Friday, 1 February 2013

Shunt Arrived!

My 50A shunt has finally arrived from China! So I went out this evening to connect up the shunt to the batteries and the Arduino.

Arduino battery monitor connected up to shunt and batteries
Oddly, I couldn't get the current reading calibration right. There is a calibrate method in the INA219 library, and I passed in the various values for the shunt and voltage and the readings kept coming out too low. I connected my multimeter in ammeter mode in series with the shunt and found I was 2.3 times too low. So I've multiplied up in the code and putting various loads on the batteries it seems to keep in tally with the multimeter, so I've left it like that for now. Voltage readings were much better now than my last attempt.

The black wire you can just about see in the photo is powering the arduino via the barrel socket and voltage regulator. It is connected directly to the battery terminals. The voltage reading was still a bit low is is multiplied up in code by 1.0034 and now it tallies with my multimeter for the range of voltages we are interested in. Of course my voltmeter could be inaccurate anyway, but these readings now do feel right, and also tally with what the Stecca solar regulator thinks the voltage is (although that only has one decimal place, the change from 12.7 to 12.8 for example seems to happen the same on the Stecca and the Arduino now).

There are 3 batteries in the bank, but I've disconnected two of them via the quick-disconnects I have on the negative terminals, so I'm just measuring one individual battery.

Interestingly I appear to have a small 0.05A parasitic load on the batteries from somewhere. I'm guessing it might be the Sterling B2B or the Webasto Thermotop in sleep mode. Everything else goes via my main control switch panel and is switched off. And no, it is not the Arduino itself, I've already discounted that from the figure ;)

So I have left it logging again overnight. I've left two halogen spots on (about 3.5A in total) and the fridge on (about 3A on 50% duty cycle). So this should discharge a single battery a reasonable amount. I should be able to go out tomorrow morning and switch the loads off... will leave it some time to stabilise and then pull the SD card out and we can look at the results now we have current and more accurate voltage readings.

I probably should have disconnected the solar panel too... as that will probably start charging when the sun comes out in the morning.... well will be interested to see if we can see its effect on the graph. It is meant to be a sunny day tomorrow.

No comments:

Post a Comment