Go Down

### Topic: Low battery voltage detector? (9v total battery voltage, 5v regulator) (Read 2347 times)previous topic - next topic

#### dickcheney6

##### Jun 11, 2012, 07:53 pm
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?

#### majenko

#1
##### Jun 11, 2012, 09:18 pm
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.

#### BillO

#2
##### Jun 15, 2012, 03:29 am
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?
Facts just don't care if you ignore them.

#### Njay

#3
##### Jun 15, 2012, 04:06 pmLast Edit: Jun 15, 2012, 04:09 pm by Njay Reason: 1
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).

Go Up

Please enter a valid email to subscribe