In this Section
How much power PyCubed mainboard draws greatly depends on what sensors are enabled and how they're operating. The estimates below were measured on a mainboardv05 with radio1 in sleep mode.
You can estimate how long your board can remain powered from a battery pack (like the PyCubed Battery Board Overview) by determining power capacity and consumption.
We like to use LG INR18650-MJ1 "18650" cells which have a capacity of 3500mAh. Since the battery board holds 6, that's a total of 21000mAh.
<aside> ☝ Recall that 1 ampere = 1 coulomb per second (C/s)
so 1Ah = 3600 coulombs (C)
</aside>
Therefore, our pack store a total of 75600C.
Now this is only an estimate! In reality, there are many factors that will impact this such as the battery voltage dropping as charge is removed, temperature, how often the board is awake, etc... This also doesn't account for any radio transmissions, which (can) consume a lot of power. To know with some level of certainty, you must test!
Below are some easy ways to decrease PyCubed's power consumption beyond the "stock" configuration.
When placed into deep sleep from CircuitPython, PyCubed's microcontroller (ATSAMD51) enters BACKUP
mode, which is the lowest power consumption mode for the device. But be careful! When exiting BACKUP
mode, the SAMD always resets (like pressing the reset button)! You can use a timer or pin to bring the SAMD out of this mode.
Therefore, each time you exit deep sleep, it will be like the board is turning on for the first time. This means your software must account for this and store configuration variables somewhere accessible (SD card, NVM, etc...).
alarm
API: https://circuitpython.readthedocs.io/en/latest/shared-bindings/alarm/index.html📅 Jan 2022
Below is a quick main.py file to test your board’s power consumption. This script will initialize the board, blink the RGB LED blue/green a few times, then deep-sleep for 60 seconds. To measure power consumption, make sure to note the comments at the top of the file.