Safeguard marine engines with proactive oil-pressure monitoring that’s loud, logged, and automation-ready. This tutorial demonstrates an ESP32 + INA219 method that taps the existing analog sender at its “G/GAUGE” terminal, samples voltage over I²C, and publishes via ESPHome to Home Assistant. A quick two-point calibration (key-on/engine-off and normal running) converts volts to bar for live gauges, history, and low-pressure alarms (siren/horn/TTS/push). Built for resistive gauge-type senders (not binary switches) and tight installs—no extra sender or T-fitting required.
*What you’ll learn*
✅ Hardware: Wire an INA219 to an ESP32 (3V3, GND, SCL=GPIO22, SDA=GPIO21) and connect VIN+ to the oil sender “Gauge” terminal (shared with your analog gauge using a spade splitter).
✅ ESPHome setup: Add I²C + INA219 YAML, flash OTA, and stream “oil sender voltage” to Home Assistant.
✅ Calibrate once: Take two real points (engine off & engine running), then create a template sensor (voltage → bar) so you always see true pressure.
✅ Dashboard & alerts: Build a 0–5 bar gauge, set color bands, and add low-pressure automations for siren/horn/TTS/push notifications.
*Quick wiring & setup tips*
🔧 INA219 → ESP32: VCC→3.3V, GND→GND, SCL→GPIO22, SDA→GPIO21.
🔧 Sender tap: INA219 VIN+ to sender “G/GAUGE”; share with analog gauge using a double spade. VIN− not used for this tap method.
🔧 Keep it tidy: Use a small junction box, Dupont leads, and a breakout board for strain relief.
🔧 Safety: If voltage drops below your “engine-on idle” baseline, treat as LOW pressure and alert immediately.
*Use cases*
✅ Safety: Loud siren/horn + lights when pressure falls.
✅ Insight: Historical trends for engine-health checks.
✅ Simplicity: No extra sender or T-fittings if space is tight.
*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-S3https://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-30pinshttps://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/n9oc7https://geni.us/a3xe🎁 AliExpress: Select 83x81x56mm
https://s.click.aliexpress.com/e/_DBOgxxVIf 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/smartboatinnovationsSome 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
3:09 Sa Calobra
3:18 ESP32 and INA219 Overview
4:21 Soldering INA219 pins
6:11 Wiring up INA219 and ESP32
8:45 Wiring Diagram
9:29 Connect Oil Sender
10:37 Add to Home Assistant
15:10 Sensor Configuration
22:20 Outro
*Keywords*
ESPHome oil pressure, INA219 oil pressure, ESP32 INA219, Home Assistant engine monitoring, boat engine oil pressure sensor, marine ESPHome, oil sender gauge terminal, I²C GPIO21 GPIO22, ESPHome template sensor, low oil pressure alarm, boat safety automations, DIY marine electronics, SmartBoat Innovations, Raspberry Pi Home Assistant, engine pressure bar gauge
*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.