diy solar

diy solar

SoC measurement of 48VDC LiFePO4 battery bank via Modbus

jwgorman

New Member
Joined
Jul 19, 2020
Messages
4
Hi, I have a 48VDC bank made up of 4 pretty average Jaycar 12VDC 100Ah LiFePO4 batteries in series. I am trying to determine the SoC of this stack - I can read the voltage off a Morningstar PWM TS45 charger controller, and I can read the energy usage off a Modbus kWh meter tracking the pure-sign inverter output, but does anyone know a Modbus-enabled battery shunt that could reliable give me an SoC reading? Thanks! John
 
The Victron Smartshunt VE.Direct port is actually an RS232-TTL port. The shunt provides 2 "packets" of data continuously at about 1 second intervals. I simply listen to the com port in a separate thread and update the in memory data which I can then process at whatever interval I want. The data is provided in a Label : Value format and the protocol is well documented.

Just apply the correct Multiplier for each data value V = 52408 * 0.001 for example.

This is the data provided by the Shunt as I am using it.
PID 0xA389 Product ID
V 52408 Channel 1 Battery Voltage
I -1755 Channel 1 Battery Current
P -92 Instantaneous Power
CE -221331 Consumed Amp Hours
SOC 279 State-of-charge
TTG 0 Time-to-go
Alarm OFF Alarm Condition Active
AR 0 Alarm Reason
BMV SmartShunt 500A/50mVModel Description
FW 0414 Firmware Version (16 bit)
MON 0 DC Monitor Mode

H1 -291483 Depth Of deepest Discharge
H2 -221332 Depth Of Last Discharge
H3 -123791 Depth Of Average Discharge
H4 2 Number Of Charge Cycles
H5 0 Number Of Full Discharges
H6 -651399 Cumulative Amp Hours Drawn
H7 5974 Minimum Battery Voltage
H8 56627 Maximum Battery Voltage
H9 447960 Number Of Seconds Since Last Full Charge
H10 1 Number Of Automatic Synchronizations
H11 0 Number Of Low Voltage Alarms
H12 0 Number Of High Voltage Alarms
H15 -7 Minimum Auxiliary Battery Voltage
H16 0 Maximum Auxiliary Battery Voltage
H17 3413 Amount Of Discharged Energy / Amount Of Produced Energy (DC monitor)
H18 4880 Amount Of charged Energy / Amount Of Consumed Energy (DC monitor)
 

Attachments

  • VE.Direct-Protocol-3.33.pdf
    388.8 KB · Views: 3
Thanks marionw - I am using a Victron 48VDC 375W inverter actually so sounds perfect. is the VE.Direct port able to be converted to or accessed via a USB port? and even though these batteries are not 3.4V LiFePO4 brick type units but rather "drop in replacements" for 12VDC lead acid type batteries that have some kind of rudimentary BMS I assume inside them, this shunt should still work with the multiplier applied?
 
A RS232-TTL to USB will work. You might have to build you own cable. I used an RS232-TTL to USB cable I had lying around, cut the end off and rewired it to work with the VE.Direct port on my SmartShunt. I only used pins 2&3 on the shunt
 
thanks marionw - I like that idea. seems less affordable and less direct than your implementation but out of interest would the MK3-USB cable from Victron also potentially allow you to access the properties of the Smart Shunt if you followed the Ve.Direct protocol? this is basically what I want to do - gauge the state of charge of the battery bank to determine when to switch a relay
 

Attachments

  • LiFePO4_AClighting_Displacer_20240301a.pdf
    36 KB · Views: 1
Cheap prospect.

PZEM-017
Available on Amazon, eBay, AliExpress, and Banggood. About $15.

1709250003130.png
 
thanks @RCinFLA I have used the AC versions of the Modbus RTU PZEM - with the right coefficients/multiples they're ok with voltage and frequency but not that accurate on powerFactor it seems. but do these DC PZEM units give you SoC as a percentage? in my case the batteries I'm using are pretty generic 12V 100Ah LiFePO4 (drop in lead acid replacement) units with some kind of built-in BMS/circuit protection so no visibility into their workings. just 4 X 12V in series in this case...
 
Back
Top