Resistor divider added to wiring.md

This commit is contained in:
2026-04-21 01:03:51 +02:00
parent 9912fe82cc
commit 9e7311fb7d

View File

@@ -51,7 +51,7 @@ Power:
Serial bridge to ESP32:
- `Mega RX1` pin `19` <- `ESP32 TX` GPIO `17`
- `Mega TX1` pin `18` -> `ESP32 RX` GPIO `16`
- `Mega TX1` pin `18` -> voltage divider -> `ESP32 RX` GPIO `16`
- `Mega GND` <-> `ESP32 GND`
This matches the current code:
@@ -59,6 +59,16 @@ This matches the current code:
- Arduino uses `Serial1` in [Gaugecontroller.ino](/home/adebaumann/development/arduino_gauge_controller/Gaugecontroller/Gaugecontroller.ino:12)
- ESP32 uses `UART(1, tx=17, rx=16)` in [gauge.py](/home/adebaumann/development/arduino_gauge_controller/gauge.py:149)
Because the Mega transmits `5V` logic and the ESP32 expects `3.3V` logic on RX, add a resistor divider on the `Mega TX1 -> ESP32 RX` line.
Suggested simple divider:
- `Mega TX1` -> `1 kOhm` resistor -> divider node
- divider node -> `2 kOhm` resistor -> `GND`
- divider node -> `ESP32 GPIO16 (RX)`
That scales the Mega's `5V` TX signal to roughly `3.3V` for the ESP32 RX input.
## VFD Control: Mega -> HV5812P
These are the integrated pin assignments used by the merged controller:
@@ -206,9 +216,15 @@ ESP32 power:
### Mega to ESP32
- `Mega 19 (RX1)` <- `ESP32 GPIO17 (TX)`
- `Mega 18 (TX1)` -> `ESP32 GPIO16 (RX)`
- `Mega 18 (TX1)` -> resistor divider -> `ESP32 GPIO16 (RX)`
- `Mega GND` <-> `ESP32 GND`
Resistor divider on `Mega TX1`:
- `Mega TX1` -> `1 kOhm` -> divider node
- divider node -> `ESP32 GPIO16`
- divider node -> `2 kOhm` -> `GND`
### Mega to HV5812
- `D46` -> `DIN`
@@ -257,11 +273,3 @@ This document does not define:
- the exact VFD filament supply voltage/current
- the exact motor driver board power pins, because that depends on the driver hardware you are using
- the physical PDIP package pin numbers of the HV5812P
If you want, the next useful step is a second document with a literal bench-build checklist:
- `wire 1 from Mega D46 to HV5812 pin ...`
- `wire 2 from Mega D47 to HV5812 pin ...`
- `wire 3 from ESP32 GPIO17 to Mega pin 19`
That would be the most practical format for cleaning up the desk wiring.