Update 2014-11-04: We're calling these prototypes Sensor Pipes because they pipe data from a sensor to a place of your choosing. Read more about the proposed Open Pipe Kit here
Lately a small team of us here in Somerville, MA has been working on integrating additional sensors with the Raspberry Pi based Fido. With assistance from Mathew Lippencott and Eugene Ruenger, we have taken on the mission to harvest DustTrak II data remotely for the sake of later having the ability to test other DIY air quality sensors against the data set generated by the coveted DustTrak II. Originally Fido has been a simple temperature alarm but combined with the power of the the all-purpose environmental data tracking database known as Hive, we produced our first prototypes.
To get data from the DustTrack II, Don Blair with remote help from Crag Versek and Ben Gamari hacked into the analog output of the DustTrack II using an Arduino Uno to send readings via serial messages over USB to the Fido. The team spent a couple of hours learning that, depending on the power supply provided to the Fido, this can effect the Arduino's ability to read analog signals reliably. Analog readings would jump wildly until Craig Versek @cversek pointed out that we may be learning our first analog lesson (see his comment in the comments below). As soon as we plugged the Fido's USB power source into a MacBook Air's USB port the readings started to match the readings from the DustTrak's interface. Amazingly enough, when we plugged the Fido into the USB power supply from the DustTrak, we also saw steady values! +1 for DustTrak II.
On the data collection side, R.J. Steinert installed the Hive software on Fido so that Fido could now have some experimental data storage capabilities. Hive provides APIs for describing things like Device Nodes, what Sensors are attached to those Nodes, sensor data storage/retrieval, and an API for retrieving hourly averages of sensor data. In most cases, such as on farms, there are many remote Nodes (often the Bee board from Apitronics) sending data to a Hive, but for Fido with Hive on it, the Hive database acts as a "Single Node Hive". To facilitate the connection between the Arduino sending data over serial and the Hive hosted on the Fido, R.J. Steinert wrote a Fido driver to integrate the two. Because Hive on Fido is a new concept, it was a learning experience in how to make it easier to write Fido drivers that integrate with Single Node Hives.
With help from server wizard pirate Stefan Unterhauser, the team had a home for Fido to send the data home to on the Internet. Fido was configured to send data to a server known as Hammock on his Treehouse architecture, a super powered virtual machine with the abilities to carry dozens of Docker containers, one special for this project, a CouchDB which now acts as the home for the data from the two DustTrak Fidos. CouchDB is an amazingly "relaxing" database that makes syncing databases in near real time incredibly easy, it's also the what the Hive database software is built on.
With some old VHS cases Don Blair hacked together two cases to house the Fido and Arduino Uno boards. Now they are off to Wisconson to find a new home tracking dust. The team here in Somerville will have remote command line access when the Fido units connect to the Internet and we'll also receive text messages when our prototypes turn on and off. Good luck young Fidos!
Data online from the Hive database on the Hammock server
Find the various code examples over at the Open-EIE Github account
2 Comments
Hi RJ, it was me who Don was talking to. I find it amusing that if everyone stuck to the digital world no one would know (or care) how junky many of those AC to USB power supplies really are. Better designs for use in analog systems would require ripple (left over from rectifying the AC sine wave) filtering components like bigger capacitors that would add a few more nickles and dimes to the bill of materials. Noise sources abound and taming them can sometimes seem like witchcraft.
Reply to this comment...
Log in to comment
Thanks @cversek! The first power supply we tried was some cheap $1.50 things we found on Amazon (see the Ground Computing thread here) so when you said it might be the power supply the light bulb went off in my head. I was surprised to find that even when I plugged into other big name brand wall socket to USB power supplies that all of them caused interference. It was only a MacBook Air's USB power supply and the DustTrak that we have found so far to not cause this interference.
Reply to this comment...
Log in to comment
Login to comment.