OpenMarine

Full Version: Logging battery amps
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5
This was a bit of a surprise! Fitted an INA219 current sensor just across the battery monitor shunt not expecting too much, but turns out it's really quite accurate. No calibration tweaks, just multiplied the mV across the shunt by 10,000 to get to amps and it tracks very well against the battery monitor and a DC clamp meter so maybe accurate down to +/- 100mA or so. Sends the reading as signalk to Openplotter where it gets logged in InfluxDB and viewed on Chronograf.  I'll stick it up on github at some point & post a link. 

Been watching this more than youtube  Cool Big Grin

current = shuntvoltage * -10000;  

[Image: mCP65hw.png]

[Image: Ij9RANx.png]
Can it measure both charge and discharge?
(2018-08-31, 08:40 PM)Saqqara Wrote: [ -> ]Can it measure both charge and discharge?

Yes, have a look at the lower graph in the top image, the current goes from negative to positive, the charger was turned on.
Alright, I will follow in your shoes! I'll hit you up for that code once the parts arrive on the slow boat.

Good excuse to play with the ESP8266.
Great solution - pls keep sharing! I have a ESP32 WiFI + Battery laying around and will try to use this.
BTW What resistance (kOhm) have you used for the stunt?
(2018-09-01, 08:09 AM)SkipperEarly Wrote: [ -> ]Great solution - pls keep sharing! I have a ESP32 WiFI + Battery laying around and will try to use this.
BTW What resistance (kOhm) have you used for the stunt?

Main existing battery monitor shunt looks like maybe 0.1milliOhm, shunt in the INA219 is 0.1Ohm.
(2018-08-31, 12:58 PM)PaddyB Wrote: [ -> ]This was a bit of a surprise! Fitted an INA219 current sensor just across the battery monitor shunt not expecting too much, but turns out it's really quite accurate. No calibration tweaks, just multiplied the mV across the shunt by 10,000 to get to amps and it tracks very well against the battery monitor and a DC clamp meter so maybe accurate down to +/- 100mA or so. Sends the reading as signalk to Openplotter where it gets logged in InfluxDB and viewed on Chronograf.  I'll stick it up on github at some point & post a link. 

Been watching this more than youtube  Cool Big Grin

current = shuntvoltage * -10000;  

[Image: mCP65hw.png]

[Image: Ij9RANx.png]

Hi 

I'm planning to copy this, did you remove the 0.10 Ohm Shunt on the Board to get this to work ?

Thanks

Keith
(2018-09-14, 06:16 PM)keithwhite Wrote: [ -> ]I'm planning to copy this, did you remove the 0.10 Ohm Shunt on the Board to get this to work ?

Thanks

Keith

0.1Ohm INA219 shunt resister is still there, on paper makes very little difference & seems plenty accurate with it still there, though probably will remove it at some point
(2018-09-14, 09:55 PM)PaddyB Wrote: [ -> ]
(2018-09-14, 06:16 PM)keithwhite Wrote: [ -> ]I'm planning to copy this, did you remove the 0.10 Ohm Shunt on the Board to get this to work ?

Thanks

Keith

0.1Ohm INA219 shunt resister is still there, on paper makes very little difference & seems plenty accurate with it still there, though probably will remove it at some point

Thanks, time to get soldering  Smile
Excellent work
another possibility is to connect the INA219 directly to the Raspberry, because the connectivity is done by i2c.
Here is a tutorial on how to do it
https://www.rototron.info/raspberry-pi-ina219-tutorial/
Pages: 1 2 3 4 5