Sensor Datalogging with Cosm

 

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.

Andrew

Home Automation Project

A project I have have wanted to do for a while is a home automation system for my apartment so I finally think I am going to do it. I have a general idea of how it will work shown in the block diagram below:

I will have a bunch of wireless sensors scattered around my apartment that will gather data about temperature, light, occupancy…etc. These will probably use the Digi Xbee module I used on the quadcopter and will transmit their sensor readings back to a central server. I’m thinking right now I want these wireless modules to be battery powered so they are going to have to be very low power so that the batteries will last a long time. I think the first one I’m going to do will be a temperature sensor, but I will talk about that more on a later blog post.

I’m thinking I could do other wireless modules like maybe a light switch to turn on and off the lights. Some other ideas include modifying my room fans to be able to control them through my home automation network, and even connecting my coffee maker to it ;)

For the server right now I’m thinking of using an Arduino with an Ethernet shield and an Xbee module. Now I’m not the biggest Arduino fan but it makes a quick easy setup for a small lightweight server and gateway to my home network and the internet. The wireless modules will send sensor data to the Arduino which will post it to the web server. An alternative to the on board web server would be to use Cosm I haven’t looked into it too much but that could be an alternate place for the server to post the sensor data to. Possibly I will use the Arduino web server for a LAN web server to connect to when I am home and the Cosm server to view data when I am away from my apartment.

Anyway I have ordered an Arduino Ethernet shield and I will start by connecting a temperature sensor to it and working on setting up the sever portion before working on the wireless modules.

This should be a fun project. :)

ATTEN ADS1042C Digital Oscilloscope Review

I have been wanting a little digital storage oscilloscope for a while now and have been thinking about getting the ever popular Rigol 1052E but when I found an ATTEN ADS1042C on Craigslist for $200 I thought that seemed like too good a deal to pass up. Overall for a hobbyist this looks like a very decent oscilloscope:

  • Dual Channel Oscilloscope
  • 40MHz Analog Bandwidth
  • 500M Samples/Sec with 1 Channel, 250M Samples/Sec with 2 Channles
  • 4K Sample Memory
  • USB Device and Host Ports
  • Math +,-,*,/, FFT

It’s definitely an older technology scope with the lower sample rate and smaller sample memory than the Rigol 1052E but for most things a hobbyist would do this scope would do just fine. It powers up fast and greets you with this screen in about 8 sec which is nice because a lot of the newest modern oscilloscopes like the Tektronix DPO serieis scopes take forever to boot up and when you want to take a measurement you don’t want to have to wait for the scope to boot up.

The scope has a fan but it’s fairly quite, from reading around about people who have the Rigol 1052E apparently it has a very loud fan; I have never used one in person so I can’t compare to be certain. but I have no complaints about the fan noise on this scope.

On to some measurements:

The noise floor of the two channels looks to be very low <2mVp-p but I did notice a funny DC offset as seem in the picture below. The DC offset doesn’t go away even if the inputs are AC coupled so I think this has to be a hardware problem in the scope but it’s less than 2mV DC offset so that’s not too bad.

I don’t have the best tool for testing the limitations of this oscilloscope but it measures a 4MHz sine wave just fine, which is the max mu function generator will put out:

The last two pictures are taken from the oscilloscope and written to a USB flash drive which works great but is it horribly slow to write a picture to the flash drive, it takes over 1 minute to write one picture, the pictures are about 220KB so that’s a write speed of around 3kB/s which is slower than the write speed of a floppy drive. It also has a USB device port on the back to connect up to a printer or a computer. I tried to install the drivers that came on the CD but it wouldn’t install on my laptop, my guess is that they are for a 32But OS and I have 64bit Windows 7. I will have to look around online to see if I can find 64bit drivers anywhere.

The FFT function seems to work well as shown below, this isn’t a feature I have used much on oscilloscopes and usually for this sort of thing a spectrum analyzer is a much better tool anyway.

I will do teardown on a later post, I am interested to see what ATTENs build quality looks like. 

Conclusion

Overall I think this is a very decent oscilloscope for hobbyist work, it’s definitely not the best one out there; I think the Rigol 1052E is probably better value for money if you were going to buy one or the other new but if you can pick up a used ADS1042C like I did I don’t think you will be disappointed. I will probably upgrade to something nicer eventually but this will suit me just fine right now. My only complaints are that little DC offset on the voltage measurements and the horribly slow USB host port, I haven’t looked around but maybe there is a firmware update that fixes that.