Happy new year everyone! A new year, time for some new things! Somewhere back in 2015 I decided to buy a couple of Raspberry Pi’s, two Arduino nano devices and some other IoT stuff (sensors, cables, etc). The goal I have is to build a device which can monitor my fish tank, keeping track of things like temperature and pH value of the water. Now to be clear; there are already some very sophisticated projects out there which do exactly this and more. But I wanted to do it myself to have a better understanding of IoT technology and how it can be used. Now that Microsoft released Windows 10 IoT, I thought this would be an awesome opportunity to get me going on my existing C# skill set. I’ll be keeping track of my progress in a few blogs. I’m not quite sure where this will end yet, guess we’ll find out over the next months 🙂
Blog series index
Here are the links to all of the articles in this series:
That’s my tank by the way. At this point not yet loaded with sensors and IoT stuff 😉
First let’s talk shortly about what we’re trying to achieve here. I’ve got the following sensors lined up which I would like to read out:
- 2 temperature sensors (DS18B20 onewire) to monitor water temperature
- 1 humidity sensor
- 1 pH sensor
And I want to use a 4 channel relay board to be able to easily switch devices like pump, heater and lights on and off.
Eventually this should all be controlled using a mobile phone app. That should display the sensor outputs, monitor connection to the tank, alert in case of possible leaks and have a “maintenance mode” switch in order to easily switch off power when performing maintenance on the tank. Of course there are tons of other features we can think of, but this seems like a reasonable start.
Part of the set-up in test phase. Gotta love going back to PCB’s, resistors and cables 🙂
As said, the main technology used will be a Raspberry Pi 2 running Windows 10 IoT. Linked to the Raspberry I will use an Arduino nano primarily to read out the analog sensor values. You’ll find out quickly that although Raspberry is a very powerful and versatile platform, it doesn’t have proper support for (realtime) reading of analog sensor inputs. Arduino does this perfectly and using the I2C protocol you can make the two chat with each other in order to exchange messages. I’ll discuss this in more detail in a future post.
Having that in place, the Raspberry will then take care of uploading the captured data to an Azure IoT hub. This technology is still in preview and is meant for bulk uploading IoT data into the Azure cloud. A combination of other Azure products like stream analytics, DocumentDB and event hubs will then be used to process this data, store it, act on it, and so on. Again, too much detail so this willl be a separate future post (reminder to self: create an index in this post too).
The following diagram taken from here displays this set-up which I got from the Azure IoT suite “remote monitoring” sample, which is a sample solution that basically does the things I want it to do too. I’ll be setting up my own system based on this architecture, why invent the wheel twice, right?
These blogs hopefully will help others trying to do similar things. I quickly found out that although there is a lot of documentation available, it takes some time until you can really put all of the pieces in the puzzle in the correct place. As you can see there are quite some moving parts and as usual, error messages are not always as descriptive as you would like. So even if no one finds this interesting, it’s still good to have some things documented for myself 🙂
Ok, enough talk… onto post 2 with some more details on the hardware side of things.