Visualizing Sensor Data

December 13, 2016 | ProgressTH

Over the weekend, FabCafe Bangkok (Facebook) hosted a two-day workshop gathering engineers, designers, and farmers for their second FarmHack event. Two teams worked on two projects; a weather station connected to the Internet, and a bee counter for measuring the health of a bee hive.


Our team worked on the weather station. Using the NodeMCU (a development board with a WiFi chip on board) a light sensor and a combination temperature and humidity sensor, we were able to gather and send 3 readings to the Internet using a service called ThingSpeak.

ThingSpeak allows users to gather and use information for a variety of Internet of Things (IoT) projects. In our case, we wanted to collect and visualize the sensor data.

Visualization via ThingSpeak can be embedded into any website with code automatically produced within your ThingSpeak channel.

Below is the Temperature graph produced live from the weather station constructed at FarmHack 2.0 at FabCafe Bangkok. The weather station is currently operating on our desk. As long as it's plugged in, it will provide live updates of the temperature as well as the last 3 hours of temperatures collected.



Currently the limit seems to be 101 field entries and in our case, this means only about 3 hours of data can be downloaded into Google Docs into Sheets at a time. But there is probably a way to automate this so no data is lost and all points are collected in real-time. So for instance, the station was set up last evening, but this morning when we manually downloaded the data to put into a spreadsheet in Google Docs, only the last 101 points (about 3 hours of data) were imported.

Refining this will allow us to provide data visualizations and databases for farms (or any location wishing to collect sensor data).

The next step will be to create actual weather stations that can cope with external conditions, accurately collect environmental data by using appropriate enclosures (see Stevenson Screens) and include sensors that suit each location.

The stations need to be solar powered, so what we learned from the previous FarmHack event can be applied to the creation of these stations.

We also need to work on WiFi range, either extending the range of the NodeMCU boards we are using by including antennas, or creating relay stations. 

We learned a lot doing this project, and we will create a step by step tutorial, perhaps even a video, to help others recreate what we've done so far.