Low Power Configuration: Difference between revisions

From AnalysIR WiKi
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''''[[KontroLIR - Arduino compatible IR remote control|> KontroLIR Home]]'''''
'''''[[KontroLIR - Arduino compatible IR remote control|> KontroLIR Home]]'''''


We have designed the reference firmware to operate in an extremely low power mode when idle.
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 Power_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.
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. For 5V, the system runs at 16MHz and does not enter sleep mode. For battery operation, the system defaults to running at 8MHz and automatically goes to sleep after sending any outstanding IR signals.
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 sytem is awoken by a pin change interrupt on any of the remote's buttons.
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.  
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 low power operations as is. Any future improvements will be made available for use.
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.
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.
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:
The low power operations are generally implemented in the following files and functions:
* KIR-MISC-functions.ino => initPins
* KIR_MISC-functions.ino => KIR_initPins()
* KIR-MISC-functions.ino => initLowPowerSleep
* KIR_MISC-functions.ino => KIR_initLowPowerSleep()
* KIR-MISC-functions.ino => goToSleep
* KIR_MISC-functions.ino => KIR_goToSleep()




'''''[[KontroLIR - Arduino compatible IR remote control|> KontroLIR Home]]'''''
'''''[[KontroLIR - Arduino compatible IR remote control|> KontroLIR Home]]'''''

Latest revision as of 07:48, 10 December 2019

> 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