Intelligent power control

Hello

I have built GPS data logger. It is powered from 3xAA Ni-Mh baterries with Step-up voltage converter (converts voltage to 5V).

The problem is that when baterries get drained, the voltage drops in couple of minutes to the level so that components get underpowered, stop working and LED on the Arduino just slightly glows. I wold like to solve 3 issues:

  • indicate low battery power
  • auto power-off when baterry power is critical
  • notify Arduino that it is going to be powered off (normally or by low power) so it can flush SD card and confirm "power off" from previous point (= power off itself)

Any solution? Is there such power circuit available on the market (ebay...)?
Thanks in advance.

You could use the Arduino to measure the voltage. I'm not sure whether it would be better to measure the voltage at the battery or at the output of the voltage converter. You might need to experiment to see which is most useful as an indicator.

You should probably use the internal 1.1v voltage reference so that the voltage measurements are independent of the voltage powering the Arduino. That would require a voltage divider that brings the maximum measured voltage below the reference voltage.

...R