New SBMS0 Firmware soon to be released.

92 views
Skip to first unread message

Dacian Todea (electrodacus)

unread,
Mar 5, 2026, 9:06:05 PM (8 days ago) Mar 5
to electrodacus
For the past few weeks (since the end of January).  I started working on the SBMS0 new firmware.
I added quite a few new features as you can see some of them below.

1) Monitoring

 Not much changes here other than cell bar-graph is now green in normal range and will change to yellow above or below UV and OV and red it it gets above OVLK or below UVLK.
I also added two more temperature sensors and you need to select betwen seeing the IT1 and ET3 (what was available before) and the IT2 and ET4. ET3 and ET4 are the same external temperature sensor just measured by two separate ADC's and the IT1 is the ISL94203 (BMS IC internal temperature) and IT2 (newly added) STM32 micro-controller internal temperature.
P1370944.jpg

I added two new graphs the Battery voltage graph (data was there but was not displayed before) and the SOC graph (at least one person asked for this) and it took a bit of extra RAM that is fairly limited.
P1370945.jpg

The Diversion is now added just need more testing and also all the wiring drawings corresponding to the state for dual PV array and diversion was added.
P1370963.jpg

And on the same subject the Diversion graph will work displaying current and power for diversion. Still needs to be cleaned up by some of the things I have now for diagnostics
There will also be DMPPT functionality for diversion that needs a bit of testing also.
P1370946.jpg

2) EXT IOx Settings had a huge upgrade and will require quite a bit of testing.
There are two extra EXT IOx available EXT IO1 and IO2 and they are the I2C data and clock pins and can be used.
Main reason for this two extra IOx was so that I can do Digital max power point tracking for diversion so select between two restive heating elements to get the max power point.
There is a table showing all the settings at a glance but to set things you enter each EXT IOx separate menu.
P1370950.jpg

Here is the separate menu for EXT IO4 as an example. It is set as type 1 so Charging but there are much more settings now. 
There is a Minimum and Max temperature limit for each EXT IOx and with T sensor you select one of the 4 temperature sensors that will be used to enforce the limits in this case is IT2 (the internal temperature of the microcontroller).
I set here as 20C so below the actual temperature so you can see the OTP (over temperature protection) as a red bliking ON/OFF at 1 second flag in the bottom left corner.
Other settings include Current limit , SOC (SOC was available before) and now you can set 1 to 30 days for when the SOC limit is overridden and allow full charge of the battery. Before it was just an option for charging to full every day and you can get the same by setting 1 day.
P1370956.jpg

Also you can see the red flag in the EXT IOx table. But in the bottom left corner can be see form anywhere including monitoring page.
P1370960.jpg


3) This is what I worked for the past few days and is now almost done.
It is a test for the internal resistance of the cells and a very useful test to see if you have good connection between cells.
You just need to turn OFF your loads enter this menu and push OK to start the test that takes about 20 seconds and makes 3 tests than then averages in one result.
This is one of my A123 System battery 20Ah pouch cells and it is about 14 years old.
This first test is at 500mA 0.025C and this is a bit to low to get accurate results as there is just around 1mV drop per cell at this low current so not enough resolution even with me oversampling the voltage by averaging 10 quick measurements is still a bit to low. 
P1370919.jpg

Here is at 1A so 0.05C charge rate. Test is done by switching ON/OFF solar charging but you need DSSR20 or DSSR50 or something that can as fast react to ON/OFF.

P1370921.jpg

Here is with 2A so 0.1C and this is about the minimum I will recommend for best results

P1370922.jpg

Here is with 4A 0.2C and that is best as there are about 10mV per cell so much more to work with for calculating the internal resistance. The graph in the middle shows with magenta the portions in the graph where the 10 measurements for voltage are taken for charge enabled and the same for charge disabled to measure the delta in voltage for each cell. That graph in middle has data at 70ms interval so about 5 seconds for the entire width of the graph where the other two graphs are at standard 1 second per data point 60 seconds one minute total per graph. So in the middle is about a 12x zoom
You can see this is page 1 of 2 and on the second page I want to implement something similar for the cell balancing wire resistance as that will save a lot of time diagnosing bad cell sense wire connections. So likely another few days to do that.
P1370925.jpg

Here is anther test at same 4A as above but results are slightly different each time the test is run. Still fairly close each time especially when you have 10mV or more delta to work with.
The % value is with red only when above 40% but this is not a great battery after 14 years. I remember it was around 1mOhm per cell when new and maybe 1.5mOhm max with the connections between cells when new but both cell degradation and likely connection oxidation  got to this. I'm very curious to see what value I get for my large 8S2P EVE pack but it will need to wait a week to 10 days to finalize most things before installing the new firmware V6 on that SBMS0.  I will need at least two weeks of testing on that before I can start shipping with this new firmware.
P1370927.jpg

In the Diagnostic this is all it was before but even this was updated.  I added temperature compensation for current measurement to make it even more accurate for low currents  and I added the option to use the offset it makes at power up or a factory calibrated offset that I will set when testing.
P1370943.jpg

And last thing in the diagnostic menu was a way to reset the LCD but evolved in me implementing a graphics benchmark.
It comes with a warning as there will be fast moving images with up to 1.1 milion pixels per second in some benchmarks (a total of 14 benchmarks)
P1370942.jpg

Here is drawing small rectangles at 888kpx/second
P1370940.jpg

And here is a ray-tracing test up to around 270kpx/s.
This tests do not affect the SBMS0 functionality he will take care of battery and everything as normal.
P1370935.jpg

Unfortunately this is only tested and will only work on the SBMS0 v0.3e hardware and will not work with the older SBMS0 version or any other older SBMS models. It will take way to much time to port all this to the older models and each of them will need to be tested separately. This will likely take a full year or work and I just do not have the time to do that.

As for all of you that have the new SBMS0 and want to upgrade to firmware V6 from V5 I will need to make a tutorial and maybe offer some programmers with cables so you can easily do that.

Let me know what you think and if there is something you wanted that I did not implement. If it is easy there is still time to implement. I do not have much Flash or RAM left is now with V6 almost fully utilized.

Sasa Duric

unread,
Mar 6, 2026, 1:46:19 AM (7 days ago) Mar 6
to electrodacus
Thank you Dacian for all the changes you have done! Now, as you ask for the wishes, here it is... I know you already advised to have external thermostat to keep the batteries at 15°C, which I did. But having all those extra EXIOs and not being able to use it to trigger external heater to me is kinda ignorant. The logic that blocks charging under certain level can be used to trigger the heater. From all the improvements you did, I would appreciate the most if you add another seting type, or two in the EXIO menu for the heating and cooling if that does not cost much of the resources. I bet it cost less memory than those nice graphics for the display ray tracing test and it is certainly more useful as the batteries are much more expensive than a display or a whole SBMS0. Currently, I have another external esp32 running esphome for which I can freely adjust the battery heating, cooling and hysterisys. It works great, but I really think it should be a BMS feature.

Bjorn Teani

unread,
Mar 6, 2026, 2:51:40 AM (7 days ago) Mar 6
to electrodacus
Looks like great work Dacian ! 

I think it will be time for me to buy a new SBMS0 so I can mesure diversion, test my batteries and have the old one as backup !

One wish : being able to manually enter historical data so you can transfert them from one SBMS0 to another and keep track of how much watts you gathered over the years.

sailingharry

unread,
Mar 6, 2026, 8:37:52 AM (7 days ago) Mar 6
to electrodacus
Dacian,

Your continual improvement is awesome!

Three thoughts:
*  Your pretty graphic with the squares showing Battery, PV, Load, and Diversion -- since not all users implement Diversion, can that block be optionally disabled?  Adding unused information distracts.

*  Your IR testing is slick, and I'm looking forward to playing with that.  It would be useful (although I have pencil, paper, and a calculator so I can do it myself...), if you could total it -- a "Battery IR" result.  And, since you have a measurement point on the output of the shunt, it would be interesting to get a "System IR" that includes the entire system from the negative connection to the output of the shunt (I'd actually like the output of the fuse, but there aren't any measurement points there). I've already done my own calculation of "System IR" that even includes the fuse, since in my mind that is the number that impacts short circuit current (for fuse ratings).

*  It looks like you've set up high/low charge temps (Type 1) independent of high/low disconnect temps (Type 5).  YAAAY!  (Actually, it looks like you've allowed independent temps for each Type).  I've implemented this on my boat by setting the low temp disconnect at some crazy low number (-20F/-30C?), and then setting my charge sources (they have temp controls) to something like 40F/10C.  This past winter we had an especially cold snap (for us -- balmy for you!) of about 2 weeks below freezing, and my battery only fell to 75% with various incidental uses.

None of these comments are critical or negatively impact the use of the SBMS0 -- the system rocks.  But they would be nice if possible.

Keep up the good work!

Dacian Todea (electrodacus)

unread,
Mar 6, 2026, 12:45:15 PM (7 days ago) Mar 6
to electrodacus
Sasa,

The Ray tracing uses no significant amount of recurses else I will not have included it. The LCD has his own memory (each pixel has a 16byte memory for the color RGB565) so when I write a pixel to screen it will remain there no need to have a buffer for that. The LCD has much more memory than my micro controller  320x240 * 2byte =153.6KB of video memory vs just 32KB of RAM on my microcontroller.
Most of the RAM on the microcontroller is used up by the graphs on page 4 of the monitoring those use over 80% of available RAM thus very little is left for everything else.
 
That said your request is not significant at all in terms of resources I just did not found it useful in the past when others have asked for the same thing. 

While you think 4 now 6 EXT IOx are plenty I find they are fairly limited to waste one of them for battery heating element control.
That said if you want to do that  (with the new firmware)  you can use an EXT IOx set as type 2 (load) to have a heating element ON until your set temperature limit say +15C is reached then it will turn OFF the heater until temperature drops 3C below that limit so +12C then heater will be re enabled.
But I will still suggest you use a $5 electronic thermostat that comes with his own thermometer probe that way you save an EXT IOx pin and the only external temperature sensor of the SBMS0.
Me I will be using the extra EXT IOx for DMPPT for water heating and the external temperature sensor to monitor the water temperature to not exceed +80C.  And yes I can do the same with an external thermostat for the water as I do now but using the SBMS0 external temperature to monitor the water temperature also gives me a more interesting data log as I can know the amount of energy delivered to water and the energy loss from water to environment.
 

Bjorn,

If you have the new SBMS0 model (the one with the 16pin green connector at the back instead of the older one with just 10pin white side connector) then you can write the new firmware when available and the historical data will be preserved.

sailingharry,

* That will normally just show zero for diversion if unused. Will you prefer that diversion bloc just be completely gone leaving a black spot in that place ?

*I was thinking of the total battery IR will be useful information or just extra distracting information :)  
My measurement points are limited from battery- terminal to battery+ terminal so nothing outside of that. The cell resistance includes the bussbar between the cells and connection point between the cell terminal and bussbar.  So the main use for this is to see if you have bad connections between cells.

*Yes each EXT IOx has his own independent low and high temperature limits. The one that was before controlled by ISL94203 is now disabled so that this independent ones are to be used.
So was your charging disabled for 2 weeks ? and you only used 25% of your battery in that time ? Seems like a very unusual use case if my understanding is correct.
The default values as you see now are just temporary I will need to think on what default's I should use before release of V6 firmware version. But for type5 I will likely leave the -40C and +80C limits. Of course anyobe can change that to what they like but they need to remember to use the Store device settings else they will reset to default after a power cycle. 

sailingharry

unread,
Mar 6, 2026, 1:47:33 PM (7 days ago) Mar 6
to electrodacus
sailingharry,

* That will normally just show zero for diversion if unused. Will you prefer that diversion bloc just be completely gone leaving a black spot in that place ?

*I was thinking of the total battery IR will be useful information or just extra distracting information :)  
My measurement points are limited from battery- terminal to battery+ terminal so nothing outside of that. The cell resistance includes the bussbar between the cells and connection point between the cell terminal and bussbar.  So the main use for this is to see if you have bad connections between cells.

*Yes each EXT IOx has his own independent low and high temperature limits. The one that was before controlled by ISL94203 is now disabled so that this independent ones are to be used.
So was your charging disabled for 2 weeks ? and you only used 25% of your battery in that time ? Seems like a very unusual use case if my understanding is correct.
The default values as you see now are just temporary I will need to think on what default's I should use before release of V6 firmware version. But for type5 I will likely leave the -40C and +80C limits. Of course anyobe can change that to what they like but they need to remember to use the Store device settings else they will reset to default after a power cycle. 

Dacian,

*  Making the diversion block just a blank spot (assuming it's cleaned up with no connection lines, etc) would be nicer-- but this really is just icing on the cake, not a big deal.  I assume that the "no diversion" portion of your users is large enough to make this useful -- but I may be mistaken.  My GPS has a couple of permanently displayed "errors" for things that don't exist (SIRIUS antenna, for instance) that distract from "real" errors like "GPS signal lost."

*  Understand on the Battery IR.  Really looking forward to playing with that.

*  My use case is unusual, but not completely uncommon.  In winter (during layup), I have several very low loads (monitoring, lights when working on the boat, occasional inverter power for tools, etc).  Use under 20Ah/day (12V system).   This is probably typical of boats, RV's, summer cabins, etc during winter.  In the summer, when actually using the boat, my daily consumption is closer to 300Ah/day!

Dacian Todea (electrodacus)

unread,
Mar 8, 2026, 12:08:23 AM (5 days ago) Mar 8
to electrodacus
Short update.
I implemented the cell balancing wire voltage drop.
Here is normally connected to the 20Ah 8s battery with a short ribbon cable maybe around half the length of what I include with the SBMS0 
P1370975.JPG
Here is with a simulated fault by adding a 110mOhm resistor in line with wire #3 the one between the cell1+ and cell2-
Still acceptable as if you had a longer sense wire in that place.
Easy to see that issue is between cell 1 and 2 as both show a higher voltage drop than the other's
While it is not a pass it still OK to use.
Untitled.JPG 
Here is the 110mOhm now replace with 1Kohm and it will look and work normal except if cell balancing is enabled.
Same fairly simple to see where the issue is.
P1370986.JPG
And here is an update to the cell internal resistance. I increased the number of measurement points to increase a bit the accuracy.
Still needs at least 10mV drop per cell to get below 10% measurement tolerance. 
P1370980.JPG

Peter

unread,
Mar 8, 2026, 4:33:11 AM (5 days ago) Mar 8
to electrodacus
That looks awesome! Really appreciate the work your putting into the firmware!

- Love the new function to independently set temperature for charge and discharge!!!! thumps up!
- Diagnosis for cells and sensing lines looks very cool, also the time limits for full charge.
- What is the purpose of having External temperature measured by different ADCs?
- What is the hardware setup requirements for using DMPPT? I have DualPV setup with the DSSR20s, would i need DSSR50? Is this the case where you input the resistance of the heaters? But how will SBMS0 know which voltage the panels currently deliver? Currently i monitor those individually with separate Esp32, but that cannot switch anything. 

cheers


Dacian Todea (electrodacus)

unread,
Mar 8, 2026, 10:42:47 AM (5 days ago) Mar 8
to electrodacus
Peter,

- What is the purpose of having External temperature measured by different ADCs?
The ISL94203 has two temperature sensor inputs. On the SBMS60,SBMS40, SBMS100, SBMS120 the second one was used internally to measure the temperature on the board mostly to protect the mosfets.
Since that was not needed for SBMS0 instead on leaving that temperature sensor pin disconnected I connected together to the the other input so now both temperature senor inputs measure the same single external temperature on the SBMS0.  Maybe if there is ever a new hardware revision of the SBMS0 I will expose that second input on a separate connector to have two external temperature sensors.

- What is the hardware setup requirements for using DMPPT? I have DualPV setup with the DSSR20s, would i need DSSR50? Is this the case where you input the resistance of the heaters? But how will SBMS0 know which voltage the panels currently deliver?
No you do not need the DSSR50 you can use your existing setup. There is a new menu called diversion settings replacing the old DMPPT menu as some settings where moved in the new EXT IOx settings like max current in dual PV setting "MPV" as seen default 10A for the type 6 and I introduced a new one is the ratio between the two arrays default set here 2.00 meaning the large array is 2x larger than the small array.
P1370996.JPG 

So here is the menu where you input the resistance for heaters. If they are set to 0.0499 Ohm (minimum value) they are considered OFF or not set and above 0.0500 Ohm they are considered ON
If you had a single PV array or want to divert just one of the two arrays to heating You will set just the first one Div1R1 if you wanted max power point with single array diverted then Div1R1 for small heating resistor and Div1R2 for large heating resistor (resistors could also be equal).
Then for dual PV array diversion and with DMPPT you will have 4 resistor values that you will need to set the Div6R1 and Div6R2 will be for the large array controlled by the type 6.  
P1380001.JPG

As for voltage measurements to calculate current and power and and to be able to do the DMPPT logic the ADC2 and ADC3 are used.
The ADC2 is for the small array and the ADC3 for the large array voltage.
Since SBMS0 knows the array voltage and it knows the heating element or elements resistance it will know to calculate the current and from there also power.
Then for max power point it can control in this example EXT IO1 and IO2 set as type 3 and type 4 that control R1 and R2 from one or both arrays.
For the EXT IO1 and IO2 I will need to make an adapter with two sets of optoisolators  that you will need. This will have two inputs IO1 and IO2 and 4 outputs so that you can simultaneously control R1 and R2 from both the small and the large array. 
So when battery is fully charged and both arrays are diverted you can turn ON/OFF both R1's with EXT IO1 set as type 3 measure the current and calculate power (using ADC2 and the resistance settings) then turn that OFF IO1 and turn ON IO2 the R2's will now be connected measure current and power with ADC3 and then connect all of them and measure power and decide witch of the 3 variants provide most power for those solar conditions then have that selected until there is a large enough change in solar.
It is all implemented just needs to be tested and modified in the next weeks.  Then I will also need to almost fully rewrite the user manual as there are quite a few changes with this new firmware version. And also I need to modify the computer app the one the comes on the Wyse mini computers.
Reply all
Reply to author
Forward
0 new messages