User Tools


Power Management

TruConnect power management currently supports a number of power modes:

Mode Description Minimum
Current Consumption
Bobcat module
awake All functions available 3.5mA
low power advertising Advertising as peripheral, UART disabled, responds to mode_sel 35µA
deep sleep Minimal power state, UART disabled, responds to mode_sel 1.65µA
power off Disable external power regulator 0A

In the following discussion, sleep refers to deep sleep mode.

You can configure your ACKme BLE device to transition between power modes in a variety of ways, depending on the level of GPIOs, and on activity on the UART or wireless BLE interface.

  • enter low power advertising mode when there is no activity for a specified duration
  • deep sleep or wake depending on the level of a GPIO
  • deep sleep or wake on toggling the level of a GPIO (edge-triggered)
  • deep sleep or wake on timeout
  • power off when there is no activity for a specified duration
  • power off when a GPIO is held low
  • power off when there is no activity for a specified duration

GPIO Power Management Functions

GPIO functions are set with the gfu (GPIO function) command.

sleepwake GPIO function

The sleepwake function is an input:

  • sleepwake assert: Wake the module from sleep
  • sleepwake de-assert: Put the module to sleep

shutdown GPIO function

The shutdown function is an input. It has two modes:

  • activity function NOT assigned:
    • shutdown level change, module asleep: Wake the module from sleep
    • shutdown level change, module awake: Put the module to sleep
  • activity function IS assigned:
    • shutdown assert for >1 second: Force the activity GPIO low

activity GPIO function and system activity timeout

The activity function is an output.

When there is activity on either the BLE interface or the UART, the activity GPIO level goes high.

The system activity timeout (sy a t) variable determines the period of inactivity before the activity GPIO goes low.

Power Management Applications

Low Power Advertising Mode

In low power advertising mode, the module advertises with regular beacons, but minimal other functions are available.

The module awakes from low power advertising mode on:

  • A remote central connecting via the BLE interface
  • mode_sel function GPIO
  • Reset

To set up low power advertising mode, set the system activity timeout (sy a t) variable to a non-zero value, and ensure advertising is on. For example:

adv
set sy a t 120

Sleep or Wake on GPIO Level

To sleep or wake depending on a GPIO level, assign the GPIO function sleepwake to a GPIO, using the gfu command:

> gfu <GPIO#> sleepwake

For example:

> gfu 8 sleepwake
Success

Sleep or Wake on GPIO Edge-Trigger

To sleep or wake on a GPIO edge trigger, assign the GPIO function shutdown to a GPIO, using the gfu command:

> gfu <GPIO#> shutdown

For example:

> gfu 8 shutdown
Success

Note: In order to use the shutdown function as a sleep wake toggle in this mode, the activity function must NOT be assigned to any GPIO. If the activity function is assigned, the shutdown function works in a different mode. See Power Down on Inactivity with Manual Shutdown and Power Up below.

Sleep or Wake on Timeout

To enter sleep mode on timeout, set a non-zero value for the sy s t (system sleep timeout) variable.

When the module is in deep sleep mode, it wakes only on mode_sel or reset. Advertising is disabled so no activity is possible on the BLE interface. This means that if you remotely set the sy s t variable to put the module to sleep, you should also set the sy w t variable to ensure it will wake up again.

To wake from sleep mode on timeout, set a non-zero value for the sy w t (system wakeup timeout) variable.

For example, to sleep after the minimum 10 seconds, and wake after 5 seconds:

set sy s t 10
set sy w t 5
save
reset

If you set both the sy s t and sy w t variables, the module enters a cycle of sleep and wake states. To break out of the cycle, during a wake state, set the sy s t variable to 0 and save:

set sy s t 0
save

Power Down on Inactivity

To power down on inactivity, set the activity GPIO, using the gfu command:

> gfu <GPIO#> activity

Connect the activity GPIO to the enable pin on a regulator controlling module power. The regulator may also control power to other devices.

This configuration allows you to power the module down automatically, but not to turn it back on. For a more practical configuration, see Power Down on Inactivity with Manual Shutdown and Power Up below.

Power Down on Inactivity with Manual Shutdown and Power Up

While the activity function alone allows powering down, it can be used in conjunction with the shutdown function to shut down either automatically or manually, and power up manually.

For this application, assign the shutdown and activity functions to two GPIOs, using the gfu command:

> gfu <GPIO-shutdown#> shutdown
> gfu <GPIO-activity#> activity

With the circuit shown below, holding down the manual shutdown button for one second shuts down power before system activity timeout elapses. With the system powered down, pressing the manual shutdown button powers the module back up.

Other Power Management Strategies

Reducing LED blink rate and duty cycle can result in an effective power savings in low power applications.

The sy i s (system indicator status blink behavior) variable allows control of the blink rate and duty cycle of the system indicator function LED.