Sleep and Battery Conservation

Sleep and Battery Conservation

bg opacity:.85 right:58%

Power Conservation

  • Continuously keeping the Argon uses a lot of power

    • Connection to Particle Cloud

    • Running loop ()

    • Responding to any interrupts or inputs

  • To limit wasting electricity and extend the time between battery charges, use sleep, which turns off some or all of the Argon components
  • Note: sleep for more than 10 seconds. Less than that use more power turning it on / off than you will be saved

Zzzz….Three Sleep Modes

  • STOP (most wake options, highest power)
  • HIBERNATE (fewest wake options, lowest power)

Sleep Considerations

  • Choosing the specific sleep mode and options depends on your specific application

  • Some things you’ll need to consider
    • How do you want to wake up the device?
    • How long in between wake periods will you have?
    • How quickly do you need the device to respond once it wakes?
  • In general, choose the mode that uses the least power but support the features you want

Power vs. Responsiveness

Sleep Power

Options to Wake Argon

signal on input pins signal on inputs
time duration time duration
specific analog voltage  
Serial input  
Wifi signal  

What Happens After Waking

Wake Methods

Sleep Syntax

  • Here is the general syntax to sleep
SystemSleepConfiguration config;
config.mode(SystemSleepMode::<<ADD SLEEP MODE>>).<<ADD WAKE OPTIONS>>;

Sleep Example #1

  • Put device in HIBERNATE and wake after 10 min
SystemSleepConfiguration config;

Sleep Example #2

  • Put device in ULTRA_LOW_POWER and wake with a falling (HIGH to LOW) signal on pin D8
SystemSleepConfiguration config;
config.mode(SystemSleepMode::ULTRA_LOW_POWER).gpio(D8, FALLING);

Sleep Example #3

  • Put device in ULTRA_LOW_POWER, and wake with a rising (LOW to HIGH) signal on pin D5 or after 2 hours
SystemSleepConfiguration config;
config.mode(SystemSleepMode::ULTRA_LOW_POWER).gpio(D5, RISING).duration(2h);

Waking but Staying Silent

  • Using the wifi to connect to the cloud takes time and uses battery

  • If you don’t need to update in real-time, you can do the following

    • Sleep the Argon

    • Wake up after a fixed time, but do not connect to the cloud

    • Read / store sensor data

    • Sleep the Argon

  • After a certain amount of time or number of sensor readings, you can send all the saved data to the cloud at once

Controlling Cloud Connection

  • To prevent automatic connection to the cloud, use the following command at the top of your code (not inside loop or setup)
  • When you are ready to connect to the cloud, run the following command in your code