Thanks, very interesting. I ran into the same serialstarter issues when writing a custom USB-GPS filter in Node-RED.
Nice! Regarding accuracy; the thing is more accurate than man might think. Did some quick tests today, now it has been tuned and it is SPOT ON. First impression it’s accurate upto 10mA. Tested with very small currents and even 10 mA and 20mA are visible and spot on. And going up it gets easier, and for now I think the resolution indeed is in the 0.01A or 10 mA. So, earlier posts about that that would not be feasible with a shunt which can go to 500A are not true; it’s perfectly capable of catching small currents. So, conclusion right now, if the resistor is right, the electronics are more than capable of doing their thing. Curious if you’re able to go to the 1mA domain/resolution. Keep us posted.
I do see that the shunt returns numbers that differ by 1 mA from each other (either noise or real), so at least ADC resolution appears to be good enough, but unfortunately I don’t have lab grade equipment to ensure an outcome that could be relied on, and my wife might not approve buying it
(I’m tempted though, not only for this project).
In either case it’s great to hear that at 10 mA resolution it’s accurate, thank you for confirming that!
The soc jumps and sometimes it doesn’t register an soc drop even though there has been a draw. Yes.
Sometimes the rounding on percentage can be an issue. But it seems pretty close.
Agreed. The SOC calc does need to take temps into account.
And then its own pesky inefficiencies. Which also make losses due to heat. Then the percentage loss is relative to how hard the system is being used.
JK BMS is measuring peak current and not average.
A Multiplus II with AC IN active, induced peak DC current on the batteries, and this is why the BMS never sees 0A current and always jumps between plus an minus amps.
This is why JK BMS is inaccurate in the low current range.
Do any of you open it and see which microcontroller a shunt is using? To know which resolution its ADC has?
Because if the resolution is the usual 12bits, the current quanta will be 500A/2^12 = 122mA, for 16bit the resolution will be 7.6mA and only for 19 bits and above will be under 1mA. Again for 500A. Double that for 1000A variant.
The usual microcontrollers are too noisy for a high-bit ADC and for sure you’ll get 2-3 LSBs of pure noise.
Maybe the best we can hope is probably a 16bit sigma-delta and then don’t expect less than 10mA…
I’m pretty sure the ADC is 20bits or higher even. Reason being the roundtrip accuracy of the coulomb counter.
I wish I did, but right now it’s already installed and is difficult to access. I agree with Jan, looking at the actual data returned by my 300A shunt, I don’t think the ADC can be lower than 19 bits.
I couldn’t find reliable sources for SmartShunt, but here in another thread someone confirmed that the BMV shunt, which has the exact same resolution, accuracy and voltage range specs according to its datasheet, is using MSP430F6733A that has 24-bit Sigma-Delta ADCs: Victron BMV Shunt - what internal a/d converter used? - VictronEnergy
Thank you both for finding the relevant information! ![]()
I’ve opened a shunt the other night but the PCB and microcontroller were covered with some resin against moisture.
Not to mention that exactly on top of the micro was a label with the shunt’s serial number and company’s name also covered in resin…
That confirms that even with 4 bits of pure noise, still 20 bits remains which gives it a 0.5mA resolution for 500A and 1mA for 1000A.
For 300A version the resolution could even be better than 0.3mA.
Can you please check/confirm the availability of high-resolution SoC% and other values such as Voltage and consumedAh?
Voltage is in millivolts and Consumed Energy is in mAh.
Power is in watts, and SOC is only provided with the same resolution it’s displayed (e.g. 99.9%), but they’re redundant since higher resolution power and SOC can be calculated from current, voltage, consumed energy, and your battery capacity. Assuming your battery capacity is at least 100Ah, you can get SOC with resolution better than 0.001%!
(The proof of concept script output in output.txt from my post above has a sample of how all this data is represented).
This is great.
I have published an experimental Node-RED flow to detect / reverse engineer the capacity from SoC% and consumedAh. I’t needs some work still but that will get a whole lot easier with high-resolution consumedAh values.
mAh is not the energy.
Ah are the unit of the (transfered) charge.
1A = 1C/1s
In Words: 1 Ampere = 1 Coulomb divided by 1 second
Electric current ist the charge per second.
So 1 Ah = 1 A * 3600s = 3600 As = 3600 C
or the example above
1mAh = 3.6 C
Right. It’s a bit confusingly called “CE“ in the protocol and I didn’t think much of it when writing the post, but Victron documentation does describe this field as “Consumed Amp Hours” “in mAh units”. So everything else in my post stays true.
absolutely. You are right.
