Getting battery level, while in charge

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
perfaram
 
Posts: 10
Joined: Tue Jul 22, 2014 11:00 am

Getting battery level, while in charge

Post by perfaram »

Hi all !
First thing, you must know that I'm a total newbie about electronics (but not about programming).
So here's my question : Is it possible, using this Li-Ion battery charger and this battery current sensor to get the battery charge level ?
Seeing how the current sensor works and is designed, I think it that, when charging, it will show an unrealistic percentage. But i'd like to be proven wrong !
Here's what I've been thinking to :
BATTERY-SENSOR.png
BATTERY-SENSOR.png (154 KiB) Viewed 374 times
Any ideas ?
Last edited by perfaram on Thu Jul 24, 2014 3:12 pm, edited 1 time in total.

User avatar
adafruit_support_bill
 
Posts: 88136
Joined: Sat Feb 07, 2009 10:11 am

Re: Getting battery level, while in charge

Post by adafruit_support_bill »

No. As diagrammed, it would just short out the battery. But it would not work anyway. Since it is a current meter, it will only tell you what the charge current is. That actually decreases in the last phase of the charge.

What will work to some degree is a voltage meter. The battery voltage will range from about 3v when drained to about 4.2v when fully charged. It is not completely linear over the charge cycle, but it will give you an idea of when you are approaching full charge.

perfaram
 
Posts: 10
Joined: Tue Jul 22, 2014 11:00 am

Re: Getting battery level, while in charge

Post by perfaram »

adafruit_support_bill wrote:Since it is a current meter, it will only tell you what the charge current is.
Exactly what I expected...
INA219 Board Product Page wrote:measure both the high side voltage and DC current draw
So, can I use INA219 as a voltage meter ? Or should I use another thing ? Is there any voltage meter that is known to be good ?

Thx in advance

User avatar
adafruit_support_bill
 
Posts: 88136
Joined: Sat Feb 07, 2009 10:11 am

Re: Getting battery level, while in charge

Post by adafruit_support_bill »

An Arduino analog pin will read 0-5v with 10-bit resolution. You can use an ADS1115 if you want 15-bit resolution.

perfaram
 
Posts: 10
Joined: Tue Jul 22, 2014 11:00 am

Re: Getting battery level, while in charge

Post by perfaram »

Here's what I came to :
board_bb.png
board_bb.png (126.25 KiB) Viewed 329 times
But again, I think I will just get the charge voltage...

User avatar
adafruit_support_bill
 
Posts: 88136
Joined: Sat Feb 07, 2009 10:11 am

Re: Getting battery level, while in charge

Post by adafruit_support_bill »

Don't connect the Arduino 5v pin to the output of the charger! That will put 5v directly across the battery terminals.

How are you powering the charger?

perfaram
 
Posts: 10
Joined: Tue Jul 22, 2014 11:00 am

Re: Getting battery level, while in charge

Post by perfaram »

I'm just reproducing what I saw here
If you want to use the battery while also having it connected to the charger (less plugging and unplugging that way) you can simply use the BATTERY OUT connecion on the right. The IN and OUT ports are connected together on the circuit board so it acts as a pass-through

To charge, connect a power supply to the top of the board.
The charger is powered using USB. And the battery shown in the schematic is a placeholder.

perfaram
 
Posts: 10
Joined: Tue Jul 22, 2014 11:00 am

Re: Getting battery level, while in charge

Post by perfaram »

Sorry, just understood what you meant... yes, I screwed the schematic. Battery + must be connected to VIN...

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”