Low Power Configuration

From AnalysIR WiKi
Jump to navigation Jump to search

> KontroLIR Home

We have designed the reference firmware to operate in an extremely efficient low power mode when idle (i.e. in standby / PWR_DOWN mode).

In PWR_Down mode, the device typically uses less than 1uAmp of current, which means batteries could last up to several years. Depending on level of usage, we expect battery life to be from 1 to 2 years or more.

The firmware, also checks whether the device is being powered from a USBserial adapter(5V) or 2xAAA batteries and sets a variable (usbPowered) to true or false accordingly. When not running on batteries (i.e. supply voltage is greater than 4 Volts) the variable is set to true. The system automatically goes to sleep after sending any outstanding IR signals. The only exception is the bootloader 30 second delay(with blinking red LED) which is triggered automatically on power-up and if powered from USB when the buttons 1,3,7,9 are pressed in sequence.

On start-up, any unused peripherals are disabled to reduce power and when entering PWR_Down mode (sleep/standby) all other active peripherals are disabled. The system is awoken by a pin change interrupt resulting from a press of any of KontroLIR's buttons.

In debug mode, the UART peripheral is re-enabled on wake-up as it is required to print debug information to serial. DEBUG should be disabled for normal battery operation.

Most users, should leave all of the low power operations as is. Any future improvements will be made available for use.

Advanced users can try to implement even lower power operation and are welcome to contribute any improvements to the code base.

The external I2C EEPROM and IR receivers are typically powered via GPIO pins and are typically powered off when not in use. The user is responsible for powering these on when used. If they are left powered on during idle this will reduce battery life significantly. There is no need for these to be powered on during IDLE.

The low power operations are generally implemented in the following files and functions:

  • KIR_MISC-functions.ino => KIR_initPins()
  • KIR_MISC-functions.ino => KIR_initLowPowerSleep()
  • KIR_MISC-functions.ino => KIR_goToSleep()

> KontroLIR Home