Hi,
I am running an Arduino Mega in the field by battery (9V) directly through VIN. Is it possible to monitor the battery voltage and power off the Mega before the voltage drops below the necessary voltage to power itself?
Hi,
I am running an Arduino Mega in the field by battery (9V) directly through VIN. Is it possible to monitor the battery voltage and power off the Mega before the voltage drops below the necessary voltage to power itself?
Is it possible to monitor the battery voltage
Yes you need to use a potential divider to get it down to below 5V.
and power off the Mega before the voltage drops below the necessary voltage to power itself
Much more tricky, you will need exrat components to disconnect the power, maybe a relay.
Grumpy_Mike:
Is it possible to monitor the battery voltage
Yes you need to use a potential divider to get it down to below 5V.
and power off the Mega before the voltage drops below the necessary voltage to power itself
Much more tricky, you will need exrat components to disconnect the power, maybe a relay.
I agree with Mike. Put a relay on the power line, and between it and Vin, put a voltage divider that will go to 5 volts, read it to an analog in, and have it as an interrupt to cut power to the relay off a digital pin.
Good way to match this up would be to use a higher rated battery. As I mentioned on another topic, I'm using a 8.4V 4200mAh RC battery to power my current project. Should give me a minimum 12 hour run time.
Thanks gentlemen for your help, I really appreciate it.
You get a battery that has a auto cutoff. I have the LiPo's from Sparkfun that have a protection circuit and under voltage protection.