IoT Sensor Nodes using Micro Python and the ESP8266

One challenge that is particularly interesting about the IoT is how to develop an Internet-connected sensor node.

One challenge that is particularly interesting about the IoT is how to develop an Internet-connected sensor node. Sensor nodes must be able to interface to a wide range of industrial sensors and actuators while being deployed in areas within the field where there may not be an easily accessible Internet drop or even power source. In some circumstances, using commercially off-the-shelf boards such as the Raspberry Pi with a customized daughter board can bridge the gap. When the nodes need to be deployed in high volume, at low costs and where battery life is an important requirement, the Raspberry Pi may not be the correct solution. An interesting contender to providing low-cost, low-power sensor nodes that are highly adaptable is the ESP8266.

The ESP8266, from Espressif Systems, was introduced in August 2014 and quickly became popular among maker groups. There were plenty of reasons for engineers and makers to be excited about the ESP8266. The ESP8266 is a WiFi chip with an integrated 32-bit Tensilca microcontroller, a fully integrated TCP/IP stack, and up to 1 MB Flash for code space. It is even designed to operate in environments ranging from -40C to 125C, which makes it well suited for an industrial environment.

There are two different ways a designer can use the ESP8266 for an industrial sensor node. First, the ESP8266 can be used to facilitate wireless communication with the cloud. From the factory, the part contains a TCP/IP stack that can be accessed via UART commands. A designer can connect the ESP8266 to the UART on any microcontroller and then use the microcontroller to perform sensor node data acquisition while using the ESP8266 as its own low-cost, wireless Internet gateway. A quick Digi-Key search reveals several ESP8266 modules that can be dropped into a design for less than $5 and that’s in prototype volumes. Using the ESP8266 as just a drop-in WiFi chip is an interesting solution since it requires no more than seven external components to make it work.

IoT, sensor, nodes, WiFi, Raspberry Pi

Using the ESP8266 all on its own as the sensor nodes WiFi module and also as the brains behind the sensor acquisition is far more interesting. The ESP8266 is designed to consume less than 12 uA in standby. Since it already has a microcontroller onboard, there is Flash available to customize the application code and peripherals such as SPI, GPIO, I2C, PWM, and an ADC available to communicate with and control external sensors. In fact, most sensors can be interfaced using I2C, which provides a convenient two-pin addressable interface. Higher speed sensors if required can be connected using SPI although the interface on the ESP8266 is limited to three devices. For many industrial applications, sampling at frequencies greater than 10 Hz will be rare. If these capabilities match the sensor node needs, why not get rid of the external microcontroller and extra software, and save cost and complexity?

IoT, sensor, nodes, WiFi, Raspberry Pi

Developers do need to be slightly careful when using the ESP8266 as the whole solution. For starters, they will need to create their own custom firmware to load on the ESP8266. Creating custom

Add new comment

By submitting this form, you accept the Mollom privacy policy.