ES200G Scooter Battery Powerwall
Contents
Introduction
Project lead: Amelia Meyer
This project is to use 16x salvaged OKAI ES200G scooter packs to make a powerwall for my house.
Goals
- Home Assistant / ESPHome integration:
- Time of day charge/discharge for wholesale power pricing?
- Safety, status, and alerts
- Monitoring:
- All pack parameters from the BMSen, based on the OKAI-Battery-Lib project and the ES200G-Decoder-Analysis project
- All input power parameters from 2x DPS-1200-I2C breakout boards for HP DPS-1200 modular power supplies
- Control:
- Input power/charging on/off
- Individual pack wake/sleep state and maybe external isolation of charge/discharge connections
- Output inverter on/off
- Enclosure cooling
TODO
Software
- ESPHome integration
Electrical
- Custom PCB:
- Controller (probably D1 Mini/ESP8266)
- UART muxes (4x TI SN74CBTLV3251DR 8:1 mux)
- Inverter on one OE pin so a 4-bit address switches between the low 8 and the high 8 fluidly
- LTV-846S optoisolators for incoming/outgoing UART signals, since the packs use different 0VDC references for the discharge (where the UART is) and the charge (where the 5Vsb from the input PSUs will be) because of course they do.
- MCP23017 I/O expander(s) as needed for:
- 16x Pack "Signal" yellow wires
- Enclosure control relays
- 16x WS2812B LEDs, one each pack for immediate local status info
Addresses
Item | Address Start | Address End |
---|---|---|
MCP23017 | 0x20 | 0x27 |
DPS-1200 PIC16F886 | 0x58 |
0x5F |
DPS-1200 EEPROM | 0x50 | 0x57 |
D1 Mini Pins
Pin | Usage |
---|---|
RST | |
A0 | |
D0 | ADDR 0 Muxes |
D5 | ADDR 1 Muxes |
D6 | ADDR 2 Muxes |
D7 | ADDR 3 Muxes (OE, with upper bank inverted) |
D8 | WS2812B Data |
3V3 | |
TX | Muxes to packs |
RX |
Muxes from packs |
D1 | SCL |
D2 | SDA |
D3 | INT A MCP23017 for Packs 0-7 Signal, configured as I/O change interrupt, open-drain (MUST be HIGH on boot, or ESP will fail to boot) |
D4 | INT B MCP23017 for Packs 8-F Signal, configured as I/O change interrupt, open-drain (MUST be HIGH on boot, or ESP will fail to boot, also builtin LED) |
G | 0VDC reference to DPS-1200s |
5V | 5Vsb from DPS-1200s |
MCP23017 Chips
0x20
Pin | Port | Dir | Usage |
---|---|---|---|
1 | A | OUT | DPS1200 (A) Ron |
2 | A | OUT | DPS1200 (B) Ron |
3 | A | OUT | R1 DISCHARGE contactor |
4 | A | OUT | R2 Enclosure fan |
5 | A | OUT | R3 |
6 | A | OUT | R4 |
7 | A | ||
8 | A | ||
9 | B | ||
10 | B | ||
11 | B | ||
12 | B | ||
13 | B | ||
14 | B | ||
15 | B | ||
16 | B |
0x21
Pin | Port | Dir | Usage |
---|---|---|---|
1 | A | IN | Yellow Signal wire, Pack 0 |
2 | A | IN | Yellow Signal wire, Pack 1 |
3 | A | IN | Yellow Signal wire, Pack 2 |
4 | A | IN | Yellow Signal wire, Pack 3 |
5 | A | IN | Yellow Signal wire, Pack 4 |
6 | A | IN | Yellow Signal wire, Pack 5 |
7 | A | IN | Yellow Signal wire, Pack 6 |
8 | A | IN | Yellow Signal wire, Pack 7 |
9 | B | IN | Yellow Signal wire, Pack 8 |
10 | B | IN | Yellow Signal wire, Pack 9 |
11 | B | IN | Yellow Signal wire, Pack A |
12 | B | IN | Yellow Signal wire, Pack B |
13 | B | IN | Yellow Signal wire, Pack C |
14 | B | IN | Yellow Signal wire, Pack D |
15 | B | IN | Yellow Signal wire, Pack E |
16 | B | IN | Yellow Signal wire, Pack F |
Mechanical
- Figure out enclosure
- Pack mounting hardware
- PSU bays (because it would be neat to actually use these as modular as designed)
- Charger/inverter/controller/etc. mounting
- Thermal cooling needs
ES200G Pack Reverse-Engineering
Headers
P1:
/WP
on Winbond W25Q16JVSSIQVSS
Pin 7/NRST
on the STM32L071CBT6 (Reset)Pin 37/PA14/SWCLK
on the STM32L071CBT6 (Serial Wire Debug)Pin 34/PA13/SWDIO
on the STM32L071CBT6 (Serial Wire Debug)
Firmware
NOTE that the STM32 firmware image (and the disassembly) will be copyright Ruipu Technology Co. LTD. (who made the pack and BMS board).
Option byte RDPROT does appear to be set to 0xBB, which means Level 1 readout protection.