Digital Engine Tachometer with ESP32 and Optocoupler
Автор: Smart Boat Innovations
Загружено: 2024-04-29
Просмотров: 6247
Описание:
Today, we’re building a simple, accurate digital tachometer for your engine using an ESP32 and a $2 optocoupler. The ESP32 acts as a remote hub to collect sensor data and publish it wirelessly to a Raspberry Pi running Home Assistant via ESPHome. We’ll tap the alternator’s W / stator / tacho output (or a smart regulator’s tacho pin), isolate the signal with an optocoupler, read pulses on GPIO25, then calibrate with real RPM points. You’ll end up with a clean dashboard gauge, engine hours, and an engine active binary sensor for automations.
What you’ll learn
✅ Hardware hookup: Optocoupler → alternator tacho; optocoupler → ESP32 (VCC=3.3V, OUT=GPIO25, GND=GND).
✅ ESPHome setup: Add the pulse counter sensor, flash OTA, and watch pulses per minute in logs.
✅ Calibration workflow: Temporarily set logger: debug, capture PPM at known RPMs (e.g., 0, 1000 ≈ 15200, 1200 ≈ 18200), build the calibration line, then switch logger back to info.
✅ Entities you get: RPM sensor, engine_hours (optional), and engine_active (binary).
✅ Dashboards: Create an RPM gauge (max 2400; green 800, yellow 2000, red 2200) and add it to your engine panel.
Quick wiring & setup tips
🔧 Optocoupler ↔ ESP32: Red → 3.3V (VCC), White → GPIO25 (OUT), Black → GND.
🔧 Alternator tap: Use W / stator / tacho terminal. If you have a smart regulator, use its tacho output (you may need a double spade to share with an analog gauge).
🔧 Powering ESP32: Use a 12V→5V DC-DC on the boat; USB is fine for bench testing.
🔧 Verify signal: The optocoupler LED should blink with input; confirm pulses in ESPHome logs before calibrating.
🔧 Measure true RPM: Use your analog tach, a strobe app + reflective tape, or idle spec to collect calibration points.
Use cases
✅ Safety & alerts: Notify when RPM exceeds thresholds; gate other alerts (e.g., low oil pressure) using engine_active.
✅ Insight: Engine hours tracking and historical RPM trends for fuel-use patterns.
Resources
🔗 Overview article: https://smartboatinnovations.com/buil...
🔗 Tutorial playlist: • Tutorial Path. Central Marine Computer 101.
Parts & tools 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/_DC2...
✔ ESP32 – 38 pins
🎁 Amazon: Select 38pin model
https://geni.us/esp32-38pin
🎁 AliExpress:
https://s.click.aliexpress.com/e/_Dd4...
✔ ESP32 38 pins Breakout Board
🎁 Amazon:
https://geni.us/esp32-38pin-breakout
🎁 AliExpress:
https://s.click.aliexpress.com/e/_DdP...
✔ 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/_DdF...
✔ ESP32 30 pins Expansion Breakout Board
🎁 Amazon:
https://geni.us/esp32-30pin-breakout
🎁 AliExpress:
https://s.click.aliexpress.com/e/_DFM...
✔ 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/_Deu...
✔ Optocoupler Module - select 24V version
🎁 Amazon:
https://geni.us/Optocoupler
🎁 AliExpress:
https://s.click.aliexpress.com/e/_DDT...
✔ Dupont breakout cables
🎁 Amazon:
https://geni.us/Dupont-cables
🎁 AliExpress:
https://s.click.aliexpress.com/e/_DdQ...
✔ Junction Box (80mm x 80mm)
🎁 Amazon:
https://geni.us/n9oc7
https://geni.us/a3xe
🎁 AliExpress: Select 83x81x56mm
https://s.click.aliexpress.com/e/_DBO...
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:04 My Boat
2:15 Wiring up ESP32 and Optocoupler
4:03 Add to Home Assistant
7:29 RPM Calibration
9:55 Add Gauges to Dashboard
11:26 Outro
Keywords (SEO)
ESPHome tachometer, ESP32 tachometer, Home Assistant RPM, boat alternator W terminal, optocoupler RPM sensor, pulses per minute calibration, GPIO25 ESP32, Raspberry Pi Home Assistant, engine hours ESPHome, engine active binary sensor, marine engine monitoring, DIY marine electronics, SmartBoat Innovations, logger debug ESPHome, OTA flash ESPHome, RPM gauge Home Assistant
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.
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: