diy solar

diy solar

JBD / Overkill BMS Monitoring

Why the buck converter? You should be able to power the ESP32 directly using the 5v from the BMS TTL lines. The pins on most ESP32 boards (RX/TX) are 5v tolerant.

So just a simple 4 wire connection just like the bluetooth or UART module that they sell.

ESP32 + RS232 TTL serial communication - Using Arduino / Programming Questions - Arduino Forum
I had no information on what current the UART lines could supply so it was easy enough to add the buck which I had a bunch of.
 
Thats a nice compact setup. And solves the issue of the Bluetooth protocol. I'll have to look further in that thread to see if the schematic for the PCB is listed. Would be easy to DIY with the right parts. And with the ESP32 you can either run compiled code, or wit the Adafruit feathers even run circuit python. For me I would flash it and run the .NET nanoFramework. A lot of low cost options.

Roy
I have OTA in the code too so I can update the s/w over wifi

I used a pc of perf board but if you had enough BMS units you could make up a simple PCB.
 
Is it possible to run this on a mac without the pi? I just want to connect to bms and see the data and perhaps change gui with the data as my needs.
nope, some things doens't seem to work on mac.. I had to get a pi and try and it worked.
 
So, I am new to this and python.. I saw this code (cellinfo2) for showing temperatures, percentage etc.. But how can we call that to show?

Python:
if text_string.find('dd04') != -1:              # check incoming data for routing to decoding routines
    cellvolts1(data)
 elif text_string.find('dd03') != -1:
    cellinfo1(data)
elif text_string.find('77') != -1 and len(text_string) == 38:    # x04
    cellvolts2(data)
elif text_string.find('77') != -1 and len(text_string) == 36:    # x03
    cellinfo2(data)

It seems its only calling cellvolts2.
 
So, I am new to this and python.. I saw this code (cellinfo2) for showing temperatures, percentage etc.. But how can we call that to show?

Python:
if text_string.find('dd04') != -1:              # check incoming data for routing to decoding routines
    cellvolts1(data)
 elif text_string.find('dd03') != -1:
    cellinfo1(data)
elif text_string.find('77') != -1 and len(text_string) == 38:    # x04
    cellvolts2(data)
elif text_string.find('77') != -1 and len(text_string) == 36:    # x03
    cellinfo2(data)

It seems its only calling cellvolts2.
Which script are you using? When I started playing with it I noticed that I had to change a few lines to get the second temperature sensor working on the 4 cell script.


Python:
elif text_string.find('77') != -1 and len(text_string) == 24 or len(text_string) == 28 or len(text_string) == 36:        # x03
    cellinfo2(data)

And then also expand the cellinfo2 method (to account for the extra data)...

Python:
protect,vers,percent,fet,cells,sensors,temp1,temp2,b77 = struct.unpack_from('>HBBBBBHHB', infodata, i)
    temp1 = (temp1-2731)/10
    temp2 = (temp2-2731)/10                     # fet 0011 = 3 both on ; 0010 = 2 disch on ; 0001 = 1 chrg on ; 0000 = 0 both off

Seems different versions/models of the BMS firmware might support more/less temperature sensors and you have to compensate for them. But I dont know, I have only been looking at this for a few hours at most.

Roy
 
Last edited:
Not all BMS configs have the two sensors. In the DD03 buffer the cell[26] will have a 1 or a 2 and then 1 or 2 dbl-byte values will be in the next 2 or 4 cells.

From my ESP32 code:

iNTCQuantity = inBuff[26];

if(iNTCQuantity > 0)
flTempValues[0] = (MakeFloatFromBytes(inBuff[27], inBuff[28])-2731)/10.;
if(iNTCQuantity > 1)
flTempValues[1] = (MakeFloatFromBytes(inBuff[29], inBuff[30])-2731)/10.;
 
@tgalarneau, isn't it possible to show few basic data on simple gui say tkinter? I am using raspi zero w so wanted to show the data on a 4" screen. Do we have to store the data in db to do this? I am trying to get the data from bms every second or so and show them on the screen without storing... just for monitoring while I drive.. only few params are needed like %, V, delta, temp, current, cell high, cell low. and maybe few others.
 
ah nevermind.. after a lot of hit and trials, I finally found a way to do it... and its looking good.. now need to make an executable file so it loads when car starts up..
 

Attachments

  • Screen Shot 2022-06-15 at 10.57.49 PM.png
    Screen Shot 2022-06-15 at 10.57.49 PM.png
    174.7 KB · Views: 11
Back
Top