Analog to Digital Gauges with ESP32 and INA219

Published at : 23 Dec 2025

Add a clean digital gauge alongside your existing analog gauge—without losing what already works. In this video, we turn a standard fuel-tank sender into a digital, percentage-based readout using an ESP32 and an INA219 voltage sensor. You’ll see how to tap the sender’s gauge terminal, read voltage over I²C, convert it to % full in Home Assistant, and drop a needle gauge on your dashboard. Along the way we’ll enable alerts (siren/horn/TTS/lights/notifications), keep historical trends for fuel-use insights, and keep everything neat with a breakout board and junction box.

*What you’ll learn*
✅ Hardware path: ESP32 + INA219 wiring (3.3 V, GND, SCL=GPIO22, SDA=GPIO21) and a single lead from the sender’s gauge terminal to INA219 VIN+.
✅ ESPHome setup: Add the INA219 YAML to expose a “tank sender voltage” entity; flash OTA.
✅ Dashboard: Create a 0–100% needle gauge with color bands, then add to your engine panel.
✅ Scale up: Run multiple tanks/sensors—up to eight INA219 modules on one ESP32.
✅ Practical workflow: Read voltage in logs, set initial reference points, refine after a full fill-up for accuracy.

*Quick wiring & setup tips*
🔧 INA219 I²C: VCC → 3.3 V, GND → GND, SCL → GPIO22, SDA → GPIO21.
🔧 Sender tap: One wire from the tank sender “gauge” terminal to INA219 VIN+ (use a double spade to share with the analog gauge if needed).

*Use cases*
✅ Alerts at thresholds (siren/horn/TTS/lights/notifications).
✅ History and trends for real fuel-use patterns.
✅ Keep your analog gauge—and add a sleek digital one to your SmartBoat dashboard.

*Resources*
🔗 Overview article: https://smartboatinnovations.com/build-central-marine-computer/
🔗 Tutorial playlist: https://youtube.com/playlist?list=PLGKcAl-AeSpU7W7GXD86MF9qR1fRT1nx2

*Parts used*
✔ *ESP32 S3 Latest and Fasted Model*
🎁 Amazon:
https://geni.us/ESP32-S3
https://geni.us/ESP32-S3-B
🎁 AliExpress: Select N16R8 KIT
https://s.click.aliexpress.com/e/_DC2iYxV

✔ *ESP32 - 38 pins*
🎁 Amazon: Select 38pin model
https://geni.us/esp32-38pin
🎁 AliExpress:
https://s.click.aliexpress.com/e/_Dd47S3F

✔ *ESP32 38 pins Breakout Board*
🎁 Amazon:
https://geni.us/esp32-38pin-breakout
🎁 AliExpress:
https://s.click.aliexpress.com/e/_DdPZGFJ

✔ *ESP32 - 30 pins*
🎁 Amazon: Select 30pin model
https://geni.us/esp32-30pins
https://geni.us/esp32-30pin-kit
🎁 AliExpress: Mirco USB or USB C models
https://s.click.aliexpress.com/e/_DdFEubR

✔ *ESP32 30 pins Expansion Breakout Board*
🎁 Amazon:
https://geni.us/esp32-30pin-breakout
🎁 AliExpress:
https://s.click.aliexpress.com/e/_DFM8OV7

✔ *12v to 5v Converter*
🎁 Amazon:
https://geni.us/12v-5v-converter
🎁 AliExpress: Select the 12V to 5V 3A option
https://s.click.aliexpress.com/e/_Deuww1D

✔ *INA219 Module*
🎁 Amazon:
https://geni.us/yE8oa
🎁 AliExpress: Select soldered option or ask them
https://s.click.aliexpress.com/e/_Dd2RsTZ

✔ *INA3221 Module: Three INA219s in One Compact Module!*
🎁 AliExpress: Select soldered option or ask them
https://s.click.aliexpress.com/e/_on30cDb

✔ *Dupont breakout cables*
🎁 Amazon:
https://geni.us/Dupont-cables
🎁 AliExpress:
https://s.click.aliexpress.com/e/_DdQTOsx

✔ *Junction Box (80mm x 80mm)*
🎁 Amazon:
https://geni.us/n9oc7
https://geni.us/a3xe
🎁 AliExpress: Select 83x81x56mm
https://s.click.aliexpress.com/e/_DBOgxxV

If you'd like to support me so that I can buy extra sensors and equipment for future projects:
💖 Buy Me a Coffee: https://ko-fi.com/smartboatinnovations

Some links above are affiliate links, meaning I may earn a small commission if you make a purchase. Your support helps fund valuable content. Thank you!

*Chapters*
0:00 Introduction
2:39 My Boat
2:49 ESP32 and INA219 Overview
3:50 Soldering INA219 pins
5:41 Wiring up INA219 and ESP32
8:15 Wiring Diagram
8:55 Connect Tank Sender
9:59 Add to Home Assistant
13:44 Sensor Configuration
15:59 Add Gauge to Dashboard
17:32 Outro

*Keywords*
ESP32 fuel gauge, INA219 tank level, ESPHome INA219, HA fuel tank, analog to digital gauge, fuel sender terminal, I2C, tank level %, voltage→percent template, ESPHome template, SmartBoat Innovations, marine fuel monitoring, boat tank level, junction box wiring, ESP32 breakout board, OTA flash ESPHome, HA automations, siren/horn/TTS alerts, fuel usage history, resistance sensor, VIN+ tap INA219, HA tank dashboard, marine DIY electronics, HA YAML config, multiple INA219

*Disclaimer*
The information provided in this video is for educational and informational purposes only. SmartBoat Innovations assumes no responsibility for any damage, fire, injury, or loss resulting from the use or misuse of the information provided. Viewers are responsible for ensuring that all installations and modifications are performed safely and correctly. It is recommended to consult with a licensed professional before attempting any work on your boat's electrical systems. Use this information at your own risk.