Peugeot E-208/Corsa E CATL BMS CAN decoding

Discussion about components from Ampera/Bolt and the PSA group which owns Opel these days
Yevhen
Posts: 8
Joined: Wed Oct 16, 2024 4:48 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Peugeot E-208/Corsa E CATL BMS CAN decoding

Post by Yevhen »

case 0x125:
battery_voltage = (rx_frame.data.u8[3] << 8) | rx_frame.data.u8[4];
battery_current = (rx_frame.data.u8[5] - 0x58) << 8 | rx_frame.data.u8[2];
break;

datalayer.battery.status.voltage_dV = ((float)battery_voltage / 128) * 10;

datalayer.battery.status.current_dA = ((float)battery_current / 256) * 10;

This is a code snippit from the battery emulator software that I added to.

This is just my guess but it seems to work ok, still very granular readings not much precision i wonder if the BMS needs to be activated via canbus to work in a normal mode.
LRBen
Posts: 561
Joined: Thu Jul 04, 2019 6:35 pm
Location: Somerset, UK
Has thanked: 75 times
Been thanked: 212 times

Re: Peugeot E-208/Corsa E CATL BMS CAN decoding

Post by LRBen »

Yevhen wrote: Thu Dec 12, 2024 9:38 am case 0x125:
battery_voltage = (rx_frame.data.u8[3] << 8) | rx_frame.data.u8[4];
battery_current = (rx_frame.data.u8[5] - 0x58) << 8 | rx_frame.data.u8[2];
break;

datalayer.battery.status.voltage_dV = ((float)battery_voltage / 128) * 10;

datalayer.battery.status.current_dA = ((float)battery_current / 256) * 10;

This is a code snippit from the battery emulator software that I added to.

This is just my guess but it seems to work ok, still very granular readings not much precision i wonder if the BMS needs to be activated via canbus to work in a normal mode.
Thanks for that. I've made some updates to my zombie module to show battery voltage as well. I had to make some slight changes to the calculations to get the battery voltage showing correctly.
I still need to play with current a little bit. Not quite there yet, I'm testing this by playing back logs to my Zombieverter and checking spot values.

Code: Select all

case 0x125:
  SoCValue = data[0] * 0.4;
  Param::SetFloat(Param::SOC,SoCValue);
  
  batteryvoltage = (data[3] << 8) | data[4];
  udcvoltage = (batteryvoltage / 128);
  
  current = (data[5] << 8) | data[2];
  batterycurrent = (current/256) / 10;
  if (Param::GetInt(Param::ShuntType) == 0)//Only populate if no shunt is used
   {
  Param::SetFloat(Param::idc,batterycurrent);
  Param::SetFloat(Param::udc2, udcvoltage);
   }
I've also been working on the ground fault circuit that is inside the battery box. It connects directly to the BMS box so I'm hoping any faults will show up in the canbus. I''m just a bit stuck on simulating a HV voltage leak to check canbus reponses.
Yevhen
Posts: 8
Joined: Wed Oct 16, 2024 4:48 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Peugeot E-208/Corsa E CATL BMS CAN decoding

Post by Yevhen »

I also find that SOC can be read out in reg 0x358 0 byte.
case 0x358:
battery_soc = rx_frame.data.u8[0];

0-100 in decimals. No need for scaling.
But I found out that SOC is "frozen" will not move even if the battery is cycled up and down, which confirms my suspicion that some kind of activation of the BMS is needed via CAN bus.
martii
Posts: 19
Joined: Fri Mar 22, 2019 10:07 am
Has thanked: 4 times

Re: Peugeot E-208/Corsa E CATL BMS CAN decoding

Post by martii »

Yevhen wrote: Fri Dec 13, 2024 3:36 pm I also find that SOC can be read out in reg 0x358 0 byte.
case 0x358:
battery_soc = rx_frame.data.u8[0];

0-100 in decimals. No need for scaling.
But I found out that SOC is "frozen" will not move even if the battery is cycled up and down, which confirms my suspicion that some kind of activation of the BMS is needed via CAN bus.
Is this battery from heavily crashed car? Sometimes BMS is locked if few airbags are deployed during accident :(
Yevhen
Posts: 8
Joined: Wed Oct 16, 2024 4:48 pm
Has thanked: 1 time
Been thanked: 3 times

Re: Peugeot E-208/Corsa E CATL BMS CAN decoding

Post by Yevhen »

martii wrote: Mon Dec 16, 2024 2:05 pm Is this battery from heavily crashed car? Sometimes BMS is locked if few airbags are deployed during accident :(
Yes this one was.
RJSC
Posts: 3
Joined: Wed Feb 05, 2025 3:11 pm
Has thanked: 3 times

Re: Peugeot E-208/Corsa E CATL BMS CAN decoding

Post by RJSC »

Any progress with open source code?
stuart1977
Posts: 4
Joined: Mon Nov 04, 2024 8:58 pm

Re: Peugeot E-208/Corsa E CATL BMS CAN decoding

Post by stuart1977 »

anyone worked out how to instruct the bms to balance ?
RJSC
Posts: 3
Joined: Wed Feb 05, 2025 3:11 pm
Has thanked: 3 times

Re: Peugeot E-208/Corsa E CATL BMS CAN decoding

Post by RJSC »

Anyone has news about decoding the current?
with:

Code: Select all

case 0x125:
battery_current = ((((rx_frame.data.u8[5] - 0x58) << 8) | rx_frame.data.u8[2]) / 256) * -10;
What should be 3.8A is showing as 1A
Post Reply