Close

Wake up timer!

A project log for LiFePO4wered/Pi

LiFePO4 battery / UPS / power manager for Raspberry Pi

patrick-van-oosterwijckPatrick Van Oosterwijck 02/04/2016 at 18:380 Comments

I added a wake up timer to the LiFePO4wered/Pi firmware! :)

There is now a new 16-bit I2C register that allows a program on the Raspberry Pi to set a number of minutes for the wake time. After spending that amount of time in the Power Off state, the LiFePO4wered/Pi will boot up the Raspberry Pi.

This feature significantly extends the potential battery life of the system for low duty cycle applications! Imagine if you want to take a sensor reading once a day, or set this up with a camera module to do time lapse photography by taking a picture every 15 minutes. Your program could be made to start at boot, do its thing, set the wake time and shut down. The whole active phase could be less than a minute, while the rest of the time, the system is sleeping and takes only ~8uA. You could run from a single charge for months!

The wake timer uses the MSP430G2131's VLO (Very-Low-Power Low-Frequency Oscillator) to work its magic. Unfortunately this timer is not very accurate, so don't expect high precision wakeups! The value written to the I2C register is supposed to be in minutes at the typical 12 kHz VLO frequency, but according to the datasheet, this frequency can vary from 4-20 kHz. So it is a good idea to run some tests to see the actual unit of time and adjust the wake time value accordingly.

Discussions