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.
Peugeot E-208/Corsa E CATL BMS CAN decoding
-
- 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
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.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.
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);
}
Re: Peugeot E-208/Corsa E CATL BMS CAN decoding
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.
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.
Re: Peugeot E-208/Corsa E CATL BMS CAN decoding
Is this battery from heavily crashed car? Sometimes BMS is locked if few airbags are deployed during accidentYevhen 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.

-
- Posts: 4
- Joined: Mon Nov 04, 2024 8:58 pm
Re: Peugeot E-208/Corsa E CATL BMS CAN decoding
anyone worked out how to instruct the bms to balance ?
Re: Peugeot E-208/Corsa E CATL BMS CAN decoding
Anyone has news about decoding the current?
with:
What should be 3.8A is showing as 1A
with:
Code: Select all
case 0x125:
battery_current = ((((rx_frame.data.u8[5] - 0x58) << 8) | rx_frame.data.u8[2]) / 256) * -10;