Page 1 of 1

Running Peugeot E208 modules with Battery-Emulator

Posted: Thu Feb 08, 2024 11:37 am
by yasko
I'm starting this topic as a follow-up to a conversation with forum member @usus.

We discussed the possibility of using CATL modules from Peugeot E208 (and other cars) with the Battery-Emulator project.
This project gained popularity and now supports various EV batteries and hybrid inverters.
I'm a little skeptical about used hardware (ESP32), but maybe it's time to give it a chance :)

The CATL modules use MAX17823B together with MAX17841b for cell monitoring. The topic has been discussed on the forum many times, and some software implementation exists.
I've used and know these modules in some energy storage projects but with slightly different hardware (MAX17851 + STM32 MCU).

So, the task will be to interface the MAX17841b or MAX17851 chip to ESP32 and get cell data. For this, we will need an SPI port, and the first check shows that there is one. This port has been used for an additional CAN interface with MCP2515, so I believe it will also be for the MAX178XXX chips.

I will prepare some hardware and start testing in the following weeks.
Stay tuned :)

Re: Running Peugeot E208 modules with Battery-Emulator

Posted: Thu Feb 08, 2024 12:38 pm
by usus
Nice

Re: Running Peugeot E208 modules with Battery-Emulator

Posted: Thu Feb 08, 2024 12:39 pm
by m.art.y
yasko wrote: Thu Feb 08, 2024 11:37 am I'm a little skeptical about used hardware (ESP32), but maybe it's time to give it a chance
Thanks, what other hardware could be used for that? Perhaps something more arduino friendly like Due or Teensy?

Re: Running Peugeot E208 modules with Battery-Emulator

Posted: Thu Feb 08, 2024 2:08 pm
by Aragorn
Isnt there a "piece" missing here?

The MAX chips monitor cell voltages, but BatteryEmulator for other packs is talking to the higher level BMS, which is doing a lot more than just monitoring cell voltages. Its measuring/monitoring charge and discharge, calculating SOC, SOH, maximum charge/discharge currents based on temperature, fault monitoring, precharge and contactor control etc etc.

The BatteryEmulator is a bridge between one BMS and another. Its not really intended to be capturing cell data and acting like a BMS in of itself?

Connecting to the MAX chips means your building the actual BMS?

Re: Running Peugeot E208 modules with Battery-Emulator

Posted: Sat Feb 10, 2024 11:12 am
by yasko
Aragorn wrote: Thu Feb 08, 2024 2:08 pm The BatteryEmulator is a bridge between one BMS and another. Its not really intended to be capturing cell data and acting like a BMS in of itself?
I agree with your opinion. We need some basic BMS functionality implemented in the BatteryEmulator. Some of them already exist, like a contactor and pre-charging control.
The battery current measurement is missing with CATL modules, but some inverters do that alone. In this case, it is difficult to calculate a precise SOC, but with NMC chemistry, we can use battеry voltage for simple SOC calculation.

I'm discussing the bare minimum BMS implementation and will write about this later.
m.art.y wrote: Thu Feb 08, 2024 12:39 pm Thanks, what other hardware could be used for that? Perhaps something more arduino friendly like Due or Teensy?
These platforms can do the job. The main strength of ESP32 is excellent network connectivity, but it lacks some peripherals found in other MCUs.
The Due is a little old these days. I think Teensy is okay with some expansion board. I think the SimpBMS project is based on it.
I went the hard way for my projects, building my own hardware (STM32-based) and programming in C/C++. But this take a lot of time :)

Re: Running Peugeot E208 modules with Battery-Emulator

Posted: Sat Feb 10, 2024 2:26 pm
by usus
yasko wrote: Sat Feb 10, 2024 11:12 am The battery current measurement is missing with CATL modules, but some inverters do that alone. In this case, it is difficult to calculate a precise SOC, but with NMC chemistry, we can use battеry voltage for simple SOC calculation.
I alredy have done lot of tests wit open voltage SOC.

{ 0, 3300 },
{ 5, 3420 },
{ 16.4, 3540 },
{ 25.9, 3600 },
{ 36.1, 3650 },
{ 45.2, 3700 },
{ 54.4, 3780 },
{ 63.5, 3870 },
{ 72.3, 3940 },
{ 81.4, 4020 },
{ 90.6, 4090 },
{ 100, 4150 },

Re: Running Peugeot E208 modules with Battery-Emulator

Posted: Sat Jun 22, 2024 11:12 am
by Leuchstoff
Hi Guys, im working since the end of 2022 on the same thing.

It is build on this mean things:

1. MAX17841 Chip Interface to the Slave Board
(Hardware works, Software not finished, reading cell data works)

2. Contator controller with build in Ecomizer (to get the consumption power down) (tested, functions)

3. HVDC Voltage measurement of the Pack Voltage
(tested, functions)

4. DC Current measurement with an Shunt to measure up to 30A ( tested, functions)

5. A Hardware Comparator Circuit that shuts down the Contractor if an over or under voltage occurs of the Battery ( in hardware because i don't thrust software for safety critical functions.) ( Prototype PCB is working)

6. An Esp32 with Wifi and Ethernet (100Mbit) to connect to the network via MQTT. ( I use Home Assistant)
(Software and Hardware functions)

7. I build an DC-DC Flyback (200V - 500V) converter with 12W power and 12V output. ( Tested and functions im currently building an DC input filter to reduce noise on the input line.)

8. A CAN interface for diagnose and control other Batteries.

All of the Things are Controlled by an STM32 in C/C++
(Work in Progress)

I also what to use Dala's Battery Emulator.

Im currently running my second test PCB in my setup.
(But without the DC - DC and the Contactor Ecomizer)

Later this year im hopefully can build Version 3 with all the features i described.

At the end is should be an fully functioning BMS Master Unit.

Re: Running Peugeot E208 modules with Battery-Emulator

Posted: Wed Aug 21, 2024 11:57 am
by albertofr
Hi there!
There’s an issue on the Battery Emulator’s GitHub page in order to try to get this to work.
https://github.com/dalathegreat/Battery ... issues/414

In order to do this, it’s necessary to get CAN logs and extract the relevant values listed here:
https://github.com/dalathegreat/Battery ... ntegration

I’m not practical with this, can anyone help me? Thanks!

Re: Running Peugeot E208 modules with Battery-Emulator

Posted: Mon Feb 17, 2025 2:22 pm
by RJSC
Hello @yasko
Did you go forward with this project?