diy solar

diy solar

Interfacing with Valence built in monitoring

So we having similar issues with invalid response -anyone got a fix?

We also using ESP32

Cheers
Capture.PNG
 
Hi,

I bought as well 10 U27-36XP with intend to build 5S2P HV house pack.

Unfortunately :

- Valence Diag software is able to wake, modify Ids and Scan but it do not want to Read!
Since only 6 cell banks are provided on screen and "Module Type" do not appears, I guess it may be compatible up to 18XP...
View attachment 51772

- I guess codes I found at OpenXPBMS (great Thanks!) are only matching 12XP which is most popular
I am jumping in Python as a beginner but I guess I can go forward to make a lit bit of reverse since some returned values are quite close to cell voltage or temperatures.

- sniffing communication will not be possible since this communication is not provided with Diag software...
Only way would be to setup a configuration with a Valence BMS and sniffer in between communication : I guess it will be a high skill I would hardly affort (I guess Cogito44 did some but seems to be as well with 12XP)

Is there someone to help for this module type?

To bring my very little contribution, I handle activation of 12XP parallel packs by just adding internal modified boards which make a reset every 120s leading to remain in awaken status and balancing :
- buy infinite cycle module in 5V (to lower power consumption) for 3USD
- remove LDO 5V>3.3V if existing (to lower power consumption)
- supply it at 3.3V internal
- remove relay and connect its transistor to pull down reset pin which is easy access on battery board
- use external communication cable to supply, or not when disconnected, this "cycle reset board"

Thanks!
Howdy,

I support some equipment at work that uses these.

I did some digging in Lithion literature and found a reference to a "U27-36XP Battery Monitor Tool V06" in their U27-36XP diag kit .
Possibly somewhere in https://www.lithionbattery.com/data-sheets-downl/

Lithion sales, after a few tries, routed me to their senior applications engineer, Chas Taylor, who gave me a link, prolly expired by now.
I can't share the file, because work rules.

Short version, it does the battery ID changing, but also lists alarms, cell voltage, balance state, battery voltage, cell min/max spread and temperature values. Does logging too. but only on single batteries. It will work with a valence BMS running on the pack, but the readings are flaky then. I imagine because two masters on the bus conflict.

My next battery recovery session, I'll see if I can sniff the traffic and share my knowledge.

He also gave a link to a recycler they use.
Asset Recycling Recovery LLC
396 Cross Plains Blvd
Dalton, GA 30721
423 667-6686
PoC: Lamar Bearden
 
Hello,

Here is a very basic code (nothing nice, just works) of the OpenBMS with MQTT to home assistant. I am still working on making the sensors auto-discover but no luck so far (if someone can help on this would be awesome!). Once I have that implemented, I will add all data available to MQTT. Also, I am planning to add MQTT controls to be able to discharge the batteries on a schedule (ex.: charge during the day and discharge during the night)

Hope this helps somebody ;)
Grate. Thanks. Do you have the wiring schematics as well? Thanks
 
Any update on this? I checked out the github page for @skaggetse but I don't see any details about how to wire up the RaspPi to the batteries.
You need a USB 2 RS485 dongle, and connect the dongle to the battery RS485 cables. There are some videos on YouTube on other people doing this to use the Valence Monitoring software. You should begin with getting that working on a PC, and then when that is working, setup correct TTY in the settings python file. Then you can use the GPIO-outputs to control a relay to turn power on and off.

It should be viewed as a starter, that you can customize for your needs, its not Plug and play BMS.

I have had issues with batteries drifting apart in SOC, not sure the inter cell balancing is working. Anyone that can confirm that they have the inter cell balancing is working?
 
@skaggetse I've been running your sw (a big thank you!) on pi zero's w/ some modifications for a few years now. I log all data points including cell voltage delta's into a database. I do believe with high confidence (cell delta's and PCB temps) that the four cells within the batteries do balance regardless of SOC drift. I have a set running at 72v (series of six) and over time a couple of the batteries SOC will start to drift drastically from the pack(or what i think is correct). So it appears the SOC is basically a GOM (guess-o-meter) that can easily be calibrated (typical of LFP batteries) if the batteries are held for some time at near 0% SOC or 100% SOC. Since I usually keep my series packs in the sweet spot (20%-80%)SoC for charge/discharge I usually have significant SoC drift with some of the batteries. And I might calibrate SOC once every couple of years for convenience, doesn't appear it helps with pack performance.
 
@skaggetse I've been running your sw (a big thank you!) on pi zero's w/ some modifications for a few years now. I log all data points including cell voltage delta's into a database. I do believe with high confidence (cell delta's and PCB temps) that the four cells within the batteries do balance regardless of SOC drift. I have a set running at 72v (series of six) and over time a couple of the batteries SOC will start to drift drastically from the pack(or what i think is correct). So it appears the SOC is basically a GOM (guess-o-meter) that can easily be calibrated (typical of LFP batteries) if the batteries are held for some time at near 0% SOC or 100% SOC. Since I usually keep my series packs in the sweet spot (20%-80%)SoC for charge/discharge I usually have significant SoC drift with some of the batteries. And I might calibrate SOC once every couple of years for convenience, doesn't appear it helps with pack performance.
I have 8 batteries, 2 series, 4 parallel (24V).
6 of them typically have a fairly accurate SOC but the other two drift down if I don't periodically bring them to 100% SOC.
I found that the issue with the 2 batteries that drift is that their BMS always shows a very low discharge current even when completely disconnected. One of them with nothing connected will discharge down to 80% after several days. I tested the capacity and found that it was actually full.
I would love to know if there is a way to calibrate the current sensor inside the battery to 0 with nothing connected.
 
I have 8 batteries, 2 series, 4 parallel (24V).
6 of them typically have a fairly accurate SOC but the other two drift down if I don't periodically bring them to 100% SOC.
I found that the issue with the 2 batteries that drift is that their BMS always shows a very low discharge current even when completely disconnected. One of them with nothing connected will discharge down to 80% after several days. I tested the capacity and found that it was actually full.
I would love to know if there is a way to calibrate the current sensor inside the battery to 0 with nothing connected.
I've been searching for a way. Never found it yet. There is speak of calibration in the code. And I have a feeling it's in there more advanced set of software which I haven't been privileged with.
 
I think I made it work for the esp32.
Is someone able to pol the battery ID?
I want to make a module that can auto detect which module (battery ID) is connected.
thanks!
 
I think I made it work for the esp32.
Is someone able to pol the battery ID?
I want to make a module that can auto detect which module (battery ID) is connected.
thanks!
If you have the diag tool, click the locate battery button.

If you're writing your own, poll each ID one by one by sending a wake up and then ask for a voltage read and note which ID responds.
 
For what it's worth, I uploaded all my patched together spaghetti code to Github.
https://github.com/cheezemanrich/BMS_ESP32S---20221121_0_Backup
It's my super rough code after playing around for a couple years but it does what I need it to do at the moment.
There is a lot going on in there with an LCD, Web server, Cayenne MQTT, and even a bug that causes it to reboot every once in a while with a serial port watchdog issue.
I'm not planning on supporting it but might answer any questions posted on Github under Discussions.
You're free to do with it as you like.
 
thanks, I found out it is just the first received byte that corresponds to the battery ID.
Thanks for posting you code! I will have a look to at it.

Yes, when playing with the original code and the esp32 I constantly had reboot events... it's not as fool proof as the atmel controllers...
 
thanks, I found out it is just the first received byte that corresponds to the battery ID.
Thanks for posting you code! I will have a look to at it.

Yes, when playing with the original code and the esp32 I constantly had reboot events... it's not as fool proof as the atmel controllers...
FYI, here is also an example of received response decoding where I marked registers I know.
1675790776396.png
 
Hi, do to being unable to be able to pickup an original BMS I am trying to use the XP-BMS by seb303 but have Valence u27-36xp batteries and not the 12V versions, is there anyway to get this to measure all the cells and also something appears to be wrong as the 4 cell voltages are incorrect.
1687620153707.png
This is my debug output however my Battery terminal voltage is 39.57V which I assume each cell should be around 3.29V

The code wouldn't compile on an ESP32 due to errors, so I purchased a teeny4.0 and that compiled and produced the above results.

My end goal is to put this between a string of six series batteries and a solax X1-AC.

Any feedback, recommendations would be greatly appreciated
 
Back
Top