Home Energy Prototypes
November 15, 2011 #electronics #software
In this post, I’ll walk through a few of my early home automation and energy monitoring projects. These were all functional prototypes designed to track power usage, automate HVAC systems, and give me better visibility into what's happening around the house. Most of them use simple microcontrollers, wireless modules, and a DIY web interface to bring it all together.
Wireless Temperature Sensor
This wireless temperature sensor includes Sparkfun's basic 315MHz wireless transmitter, an ATtiny45, LM335A temperature sensor, and a 12mm battery holder.
It lasted a few weeks by disabling the brownout detector, enabling internal pull-ups on unused I/O, and disabling all peripherals. It periodically wakes up and transmits temperature data to a hub with an ATtiny328.
Smart Meter Reader
Using an IR detector, I was able to read IR pulses from the smart meter and measure power usage with 1Wh resolution. I built an enclosure to block sunlight.
Newer meters use encrypted Zigbee mesh networks, which are still worth investigating — I plan to test with the Zigduino.
By switching appliances on/off and subtracting before/after readings, you can get per-device usage. This is more accurate than current clamps, especially for inductive loads.
Example readings from my house:
Fridge - 180W
HDTV + cable box - 130W
Hot water heater - 70W
Hallway spot lights full - 220W
Dryer - 5840W
Large stove high - 3000W
Toaster oven - 1000W
Notebook charger - 65W
Wireless Power Bar
This breadboard-stage project includes an ATmega168, Hope RFM12B wireless module, current clamp, and a 220VAC relay. It's hooked up to a power bar.
The web UI displays real-time usage and allows toggling the relay.
Wireless Thermostat
This thermostat controls the HVAC: heating, AC, and fan. It uses an ATmega328, RF module, and a digital temp/humidity sensor.
It runs a simple PID loop to regulate the house temp. In the future, I want to add safeguards to protect the HVAC from overshoot damage. Nest-style testing chamber would help.
Wireless Hub + Garage Opener
No images, but the hub has an ATmega328, RF module, and USB-serial chip to bridge physical devices and the web.
The garage door unit uses a reed switch and IR beam to detect the door position and car presence.
Web Interface — Version 1
This version was built using Google Web Toolkit (GWT) after attending Google IO. GWT is great for building dynamic apps without much JavaScript.
However, issues arise with 3rd-party JS integrations (like plotting libs), and you often end up locked into Google’s ecosystem.
The stock chart is from Google Finance, but struggles with real-time updates and large datasets. Ideally, you’d reduce resolution dynamically while zooming.
Features:
- Electricity bill calculation based on TOU pricing
- Real-time cost per hour
- Historical power & temp graphs
- Thermostat controls
- Power bar state & usage
- Garage controls
- Parking status
Version 2 — Improved Granularity
Current Meter
Built a new board with a Hope RF module, ATmega168, and six 3.5mm jacks (analog inputs).
Used both 15A and 100A clamps depending on the appliance.
Breaker Panel Install
Attached clamps to major circuits: stove, dryer, ground/top floor, fridge, and AC.
Installation was simple:
- Turn off mains
- Remove panel
- Clip clamp to wire
- Route wires through existing holes
- Reinstall panel and turn on mains
Web Interface — Version 2
Moved to Pyramid, PySerial, SocketIO, and Gevent.
Server events like door openings now push updates to the browser without polling.
I used Flot for plotting — added zoom controls and server-side data thinning for large datasets.
Future Plans
Things I’d like to improve:
- Replace RF modules with ATmega128RFA1 for built-in Zigbee
- Add user accounts and clean up JS
- Build a Linux-based hub using i.MX233
- Revise electronics and fix bugs