Go Down

Topic: Using LiPo Fuel Gauge for reading THIS! battery pack (Read 4420 times) previous topic - next topic

Nishant_Sood

I'm eyeing this LiPo Battery pack >> https://www.sparkfun.com/products/11360 and wanted to use the LiPo Fuel Gauge here >> https://www.sparkfun.com/products/10617 , Although the Fuel gauge can read a single cell lipo and the battery pack is a single cell battery thing as per that I think it will work! but it is good to know if anybody tried it!
"Real Men can Accomplish  Anything"

- skype : nishants5  
ਫ਼ਤੇਹ ਕਰੁਂ!
www.winacro.com

o_lampe

Why not using the arduino as voltage monitor? Just bridge the Vin pin to an analog Input and read the voltage in the void loop?

Nishant_Sood

Quote
Why not using the arduino as voltage monitor? Just bridge the Vin pin to an analog Input and read the voltage in the void loop?


That can't match the accuracy of a MAXIM fuel gauge IC
"Real Men can Accomplish  Anything"

- skype : nishants5  
ਫ਼ਤੇਹ ਕਰੁਂ!
www.winacro.com

Chagrin


Quote
Why not using the arduino as voltage monitor? Just bridge the Vin pin to an analog Input and read the voltage in the void loop?


That can't match the accuracy of a MAXIM fuel gauge IC


The Maxim chip is ~1.2mv precise while the arduino would be ~4.9mv precise. I wouldn't consider that worth the $10 or added complexity.

Btw, o_lampe, the battery pack contains a boost circuit and outputs 5V; you'd need to run a wire directly to the battery output inside the pack to measure the state of charge. Also, bridging Vin to an analog port would never be a correct method of measuring the input voltage. Actually I'm not sure what voltage is reported on Vin when powered via the USB port, but assuming it was the USB voltage, you'd be measuring that voltage against itself (the default reference is the 5V regulated voltage) and always get a 1023 analogRead().

mauried

Dont confuse precision with resolution.
The Arduino can read to a resolution of 4.9 mv , but that doesnt mean its accurate to 4.9 mv.
Its accuracy is set by the accuracy of whatever its using as its voltage referance.

Nishant_Sood

Quote
you'd need to run a wire directly to the battery output inside the pack to measure the state of charge.


So you are saying to read the 3.7volt battery directly by hacking under the pack? but then about the reference voltage I need to have the same 3.6/3.7 at the VREF too and as such need to run my arduino on the same 3.7/3.6 voltage level! if I take 3.6 or so voltage while running Arduino with 5v @ VREF then in that case I need to calibrate values!
"Real Men can Accomplish  Anything"

- skype : nishants5  
ਫ਼ਤੇਹ ਕਰੁਂ!
www.winacro.com

Chagrin


Quote
you'd need to run a wire directly to the battery output inside the pack to measure the state of charge.


So you are saying to read the 3.7volt battery directly by hacking under the pack? but then about the reference voltage I need to have the same 3.6/3.7 at the VREF too and as such need to run my arduino on the same 3.7/3.6 voltage level! if I take 3.6 or so voltage while running Arduino with 5v @ VREF then in that case I need to calibrate values!


Yes, you need to read the 3.7V battery voltage from the pack; the circuitry of the pack is boosting the battery voltage to a stable 5V output so reading that 5V output alone will never tell you anything about the charge on the batteries.

You lost me with your reference question, though. By default the Arduino's reference is going to be 5V; 3.7V read from the batteries would result in an analog read somewhere around (1024 * 3.7/5 =) 757.

My point about bridging Vin to an analog port won't work because, in general, either:
1) Vin will be higher than 5V in which case you'll wreck your analog pin.
2) Vin will be equal to 5V in which case reading it has no useful purpose.
The Arduino treats the USB voltage input as a de-facto "5V" even if it's not exactly 5V. That input voltage is the default reference voltage.

(sorry, I think I'm still doing a poor job trying to explain this)

o_lampe

I'm using this "selfcontrol" method with 2s and 3s LiPos. They feed the 5v onboard regulator and when I only Monitor the first Lipo, it works well. It would work with 1s only if you'd use an external reference.

flounder

The best circuit I found for reading battery voltage takes an innovative approach: treat AREF as the unknown voltage and use the internal 1.1V reference as the voltage being measured.  Since the ADC measures the ratio of V1/V2 and expresses it as a value in the range 0..1023, we use AREF as V2 and the unknown as V1.  But note that ADC = 1023*(V1/V2), normally we think of V1 as the unknown, so we are solving that equation for  V1 = (V2*ADC)/1023.  But what if we know V1 and need to solve for V2?  Then V2 = (1023*V1)/ADC.  The compelling value of this solution is that it requires no external components at all.

https://wp.josh.com/?s=fuel

joe

Go Up