Archive stale documentation
This commit is contained in:
@@ -0,0 +1,663 @@
|
||||
# Wiring
|
||||
|
||||
This document contains older wiring notes and may include legacy Pico/UART dashboard assumptions.
|
||||
|
||||
Current dashboard and hardware source of truth:
|
||||
|
||||
- `docs/HARDWARE.md`
|
||||
- `docs/dashboard-esp32s3.md`
|
||||
|
||||
Do not use Pico-specific wiring in this file for the current dashboard build.
|
||||
|
||||
Current planned system uses:
|
||||
|
||||
- Cargo ESP32 2-relay controller board
|
||||
- Waveshare ESP32-S3-Touch-LCD-5 dashboard over WiFi/HTTP
|
||||
- ACC switched 12V fused dashboard power into Waveshare VIN
|
||||
- DS18B20 temperature sensors
|
||||
- JBD/Xiaoxiang BMS over BLE
|
||||
- External fused automotive relays or contactors for major loads
|
||||
|
||||
---
|
||||
|
||||
## Current ESP32 Relay Board
|
||||
|
||||
Board markings:
|
||||
|
||||
ESP32_Relay_X2
|
||||
|
||||
Relay contact terminals:
|
||||
|
||||
NO1 COM1 NC1 NO2 COM2 NC2
|
||||
|
||||
Power terminal:
|
||||
|
||||
VCC GND 5V
|
||||
|
||||
UART/programming header:
|
||||
|
||||
IO0 GND GND RX TX 5V
|
||||
|
||||
Firmware relay mapping:
|
||||
|
||||
relay_1 = GPIO16
|
||||
relay_2 = GPIO17
|
||||
|
||||
---
|
||||
|
||||
## System Power Overview
|
||||
|
||||
Plain text diagram:
|
||||
|
||||
House Battery +
|
||||
|
|
||||
+---- Main fuse / distribution
|
||||
|
|
||||
+---- 2A fuse --------------------> ESP32 relay board VCC
|
||||
|
|
||||
+---- 1A or 2A fuse --------------> CAT5 blue pair to dash +12V
|
||||
|
|
||||
+---- Load fuse ------------------> Automotive relay #1 pin 30
|
||||
|
|
||||
+---- Load fuse ------------------> Automotive relay #2 pin 30
|
||||
|
||||
House Battery -
|
||||
|
|
||||
+---------------------------------> Common ground bus
|
||||
|
|
||||
+--> ESP32 relay board GND
|
||||
+--> CAT5 green pair to dash GND
|
||||
+--> Automotive relay coil grounds
|
||||
+--> Load grounds
|
||||
|
||||
Notes:
|
||||
|
||||
- Fuse every positive feed.
|
||||
- Keep all grounds common.
|
||||
- Do not run high-current loads directly through the ESP32 relay board.
|
||||
- Use the ESP32 relay board to trigger automotive relays.
|
||||
|
||||
---
|
||||
|
||||
## ESP32 Board Power
|
||||
|
||||
Use the bottom-right power terminal:
|
||||
|
||||
VCC GND 5V
|
||||
|
||||
Recommended wiring:
|
||||
|
||||
House battery +
|
||||
|
|
||||
+-- 2A fuse
|
||||
|
|
||||
+---> ESP32 VCC
|
||||
|
||||
House battery -
|
||||
|
|
||||
+---> ESP32 GND
|
||||
|
||||
Leave the ESP32 board 5V terminal unused unless verified for your exact board/power setup.
|
||||
|
||||
---
|
||||
|
||||
## Pico Dashboard Power Over CAT5
|
||||
|
||||
The dash Pico should be powered from a buck converter inside the dash enclosure.
|
||||
|
||||
Rear compartment:
|
||||
|
||||
House battery +
|
||||
|
|
||||
+-- 1A or 2A fuse
|
||||
|
|
||||
+---> CAT5 blue/white + blue conductors
|
||||
|
||||
House battery -
|
||||
|
|
||||
+---> CAT5 green/white + green conductors
|
||||
|
||||
Dash enclosure:
|
||||
|
||||
CAT5 blue pair +12V
|
||||
|
|
||||
+---> Buck converter IN+
|
||||
|
||||
CAT5 green pair GND
|
||||
|
|
||||
+---> Buck converter IN-
|
||||
|
||||
Buck converter OUT+ 5V
|
||||
|
|
||||
+---> Pico VSYS
|
||||
|
||||
Buck converter OUT- GND
|
||||
|
|
||||
+---> Pico GND
|
||||
|
||||
Important:
|
||||
|
||||
- Do not connect 5V to Pico 3V3.
|
||||
- Use Pico VSYS for 5V input.
|
||||
- Keep ESP32 GND and Pico GND connected through the CAT5 ground pair.
|
||||
|
||||
---
|
||||
|
||||
## CAT5 / CAT6 Cable Plan
|
||||
|
||||
Recommended CAT5/CAT6 wiring between the rear ESP32 controller and dash Pico:
|
||||
|
||||
Orange/White ESP32 TX ---> Pico GP1 RX
|
||||
Orange ESP32 RX <--- Pico GP0 TX
|
||||
|
||||
Green/White Ground
|
||||
Green Ground
|
||||
|
||||
Blue/White +12V fused dash feed
|
||||
Blue +12V fused dash feed
|
||||
|
||||
Brown/White Spare
|
||||
Brown Spare
|
||||
|
||||
Notes:
|
||||
|
||||
- Use two conductors for +12V.
|
||||
- Use two conductors for ground.
|
||||
- UART requires shared ground.
|
||||
- Brown pair is reserved for future expansion.
|
||||
|
||||
---
|
||||
|
||||
## Pico 2 W UART Pins
|
||||
|
||||
Recommended Pico UART pins:
|
||||
|
||||
Pico GP0 = UART0 TX
|
||||
Pico GP1 = UART0 RX
|
||||
|
||||
Connection:
|
||||
|
||||
ESP32 TX ---> Pico GP1 RX
|
||||
ESP32 RX <--- Pico GP0 TX
|
||||
ESP32 GND ---> Pico GND
|
||||
|
||||
Do not connect ESP32 5V to Pico unless intentionally using it as a power source.
|
||||
|
||||
Current plan is to power Pico from local dash buck converter instead.
|
||||
|
||||
---
|
||||
|
||||
## ESP32 UART Header
|
||||
|
||||
The ESP32 relay board exposes a 6-pin header:
|
||||
|
||||
IO0 GND GND RX TX 5V
|
||||
|
||||
Use:
|
||||
|
||||
TX ---> Pico GP1 RX
|
||||
RX <--- Pico GP0 TX
|
||||
GND ---> Pico GND
|
||||
|
||||
Do not use IO0 for dashboard wiring.
|
||||
|
||||
Do not use 5V for dashboard power in the current design.
|
||||
|
||||
---
|
||||
|
||||
## DS18B20 Temperature Sensor Bus
|
||||
|
||||
Recommended ESP32 GPIO:
|
||||
|
||||
GPIO4
|
||||
|
||||
All DS18B20 sensors share one 1-Wire data bus.
|
||||
|
||||
Plain text diagram:
|
||||
|
||||
ESP32 3.3V
|
||||
|
|
||||
+---- 4.7k pull-up resistor
|
||||
|
|
||||
ESP32 GPIO4 --------------------+---- DS18B20 Sensor 1 data
|
||||
|
|
||||
+---- DS18B20 Sensor 2 data
|
||||
|
|
||||
+---- DS18B20 Sensor 3 data
|
||||
|
|
||||
+---- DS18B20 Sensor 4 data
|
||||
|
|
||||
+---- Additional sensors up to temp_8
|
||||
|
||||
ESP32 3.3V -------------------------- DS18B20 red wires
|
||||
ESP32 GND -------------------------- DS18B20 black wires
|
||||
ESP32 GPIO4 ------------------------- DS18B20 data wires
|
||||
|
||||
Typical waterproof DS18B20 wiring:
|
||||
|
||||
Red = 3.3V
|
||||
Black = GND
|
||||
Yellow = Data
|
||||
|
||||
Important:
|
||||
|
||||
- A 4.7k resistor is required between 3.3V and data.
|
||||
- One pull-up resistor is used for the whole bus.
|
||||
- Do not use one resistor per sensor.
|
||||
- Long leads may need clean splices and good grounding.
|
||||
|
||||
---
|
||||
|
||||
## BMS Connection
|
||||
|
||||
The JBD/Xiaoxiang BMS is wireless.
|
||||
|
||||
Connection:
|
||||
|
||||
ESP32 <---- BLE ----> JBD/Xiaoxiang BMS
|
||||
|
||||
No physical BMS data wiring is currently required.
|
||||
|
||||
The BMS Bluetooth address is stored in controller configuration.
|
||||
|
||||
---
|
||||
|
||||
## Relay Control Strategy
|
||||
|
||||
The onboard ESP32 relays should trigger automotive relays.
|
||||
|
||||
They should not directly power large vehicle loads.
|
||||
|
||||
Recommended pattern:
|
||||
|
||||
ESP32 onboard relay
|
||||
|
|
||||
+-- switches automotive relay coil
|
||||
|
|
||||
+-- automotive relay switches load power
|
||||
|
||||
This keeps high current off the ESP32 board.
|
||||
|
||||
---
|
||||
|
||||
## Relay 1 Automotive Relay Wiring
|
||||
|
||||
Example installation-specific name:
|
||||
|
||||
relay_1 = Starlink
|
||||
|
||||
ESP32 board contact terminals:
|
||||
|
||||
COM1
|
||||
NO1
|
||||
|
||||
Automotive relay wiring:
|
||||
|
||||
House battery +
|
||||
|
|
||||
+-- load fuse
|
||||
|
|
||||
+---> Automotive relay pin 30
|
||||
|
||||
Automotive relay pin 87
|
||||
|
|
||||
+---> Load positive
|
||||
|
||||
Load negative
|
||||
|
|
||||
+---> Ground bus
|
||||
|
||||
Automotive relay pin 85
|
||||
|
|
||||
+---> Ground bus
|
||||
|
||||
Automotive relay pin 86
|
||||
|
|
||||
+---> Switched positive from ESP32 relay COM1/NO1 circuit
|
||||
|
||||
ESP32 relay contact wiring concept:
|
||||
|
||||
Fused low-current +12V
|
||||
|
|
||||
+---> ESP32 relay COM1
|
||||
|
||||
ESP32 relay NO1
|
||||
|
|
||||
+---> Automotive relay pin 86
|
||||
|
||||
When relay_1 turns on, COM1 connects to NO1 and energizes the automotive relay coil.
|
||||
|
||||
---
|
||||
|
||||
## Relay 2 Automotive Relay Wiring
|
||||
|
||||
Example installation-specific name:
|
||||
|
||||
relay_2 = Fridge
|
||||
|
||||
ESP32 board contact terminals:
|
||||
|
||||
COM2
|
||||
NO2
|
||||
|
||||
Automotive relay wiring:
|
||||
|
||||
House battery +
|
||||
|
|
||||
+-- load fuse
|
||||
|
|
||||
+---> Automotive relay pin 30
|
||||
|
||||
Automotive relay pin 87
|
||||
|
|
||||
+---> Load positive
|
||||
|
||||
Load negative
|
||||
|
|
||||
+---> Ground bus
|
||||
|
||||
Automotive relay pin 85
|
||||
|
|
||||
+---> Ground bus
|
||||
|
||||
Automotive relay pin 86
|
||||
|
|
||||
+---> Switched positive from ESP32 relay COM2/NO2 circuit
|
||||
|
||||
ESP32 relay contact wiring concept:
|
||||
|
||||
Fused low-current +12V
|
||||
|
|
||||
+---> ESP32 relay COM2
|
||||
|
||||
ESP32 relay NO2
|
||||
|
|
||||
+---> Automotive relay pin 86
|
||||
|
||||
When relay_2 turns on, COM2 connects to NO2 and energizes the automotive relay coil.
|
||||
|
||||
---
|
||||
|
||||
## Automotive Relay Pin Reference
|
||||
|
||||
Common Bosch-style relay pins:
|
||||
|
||||
30 = Common load power input
|
||||
87 = Normally open load output
|
||||
87a = Normally closed output, if present
|
||||
85 = Coil side
|
||||
86 = Coil side
|
||||
|
||||
Recommended use:
|
||||
|
||||
30 = fused battery positive
|
||||
87 = load positive
|
||||
85 = ground
|
||||
86 = switched positive from ESP32 relay board
|
||||
|
||||
---
|
||||
|
||||
## Future Reserved Inputs
|
||||
|
||||
Do not wire these yet unless firmware support has been added.
|
||||
|
||||
Recommended reservations:
|
||||
|
||||
GPIO34 = Ignition sense input
|
||||
GPIO35 = House battery voltage sense input
|
||||
|
||||
Reason:
|
||||
|
||||
- GPIO34 and GPIO35 are input-only.
|
||||
- Input-only pins are appropriate for sensing.
|
||||
- They are not appropriate for relay outputs.
|
||||
|
||||
Important:
|
||||
|
||||
Never connect vehicle 12V directly to an ESP32 GPIO.
|
||||
|
||||
Use a voltage divider or proper interface circuit.
|
||||
|
||||
---
|
||||
|
||||
## Current Version 1 Wiring Summary
|
||||
|
||||
Current required physical wiring:
|
||||
|
||||
ESP32 board VCC/GND from fused house battery power
|
||||
|
||||
ESP32 TX/RX/GND to Pico over CAT5
|
||||
|
||||
12V fused dash feed and ground to Pico dash enclosure over CAT5
|
||||
|
||||
Dash buck converter 12V to 5V
|
||||
|
||||
Buck 5V to Pico VSYS
|
||||
|
||||
ESP32 GPIO4 to DS18B20 1-Wire bus
|
||||
|
||||
4.7k pull-up from GPIO4 data bus to 3.3V
|
||||
|
||||
ESP32 relay COM/NO contacts to automotive relay coils
|
||||
|
||||
Automotive relays to actual high-current loads
|
||||
|
||||
ESP32 BLE to JBD/Xiaoxiang BMS
|
||||
|
||||
---
|
||||
|
||||
## Safety Notes
|
||||
|
||||
- Fuse every positive feed.
|
||||
- Use proper wire gauge for each load.
|
||||
- Keep high-current wiring separate from signal wiring where possible.
|
||||
- Use common ground between ESP32, Pico, buck converter, relays, sensors, and battery.
|
||||
- Do not connect 12V directly to any ESP32 or Pico GPIO.
|
||||
- Do not power high-current loads directly through the ESP32 relay board.
|
||||
- Test relay behavior with a multimeter before connecting expensive loads.
|
||||
|
||||
---
|
||||
|
||||
## Dash Power Revision
|
||||
|
||||
The current preferred dashboard power plan is to send fused 12V over the CAT5/CAT6 run and regulate it in the dash enclosure.
|
||||
|
||||
Rear compartment:
|
||||
|
||||
House battery +
|
||||
|
|
||||
+-- 1A or 2A fuse
|
||||
|
|
||||
+---> CAT5/CAT6 blue pair
|
||||
|
||||
House battery -
|
||||
|
|
||||
+---> CAT5/CAT6 green pair
|
||||
|
||||
Dash enclosure:
|
||||
|
||||
CAT5/CAT6 blue pair
|
||||
|
|
||||
+---> Buck converter IN+
|
||||
|
||||
CAT5/CAT6 green pair
|
||||
|
|
||||
+---> Buck converter IN-
|
||||
|
||||
Buck converter OUT+ 5V
|
||||
|
|
||||
+---> Pico VSYS
|
||||
|
||||
Buck converter OUT- GND
|
||||
|
|
||||
+---> Pico GND
|
||||
|
||||
Reason:
|
||||
|
||||
- Less voltage drop concern than sending 5V over the full cable run
|
||||
- Clean local 5V regulation at the dashboard
|
||||
- Pico/display power stays independent from the ESP32 board regulator
|
||||
|
||||
Important:
|
||||
|
||||
- Do not connect 12V directly to Pico.
|
||||
- Do not connect 5V to Pico 3V3.
|
||||
- Use Pico VSYS for 5V input.
|
||||
|
||||
---
|
||||
|
||||
## CAT5/CAT6 Updated Plan
|
||||
|
||||
Recommended cable assignment:
|
||||
|
||||
Orange/White ESP32 TX ---> Pico GP1 RX
|
||||
Orange ESP32 RX <--- Pico GP0 TX
|
||||
|
||||
Green/White Ground
|
||||
Green Ground
|
||||
|
||||
Blue/White +12V fused dash feed
|
||||
Blue +12V fused dash feed
|
||||
|
||||
Brown/White Spare
|
||||
Brown Spare
|
||||
|
||||
Notes:
|
||||
|
||||
- Blue pair carries fused 12V to the dash buck converter.
|
||||
- Green pair carries ground.
|
||||
- Orange pair carries UART.
|
||||
- Brown pair remains spare.
|
||||
|
||||
---
|
||||
|
||||
## Compact Enclosure Direction
|
||||
|
||||
Current rear enclosure target:
|
||||
|
||||
ESP32 relay board
|
||||
compact fuse block
|
||||
ground bus
|
||||
CAT6 keystone
|
||||
wiring exits
|
||||
|
||||
Because the Starlink Mini and typical 12V fridge are modest loads, the onboard relays may be acceptable for the initial build if properly fused.
|
||||
|
||||
Suggested fuse allocation:
|
||||
|
||||
ESP32 controller 2A
|
||||
Pico dashboard 1A or 2A
|
||||
Starlink Mini 7.5A
|
||||
Fridge 10A
|
||||
Spare optional
|
||||
Spare optional
|
||||
|
||||
External automotive relays remain a good upgrade path for higher-current loads.
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Current Relay Switching Decision
|
||||
|
||||
For the current Starlink Mini and fridge use case, the built-in ESP32 relay board relays are the planned switching method.
|
||||
|
||||
Use positive-side switching:
|
||||
|
||||
Battery +
|
||||
|
|
||||
Fuse
|
||||
|
|
||||
Relay COM
|
||||
|
|
||||
Relay NO
|
||||
|
|
||||
Load +
|
||||
|
||||
Load -
|
||||
|
|
||||
Ground bus
|
||||
|
||||
External automotive relays are reserved for future higher-current loads.
|
||||
|
||||
## DS18B20 Final Install Direction
|
||||
|
||||
Temporary Wago wiring proved one probe, but final install should use a proper terminal/distribution board.
|
||||
|
||||
Recommended:
|
||||
|
||||
3.3V bus
|
||||
DATA bus
|
||||
GND bus
|
||||
|
||||
With:
|
||||
|
||||
4.7k resistor between DATA and 3.3V
|
||||
|
||||
Only three wires need to return to the ESP32:
|
||||
|
||||
3.3V
|
||||
GPIO4
|
||||
GND
|
||||
|
||||
---
|
||||
|
||||
## Pico Dashboard Wiring
|
||||
|
||||
The Pico dashboard should be powered from a local 12V-to-5V buck converter in the dash enclosure.
|
||||
|
||||
Rear enclosure sends fused 12V over CAT5e.
|
||||
|
||||
Dash side:
|
||||
|
||||
CAT5e +12V -> buck IN+
|
||||
CAT5e GND -> buck IN-
|
||||
|
||||
buck OUT+ 5V -> Pico VSYS
|
||||
buck OUT+ 5V -> Display VCC
|
||||
|
||||
buck OUT- GND -> Pico GND
|
||||
buck OUT- GND -> Display GND
|
||||
|
||||
Display wiring:
|
||||
|
||||
SCLK -> Pico GPIO18
|
||||
MOSI -> Pico GPIO19
|
||||
LCD_CS -> Pico GPIO17
|
||||
LCD_DC -> Pico GPIO16
|
||||
LCD_RST -> Pico GPIO20
|
||||
LCD_BL -> Pico GPIO21
|
||||
|
||||
Touch wiring, reserved for future:
|
||||
|
||||
TP_SDA -> Pico GPIO26
|
||||
TP_SCL -> Pico GPIO27
|
||||
TP_INT -> Pico GPIO28
|
||||
TP_RST -> Pico GPIO15
|
||||
|
||||
UART wiring:
|
||||
|
||||
ESP32 GPIO21 TX -> Pico GPIO0 RX
|
||||
ESP32 GPIO22 RX -> Pico GPIO1 TX
|
||||
ESP32 GND -> Pico GND
|
||||
|
||||
Do not use the ESP32 6-pin UART header for the dashboard UART. It appears to be connected to RXD/TXD for UART0/programming/debug.
|
||||
|
||||
|
||||
|
||||
## Dashboard Wiring (Current Direction)
|
||||
|
||||
Dashboard Hardware:
|
||||
- Waveshare 5" ESP32-S3 Display
|
||||
|
||||
Communications:
|
||||
- WiFi connection to cargo ESP32 AP
|
||||
- HTTP API polling
|
||||
- No UART required for normal operation
|
||||
|
||||
CAT5e Usage:
|
||||
- 12V power from cargo area to dashboard
|
||||
- Local buck converter in dashboard enclosure
|
||||
- Common ground
|
||||
|
||||
Optional Future:
|
||||
- UART over CAT5e for diagnostics or alternate dashboard hardware
|
||||
Reference in New Issue
Block a user