Tools – Connecting to the IoT with the Electric Imp

Developing embedded software for the internet can be a nightmare. Ethernet chips and peripheral are very complex and require an extraordinary amount of effort and time to configure and setup properly. Driver and example code is usually provided by chip manufacturers but how secure and trustworthy is their code? Simple customizations to the stack can easily break them and the use of an external module can simplify matters but a developer must still become an expert in the module behavior. One solution for connecting to the internet that provides nearly a complete black box solution is the Electric Imp.

The Electric Imp is a platform that allows developers to seamlessly connect their embedded device to the internet without becoming an expert in internet protocols and security. The platform consists of two pieces. The first is a hardware component most commonly referred to as the Imp module. The second component is the Imp Cloud which allows application services to be developed and for the behavior of the Imp module to be customized.

The Imp Module comes in a variety of flavors. The first, known as imp001, is a development module in the same form factor as a standard SD card. Be warned, the pin-outs are NOT compatible with a standard SD card and could damage the device! A second example, known as imp003, is sold by Murata under the part number LBWA1ZV1CD-716 and sells for $12.82 in volumes of 1k. The imp003 is a surface mount device designed for production systems. Additional Imp module information can be found at https://electricimp.com/docs/manufacturing/modules/.

The Imp module contains Wi-Fi for connecting to a local hot spot in addition to providing miscellaneous I/O. The Wi-Fi configuration is setup using a new technology developed specifically for the Imp Platform known as BlinkUp. The imp001, shown in Figure 1, contains a small photodiode that is used to program the module with Wi-Fi network settings. BlinkUp is performed by downloading the Electric Imp application to an Android or iOS device, providing it with the network settings and then placing the devices screen up against the photodiode. The device screen literally blinks a white screen to transfer the network settings to the module. A developer should not look directly at the display while programming the Imp module due to potential health side effects. If you attempt to program a module, make sure you read the Imp documentation on BlinkUp.

The I/O can be used as simple general purpose input / output or can be configured for UART, I2C or SPI communication. The specific pin configuration and behavior of the Imp module is defined by the Imp Cloud, shown in Figure 2. The right hand side of the console is used to define the device behavior such as configuring the I/O pins, reading and writing data and pretty much anything a developer would want the Imp module to do. The Imp Cloud uses the Squirrel programming language for the device and the web application programming. The web services are developed on the left hand side of the console and is known as agent code. The final portion of the console is made up of a server log that records agent and device behavior.

For a very simple application such as a remote sensor monitor, there might not even be a need for a microcontroller in the system! Digital sensors using I2C or Spi can be connected directly to the Imp module and device code written in the console can read the sensors and transmit their data back to the agent for processing. A more complicated system might instead use a microcontroller to collect data and then send it to the Imp module over UART. The beauty of this type of system is that the microcontroller doesn’t need to be concerned with the internet or security but only to send formatted data out a UART. Simply trivial!

A developer can get up and running with the Electric Imp platform in a matter of a couple of hours with an investment of less than $50. The bare necessities would be to purchase an imp001 module (Digikey 1413-1002-ND) and the April break-out board (Digikey 1413-1004-ND) for $35 plus shipping. Any development kit lying around the office could then be interfaced over UART along with any spare sensors. The developers cloud component is free and since Squirrel resembles the C programming language, getting a simple IoT device up and running takes less than half a day.

The use of the Electric Imp platform has the potential to drastically simplify the process of connecting an embedded system to the internet. NO TCP/IP stacks, low level drivers or endless concerns about system security. To learn more about the Electric Imp check out their developer page at https://electricimp.com/docs/.

Share >

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.