Cicada: An Open-Source IoT Communications Module for Energy Access

Damian Veling
September 10, 2019


We’re pleased to present

Cicada: An Open-Source IoT Communications Module for Energy Access 🚀

Cicada: An Open-Source IoT Communications Module for Energy Access

by Damian Veling | Sep 10, 2019


Reliable IoT connectivity to the cloud is a challenge, especially in remote areas with no WiFi or reliable internet connection. Connectivity is the most important component of any IoT device; without it, the device is simply a ‘Thing’.

After many struggles seeking reliable connectivity, we transitioned from a cheap off-the-shelf 2G module to a custom solution. To prevent other startups from going down this dark, debugging rabbit hole, Okra has partnered with The EnAccess Foundation to open-source our IoT Communications Module, both firmware & hardware. Links to all the materials created, and the project summary can be found here, and throughout the rest of this post.

The goal here is to provide a simple & reliable connectivity solution for other IoT startups. This should reduce time to market, allowing startups to focus on the real problem they are solving, such as energy access.

One of the major reasons why millions of households still don’t have energy access infrastructure is because physically getting to remote off-grid villages is difficult. The first village we energised in Cambodia, Prey Mreas, is a good example of how remote these villages are: the 3-hour journey from the closest city, Phnom Penh, starts with a bumper-to-bumper car ride battling oncoming traffic, followed by a bike ride over flooded rice paddies on rocky dirt roads and finally a motorboat across an inland lake to a small island… but it gets more intense. Recently we deployed smart grids on two more isolated islands in Southeast Asia – one near Busuanga, the Philippines, and the other in Central Sumba, Indonesia. Both require 5-hour transits from the nearest big cities which include plane flights followed by long and uncomfortable car rides and in the case of the Philippines, the last leg of the journey consists of a Bangka boat ride through rough seas. To add insult to injury, all of these villages were handpicked as some of the easiest off-grid locations to access, the worst is yet to come.

The road from Phnom Penh to off-grid Cambodia

This is why having remote monitoring and control of Okra grids is necessary; it reduces operations and maintenance burdens so that projects can be economically feasible which ultimately makes last-mile electrification possible. Back at Okra HQ, we’ve faced some gloomy times when our monitoring platform failed to show any household data due to loss of connection via the off-the-shelf modules used in our first generation of smart grid controllers.

We were in the dark with no way to ensure households were not. This problem was extremely difficult to diagnose and debug as there was no pattern in the way disconnections occurred. We even witnessed temperamental connectivity in our office where signal strength was indisputably sufficient. Needless to say, we maintained a few theories for why this was happening: firmware bugs, poor quality hardware, dodgy jumper cables connecting the modem to our PCB, wear-and-tear and generally poor network signal strength.

“We were in the dark with no way to ensure households were not”

Through trial and error, a core problem was discovered: hardware. The modem failed to receive enough power when the network signal became intermittent which was resultant of the fact that the capacitance across the module’s power input was much lower than the specifications detailed by the SIM800l modem datasheet. We rapidly prototyped a band-aid fix (below) to increase the input capacitance however it seemed to only provide marginal improvements.

Our band-aid fix to the inadequate capacitance seen on off-the-shelf SIM800l modules

Moving to a custom solution was clearly the best way forward to address these connectivity issues once and for all. The result is Cicada – an easy way to get production-ready, bidirectional communications for your IoT embedded device.

The Okra “Cicada” IoT communications module, open sourced by EnAccess

Here are the juicy technical design details:

It’s Platform Agnostic The Cicada firmware is compatible with any MCU and even Linux. Developers only need to provide 2 simple interfaces: a UART driver and a clock source. We have included 3 platform examples in the library for Mbed, FreeRTOS and STM32 bare metal.

Supports 2G, 3G, 4G & Wifi Commands to control these modems are not standardised among vendors. Cicada provides an abstraction layer to solve this. The drivers are abstracted away making it interchangeable between modem types – 2G,3G,4G, Wifi, etc. So far we have included 2 drivers in the library, one for a 2G modem (SIM800) and one for a 3G/4G modem (SIM7600) with plans to include a Wifi modem in the near future.

It’s Modular The Cicada hardware can be plugged into other PCBs, preventing IoT devices from being locked into a single mode of transport. It was important to support different forms of connectivity to suit flexible requirements. Some IoT devices might want to save on costs and a 2G modem can save up to 75% compared to 4G alternatives. Some IoT devices might be geared towards middle-income countries where 3G/4G telecommunications are rapidly replacing 2G networks. That’s why we made it future proof.

It supports MQTT Bidirectional communications for an IoT device is a must as it enables not only remote monitoring but also remote control. optimized for high latency or unreliable networks with limited bandwidth – perfect for remote off-grid villages. Cicada encapsulates the open source Paho MQTT Clientfor embedded platforms. Dialling up the cellular modem, opening an IP channel and sending/receiving MQTT messages can be done in less than 50 lines of code.

The Cicada library is on Github, you can check out the firmware here and hardware here. Okra will be actively contributing to the library going forward with plans to extend the library to support other transport options such as LPWAN. The EnAccess Foundation funds solutions that help organizations bring modern energy to the poorest people in the world. If you have an idea for a piece of hardware, software, or research that can transform the energy access industry, they want to hear about it!