Tuesday 13 July 2010

Arduino power meter reading

Being the curious nerd I am, I decided the other day that I really needed to put an end to argument that pulling the plug on a WiFi access point when not in use does or does not provide any significant power / cost saving benefits.

Armed with an Arduino Decimilla I rigged up a very simple app that samples an analogue value from a photo resistor and waits for a transition from light to dark and back to light again. A transition was defined as a 2 standard deviation change in the sampled light level based on the previous 32 sampled values. The number of values sampled every 20 minutes was written to EEPROM, providing up to a week of recording on my tiny 512 byte EEPROM.

An LED and photo-receptor with a cardboard sheeth around it (to stop direct light from the LED from shining on the sensor) were placed on the meter in front of the rotating disk and to my suprise, things just worked - really well. I didn't spend a long time confirming it worked well under very slow rotations (low power usage) and fast rotations (high power usage) but the times I checked on it, it seemed to be doing its job perfectly.

Results were not super suprising. The power usage late into the night was the air conditioner set to turn off around 2:30am. The spike in the morning was the air conditioner, microwave / toaster + lights and PC that basically all came on at once.
Power Usage


Some more testing is required to confirm or reject my hypothesis. Of course, if I used decent gear I could figure this out with a lot less effort but where would the fun be in that?