Monitoring the PSU voltage

I'm thinking of running my Duemillnove and display off a 7.4V LiPo battery and I want to shut down when the battery is at its safe operating minimum voltage.

Can I use one of the analogue inputs or does this get effected by the supply voltage ? Does the regulator drop out and the ADC then follow the supply voltage ie 10 bits of Vsupply not 10 bits of 5V ? :(

I looked around but didn't turn up any leads on this any ideas ?

Matt B

Well the 7.4V should go to the barrel jack or Vin, and the regulator will provide 5V as the arduino's supply.

A resistor divider can then allow a safe fraction of the battery voltage to be sensed by an analog pin.

However if Vin drops below the minimum input to the regulator (something like 6.5 or 7V) then the regulator will fail to maintain regulation and the nominal 5V will start to fall in step.

So I'd suggest specifying analogReference(EXTERNAL) and routing the 3V3 pin to AREF. 3V3 isn't going to drop so easily if the input voltage drops to 6V or so. Choose resistor divider to take the maximum possible battery voltage down to about 3V so its in range of the ADC.

BTW does it matter if the supply does drop below 5.0V for any other reason?

chewie:
I’m thinking of running my Duemillnove and display off a 7.4V LiPo battery and I want to shut down when the battery is at its safe operating minimum voltage.

Can I use one of the analogue inputs or does this get effected by the supply voltage ? Does the regulator drop out and the ADC then follow the supply voltage ie 10 bits of Vsupply not 10 bits of 5V ? :frowning:

When the supply voltage gets too low, the regulator drops out and the +5V rail follows the supply voltage less a bit.

You’ll want to shut down when the supply voltage falls to a chosen level, which will be in the range 6V to 6.4V. The Arduino uses a low-dropout regulator, so as long as you connect the Lipo to the Vin pin and not the barrel jack (which has a series diode for reverse polarity protection), the 5V supply should be maintained even if the Lipo is as low as 6V, assuming you are not drawing a lot of power from the +5V pin. So using +5V as the analog reference for the low voltage detection should not cause a problem. If in doubt, use the 3.3V pin as the reference as MarkT suggests.