Post a new topicPost a reply Page 1 of 1   [ 4 posts ]
Author Message
 Post subject: Battery level
PostPosted: Wed Nov 30, 2011 12:03 pm 

Joined: Sun Sep 04, 2011 1:43 pm
Posts: 8
Good Morning:

I'm working for weeks with SquidBee I have acquired. I am using the arduino uno But I have a question about the level of battery charge. Is there any way to measure it? There is a library for this? In advance thank you very much

regards,


Top
 Profile  
 
 Post subject: Re: Battery level
PostPosted: Fri Dec 02, 2011 7:42 am 

Joined: Mon Sep 28, 2009 11:06 am
Posts: 2052
Hi rgcac,

No, there is not a library for that, it depends on what battery you use.
You can use one of the analog inputs of Arduino to measure the voltage of the battery, but be careful, the maximum value of the analog input is 5V, if your battery has more than 5V (e.g. 9V) you have to adapt that vale to the 0-5V range. You can adapt it using a resistor divider http://en.wikipedia.org/wiki/Voltage_divider. Once you have the adapted voltage in Arduino you can "calculate" the actual voltage of the battery.
Use resistors about 1-10 megaohms!

regards


Top
 OnlineProfile  
 
 Post subject: Re: Battery level
PostPosted: Fri Dec 02, 2011 9:49 am 

Joined: Sun Sep 04, 2011 1:43 pm
Posts: 8
Good Morning:

Thanks for the reply. It's exactly what I did. But I have a question about the resistance of 1-10Mohm, because I've used two 1kohm resistance. It needs to be of 1-10Mohm? With a multimeter I measures the impedance of the analog input to ground and was 1Mohm. It may be true? .. Thank you in advance ..

regards,


Top
 Profile  
 
 Post subject: Re: Battery level
PostPosted: Wed Dec 07, 2011 9:06 am 

Joined: Mon Sep 28, 2009 11:06 am
Posts: 2052
Hello rgcac,

Yes, it should be a very high resistance in order to shave current.

We mean you can divide the voltage to the half. But it is better to so so with 2 high resistances (equal) since the battery will not be discharged in a fast way.

Yes, the analog inputs are really high in order to be an ideal load and do not interfere in the circuit.

Best regards


Top
 OnlineProfile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 1 of 1   [ 4 posts ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Libelium theme based on 610nm Style by Daniel St. Jules of http://www.gamexe.net


© Libelium Comunicaciones Distribuidas S.L. | Terms of use