Continuing with the Home Automation System I talked about in the last post I have been working on the datalogging server portion of the project. The purpose of this is to receive sensor data from the sensors in my apartment and server them on an internal websever and post them on Cosm for logging the data. I chose to use Cosm.com to log the sensor data since there is a very limited amount of onboard memory on the ATMega328 on the Arduino board and this way I don’t need to have external memory.
To test out the Arduino’s ability to function as my home automation system server I bought an Arduino Ethernet Shield and connected a 10K Ohm thermistor with 10K pull-down to the analog input on the Arduino board. I wrote a program that reads the analog input and posts it to my Cosm feed. I added a bit of software filtering to the ADC reading to smooth it out a bit, adding a capacitor to the ADC input may help as well but it’s working reasonably well for not
Here is a plot of the temperature in my apartment over the last 5 mins in degrees Celsius.
Using the Ethernet shield I also setup a little web server that posts the current temperature and pulls the graph from COSM to show the temperature over the last 5 mins. This webpage refreshes automatically every 5 seconds. I might try to setup dydns so I can access it from outside my apartment. I think I could also add controls to this web server so at some point I may be able to control the lights or temperature through it.