Wednesday, 19 March 2014

Home Monitoring System – Version 1.0

Having worked on my home monitoring system on an off for the last number of weeks I have finally gotten to version 1 for the host board and the sensor nodes.

Temperature And Humidity Sensor Node

I completed the development and testing of the wireless temperature and humidity sensor nodes.

WP_20140319_001

This board was installed in an enclosure as shown below. The board was designed to fit snuggly into the enclosure which takes two AAA batteries to power the sensor.

WP_20140319_002WP_20140319_003

The sensor implements a simple channel scanning and handshake protocol which allows it to determine the radio frequency channel the wireless hub is listening for packets. When the channel is found by sending a NodeHello packet to which the wireless hub replies with a NodeHelloAck packet. The NodeHelloAck packet contains configuration data that the node uses to setup it logical RF channel.

Once the handshake has completed the node enters a loop where it sleeps for a period, which is provided as part of the handshake data, wakes up and transmits the latest temperature, humidity and battery voltage readings to the wireless base station.

Wireless Hub

I chose a Netduino Plus 2 as the hardware for the wireless hub. The hardware setup is pretty straight forward. An NRF24L01P radio module is connected to power and the SPI port on the Netduino.

WP_20140319_004

The Netduino implements a simple web server, based on embeddedwebserver, that hosts a set of pages that renders the sensor data from each of the sensors, allows configuration changes to be made and log file viewing. Since the Netduino has limited memory and CPU most of the processing for data rending is offloaded onto the browser. The sensor data page uses a JavaScript graphing component called Rickshaw. The pages are rendered on the client side browser as a single page application using AngularJs as the MVVM framework and Bootstrap to provide a responsive UI that scales to different device screen sizes.

Sensor Data Display

Monitoring

The sensor data is rendered on the main page of the application. The interface allows selection of a number of days of data. Multiple sensor feeds can be rendered, the graphing component supports hoover details when the mouse is over a point on the graph.

Nodes Configuration

Nodes

The nodes configuration page shows active nodes and the node types. The nodes name can be modified.

System Log

log

The logging level is set on the configuration page from 0 to 4, 0 = None 4 = Debug

Configuration

Configuration

The configuration page allows the following to be configured:

  • The radio channel
  • The radio device address
  • The log level
    • None
    • Info
    • Warn
    • Error
    • Debug
  • Update interval, the rate that the sensor will push readings

Future Additions

  • Minor web UI clean up and changes
  • The ability to export sensor data
  • The ability to have a node release its allocated id

I would also like to add some additional sensor types, maybe air quality, water,power etc. Later I would like to use the data gathered to directly control the space heating from the netduino, via a relay node that can be used to advance and retard the heating system based on evaluation of the temperature data. For example on a very cold day fire up the heat at an earlier time than the heating control system would normally.

4 comments:

  1. Great work, you are really getting maximum utility out of the netduino! Any plans on releasing the source?

    ReplyDelete
    Replies
    1. Hi,

      Yes at some point I will put the source up on codeplex. Probably in the next week or two.

      Delete
  2. This seems like exactly the sort of thing I've been looking for, I want a set of simple temp + humidity sensors to monitor conditions when growing new seedlings in temporary greenhouses in the spring. Finding something that's cost effective (this is just my home garden) has been a real challenge. Would love to help with testing on this if you're interested, send me a message.

    ReplyDelete
  3. Hi Ben,

    I had the same problem when I went looking for sensors, I found they where either too expensive or too bulky or both. That's why I designed and built my own sensor board.

    With respect to testing, there is not really much left to test, it was pretty simple to start with, I am just testing it for long term stability.

    Also you would need some of the sensor nodes that I have built, I think I have a few spare PCBs. If you can send me your email address we could work something out.

    ReplyDelete