Page 2 of 2
Re: Peugeot E-208/Corsa E CATL BMS CAN decoding
Posted: Thu Dec 12, 2024 9:38 am
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.
Re: Peugeot E-208/Corsa E CATL BMS CAN decoding
Posted: Thu Dec 12, 2024 11:20 pm
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.
Re: Peugeot E-208/Corsa E CATL BMS CAN decoding
Posted: Fri Dec 13, 2024 3:36 pm
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.
Re: Peugeot E-208/Corsa E CATL BMS CAN decoding
Posted: Mon Dec 16, 2024 2:05 pm
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

Re: Peugeot E-208/Corsa E CATL BMS CAN decoding
Posted: Tue Dec 24, 2024 11:57 am
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.
Re: Peugeot E-208/Corsa E CATL BMS CAN decoding
Posted: Wed Feb 05, 2025 9:38 pm
by RJSC
Any progress with open source code?
Re: Peugeot E-208/Corsa E CATL BMS CAN decoding
Posted: Mon Feb 10, 2025 7:38 pm
by stuart1977
anyone worked out how to instruct the bms to balance ?
Re: Peugeot E-208/Corsa E CATL BMS CAN decoding
Posted: Tue Mar 04, 2025 1:19 am
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
Re: Peugeot E-208/Corsa E CATL BMS CAN decoding
Posted: Thu May 22, 2025 12:04 pm
by peterdiffey
Hi Folks, apologies for hijacking this thread.
I have a MG 40Kwh pack, which uses CATL modules, so it is probable that the modules use the same sort of BMS. I cannot find much in the way of info on the battery pack controller, it has LOTS of pins, and a big SOC on board, so I am shying away from trying to use that controller.
My plan is to connect direct to the string of pairs of modules using an ESP32 via a MAX17841B.
My question is this - is there any info on the protocol used on this interface, I figure that I need to send a READ message to the first of the string of modules, and this causes a domino effect where each passes it's data to the next in the string and eventually at the other end of the string, out pops a series of datasets, one for each module.
As far as I can see by looking at the module PCBs, balancing is done on a per module pair basis, and differences in the pairs of modules is reported but not fixed during normal operation.
I read somewhere on a MG owner thread that cell balancing only occurs at full battery charge, so, does the battery pack controller kick this off, or does it automatically start balancing at a certain module pair voltage.
Any help on understanding how this works on the peugeot modules appreciated.
Pete
Re: Peugeot E-208/Corsa E CATL BMS CAN decoding
Posted: Thu May 22, 2025 12:21 pm
by tom91
peterdiffey wrote: ↑Thu May 22, 2025 12:04 pm
Hi Folks, apologies for hijacking this thread.
Yes, this is frowned upon and completely off topic. why are you posting here, this is CAN so external of the pack.
search.php?keywords=MAX17823B
viewtopic.php?t=2181&hilit=MAX17823B
viewtopic.php?p=20335#p20335
Re: Peugeot E-208/Corsa E CATL BMS CAN decoding
Posted: Thu May 22, 2025 12:30 pm
by peterdiffey
I was rather hoping that someone would be able to point me in the correct direction - so thanks
Pete
Re: Peugeot E-208/Corsa E CATL BMS CAN decoding
Posted: Thu May 22, 2025 2:15 pm
by tom91
peterdiffey wrote: ↑Thu May 22, 2025 12:30 pm
I was rather hoping that someone would be able to point me in the correct direction
Please use the search function, you had the key words in your post.