I'm trying to do a arduino project where I keep track of capacity of milliamps used from a lithium ion lipo.
Like a battery meter but I want it to be accurate and use amps instead of volts. This application needs to be very accurate.
Previous discussion was here mah fuel gauge - Project Guidance - Arduino Forum in the Project Guidance Section.
Say I have a 25V 5.3amp(5300MAH) Lithium Ion and I want to know once I have used 80% of it's capacity (4240MAH). (Lipo cells don't like to be discharged past 80% of capacity).
I think I have the code right.
Thinking of using a AttoPilot SEN-10644 180amp hall sensor.
I'm expecting peak current amps over 100amp under heavy loads.
This sensor outputs V and I to the Arduino duo Analog input ports.
sensorValue = analogRead(analogInPin); //1-1024
IFinal = sensorValue/3.7; //180 Amp sensor version
// IFinal = sensorValue/7.4; //90 AMP sensor version
An analog reading of (1) from the 180 amp sensor is .27ma
An analog reading of (1024) from the 180 amp sensor is 276.48ma
So the minimum ma the sensor can read is .27ma correct? This would be an analog reading of (1).
Now to be accurate I would want to measure ma from the sensor every 10ms.
From previous logging the motor would be pulling 2.7 to 4.5 ma every 250ms or 1/4 a second.
On Average the device uses 4240mah per 5 min time period.
This is on average 848mah per min.
14.13ma per sec
7.066ma per 500ms
3.53ma per 250ms
0.14133ma per 10ms
This can vary in how hard the device is used. Could be less amps or more amps. That is why I want to keep track of amps used.
So I want to read every 10 ms which would be an average ma of 0.14133 per 10ms.
But since the 180 amp sensor reads from .27ma to 276.48ma I don't think it will work. Not accurate enough.
I could use the 80amp version which reads ma (1-1024) (0.14ma-138.24ma) but if my motor pulls over 80 amps I will have
a failure.
So I need to find a sensor that can read a bigger range of (ma) and can take peak amps over 100 amps.
Am I on the right track here?
Can anyone help?
Mike