Running Peugeot E208 modules with Battery-Emulator

Topics concerning storage of renewable energy e.g. home battery systems
Post Reply
yasko
Posts: 17
Joined: Tue Mar 14, 2023 7:11 pm
Location: Sofia, BG
Has thanked: 5 times
Been thanked: 4 times

Running Peugeot E208 modules with Battery-Emulator

Post 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 :)
usus
Posts: 34
Joined: Sun Jul 10, 2022 7:45 pm
Has thanked: 2 times
Been thanked: 4 times

Re: Running Peugeot E208 modules with Battery-Emulator

Post by usus »

Nice
m.art.y
Posts: 575
Joined: Sat Jun 06, 2020 6:54 pm
Location: UK/EU
Has thanked: 30 times
Been thanked: 20 times

Re: Running Peugeot E208 modules with Battery-Emulator

Post 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?
Aragorn
Posts: 134
Joined: Wed Jan 04, 2023 10:23 am
Has thanked: 5 times
Been thanked: 56 times

Re: Running Peugeot E208 modules with Battery-Emulator

Post 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?
yasko
Posts: 17
Joined: Tue Mar 14, 2023 7:11 pm
Location: Sofia, BG
Has thanked: 5 times
Been thanked: 4 times

Re: Running Peugeot E208 modules with Battery-Emulator

Post 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 :)
usus
Posts: 34
Joined: Sun Jul 10, 2022 7:45 pm
Has thanked: 2 times
Been thanked: 4 times

Re: Running Peugeot E208 modules with Battery-Emulator

Post 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 },
Leuchstoff
Posts: 1
Joined: Tue Jun 11, 2024 4:00 pm

Re: Running Peugeot E208 modules with Battery-Emulator

Post 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.
Post Reply