ESP32 Based Chademo
- Bigpie
- Posts: 1757
- Joined: Wed Apr 10, 2019 8:11 pm
- Location: South Yorkshire, UK
- Has thanked: 80 times
- Been thanked: 410 times
ESP32 Based Chademo
I've been working on an ESP32 based Chademo implementation, it's pretty much a port of the SAM3X code that I was using on my DUE setup.
https://github.com/jamiejones85/ESP32-Chademo boards and software there. Will update the wiki with this option too. Can sell anyone the extra boards if you don't want to get JLCPCB to make you some up.
https://github.com/jamiejones85/ESP32-Chademo boards and software there. Will update the wiki with this option too. Can sell anyone the extra boards if you don't want to get JLCPCB to make you some up.
BMW E91 2006
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
-
- Posts: 3557
- Joined: Mon Dec 24, 2018 1:37 pm
- Location: Slovenia
- Has thanked: 133 times
- Been thanked: 331 times
- Contact:
Re: ESP32 Based Chademo
WoW thank you! I have already built the board here with idea it could work as chademo VCU too, i just wasnt able to rewrite the code yet.Bigpie wrote: ↑Sun Mar 26, 2023 3:19 pm I've been working on an ESP32 based Chademo implementation, it's pretty much a port of the SAM3X code that I was using on my DUE setup.
https://github.com/jamiejones85/ESP32-Chademo boards and software there. Will update the wiki with this option too. Can sell anyone the extra boards if you don't want to get JLCPCB to make you some up.
If you dont mind i will just ripoff your SW work and repin your code for my VCU. I can test it pronto

viewtopic.php?t=2615
Hm... you use two CAN bus. Do you think the code would work with a single CAN?
- Bigpie
- Posts: 1757
- Joined: Wed Apr 10, 2019 8:11 pm
- Location: South Yorkshire, UK
- Has thanked: 80 times
- Been thanked: 410 times
Re: ESP32 Based Chademo
Yea, just pull out the second can, I just use it for car integration
BMW E91 2006
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
-
- Posts: 3557
- Joined: Mon Dec 24, 2018 1:37 pm
- Location: Slovenia
- Has thanked: 133 times
- Been thanked: 331 times
- Contact:
Re: ESP32 Based Chademo
Thanks, I would just use a pullup pin that BMS would pulldown and stop Chademo if needed.
- uhi22
- Posts: 1085
- Joined: Mon Mar 14, 2022 3:20 pm
- Location: Ingolstadt/Germany
- Has thanked: 188 times
- Been thanked: 606 times
Re: ESP32 Based Chademo
A newbie question: What tool to use to view the schematic? Could you add a PDF of the schematic to GitHub?
Github: http://github.com/uhi22 --- Patreon: https://www.patreon.com/uhi22
- Bigpie
- Posts: 1757
- Joined: Wed Apr 10, 2019 8:11 pm
- Location: South Yorkshire, UK
- Has thanked: 80 times
- Been thanked: 410 times
Re: ESP32 Based Chademo
BMW E91 2006
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
- uhi22
- Posts: 1085
- Joined: Mon Mar 14, 2022 3:20 pm
- Location: Ingolstadt/Germany
- Has thanked: 188 times
- Been thanked: 606 times
Re: ESP32 Based Chademo
This uses the internal CAN controller of the ESP for one CAN. Does this work stable? I made bad experiences with it, and others found out that the CAN ringbuffer hardware is buggy.
Github: http://github.com/uhi22 --- Patreon: https://www.patreon.com/uhi22
- Bigpie
- Posts: 1757
- Joined: Wed Apr 10, 2019 8:11 pm
- Location: South Yorkshire, UK
- Has thanked: 80 times
- Been thanked: 410 times
Re: ESP32 Based Chademo
I'm using various ESP32's this way for multiple can interfaces, my battery MITM for example, not noticed any problems?
BMW E91 2006
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
Re: ESP32 Based Chademo
Hi, Bigpie.Bigpie wrote: ↑Sun Mar 26, 2023 3:19 pm I've been working on an ESP32 based Chademo implementation, it's pretty much a port of the SAM3X code that I was using on my DUE setup.
https://github.com/jamiejones85/ESP32-Chademo boards and software there. Will update the wiki with this option too. Can sell anyone the extra boards if you don't want to get JLCPCB to make you some up.
IMG_20230326_155533615_HDR.jpg
Please place the archive of all libraries for this project that you are using.
I can't find the correct versions of libraries for this project to compile.
I want to redesign your project with an affordable, cheap and simple INA226 current sensor (INA219), with a galvanic isolation adum1201arz near the high-voltage battery, and a short wire of about 1 meter for i2c. I will check this scheme, do in easyeda and lay out here.
Perhaps I will also add FRAM and microSD to save CAN logs.
- Bigpie
- Posts: 1757
- Joined: Wed Apr 10, 2019 8:11 pm
- Location: South Yorkshire, UK
- Has thanked: 80 times
- Been thanked: 410 times
Re: ESP32 Based Chademo
I've not got time at the moment, but here's the versions
Code: Select all
Using library ACAN_ESP32 at version 1.1.0
Using library ESPAsyncWebServer at version 1.2.3
Using library FS at version 2.0.0
Using library WiFi at version 2.0.0
Using library AsyncTCP at version 1.1.1
Using library ArduinoJson at version 6.20.1
Using library SPIFFS at version 2.0.0
Using library ACAN2515 at version 2.1.1
Using library SPI at version 2.0.0
Using library EEPROM at version 2.0.0
Using library AsyncElegantOTA at version 2.2.7
Using library Update at version 2.0.0
BMW E91 2006
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
- Bigpie
- Posts: 1757
- Joined: Wed Apr 10, 2019 8:11 pm
- Location: South Yorkshire, UK
- Has thanked: 80 times
- Been thanked: 410 times
Re: ESP32 Based Chademo
Attached a zip of them here for now.
- Attachments
-
- Archive 2.zip
- (746.17 KiB) Downloaded 649 times
-
- Archive.zip
- (9.83 MiB) Downloaded 569 times
BMW E91 2006
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
-
- Posts: 3557
- Joined: Mon Dec 24, 2018 1:37 pm
- Location: Slovenia
- Has thanked: 133 times
- Been thanked: 331 times
- Contact:
Re: ESP32 Based Chademo
Hi again i think i will try to add your code to my ESP32 version. Can you tell me if you actively use Wifi interface to setup parameters for chademo? Or what do you use Data folder for?
tnx
- Bigpie
- Posts: 1757
- Joined: Wed Apr 10, 2019 8:11 pm
- Location: South Yorkshire, UK
- Has thanked: 80 times
- Been thanked: 410 times
Re: ESP32 Based Chademo
Web interface for setting params and logging output
BMW E91 2006
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
-
- Posts: 3557
- Joined: Mon Dec 24, 2018 1:37 pm
- Location: Slovenia
- Has thanked: 133 times
- Been thanked: 331 times
- Contact:
Re: ESP32 Based Chademo
Ok thanks. It seems you only use the 16 and 17 pins for CAN1 which you use with MCP chip. I dont see any code to innitalize CAN0 here. Do you actually use 4 and 5 pins for CAN0? I see code calls out ACAN_ESP32 library?
Do you think ACAN2515 would work with CAN1 and CAN0 with Collins esp32_can library in the same ESP32? I am really more used to CAN_common library and commands as i use it with DUE...
- Bigpie
- Posts: 1757
- Joined: Wed Apr 10, 2019 8:11 pm
- Location: South Yorkshire, UK
- Has thanked: 80 times
- Been thanked: 410 times
Re: ESP32 Based Chademo
The on board can peripheral is initialised with the code below, using ACAN library for ESP32 16 and 17 for onboard can.
The SPI can with the code below, uses the ACAN2515 library.
You could use Colin's library if you prefer it
Code: Select all
ACAN_ESP32_Settings canSettings(CAN_BAUD);
canSettings.mRxPin = GPIO_NUM_16;
canSettings.mTxPin = GPIO_NUM_17;
uint16_t errorCode = ACAN_ESP32::can.begin(canSettings);
if (errorCode > 0) {
Serial.print ("Can0 Configuration error 0x") ;
Serial.println (errorCode, HEX) ;
}
Code: Select all
SPI.begin(MCP2515_SCK, MCP2515_MISO, MCP2515_MOSI, MCP2515_CS) ;
ACAN2515Settings settings2515 (MCP2515_QUARTZ_FREQUENCY, CAN_BAUD);
errorCode = can1.begin(settings2515, [] { can1.isr () ; });
if (errorCode > 0) {
Serial.print ("Can1 Configuration error 0x") ;
Serial.println (errorCode, HEX) ;
}
BMW E91 2006
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
-
- Posts: 3557
- Joined: Mon Dec 24, 2018 1:37 pm
- Location: Slovenia
- Has thanked: 133 times
- Been thanked: 331 times
- Contact:
- Bigpie
- Posts: 1757
- Joined: Wed Apr 10, 2019 8:11 pm
- Location: South Yorkshire, UK
- Has thanked: 80 times
- Been thanked: 410 times
Re: ESP32 Based Chademo
Will this do? Wasn't charging, just sat on the drive.
BMW E91 2006
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
-
- Posts: 3557
- Joined: Mon Dec 24, 2018 1:37 pm
- Location: Slovenia
- Has thanked: 133 times
- Been thanked: 331 times
- Contact:
Re: ESP32 Based Chademo
Really good thank you. Its just what i was hoping for

-
- Posts: 43
- Joined: Sun Nov 14, 2021 6:16 pm
- Has thanked: 1 time
- Been thanked: 2 times
Re: ESP32 Based Chademo
amazing work Jamie, was hoping for something like this for CCS for when i supplement the env200's rapid charging capabilities. would be great to have the kind of logging that something like this is capable of. My pet hate is a failed charge when you're not sure whether its the charger or the car at fault. recently bought a resjacan board to try to implement the export matching of ovms but on an esp32 so will be dusting off my software skills again soon.
-
- Posts: 3557
- Joined: Mon Dec 24, 2018 1:37 pm
- Location: Slovenia
- Has thanked: 133 times
- Been thanked: 331 times
- Contact:
Re: ESP32 Based Chademo
Can you let me know what is with the 1K pullup resistor on the IN2 pin? Do we need one or can we live without one?
It is important to know because i dont have opto inputs designed into my board. I use simple 10k/2k7 resistor dividers on analog pins or 10k pullups on digital input pins. As i wanted to use those inputs with relay towards GND their voltage vulnerability didnt matter much...
tnx
- Bigpie
- Posts: 1757
- Joined: Wed Apr 10, 2019 8:11 pm
- Location: South Yorkshire, UK
- Has thanked: 80 times
- Been thanked: 410 times
Re: ESP32 Based Chademo
I've started looking at CCS based on the Catphish/Uhi stuff.whereswally606 wrote: ↑Fri May 26, 2023 10:31 pm amazing work Jamie, was hoping for something like this for CCS for when i supplement the env200's rapid charging capabilities.
The EVSE will ground IN2 when ready to charge, you could do away with it, johu/zombie based chademo doesn't use IN2, but the code will need changing a littlearber333 wrote: Can you let me know what is with the 1K pullup resistor on the IN2 pin?
BMW E91 2006
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
-
- Posts: 3557
- Joined: Mon Dec 24, 2018 1:37 pm
- Location: Slovenia
- Has thanked: 133 times
- Been thanked: 331 times
- Contact:
Re: ESP32 Based Chademo
How? Is it simple changing IN2 from input to input_pullup? If that is all i am good. But if not i will simply attach IN2 to one of the analog inputs...
I still have time as i wait for chademo socket to arrive

CCS is for the future when i am not rebuilding our house at the same time

- Bigpie
- Posts: 1757
- Joined: Wed Apr 10, 2019 8:11 pm
- Location: South Yorkshire, UK
- Has thanked: 80 times
- Been thanked: 410 times
Re: ESP32 Based Chademo
In theory youd be safe without the opto and just a pullup on the digital input, I ran like that on the due for a while.
BMW E91 2006
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
ZombieVerter
GS450h
Outlander Charger DC/DC
Renault Kangoo 36kWh battery
FOCCCI CCS
Re: ESP32 Based Chademo
Trinium Mer charger today, started charge fine charged to 71% (bms Soc) and then kicked me off whilst still charging at 50a, possibly an issue with my settings I have changed them since going 96s but maybe target of 384 and maximum of 393 is too low? 384 is 4v per cell and was kicked off with cells above 3.9… the charger showed an impossible Soc of 156% to start and then actually fell to 142% when does the charger get it’s Soc from?