«

»

Wake: A Sleepy Hotspot

This application for Android phones could several hundred capital dollars at each installation it’s used.

SWEETLab (Sustainable Water, Energy and Environmental Technologies Laboratory) at Portland State University needed a cheaper method to upload data from sensors on hand washing stations, latrines and cook stoves. The tools are deployed in Indonesia and other locations that usually don’t have electricity.

To measure usage, inexpensive sensors on the purification equipment collect data for upload across the internet. Previously, several sensors would wake up at a configured time, along with a GSM modem and wireless router, and send the data for the past 24 hours to a server in Portland. It worked, but this configuration costs about $450. Using an Android phone instead cuts the upfront cost to $180. Data charges to the SIM card in both cases are the same. One would assume the equipment cost can be lowered still as hotspot support comes to cheaper Android devices.

The Wake app is real simple. It keeps the device in airplane mode until the set time, then turns on for a few minutes to be a hotspot for all nearby sensor. This happens each day with the wakeup time and awake duration being configurable. The app uses an undocumented call to the Android wifi API to enable/disable hotspot mode. It also turns itself on at boot and which makes the device into somewhat of a one-trick pony.

Wake forces the device into airplane mode whenever it does not need internet access. We also turn off all notifications. and uninstall any apps that power up the phone up automatically. All this drastically reduces power consumption. The engineers at Stevens Water Monitoring Systems, maker of the wifi-enabled sensors, measured sleeping consumption at 900 mA on our Samsung test device. Using a larger battery or solar charger will support the periodic internet link for many days or indefinitely.

The video below gives an overview of the great work at SWEETLab in more detail. The team at Stevens supports a large variety of water monitoring systems in agriculture, water treatment and other applications.

youtube=http://www.youtube.com/watch?v=wZSwuRuWQMQ

Apps that use undocumented features possibly unsupported in future releases of Android, or that assert themselves at boot are frowned upon in app stores. Therefore Wake is made available only through Github along with source code. We’re contemplating addition of a feature to allow the Android phone synchronize the clocks of all sensors. Please feel free to offer suggestions for similar or additional functionality in embedded Android apps. There could be many other metrology and control use cases.