TLDR: We built an IoT demo that logs data to AWS. See live data here.
Our office dashboard showing current conditions
At DEB Associates we combine hardware and software expertise. To showcase our abilities in a new way, we are designing and building an environmental sensor for the office that highlights a number of technologies. The first revision of this project is a prototype using development boards from ST. The next revision will include custom hardware and Power over Ethernet.
High level data flow:
The device connects to the network via wifi and sends data to the secure AWS MQTT endpoint. The data is logged to DynamoDB and queried using a Lambda function.
Security is important in the emerging world of IoT. There have already been a number of major exploits from compromised IoT devices. This past year a casino's network was breached through sensors in a fish tank.
Two big parts of securing IoT devices is making sure data sent/received is encrypted and that user applications have the correct level of access to device resources. Mbed has answers for both of these issues. Check out their resources on security,
Mbed provides a rich environment for development of connected embedded devices. It provides a number of abstractions that fit together and can be mixed and matched as needed with minor development overhead:
Including Bluetooth, Wifi, Ethernet, Thread, NFC, 6LoWPAN Sub-GHz Mesh, LoRa LPWAN, RFID, Cellular
Mbed OS includes an RTOS and additional drivers and support libraries from chip manufacturers and the community.
Mbed OS also includes support for many ARM devices. It ships with a hardware abstraction layer - allowing easier portability between devices.
One of my favorite features of Mbed is that it comes with a command line interface and a package management solution and workflow. Having a background in web application development, I've enjoyed the proper package management solutions of Elixir (hex), NodeJS (npm) and Rust (cargo).
When writing embedded code, I miss those toolchains. While Mbed package management leaves some things to be desired, it is much better than nothing at all!
I used a number of Mbed libraries in this project including:
The final build will swap the Wifi interface for Ethernet and include support for additional sensors.
AWS has solutions for the major needs of an IoT project including:
In this project the device is connecting securely to an IoT core endpoint and publishing messages with sensor data periodically.
There is a rule set up to pipe messages received to a DynamoDB table. DynamoDB is a managed NoSQL database that provides consistent performance at any scale.
Finally, to display the data, I have a Lambda function (written in NodeJS) that queries the DynamoDB table and returns a JSON payload. The lambda function is managed and deployed using Apex.
Apex is a library for deploying serverless functions. It abstracts some of the routine involved in setting up functions and makes it easier to manage them over their lifetime. Apex also supports integration with Terraform for infrastructure management. Over all, Apex (and the sister project Apex Up) provide a really nice developer experience and interface to AWS.
We have an office dashboard that displays metrics and a nice background (of rotating images). I added charts showing the recent office conditions.
I also added the charts to our public site. Check them out here.
DEB Associates helps companies through the entire electronics design process. Our team is smart, reliable, and deeply knowledgeable about the intricacies of circuit design, PCB layout, and EMC.