ESP-flatcharge - ESP32 based type2 flatpack/r48xx based OBC controller

Development and discussion of fast charging systems eg Chademo , CCS etc
Post Reply
skr
Posts: 76
Joined: Wed Jun 01, 2022 7:11 pm
Has thanked: 17 times
Been thanked: 31 times

ESP-flatcharge - ESP32 based type2 flatpack/r48xx based OBC controller

Post by skr »

Hi all,

I opted to go the poor route to add more charging power to my Vectrix VX1, and according to this viewtopic.php?p=80926&hilit=flatpack#p80926 thread I need isolated CAN bus, so I drew this. I want to control 3x Flatpack 2 (Non HE) in series. Got them from ebay about 66€ a piece. This should work with Huawei R4850 and R4875 based power supplies and maybe comes useful as a generic multi CAN board. Hope this is useful for anyone here. GIT: https://github.com/skrubis/esp-flatcharge
image.png
image.png
Main features:
ESP32-S3 module
6~28V to 5V dcdc (there's TVS in front of it for 12 or 15V, so uprate if necessary).
5V to 3v3 dcdc
Isolated TWAI CAN
3x Isolated MCP2515 SPI bus CAN
Isolated Ignition input
CC PP for type2 - PWM input, resistance switching for state setting for EVSE
I hope no fundamental errors on my part, so do your own due diligence, will update when have a prototype up and running.
Probably should have included HV voltage monitoring and isolation monitoring, but did not want to add extra complexity, so in big scheme of things this is sketchy to say the least.
Attached is also a fork/simplified flatpack connector PCB, remade to be smaller/shorter, XT90 only, screw terminal AC in, phoenix pluggable for CAN. 4 layers as funnily enough 4 layers is cheaper on JLC than 2 layers with 2Oz copper.
Attachments
pcb.zip
eltek flatpack connector pcb, 4 layers, xt90, screw terminal, phoenix conn for CAN
(3.9 MiB) Downloaded 46 times
skr
Posts: 76
Joined: Wed Jun 01, 2022 7:11 pm
Has thanked: 17 times
Been thanked: 31 times

Re: ESP-flatcharge - ESP32 based type2 flatpack/r48xx based OBC controller

Post by skr »

Assembled the first 3 boards, hopefully will get to program and test them next month.
Untitled.jpg
skr
Posts: 76
Joined: Wed Jun 01, 2022 7:11 pm
Has thanked: 17 times
Been thanked: 31 times

Re: ESP-flatcharge - ESP32 based type2 flatpack/r48xx based OBC controller

Post by skr »

Thought I should post an update:
I had stupidly routed the int for MCP2515 through gpio expander, so had to jump them directly to esp32 pins.
Works pretty good so far, pulling up to 6.1kW from 3x 2kW flatpacks in series. Has some logic from my VX1 BMS messages, and some work towards reading msgs from GREE LTO bus packs. Some logic for Type2 AC PP CP, but not yet fully implemented and tested.

Can charge blind (manual) or based on bms messages, monitors faults, etc. What I have not yet fully figured out is for my 36S pack at very low SoC I have no way to charge at currents lower that full power if my AC plug doesn't like that, otherwise there are now presets for various AC situations (3P 16A, 1P xxA etc). Git for FW is here: https://github.com/skrubis/esp-flatcharge-fw
Untitled.jpg
Untitled.jpg
Untitled.jpg
Untitled.jpg
User avatar
johu
Site Admin
Posts: 6969
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 455 times
Been thanked: 1771 times
Contact:

Re: ESP-flatcharge - ESP32 based type2 flatpack/r48xx based OBC controller

Post by johu »

viewtopic.php?p=44002#p44002

Sounds like you're running into this
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
skr
Posts: 76
Joined: Wed Jun 01, 2022 7:11 pm
Has thanked: 17 times
Been thanked: 31 times

Re: ESP-flatcharge - ESP32 based type2 flatpack/r48xx based OBC controller

Post by skr »

johu wrote: Sat Sep 13, 2025 10:07 pm viewtopic.php?p=44002#p44002

Sounds like you're running into this
Below 48V I am controlling current by setting the voltage setpoint a hair above pack and controlling current that way with a PI loop, had to play around with numbers, but now works super reliably. What I have not yet tested and what most likely doesn't work is when the pack is fully depleted, say each cell is at 3.3V - at 12S that's a bit below 40V, so the gap between 40 and 43V has to be done full throttle, so if a lousy wal plug is all I have accessible I have to never run the battery below some 3.6V per cell. If proper 3P plug is available - no problems.
User avatar
johu
Site Admin
Posts: 6969
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 455 times
Been thanked: 1771 times
Contact:

Re: ESP-flatcharge - ESP32 based type2 flatpack/r48xx based OBC controller

Post by johu »

oh yes, very much the same here
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Post Reply