Release: HVDC battery emulator project for ESS - Testers wanted

woleg

New member
Joined
May 6, 2022
Messages
20
Hi,

Thought I'd share my £12 off the shelf setup, no soldering required!

I wrote a Solax battery emulator almost 2 years ago now and have been using that code to use unmodified Renault EV batteries on Solax and FoxESS kit. Over the years this was adapted for 65V Victron kit (BYD emulation) and so on. Originally I used ESP32 as the dev platform but I am still skeptical about reliability. Later I moved to STM32 and found that to be much more reliable, cheaper for dual CAN too and so that stuck.

Just recently there's been a call for more HVDC emulation for high powered Deye/Sunsynk 3ph (30kW) kit so I've provisionally added the Pylontech Force H2 protocol which will be tested in the next week.

For those who have been struggling with the Solax protocol, especially the newer G4 kit, this solution should resolve that headache.

There's a lot more features running on the custom builds such as UDP syslog client, NTP+RTC, web portal, and TCP can bus feed but this was all done for development. As standard these releases offer a TCP modbus service on port 502 and will translate to/from RTU on the built in RS485 port.

If anyone is interested I will build custom firmware based on the current libraries in return for testing feedback.

Battery compatibility:

Renault Kangoo, Zoe 22->44kWh, Zoe 52kWh
Tesla Model 3 (2020) (needs more testing)

Emulation:

Pylontech LV, HVDC, and Force H2 (new)
Goodwe
BYD
Solax Triple Power
FoxESS

Supported inverters:

Solax
FoxESS
GoodWe
Victron (BYD)
Deye/Sunsynk
Solis (needs testing)

Hardware: STM32F407VET https://www.aliexpress.com/item/1005001620616382.html?channel=twinner
Binaries (ELF): https://github.com/rand12345/toucan_stm32f407/releases/tag/release

Note to moderators, this isn't a commercial venture and I'm not selling anything.
 
Hello.
Great project.
Would it be also available for Volkswagen MEB battery packs, please?
 
A cursory search shows that the CAN protocol is known.


Seems Tom has already implemented that pack, so creating a battery library should be fine.

 
A cursory search shows that the CAN protocol is known.


Seems Tom has already implemented that pack, so creating a battery library should be fine.

So, does it mean that you will add this battery into your project?
 
Last edited:
Sure, assuming someone can test the function of the device. I would need feedback regarding CAN bus data from someone who can at least understand Tom's C code (so we are both on the same page). Let me know which voltage compatible solar-hybrid inverter you wish to interface with and I will build a binary image

I have provided a link to the hardware that you would require, the MCU is £12 + delivery + taxes from AliExpress. You will also require something to flash the device which should cost under £8.

Hardware:
STM32F407VET https://www.aliexpress.com/item/1005001620616382.html?channel=twinner
ST Link V2 https://www.aliexpress.com/item/1005005990726856.html?channel=twinner
 
I am just at the beginning of my project.
Physically, I still have neither the converter nor the battery.
However, as a battery I should have the mentioned Volkswagen MEB 8x 12s2p = 55 kWh.
As a converter I have two alternatives. Goodwe gw10k-et or Solax X3-HYBRID-10.0-D G4.
Anyway, the first thing I'll order is the MCU you're using.
Also can you please recommend something specific for MCU flashing. I would order it at the same time as the MCU.
Thank you.
 
The ST Link V2 in the above link is the MCU flashing hardware.
 
Hello.
I have just got the MCU and MCU flashing device from Aliexpress.
Can you advice me what software I should use for MCU flashing?
I have downloaded STM32CubeIDE, but it looks to complicated and i did not find a way how to flash your BIN file into MCU (as a test).
However, at least the USB drivers for the MCU flashing device were uploaded to my system and seems to be working properly.
Do you have some tutorial, advice or link where to find these information, please?
Thank you
 
Assuming you are running Linux or macOS the instructions are in the README.MD.

I do not have a Windows device and cannot verify installation of Probe-rs for that platform but you can find it here: probe-rs-x86_64-pc-windows-msvc.zip You can also install it using Powershell

Code:
irm https://github.com/probe-rs/probe-rs/releases/download/v0.22.0/probe-rs-installer.ps1 | iex
 
Back
Top