Configure the sleep mode in firmware


Introduction

The sleep mode setting in a firmware is specifying how the Builder Base, which the firmware is uploaded to, will behave in regards of energy usage. The setting can be found in the top right corner of the firmware builder screen.


Energy Levels

There are three energy levels that also control the connection behavior with the Q-Server.

Name

Energy Consumption

Connection Behavior

Name

Energy Consumption

Connection Behavior

1

Normal Energy

High

Always connected

2

Low Energy

Mid

Connecting if client is requesting connection (stays connected for 9 seconds grace period in case of more data needing to be transmitted → better performance)

3

Ultra Low Energy

Low

Connecting if client is requesting connection and disconnecting instantly after data transfer


Driver Examples

Normal Energy

The “Generic GPIO Out” Driver which could for example be connected to LED is classified as a normal energy driver. As the LED has to be turned on by the server with minimal wait time a client with firmware specifying this driver will not be able to go to sleep and save power on a coin cell battery.

Low Energy

The “Joystick“ Driver is classified as a low energy driver. The client can sleep until the joystick is being used. Once the joystick is being used it stays connected in case you want to sent multiple commands for example when you use the Joystick to control a remote car.

Ultra Low Energy

The “TMP36 Low Energy“ Driver is classified as an ultra low energy driver. A client with this firmware sleeps until the sensor is hitting a certain threshold difference set in the firmware. Once that is the case the client fully wakes up and sends out the value. The client nor the server will wait for more data and therefore disconnect after the data exchange has been completed.


Calculation of Sleep Mode

Based on your selection of hardware components and specific drivers the firmware will calculate its possible sleep mode automatically. You can find the sleep mode setting in the top right corner of the firmware builder detail view. In some cases you might be given control of if you want the client to sleep or not. In those cases you will be able to use the switch to set the setting to your preferred sleep mode.