Tuesday 23 April 2013

Temperature monitoring system V0.2

Here is version 0.2 of my Arduino project of Temperature Monitoring System.
It is based on a JY-MCU basic AVR board with ENC28J60 Ethernet interface and a 1-wire bus to provide a local web server with real time temperature readings of any number of 1-Wire thermometers. In addition, it can be configured to post the readings to COSM data feed.

This is running at my house for quite some time and is posting indoors and outdoors readings every 10 min to the following COSM feed: https://cosm.com/feeds/100389


The hardware description can be found in my other post.
To compile the project download the JY-MCU hardware profile for Arduino and the following libraries:

  1. EtherCard
  2. EEPROMex
  3. OneWire
  4. DallasTemperature
The code can be download from here: TempServer V0.2.ino

The server use DHCP to configure the TCP/IP stack and then start (led 7 remains on while setting up, then led 8 start to blink for normal operation).
The configuration link on the main page will bring up the COSM configuration page where you can configure the posting interval, the feed id and the COSM API key (to reset this configuration, hold switch 1 when the program starts).

In the next versions I am planning to enhance the following (not in a particular order):
  1. Enable to name each sensor for display in the list and for posting the date to COSM.
  2. Log up to 96 past readings in the device EEPROM (every 15 min for 24 hours).
  3. Show the min/max of the logged values.
  4. Show graph of the logged values.
  5. Use network time to make sure date logging and posting is done properly even when the device restarts frequently (currently, the posting of data is done after the device is constantly on for the selected posting time, that is, if the post of data is every 10 min, and the device restart every 7 min for some reason, no data will ever be posted).
  6. Improve the posting code to retry on HTTP errors (currently the code ignore the returned HTTP code and does not check for time out).
The main challenge to accomplish items 1 and 2 is the limitation of the EEPROM size (1KB), but with limiting the name to 15 characters and 10 bit per reading, I can support up to 10 devices on the bus.

Please let me know your thoughts (especially if you willing to give it go).