Switching Power Remotely
RPi900 offers several ways of reducing power consumption, an important requirement in battery-powered installations. In one configuration, the DNT900 radio is able to control power to the Raspberry Pi, allowing it to be switched off and on remotely. Conversely, the Raspberry Pi is also able to control the radio’s sleep mode.
Controlling Power to the Raspberry Pi
Use GPIO5 of the radio module to control power to the Raspberry Pi. Enable this configuration by connecting jumper J7 using the supplied shunt:
(When the jumper is left open, power is permanently applied and GPIO5 is available for other uses.)
Switching power to the remote Raspberry Pi is then a simple matter of setting the GPIO5 register on the radio. With the DNT900 line discipline loaded on the base station, perform one-time setup for GPIO5 as follows:
(Where 0x00165E is the MAC address of the remote radio.) Then, to toggle power to the Raspberry Pi:
Of course, you shouldn’t remove power to the remote Raspberry Pi without first shutting it down. How you achieve this depends on the manner of your communication with the Pi. However, if the Raspberry Pi becomes unresponsive for some reason, toggling the power allows you to reboot it remotely.
Sleeping the Radio
The RPi900 design applies permanent power to the DNT900 radio, but a hardware sleep mode allows the radio to effectively power down, consuming only 50 μA. The attached Raspberry Pi can control this sleep mode using one of its general purpose input/output pins, GPIO18.
There are many ways to control GPIOs on the Raspberry Pi. For scripting, I recommend the built-in GPIO driver. In the following example, GPIO18 is set up as an output, and its value switched high to put the radio into sleep mode:
Sleep mode is only available when the radio is configured as a remote. (Base and router radios must stay awake to route packets through the radio network.) A remote Raspberry Pi could use the sleep mode to periodically wake the radio in order to send data, before returning it to sleep.