Chademo Controller Development

Development and discussion of fast charging systems eg Chademo , CCS etc
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Chademo Controller Development

Post by arber333 »

I actually posted the log from Delta EVSE with Nissan Leaf somewhere here. Might help you.

Some details from ABB charger
viewtopic.php?p=40999#p40999

Also some details from Delta
viewtopic.php?p=44983#p44983
Attachments
chademo test_0001_0000.csv
(24.65 KiB) Downloaded 61 times
P.S.Mangelsdorf
Posts: 753
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 89 times
Been thanked: 92 times

Re: Chademo Controller Development

Post by P.S.Mangelsdorf »

Ok I did a full multi-station test today, still failed at all. Logs are attached. EVGO stations are Delta, Nissan is ABB, EA is Electrify America.

I have an idea what may be wrong. A few stations have said "Make sure your car is in park". The code still includes a variable/definition for not parked. But the V3 board does not include any input from the drive system to know that the car IS parked. Can we just cut this from the code?
Attachments
evgo @ walmart2.csv
(77.82 KiB) Downloaded 52 times
evgo @ kildare 2.csv
(265.48 KiB) Downloaded 51 times
ea @ target 2.csv
(174.2 KiB) Downloaded 57 times
abb @ nissan 2.csv
(101.14 KiB) Downloaded 53 times
evgo @ walmart.csv
(155.79 KiB) Downloaded 47 times
evgo @ kildare.csv
(307.36 KiB) Downloaded 51 times
ea @ target.csv
(164.49 KiB) Downloaded 58 times
abb @ nissan.csv
(162.76 KiB) Downloaded 59 times
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed 2023 Hot Rod Drag Week
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Chademo Controller Development

Post by arber333 »

P.S.Mangelsdorf wrote: Sun Mar 19, 2023 11:56 pm Ok I did a full multi-station test today, still failed at all. Logs are attached. EVGO stations are Delta, Nissan is ABB, EA is Electrify America.

I have an idea what may be wrong. A few stations have said "Make sure your car is in park". The code still includes a variable/definition for not parked. But the V3 board does not include any input from the drive system to know that the car IS parked. Can we just cut this from the code?
Imanaged to find the raw .csv file from Delta i made when on EVSE with my friends Leaf 2018.
I noticed timing is 49ms
royhen99
Posts: 195
Joined: Sun Feb 20, 2022 4:23 am
Location: N. Wiltshire. UK
Has thanked: 14 times
Been thanked: 94 times

Re: Chademo Controller Development

Post by royhen99 »

I don't think it's the not parked variable as it's set to false, i.e. parked = true.
I noticed that for one of the logs the charger was specifying protocol V1.0, but the code is sending protocol V0.9.1.
I have modifed the code to send KWh if V1.0 as is done in the SAM3 version, and added KWh to the parameter list.
Stlll need to get it charging, which will require some more reading or someone who knows more than me to take a look at it.

Could someone post a successful charging session log in Savvy CAN format. Most on this thread are unsuccessful or not in the correct format.
arber333
Posts: 3241
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 74 times
Been thanked: 223 times
Contact:

Re: Chademo Controller Development

Post by arber333 »

royhen99 wrote: Mon Mar 20, 2023 8:43 am Could someone post a successful charging session log in Savvy CAN format. Most on this thread are unsuccessful or not in the correct format.
Couple of posts back I posted chademo test_0001_0000.csv file from a succesfull session with Nisan Leaf 2018 on a Delta EVSE.
It was made from CANalyst II and byte positions are reversed, but that is the only difference.
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: Chademo Controller Development

Post by Bigpie »

Had a quick look at your log, your requested current never raises above 0.
Screenshot 2023-03-20 at 8.53.20 am.png
Plotting the voltage the EVSE is reporting looks a little strange, it raises to 500v and falls again as normal, but then it does so again, then we see your battery voltage as reported, the requested current never raises above 0 and after a short time the station sets the malfunction flag
Screenshot 2023-03-20 at 9.03.50 am.png
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
P.S.Mangelsdorf
Posts: 753
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 89 times
Been thanked: 92 times

Re: Chademo Controller Development

Post by P.S.Mangelsdorf »

I think its clear that my issue is the car not asking for amps. Clearly it gets all the way to that point in the process, so communication is occuring and the car and station are in agreement up to that point.

Is there possibly a second voltage setting that I'm not seeing in the web interface? I only have udctresh, but it looks like the code has both max pack voltage and target voltage. Perhaps its not asking for amps because the pack is over one of the voltages?
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed 2023 Hot Rod Drag Week
royhen99
Posts: 195
Joined: Sun Feb 20, 2022 4:23 am
Location: N. Wiltshire. UK
Has thanked: 14 times
Been thanked: 94 times

Re: Chademo Controller Development

Post by royhen99 »

There's udcbms which is from the ISA current/voltage sensor. There is a check to make sure that udcbms is within 10V of the charger voltage measurement.
P.S.Mangelsdorf
Posts: 753
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 89 times
Been thanked: 92 times

Re: Chademo Controller Development

Post by P.S.Mangelsdorf »

Looking through chademo.cpp on Damiens Github, I'm seeing both targetVoltage and maxchargevoltage. Are those the same?
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed 2023 Hot Rod Drag Week
User avatar
Bigpie
Posts: 1585
Joined: Wed Apr 10, 2019 8:11 pm
Location: South Yorkshire, UK
Has thanked: 74 times
Been thanked: 299 times

Re: Chademo Controller Development

Post by Bigpie »

Think it might be worth a new thread for your specific issue? This thread is a bit long and mixing various implementations, the SAM3X and STM32 versions are both discussed here.
VW Beetle 2003
Outlander front generator
Prius Gen 3 inverter (EVBMW logic board)
Outlander charger
3x Golf GTE batteries
Chademo Charging
Outlander water heater
P.S.Mangelsdorf
Posts: 753
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 89 times
Been thanked: 92 times

Re: Chademo Controller Development

Post by P.S.Mangelsdorf »

Bigpie wrote: Tue Mar 21, 2023 1:35 pm Think it might be worth a new thread for your specific issue? This thread is a bit long and mixing various implementations, the SAM3X and STM32 versions are both discussed here.
I don't necessarily think this is a "me" issue. It appears that the implementation in the car is ok, because the authentication gets all the way to delivering power and then fails because the car doesn't ask for current.

Arber is seeing similar failures at Delta stations, but not others.

To me, that says there is some sort of issue with the firmware, at least on the V3 boards. Something is hanging up the controller and it is not proceeding to ask for current. I think the general development thread is the place to address it. If others disagree I can start another thread and we can spread this information all over the place.
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed 2023 Hot Rod Drag Week
royhen99
Posts: 195
Joined: Sun Feb 20, 2022 4:23 am
Location: N. Wiltshire. UK
Has thanked: 14 times
Been thanked: 94 times

Re: Chademo Controller Development

Post by royhen99 »

maxchargevoltage is in the SAM3X version.
STM32 version is here.
https://github.com/damienmaguire/Chadem ... 32_Chademo
P.S.Mangelsdorf
Posts: 753
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 89 times
Been thanked: 92 times

Re: Chademo Controller Development

Post by P.S.Mangelsdorf »

That's where it gets confusing, because I was looking at the software in the "ISA_CAN_Version" folder.
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed 2023 Hot Rod Drag Week
royhen99
Posts: 195
Joined: Sun Feb 20, 2022 4:23 am
Location: N. Wiltshire. UK
Has thanked: 14 times
Been thanked: 94 times

Re: Chademo Controller Development

Post by royhen99 »

I think I've fixed most of the problems in the STM32 version code. The main one was the pin allocations for chadamo 2, 10 were reversed. In the code they are called charger_in_1 and charger_in_2 on the schematic IN2 and IN1. The only reason it got as far as closing the contactors was because the logic of charger_in_2 was inverted ( should be active low, was set to active high ).

I've tested it with test EVSE data sent by SavvyCAN and get the correct requested current.

The only safe way to stop charging is to set the current to 0A on web interface, otherwise it will stop at the voltage set. There is no SOC calculation in the code so this either has to be added, or sent from BMS using CAN mapping for termination at set SOC to work.

I have also added ISA initialisation, which I will test when mine arrives in the next few days.
User avatar
CCSknowitall
Posts: 105
Joined: Fri Jun 04, 2021 1:47 pm
Has thanked: 1 time
Been thanked: 28 times

Re: Chademo Controller Development

Post by CCSknowitall »

Not sure if obvious but in CHAdeMO spec, if the vehicle doesn’t ask for non-zero current within 6 seconds of charge start, the charger will stop (and at least some will show EVSE malfunction flag).

Maxchargevoltage is a sort of “never exceed during charging” parameter and is usually set higher than target voltage.
P.S.Mangelsdorf
Posts: 753
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 89 times
Been thanked: 92 times

Re: Chademo Controller Development

Post by P.S.Mangelsdorf »

royhen99 wrote: Sat Mar 25, 2023 12:40 pm I think I've fixed most of the problems in the STM32 version code. The main one was the pin allocations for chadamo 2, 10 were reversed. In the code they are called charger_in_1 and charger_in_2 on the schematic IN2 and IN1. The only reason it got as far as closing the contactors was because the logic of charger_in_2 was inverted ( should be active low, was set to active high ).

I've tested it with test EVSE data sent by SavvyCAN and get the correct requested current.

The only safe way to stop charging is to set the current to 0A on web interface, otherwise it will stop at the voltage set. There is no SOC calculation in the code so this either has to be added, or sent from BMS using CAN mapping for termination at set SOC to work.

I have also added ISA initialisation, which I will test when mine arrives in the next few days.
Thanks for your work on this, I will try to test this week.
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed 2023 Hot Rod Drag Week
P.S.Mangelsdorf
Posts: 753
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 89 times
Been thanked: 92 times

Re: Chademo Controller Development

Post by P.S.Mangelsdorf »

royhen99 wrote: Sat Mar 25, 2023 12:40 pm I think I've fixed most of the problems in the STM32 version code.
There's some sort of new issue with this version.

I tested this evening, and unfortunately forgot my laptop in the garage, so no CAN logs. I did monitor via the web interface. The state didn't change from "off" and the command status line did not show anything throughout the attempt. The car side contactors did not turn on at all.

In essence, it seemed that the car side did not participate in the attempt or recognize the station was communicating.
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed 2023 Hot Rod Drag Week
royhen99
Posts: 195
Joined: Sun Feb 20, 2022 4:23 am
Location: N. Wiltshire. UK
Has thanked: 14 times
Been thanked: 94 times

Re: Chademo Controller Development

Post by royhen99 »

I should have spotted this earlier but the code was using hv_enable_out to control the relay. This is for HV junction box control so was doing nothing. I have disabled this output and used the correct pin which was not very helpfully called, extra_out. My bluepill setup is not working properly so I can not test this code, but it runs on another board although all the pins including CAN an USART are different. Sending shunt voltage and current from SavvyCan I can get a current ramp on cdmcureq by changing the target current.
Chad_I_ramp.png
Attachments
stm32_chademo.bin
(17.39 KiB) Downloaded 52 times
P.S.Mangelsdorf
Posts: 753
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 89 times
Been thanked: 92 times

Re: Chademo Controller Development

Post by P.S.Mangelsdorf »

royhen99 wrote: Sat Apr 01, 2023 4:09 pm I should have spotted this earlier but the code was using hv_enable_out to control the relay. This is for HV junction box control so was doing nothing. I have disabled this output and used the correct pin which was not very helpfully called, extra_out. My bluepill setup is not working properly so I can not test this code, but it runs on another board although all the pins including CAN an USART are different. Sending shunt voltage and current from SavvyCan I can get a current ramp on cdmcureq by changing the target current.Chad_I_ramp.png
I'll give it a shot and report back. It may be tonight or Tuesday night, not sure yet.
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed 2023 Hot Rod Drag Week
P.S.Mangelsdorf
Posts: 753
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 89 times
Been thanked: 92 times

Re: Chademo Controller Development

Post by P.S.Mangelsdorf »

royhen99 wrote: Sat Apr 01, 2023 4:09 pm I should have spotted this earlier but the code was using hv_enable_out to control the relay. This is for HV junction box control so was doing nothing. I have disabled this output and used the correct pin which was not very helpfully called, extra_out. My bluepill setup is not working properly so I can not test this code, but it runs on another board although all the pins including CAN an USART are different. Sending shunt voltage and current from SavvyCan I can get a current ramp on cdmcureq by changing the target current.Chad_I_ramp.png
I tested this evening at an EVGO station and was able to CAN log. The board recognized that it was plugged in and status went to ChargeStart, but the board did not send any CAN messages, and the station eventually timed out. I would attach the CAN log but it's just messages from the ISA shunt.
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed 2023 Hot Rod Drag Week
P.S.Mangelsdorf
Posts: 753
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 89 times
Been thanked: 92 times

Re: Chademo Controller Development

Post by P.S.Mangelsdorf »

At risk of being a choosing beggar, can we go back to 1.01 and just fix the pins 2 and 10 being swapped? Maybe its just the grumpy engineer in me, but I prefer changing one thing at a time, and 1.01 got a lot further in the charge process than 1.02 and 1.03.

Alternatively, royhen99 can you post the code for 1.01 to github or share via PM so I can try to make the change?
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed 2023 Hot Rod Drag Week
royhen99
Posts: 195
Joined: Sun Feb 20, 2022 4:23 am
Location: N. Wiltshire. UK
Has thanked: 14 times
Been thanked: 94 times

Re: Chademo Controller Development

Post by royhen99 »

Although swapping pins 2 and 10 is necessary it is not all that is required to get it to work. Version 1.01 should not have got as far as it did as it was not enabling the relay to close the contactors, so you may also have a wiring problem ( worth checking to eliminate as posibilty ). I have started again from version 1.0 and added in the changes I think are needed. The problem with v1.03 and the one I am working on now is that I can not get the CAN BUS to remap to the correct pins. Both function without the remap.
I did not save version 1.01 and the closest version I can retrive from backup-up did not work.
After hours of trying to find a neat solution I have just added in the code to force a remap after the intial CAN set-up.
v1.04 attached, I will send you files.
Attachments
stm32_chademo.bin
(17.43 KiB) Downloaded 49 times
P.S.Mangelsdorf
Posts: 753
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 89 times
Been thanked: 92 times

Re: Chademo Controller Development

Post by P.S.Mangelsdorf »

royhen99 wrote: Wed Apr 05, 2023 4:59 am Although swapping pins 2 and 10 is necessary it is not all that is required to get it to work. Version 1.01 should not have got as far as it did as it was not enabling the relay to close the contactors, so you may also have a wiring problem ( worth checking to eliminate as posibilty ). I have started again from version 1.0 and added in the changes I think are needed. The problem with v1.03 and the one I am working on now is that I can not get the CAN BUS to remap to the correct pins. Both function without the remap.
I did not save version 1.01 and the closest version I can retrive from backup-up did not work.
After hours of trying to find a neat solution I have just added in the code to force a remap after the intial CAN set-up.
v1.04 attached, I will send you files.
I appreciate your efforts on this, and that explanation is helpful. I'll give this version a shot this evening.

My contactors are wired to the correct pins, V3 of the board has the relays on the board, and has pins for contactor + and - (see board pinout below)
image.png
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed 2023 Hot Rod Drag Week
P.S.Mangelsdorf
Posts: 753
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 89 times
Been thanked: 92 times

Re: Chademo Controller Development

Post by P.S.Mangelsdorf »

Alright we're not there yet but back to having communication.

Attached are logs from two tests (EVGO and Electrify America) and below is a screen record of an attempt at an EVGO charger.

I couldn't screen record at the EA station because it had complimentary charges and started attempting as soon as I plugged in, so I couldn't connect to the webinterface in time.

Attachments
evgo at walmart.csv
(243.16 KiB) Downloaded 57 times
ea at target.csv
(138.77 KiB) Downloaded 59 times
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed 2023 Hot Rod Drag Week
P.S.Mangelsdorf
Posts: 753
Joined: Tue Sep 17, 2019 8:33 pm
Location: Raleigh, NC, USA
Has thanked: 89 times
Been thanked: 92 times

Re: Chademo Controller Development

Post by P.S.Mangelsdorf »

Just a quick update for everyone, @royhen99 has been working with me via PM to sort out a solution, and I do have CHAdeMO charging working on my car. We're still sorting out a few gremlins at certain chargers, but we're close to a functional version of the FW.
If at first you don't succeed, buy a bigger hammer.

1940 Chevrolet w/ Tesla LDU - "Shocking Chevy" - Completed 2023 Hot Rod Drag Week
Post Reply