Current Monitor/Shunt

He mentions the use of a second PZEM-017.
In effect, each device would be measuring current in only one direction.

2 Likes

Yeah, well, I’m working on a fork that at least removes the floating point code from the module ATTINYs.

Too much on my plate to actually test it until the end of the month, and worse I don’t have an ESP32 board, but maybe you want to take a look. GitHub - M-o-a-T/diyBMS-code: diyBMS v4 code for the ESP32 and new controller hardware

Yes using a second PZEM-017 with diodes in different directions.

One possibility is the LEM HO 50-S/SP33. It takes 3.3V input and returns a voltage proportional to the current, along with an 1.65V reference. (There’s also 5V/2.5V models.) It uses a hall sensor, so no shunt resistor required, simply thread the battery wire through it. Does measure both directions of course. Costs 20€ or so, which is twice the LEM-017 but way easier to install.

Assuming that your controller has a spare pair of differential ADC inputs, that is.

Given that diodes have a significant voltage offset, how does that even work?

hi,

got two confusing issues on my controller regarding shunt data shown on the web interface.
To start with, shunt runs, as in shows -0.2A when the 8S 308Ah LifePO4 bank is only running the controller and a rpi4 (for venusOS testing). When I turn on a 60A 24V Victron charger shunt shows +58.something Amps. Voltage reported is also fine.

What is NOT fine is that SoC started at lunch time that I got the system running at 24.08% and after 7-8h on the -0.2A I’m now 23.67%
Now, you’d think it is OK (which it is!) except that in the mean time I was charging the batteries via the 60A Victron for 2h. So would expect the SoC to be closer to 63%.

So looks like it’s measuring + and - fine in terms of Amps reported, but SOC only “picks” the consumption data.
Mind, shunt is online for a month (but with comms issues to the Controller board which were solved today. Could it be that I need to somehow reset or something the shunt?
I’m planning to charge the bank to reach balancing point, not sure this will reset SoC though.

Second issue is that on the web interface I can configure Shunt size (currently running a 200A one), output voltage (50mV) and Battery capacity (300Ah)
However no matter what, the following values wont stay to the values I set them:
Fully charged voltage want it to be 28V, but once I save the settings it goes to 90V
Tail current Amps I want it to be say 2.0A, when I save settings it’s 0
Charge efficiency factor I’ve no idea where it should be for LifePO4 EVE prismatic cells, I’d guess around 98-98, again after I save settings it’s back to 0

I wonder if this is responsible for the inability to calculate correctly the SoC.

any ideas on what I’m doing wrong?

cheers

V.

EDIT:
fooling around a bit this morning, changing all values changeable I managed to get this:

surely, shouldn’t be possible to get 105% SoC no matter what idiotic values I may have added in the charge voltage, tail current, efficiency as well as shunt size.
@stuart ?

The SoC on the current monitor will go over 100%, this is by design, but it is limited to 105%.

The idea, was that by showing over 100%, it alerts the end user that the configuration is probably incorrect and should be adjusted. Otherwise, it would be entirely possible for the SoC to be reset to 100% when the cells are only 60% full, and then continue showing 100% all the time until the battery is “really” charged.

OK, answers my github point as well :slight_smile:

would probably also make sense to have an orange or red warning strip as you do when controller reboots and browser is left behind… Or some screen warning or even change the SoC value on the TFT to flashing red/orange or whatever.
OTOH, I’m really not sure if users will be more confused when presented with a 104% SoC or a flashing 100% or flashing 105%!

Amp counter reset to 0 when controller reset or after couple days its reset by itself for no reasons. Does anyone having the same issues that i have with mine, also if there is a cycle counter after the battery’s capacity fully charged/discharged/charged for 1 cycle .

you mean the Ah out and Ah in on top of the home screen?
that will obviously reset when you restart the controller, but will also zero if you reach the fully charged state as configured in the Current Monitor basic settings:
fully charged voltage
tail current
check if when it resets, SoC goes to 100

Its cant be kept? No option to keep that information? Its would be helpful to keep track of the batteries, also if Stuart decide to make diybms commercial that option would be a must

Not familiar with how other BMSs deal with this. I’m pretty sure it has been raised before in here.

Lots of questions on it though:

  1. What do you record? just total amps in and amps out, or just one of the two (as the difference cannot be that big and only relates - I guess - at the efficiency of the battery…)
  2. Then you need to store it somewhere, SD card? internal mem? no idea.
  3. Then from my understanding it’s quite different how you charge and discharge the battery as to establish the battery condition (which I understand is what Ah measurement is inferring). Is it the same:
  • to draw 10A constantly over 24/7 and charge using solar with the daily cycle
  • to drawing bursts of 100A for an hour or two for a heavy load, and then replace using solar (or replace with mains/generator in another 60-100A burst)?
  1. Also % of discharge and SoC play a role in all that. I guess it’s different to have a battery doing daily 90-70% cycles to one doing weekly 95-15%. They both may “use” the same amount of Ah, but is the battery health the same after a couple of years?
  2. Do you simply add the amps and divide with bank Ah and somehow magically get a number of cycles done by the battery? Don’t think it works like that.

The above are my questions and by no means my field, just what I’ve read randomly over the last couple of years.
I’m sure there is a methodology that takes some (probably all?) of the above issues (and probably more that I’m not aware off) and make an educated guess on battery health. I guess that is what electric vehicles manufacturers do.
Doubt it’s a trivial task, but a start could be made :grin:

cheers

V.

Its output on the MQTT and Influx interfaces, along with the CSV log files on SD Card. But the historic data is not shown on the web interface.

Well, its not daily charge and discharge i was asking about. What i meant to ask is to record how many cycle that the battery has went through. Ex: let say an typical 280Ah lifepo4 battery have 4000 life cycle (charge/discharge/charge), if diybms could count have many cycle battery has went through that’s great. Its not so important to me its does or not as for me a have other bms that use and its does let me know how many cycle the battery went though, though if Stuart decided to bring diybms to commercially than that’s a must option to on pal with other bms on market. That’s all its was, dont know what the lecture above is for but its was not entertaining. Thank you for the free lesson.

really sorry to bother you, wasn’t my intention.
just what is a cycle on a 280Ah battery? can you explain? if it goes from 100% to 70% in a day then solar replenishes it, is that a cycle?

the problem with counting cycles is that to have useful data, you would also need to record the temperature of each cycle as that can have a dramatic effect on the # of cycles
e.g. EVE 310Ahr cells are rated >3500 @25℃ but only half that @45℃ (these are both for 90-10% cycles)

from figures I have seen 80-20% cycles bump the lifetime up to >5000

Keeping it ~100% SOC or always recharging to that level will reduce it’s life - but these things are all relative - daily cycles 10-90 is still ~10yrs lifetime!!

I have a few left.

Complete boards? How much & will you post to UK?

Thanks
Guy

Not fully complete

Requesting feature to save battery cycle count to sd card, if possible. Thanks Stuart