Pages: [1]   Go Down
Author Topic: Low battery voltage detector? (9v total battery voltage, 5v regulator)  (Read 1332 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 10
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I was going to try and make a low battery voltage indicator using an LM339, and after I figured out the circuit itself I would connect it to an Arduino input, and make my program to give a visible indication of a low battery. What I was going to attempt was to have a 5v voltage regulator connected to "input 1 minus", using a voltage divider circuit with a 10-ohm resistor and a 4.7 k, to make the voltage go down by a very small amount. (voltage drop of like 0.1v on the 10 ohm resistor). Then, the 9v is hooked to a 2.2K resistor, then to ground through a 4.7K resistor, with the "input 1 plus" pin connected in between them. I use a 5k potentiometer to simulate voltage changes. The output can only sink current, so I have an LED wired to 5V, through a 470-ohm resistor then to the output.

The circuit does not seem to work as I intended. I wanted to voltage-drop the 9v through resistors to be close to 5v, so that when the battery voltage started to drop, the voltage that the chip would see would be lower than the reference voltage, causing the output to change. My LED just stays on all the time until the voltage is too low to actually light it up. That's not exactly what I'm aiming for. Am I missing something here? This circuit is currently on a bread-board by itself, I just wanted to figure out if my idea worked. So far, it doesn't.

If you use a series resistor voltage divider circuit, could you bring the battery voltage within the range of the analog inputs on the Arduino, and then just use the analog read function to check the battery level?
Logged

UK
Offline Offline
Faraday Member
**
Karma: 99
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
If you use a series resistor voltage divider circuit, could you bring the battery voltage within the range of the analog inputs on the Arduino, and then just use the analog read function to check the battery level?

This is the easiest way.  Use a 2:1 divider for a 9v battery.

Use large values of resistor, so they don't drain the battery.

Something like 100KΩ should be good.  Use a 100KΩ between ADC input and ground.  Use a 100KΩ between ADC input and battery +.

(make sure the ADC->Ground resistor is in place before you do anything else or you may nuke your chip).

The ADC will read between 0 and 4.5V (ish) from the divider.
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Canada
Offline Offline
God Member
*****
Karma: 7
Posts: 591
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

We'd need to know a little more I think.  How much I/O do you have available on your MCU to dedicate to this?  Would you have 1 digital and 1 analog?
Logged

Facts just don't care if you ignore them.

Offline Offline
Jr. Member
**
Karma: 0
Posts: 95
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

If you really want to use an external circuit, check TL431's datasheet.

I'm not sure if it's your case (I'm unable to read circuits by description), but LM339 won't work unless the voltage at their inputs is at least 1.5V to 2V below its own voltage supply (check datasheet of specific part to know exact value; different manufacturers have slightly different values).
« Last Edit: June 15, 2012, 09:09:02 am by Njay » Logged


Pages: [1]   Go Up
Jump to: