How can I use a led on Arduino Pro Mini 3.3v to indicate low battery(so I can change it before it dies).
Hello.1. If I am using this board with an BMP085(minimum 1.8v like atmega328P to maximum 3.6v) pressure sensor and CR2450 battery witch is 3v, should I connect the battery to VCC or RAW going in the voltage regulator. I want the battery to work as much as it can ....You can wire the battery to the boards Vcc pin. 2. How can I use a led on Arduino Pro Mini 3.3v to indicate low battery(so I can change it before it dies). One way is to first have the ability to measure the battery voltage wired to the Vcc pin. You can use the method Nick suggested in his prior post. Or a little 'hack' might work as well. There is a on-board red led power light on the Pro Mini board. If you solder a small jumper wire from the junction of R11 and the anode of the red power-on led to an unused analog input pin, you should be able to measure the constant forward voltage drop of the red led, which should be about 1.5 or so (measure it with a DMM so you know what yours actually is). Because the analogRead() command uses Vcc (Avcc actually) as the reference for analog reading, you will find that the 'count value' returned from reading the led Vf will gradually rise as the battery voltage decreases. So you can have a simple function that occasionally reads the analog input pin and when the count value has increased to the 'cut-off' value you want to alert on, you can then turn on the pin 13 led. Simple, no?LeftyThank You,Razvan