Sensor Project History and Goals

This project was intended as an experiment to integrate sensors with the cloud. I've been experimenting with Arduinos and Raspberry Pis and came across an interesting project by Terren Peterson on hackster.io that did exactly what I wanted. Terren, Thank you very much for your inspiration. Your examples provided some excellent guidance greatly speed up my implementation.

My goal in building this project was to work through the details of what it would take to connect a sensor device to the cloud and perform some real world analytics on the data collected. As you know there is no substitute for real world experience and this really helped me understand some of the design concerns involved. In the end I have some pretty good pattern of how the IoT world could work.

The original project described the used of modern IoT and data analytics approaches to gardening. Interestingly there are several innovative startups working on just that. FreightFarm.com is one example of how this could self-contained shipping containers and technology are growing fresh food. Another is Climate.com which is providing farmers data collection and analytics solutions to help farmers optimize crop yields This is a fascinating area and I will be expanding the features of this experiment over time and reporting my progress using Twitter and my Blog.



Basic Architecture

The architecture leverages a single DHT22 temperature and humidity sensor connected to a Raspberry Pi. The Raspberry Pi runs a Python script which collects the sensor data and calls a Rest API of a node.js service running in Amazon AWS EC2. The node.js service saves the current reading and updated the history of readings to an AWS S3 Bucket.


Rasperry Pi

The second part of the experiment exposed the collected data for end user access. This is accomplished by a combination of a static Web site in AWS S3 and a pair of series of AWS Lambda functions access via the AWS API Gateway. With Terren's sample code and several AWS Services it was easy to create a basic IoT collector and analytics solution. AWS provides numerous scalable services which making this type of solution straight forward to implement.


Rasperry Pi


Detailed Design

The diagram to the right shows the sensor (circled) connected to a Raspberry Pi. In addition, at the time of the picture, the Raspberry Pi was also being used for several other LED scripting projects as well as being connected to a monitor and keyboard.

Rasperry Pi