Aug/21/13



As an intern at Electric Imp, I have had the opportunity to familiarize myself with one of the greatest challenges of creating a WiFi-capable device. Power. Power consumption limits WiFi to devices like your phone and laptop that you can always plug in to the wall to charge. But what about low-power devices – watches, alarm clocks, etc. – that are purely battery powered? Currently, most of those can run for a few years on a single battery. However, sticking a WiFi antenna on your watch will almost certainly run the battery dry in a matter of hours.

Electric Imp smartly optimizes its design for low-power WiFi transactions. It can enter a “sleep” mode, in which the Imp draws such low amounts of current that it can provide a few years of battery life (off of 2 AA’s!). The small, powerful ARM processor inside the Imp can smartly control when to enter this mode. With a second or two of latency, we are able to connect to the network and get great battery life as well. These features make the Imp truly remarkable, bringing WiFi to all kinds of devices that were previously unconnected, as well as to those which would be impractical to connect due to power constraints.

My project showcases the ways in which the Electric Imp API can be used to manage WiFi and its effects on battery life. The soon-to-be-available Olive board I have helped design involves RFID, a wireless technology used in badge scanners and other identification applications. The Olive has a slew of electronics including the AS3911 RFID chip and antenna. It is capable of reading RFID tags at 13.56Mhz with the ISO 14443 A, B standards as well as ISO 18092 (NFCIP-1). An interesting complication posed by RFID/NFC is that it needs a completely separate controller and antenna from WiFi, which means even more current draining our batteries! Despite this, I have estimated a little over half a year of battery life at about fifty uses per day.

image

What’s the secret? In addition to all the power-hungry antennae on the board, there is a capacitive sensor (the technology powering most touch-screens) that can sense when you bring your hand or an RFID card near the device. It operates at a miniscule sleep current (about 6µA), meaning that it can be kept on all the time while the WiFi and RFID functions are kept off. Once a hand or card is placed near the device, an electrical signal is sent from the capacitive sensor to the imp and its processor receives an interrupt.

After connecting the capacitance sensor interrupt to the wake pin on the imp, we can utilize the “pin1.configure(DIGITAL_IN_WAKEUP, callback)” API call. This sets the imp to wake up and turn on WiFi on an interrupt on pin 1. In this case, we also turn on the RFID and start our identification protocol. We look for any tags present, run through the checks to identify the tag’s unique ID (UID), and complete our operation by sending the data collected to the cloud where it can then trigger other operations – for example, the unlocking of a door.

Finally, we turn off the RFID and return to the low power state by using “server.sleepfor(TIME_TO_SLEEP)” which turns off the WiFi and places the imp in sleep mode. Thus, we stay asleep when nobody is interacting with the device, saving battery life. This easy control of power states through the API allows the developer to be free to make their application as battery conscious as desired.

Let’s talk a little about why you should care about this. In my opinion, the biggest reason is it allows WiFi, RFID, etc. to go where they have never been before. Previously, these high-power RFID chips, for instance, have been plugged into sockets or wired to control boxes where there is ample power. Now imagine sticking them anywhere – inside a cabinet, a box, on a tree, in your shoes!

If you are wondering why on earth you would want RFID in your shoe, just imagine walking into a specific location or through a certain door and having the lights turn. Perhaps it’s an over-simplified example, but it demonstrates how we can move beyond thinking of the Internet of Things as simply controlling various devices through our smartphones, and start contemplating a world where these devices are truly smart, anticipate your needs and respond to you naturally.

Siddartho Bhattacharya
Electric Imp Intern

Siddartho is majoring in Electrical Engineering and Computer Science at UC Berkeley.