Shunt trouble?

138 views
Skip to first unread message

wmckeenster

unread,
May 18, 2021, 12:03:47 AMMay 18
to electrodacus
Hi Guys,

Finally got my system up and running.

Details:
- 8S13P LifePO4 bank (300ah cells x 104 = 100kWH = 3900ah)
- 84 x 250W solar panels (42 DSSR20's 2 panels each)
- Dual PV setup (14pcs PV1 and 28pcs PV2 - 14pcs EXIO4 type 1, 14pcs EXIO5 type 6, 14pcs EXIO6 type 6 as per Dacian recommendation)

Issues:

- Shunts not reading correctly imo (charging seems to be working tho)
- Battery % remains at 0%

Screenshot pictures attached of settings and monitoring screens. Any suggestions of what is wrong?

Thanks in advance,

Wayne


IMG_2695.JPG
IMG_2718.JPG
IMG_2703.jpg
IMG_2716.JPG
IMG_2711.JPG
IMG_2712.MOV
IMG_2710.JPG
IMG_2717.JPG
IMG_2709.JPG
IMG_2715.JPG
IMG_2714.MOV
IMG_2719.JPG

Dacian Todea

unread,
May 18, 2021, 12:49:32 PMMay 18
to electrodacus
Wayne,

What sunt values do you have as those seems to be just the default values and you need to change those to match your current shunt resistance for both the battery and PV shunt. Then the current shown will be correct. Also when you powered ON the SBMS0 there should have been zero current through both shunts if all was installed correctly as the SBMS0 should be able to turn OFF all loads and all charge sources and do a zero offset calibration.
It seems you have the EXT IO4, IO5 and IO6 connected only you also need to have the EXT IO3 to allow SBMS0 to control your load likely a large inverter.
The shunt sense wires seems a bit strange as as there are only the solid color wires from a CAT cable and you should use a twisted pair like say Orange and White orange that are twisted connected to PVn and PVp
A photo of how the shunts are installed will be useful to diagnose the problem. 

That is sure the largest installation I seen up to now. The 3900Ah battery seems absolute overkill :) unless you want to power a small village

wmckeenster

unread,
May 18, 2021, 7:34:58 PMMay 18
to electrodacus

What shunt values should I use? Here are the shunts I'm using  22M1200A50 - 1200 Amp 50 DCmV DC Current Shunt Ram Meter, Inc. See attached pic for shunt arrangement.

I removed all loads before powering the SBMS0 up (plugging in 12 pin ribbon cable. Then attached loads afterwards. 

I will be using these tripable circuit breakers on each of my 4 Magnum MS4024PAE inverters once I have brackets made to surface mount them. What is the best way to control them via EX IO3?

OK, I will redo the shunt CAT6 wires to use twisted pairs. I see the potential issue.

Why would the battery be showing 0% though?

Yes, it is a rather large system but future plans warrant it. I'll also have a separate more modest electrodacus driven system for the well/pump and gate house of only 600-900ah.

Thanks for all help and support.

Wayne
IMG_2703.jpg

wmckeenster

unread,
May 18, 2021, 7:40:33 PMMay 18
to electrodacus
BTW, those small 1/0 wires in pic were temporary. Have two 1/0 now temporary and they still get quite hot so will use solid copper bars 2 inch by 1/4 inch bars for solar bus to shunt, battery and load bus like I have for the inverter bus bars.

Dacian Todea

unread,
May 18, 2021, 8:10:49 PMMay 18
to electrodacus
Wayne,

Seems both shunts are the same but seems over the top you should have got the 100mV version of those 1200A
In any case you need to set the value for both PV shunt and battery shunt to 0.05V/1200A = 0.0416mOhm then current shown by SBMS0 will be correct.
Is a bit of a mystery why the SOC shows as 0% best guess is that you had one of the battery shunt sense wires disconnected so it showed a fake 500A discharge current for some period (should be hours to get from 50% initial install to 0%)
It depends on what current that tripping coil needs you may want to use some normal close SSR like the CPC1705 probably one of them or each trip coil and that will be controlled by EXT IO3

wmckeenster

unread,
May 19, 2021, 9:46:39 AMMay 19
to electrodacus
Thanks Dacian. Shunts reading correctly now. Why would 100mv shunts be better? Should I buy the 100mv ones (if they have them) as I dont mind spending the money to do it right?


Also, what does the green LED indicate on the DSSR20? I have 3 out of the 42 with no green LED lit and the connections are fine.

Thanks again!

Dacian Todea

unread,
May 19, 2021, 12:15:00 PMMay 19
to electrodacus
The smaller the resistance of the shunt the lower the measurement resolution.
The SBMS0 has plus minus 90mV input range for current shunt measurement and so with 100mV shunt it can measure up to 1080A (but internally the SBMS will stop displaying above 750A anyway).  With 50mV shunt it can measure up to 2162A so way above what will be displayed.
Since the ADC is 16bit and the current shunt is bidirectional there are 15bit resolution in each direction thus 32768
So with your 50mV shunt minimum current it can discern is 2162A / 32768 = 66mA so the smallest change in current it can see is 66mA where with 100mV it can see 33mA change.
Since you measure fairly large currents I will not be worried to much about the lower resolution seeing in steps of 66mA so as you already have this current shunts it makes no sense to upgrade to 100mV ones.
Comment was made for those that read this and did not purchased a shunt already. 
That is normal open circuit SSR and you should be able to also use that it will just need to be connected differently. Like the input will be supplied from battery through a resistor and then that input will be shorted by the EXT IOx set as type 5
So in normal operation the EXT IOx will be close circuit shorting the SSR input thus the output of the SSR will be open circuit then if the EXT IOx becomes open circuit the SSR input will no longer be shorted so it will be supplied through the resistor and the output will become close circuit tripping the breaker that will have his trip coil in series with the SSR output connected to battery.
It is a bit strange that green LED is no lit maybe the remote heat connection wire (the one in the small grey connector is not making good contact). The green indicates that diversion circuit is active so solar panels are diverted to something like a heating element. I assume the red LED works on those DSSR20's when battery charging is required.

Bernd

unread,
May 19, 2021, 4:21:07 PMMay 19
to electrodacus
oh my good, Wayne,

thank you so much for sharing. This is insane!
I have a very small system with 24V and 1120Ah... I love what you build. Beautiful....

Here are my thoughts (I am only a beginner)....

- your single 13P cells seems to have only one small busbar to next next cell. All current must go through this metall. Maybe add some more connectors from cell 1 -> cell 2 etc..
- the cells in front of picture 2703 will be less used than the cells on the top of the picture, due to busbar connections always on the upper cells. Maybe switch the busbars bottom - top - bottom - top ... etc 
- the cell compression does not look optimal. Consider compressing each single 13P cells and then pack them all. Also maybe compress the whole cell and not only 40%?

I know all this is work in progress, but maybe this are some hints in the right direction?!?

Good luck and have fun for your next steps

Bernd

Dacian Todea

unread,
May 19, 2021, 10:33:40 PMMay 19
to electrodacus
Wayne,

Bernd makes some good points. I did not noticed that the cells where connected is series with only a small busbar. 
Compression is also a good idea as it will increase your cell cycle life very significantly.

wmckeenster

unread,
May 19, 2021, 11:21:59 PMMay 19
to electrodacus
Dacian/Bernd,

Thanks for the suggestions. I love this forum, everyone is so awesome and generous with their time and expertise. Dacian, you are a genius. Seriously. 

Still a work in progress, just got up and running for a "proof of concept". The posts on the battery terminals wouldnt support 2x 1"x1/8" bars with the nuts so I think only solution is to drill and tap between the parallel bars? Any other suggestions? 

All main bus bars are 2"x1/4" solid copper. Im using temporary (until I get more solid copper bars) 2x 1/0 cables for Battery and solar connections and they get hot AF so this is priority as well.

Compression is a must as well, I agree. We made a custom pallet so we can work on it (and upgrade) and plan on using unistrut and all thread to keep cells tight, but I worry about stress on the small M6 terminal posts during compression and potential swell. We used carbon conductive grease on all connections, terminals and nuts and that made a HUGE difference.

I really really need this monitoring on my phone in the very near future but thats another learning curve project.

Thanks guys,

Wayne

Dacian Todea

unread,
May 20, 2021, 12:26:36 PMMay 20
to electrodacus
Wayne,

Best solution will be a single copper bar not connected directly to cells and from that bar connections to each cell trough flexible (stranded) copper wire.
Here are some braided battery strap maybe a bit short but you can build something similar http://store.evtv.me/proddetail.php?prod=braidedstrap50mm
So each cell will have two of this and imagine bending this up 90 degree then take only one of those copper bus bars that you already have that has 13 holes and connect the positives from the 13 cell #1 on one side and on the other side the 13 negatives of cell #1 so there will be a longer M6 screw trough the braided strap then copper bar and on the opposite side of the copper bar the braided copper strap from cell 2
Hope you understand my description. This way there will be zero stress on any cell terminal and the current will be perfectly distributed to all cells.



wmckeenster

unread,
May 22, 2021, 1:38:35 PMMay 22
to electrodacus
not really sure I understand your reply? I will have custom braided bars made as per your suggestions. BTW still 0% battery reading after resetting no load. not sure what that is but system working great so far. SMBMS0 damaged?

Dacian Todea

unread,
May 22, 2021, 1:45:24 PMMay 22
to electrodacus
Check if battery shunt sense wires are connected correctly meaning ADC1p is on the side of the shunt connected to Battery+ and ADC1n is connected to the Load side of the shunt.
You have a 3900Ah battery so 1% of that will be 39Ah and you will need to put 39Ah in to battery in order to move the SOC by one percent so 39A for 1h put in to battery or 78A for 30 minutes.
Do you have a photo showing the SBMS0 charging current ?
If you charge the Battery current should show a positive value say +200A and SOC will increase slowly then when any cell gets to 3.55V meaning full battery the SOC will be reset to 100% and from there you will have the correct SOC for the battery.
So you will need a full charge for the SOC to display the correct value.
Also if you turn OFF all loads and all charge sources both shunts should read 0A in case of battery it will be -0.050A or so as the SBMS0 self consumption is added there.
A photo of the diagnostic screen on the SBMS0 will also be useful.  


wmckeenster

unread,
May 22, 2021, 2:17:13 PMMay 22
to electrodacus

attached are pictures of the SBMS0 screens as requested. Before reset again, I removed loads but did not remove DSSR20 charge sources as I assume this is taken care of with the SBMS0
Dacian2.JPG
dacian1.JPG

Dacian Todea

unread,
May 22, 2021, 2:38:50 PMMay 22
to electrodacus
I remember you mentioning that you set the current shunts resistance value correctly but your battery shows more than 2x the PV current when they should be equal.
Double check in the ADC menu that both battery and PV shunts are set as 0.0416mOhm (they clearly not) then go to Device Settings menu and push the Save device settings. 


The current shown also seems unusually low. I'm guessing you also have a load connected not just charging.
Looking at the diagnostic PV values the zero offset was set at 32735 and current value reads 34823 so delta is 2088 since I calculated the value you get for that shunt 0.066A then if you have set the PV current shunt corectly in the ADC menu the you will read 137.8A that makes a lot more sense considering the size of your PV array.
Then on the battery shunt you have a delta of 605 (assuming zero offset calculation was done correctly) so 605 x 0.066A = +39.93A battery charge current.
So your real values may be 
137.8A PV current 
+39.93A Battery current
97.87A Load (so you have a 2600W load connected).

You need to better understand your system especially with such a large system


wmckeenster

unread,
May 22, 2021, 4:38:52 PMMay 22
to electrodacus
Dacian,

Currents were reading fine until I reset and pulled power (loads) off. I dont think I pushed save settings tho.

See attached for Screenshots. I can take video. Still shows 0%?

thanks,

Wayne

2.JPG
4.JPG
3.JPG
1.JPG

wmckeenster

unread,
May 22, 2021, 4:43:19 PMMay 22
to electrodacus
ADC1p is connected to the battery side of the shunt. ADC1n is connected to the load side of the battery shunt.

Dacian Todea

unread,
May 23, 2021, 1:22:02 PMMay 23
to electrodacus
Wayne,

You need to push Save Device Settings else after a power cycle the settings for current shunt will be lost.
Can you show me the advance parameter settings screen ? Have you made any changes there ? I see you power cycled again so did it showed 0% when you plugged in ? or did it showed 50% and dropped to 0% ?
I see that you always have that 2600W load. What is that ?
Nevermind.  I just took an SBMS0 I had on the bench and set 3900Ah as battery capacity and I see 0% SOC. None had such a large battery before and I did not test that. Maybe there is some error likely a variable that is not defined as large enough.
I will investigate this and probably you will need a firmware update.
It seems that max battery capacity for witch it works correctly is 2147Ah (A bit strange but I will look into where the problem is so ignore all my above questions).
For now just set the Battery capacity to 1950Ah and while this will not be correct you will have a SOC indication.
So when you will power ON it will show 50% then if you charge at some point battery will be fully charge and SOC will reset to 100% SOC and from there the SOC indication will be correct only that with half the real battery capacity 50% will mean 75% and 0% will mean 50%
I will look in to the problem today and I hope I will find the issue and release a firmware update. It will not affect anyone other than you as up to now none had a battery above 2000Ah.

Dacian Todea

unread,
May 23, 2021, 2:36:20 PMMay 23
to electrodacus
For those interested I found the problem tho is a bit of a strange issue likely related to compiling with optimisation enabled.
From the 2147 limit you will think it is related with a int32 as that is limited to 2147483647 and I do a multiplication with 1000000 but the problem was strangely with an int16 and not obvious in my opinion.

What I changed was this piece of code
 "
 BattCapacity=(ROMdec[2]*1000000);
 BatterySOC=BattCapacity*1.5;
"
to this:
"
 BattCapacity=ROMdec[2];
 BattCapacity=(BattCapacity*1000000);
 BatterySOC=BattCapacity*1.5;
"

Now all works correctly. The ROMdec[2] is a int16 and contains the battery capacity in Wayns case 3900 Ah problem was that anything above 2147 Ah will have resulted in an error thus SOC shown as 0% but 2147 x 1000000 is the limit of a int32 not an int16 and the BatterySOC and BatteryCapacity where both int64 so no issue there.

If anyone knows why the original code was a problem I will be curious to know.

I will upload the new firmware today and update the SBMS0 manual with the new link. The older SBMS version likely do not have this problem as nowane will install such a large battery with those and also you do not need to update if your battery capacity is less than 2147Ah as then it will not affect you. 

Dacian Todea

unread,
May 23, 2021, 2:47:16 PMMay 23
to electrodacus
Wayne,

If you have a STLink V2 programmer or you want to get one (less than $10) and update the firmware I can give you a link on the forum on how is done. If that seems to complicated for you then ship the SBMS0 to me (I will refund you the shipping costs) and I will update the firmware for you and ship it back.

wmckeenster

unread,
May 23, 2021, 3:17:15 PMMay 23
to electrodacus
 Thanks Dacian for your continued first class support. Glad you found the problem so quickly. Send me the link and info and I'll try to update. Worse case is I'll buy another SBMS0 that you can ship with updated firmware and I'll send back my 3 for updating if you have one in stock as shipping times to PO box excessive.

Thanks again,

Wayne

Dacian Todea

unread,
May 23, 2021, 5:00:49 PMMay 23
to electrodacus
I updated the manual but it may take some minutes until is update on the website so the direct link for the firmware binary is this one https://electrodacus.com/SBMS0/sbms0-v03d-v51d.bin.zip
I hown here how the STLink programer connects to the older version of SBMS0 but it will be in the exact same way for the new one https://groups.google.com/g/electrodacus/c/mlqSLOcVAbI/m/S8E7vWYAAgAJ

The firmware needs to be uploaded using an STLink v2.0 programmer like this https://www.amazon.com/Ximimark-ST-Link-Programming-Emulator-Downloader/dp/B07FCTR43B or any of the ST Discovery boards if you have one as they have build in STLink v2 programmer. There are many seller that is just a quick link example not a recommendation.
Software tools will depend on your operating system for Windows just download the tool from ST website https://www.st.com/en/development-tools/stsw-link004.html
If you are running Linux then get this https://github.com/texane/stlink
The USB port on the SBMS can not be used as this microcontroller used has no support for USB firmware upload 

Procedure is 
1) Connect BOOT0 (pin 5) to 3V (pin 12)
2) Power the SBMS0 by connecting the 12pin cell balancing connector just just supply at least 6V to Pin 1 negative and pin 12 positive
3) Connect GND (pin 9 or pin 10) , SWK (pin 6) and SWD (pin 8) to the respective pins on your ST-Link programmer.


Reply all
Reply to author
Forward
0 new messages