27597bceab17538b71920c5c5c511d8e34211457
arduino_gauge_controller
A dedicated gauge controller for Arduinos.
Overview
This repository contains:
Gaugecontroller/Gaugecontroller.ino: the Arduino Mega firmware for the stepper gauges, LEDs, and integrated HV5812-based VFDgauge.py: the ESP32 / MicroPython MQTT bridge that exposes the controller to Home Assistant
VFD Support
The integrated gauge controller now includes a 4-digit VFD with:
- 4 alphanumeric digits
- decimal point indicator
- alarm bell indicator
On the merged Arduino firmware, the HV5812 control pins are:
D46->DATAD47->CLOCKD48->STROBED49->BLANK/OE
The standalone VFD sketch used D51/D52/D53/D49, but 51/52/53 conflict with the gauge stepper pins in the integrated controller.
Arduino Serial Commands
The merged Arduino firmware accepts:
VFDclears the display and turns off decimal point and alarm bellVFD 1234VFD 0123VFD DEADVFD 8888.VFD BEEF!VFD 12AF.!
Rules:
- up to 4 characters are displayed
- valid characters are
0-9,A-F, and- .enables the decimal point!enables the alarm bell- shorter values are right-aligned
- leading zeroes are preserved if they are part of the input
Home Assistant Entities
The MQTT bridge publishes Home Assistant discovery entities for the VFD:
VFD Displaytext entity for the displayed valueVFD Decimal Pointswitch entityVFD Alarmswitch entity
The display is intentionally exposed as a text entity rather than a numeric entity so that:
- leading zeroes are preserved
- hexadecimal values like
DEADorBEEFwork - clearing the display is possible with an empty value
MQTT Topics
Using the configured mqtt_prefix from config.json, the VFD topics are:
<prefix>/vfd/set<prefix>/vfd/state<prefix>/vfd/decimal_point/set<prefix>/vfd/decimal_point/state<prefix>/vfd/alarm/set<prefix>/vfd/alarm/state
Example with the default prefix gauges:
gauges/vfd/setgauges/vfd/decimal_point/setgauges/vfd/alarm/set
Example payloads:
- publish
0123togauges/vfd/set - publish
ONtogauges/vfd/decimal_point/set - publish
OFFtogauges/vfd/alarm/set
The MQTT bridge then converts that into the correct Arduino serial command such as VFD 0123..
Languages
Python
58.1%
C++
41.9%