Page 1 of 4
ESP32 Based Chademo
Posted: Sun Mar 26, 2023 3:19 pm
by Bigpie
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.
Re: ESP32 Based Chademo
Posted: Sun Mar 26, 2023 3:37 pm
by arber333
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.
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.
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?
Re: ESP32 Based Chademo
Posted: Sun Mar 26, 2023 3:50 pm
by Bigpie
Yea, just pull out the second can, I just use it for car integration
Re: ESP32 Based Chademo
Posted: Sun Mar 26, 2023 3:58 pm
by arber333
Bigpie wrote: ↑Sun Mar 26, 2023 3:50 pm
Yea, just pull out the second can, I just use it for car integration
Thanks, I would just use a pullup pin that BMS would pulldown and stop Chademo if needed.
Re: ESP32 Based Chademo
Posted: Mon Mar 27, 2023 11:52 am
by uhi22
A newbie question: What tool to use to view the schematic? Could you add a PDF of the schematic to GitHub?
Re: ESP32 Based Chademo
Posted: Mon Mar 27, 2023 12:05 pm
by Bigpie
Re: ESP32 Based Chademo
Posted: Mon Mar 27, 2023 12:56 pm
by uhi22
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.
Re: ESP32 Based Chademo
Posted: Mon Mar 27, 2023 1:06 pm
by Bigpie
I'm using various ESP32's this way for multiple can interfaces, my battery MITM for example, not noticed any problems?
Re: ESP32 Based Chademo
Posted: Tue Apr 18, 2023 8:27 am
by Ben
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
Hi, Bigpie.
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.
Re: ESP32 Based Chademo
Posted: Tue Apr 18, 2023 8:48 am
by Bigpie
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
Re: ESP32 Based Chademo
Posted: Tue Apr 18, 2023 8:50 am
by Ben
thank you. i will try.
Re: ESP32 Based Chademo
Posted: Tue Apr 18, 2023 8:54 am
by Bigpie
Attached a zip of them here for now.
Re: ESP32 Based Chademo
Posted: Tue May 23, 2023 5:35 pm
by arber333
Bigpie wrote: ↑Sun Mar 26, 2023 3:50 pm
Yea, just pull out the second can, I just use it for car integration
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
Re: ESP32 Based Chademo
Posted: Tue May 23, 2023 7:10 pm
by Bigpie
Web interface for setting params and logging output
Re: ESP32 Based Chademo
Posted: Tue May 23, 2023 7:46 pm
by arber333
Bigpie wrote: ↑Tue May 23, 2023 7:10 pm
Web interface for setting params and logging output
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...
Re: ESP32 Based Chademo
Posted: Tue May 23, 2023 9:13 pm
by Bigpie
The on board can peripheral is initialised with the code below, using ACAN library for ESP32 16 and 17 for onboard can.
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) ;
}
The SPI can with the code below, uses the ACAN2515 library.
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) ;
}
You could use Colin's library if you prefer it
Re: ESP32 Based Chademo
Posted: Wed May 24, 2023 7:00 am
by arber333
Bigpie wrote: ↑Tue May 23, 2023 7:10 pm
Web interface for setting params and logging output
Can you post a screenshot of your wifi charging interface? Just a teaser...

Re: ESP32 Based Chademo
Posted: Wed May 24, 2023 8:21 am
by Bigpie
Will this do? Wasn't charging, just sat on the drive.
Re: ESP32 Based Chademo
Posted: Wed May 24, 2023 9:19 am
by arber333
Bigpie wrote: ↑Wed May 24, 2023 8:21 am
ESP32-BMS.jpegScreenshot 2023-05-24 at 9.18.38 am.png Will this do? Wasn't charging, just sat on the drive.
Really good thank you. Its just what i was hoping for

. I will adapt the code and test it in my Chademo setup.
Re: ESP32 Based Chademo
Posted: Fri May 26, 2023 10:31 pm
by whereswally606
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.
Re: ESP32 Based Chademo
Posted: Sun Jun 04, 2023 2:46 pm
by arber333
Bigpie wrote: ↑Tue May 23, 2023 9:13 pm
The on board can peripheral is initialised with the code below, using ACAN library for ESP32 16 and 17 for onboard can.
...
You could use Colin's library if you prefer it
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
Re: ESP32 Based Chademo
Posted: Sun Jun 04, 2023 3:37 pm
by Bigpie
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.
I've started looking at CCS based on the Catphish/Uhi stuff.
arber333 wrote:
Can you let me know what is with the 1K pullup resistor on the IN2 pin?
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 little
Re: ESP32 Based Chademo
Posted: Sun Jun 04, 2023 4:51 pm
by arber333
Bigpie wrote: ↑Sun Jun 04, 2023 3:37 pm
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 little
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

.
Re: ESP32 Based Chademo
Posted: Sun Jun 04, 2023 5:26 pm
by Bigpie
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.
Re: ESP32 Based Chademo
Posted: Sun Jul 23, 2023 2:19 pm
by Ev8
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?