Overview
Introduction
Catrpillr is a home automation system built from scratch. It provides the instructions to build the hardware as well as the complete software framework to build your own home automation system.
It is based on cheap, easy-to use parts. Rather than packing in “expensive” pieces of equipment, such as an Arduino and an Xbee which run you $50 together, the idea is to build sensors easily, making it more feasible to wire up your entire house. In many cases the raw hardware costs for some of the sensor circuits is around $10.
It is not a full-fledged out-of-the-box system at this point, more a collection of blueprints, software, and ideas. I am hoping that over time we’ll be able to offer pre-built kits of sensors and remote switches, but at this point be advised that this is more of a toolbox which provides all the plumbing needed to put together a home-automation system.
If you have fun playing with hardware like Arduinos and aren’t afraid of rolling up your sleeves and writing some software, then read on!
Basic Solution
The solution is composed of the following parts:
- A master device connected to a PC/Mac is responsible for communicating to and gathering data from the remote sensors and command receivers. This is currently based on an Arduino
- Remote receivers which execute commands (such as remote switches)
- Remote sensors which gather data
- Software running on the PC to provide a user interface
The PC software talks to an Arduino via a proprietary binary protocol over the USB/serial connection which has the Rf receiver and transmitter modules attached to it (i.e. it can send commands to remote receivers as well as receive data from remote sensors). The Arduino (let’s call it the master device from now on) utilizes a software library which handles the packaging of commands and data into a bit structure as well as transmission and receiving of these packages. The same firmware that runs on the master also runs on the remote satellite devices which in return could be Arduinos again or simple circuit running on AVR processors such as the attiny22313 directly.
To show off a quick demo, the following shows a video of a simple iPhone (web)site which uses the client libraries to remote control the relay on the breadboard wirelessly. Incidentally, I use the same circuit to remotely open my garage door.
Hardware
The modules are built around simple RF receivers and transmitters, such as these: RF Link receiver and transmitter. I have found these cheap modules to provide excellent reception and range for home automation.
So far the following hardware has been built out and documented in the hardware section:
- The “master” receiver and transmitter device which hooks up to the main computer
- A relay-based “slave” receiver which can be used to drive up to four channels which can be outlets, garage doors, etc
- A “slave” transmitter which provides a three-channel light-sensor (it can actually be used for any digital input)
Software
Most of the value Catrpillr provides is actually the software libraries. CatrPillr provides a common wireless transmission framework which makes it easy to build custom sensor firmwares, an Arduino-based API, as well as client-libraries which open the full remote-control API up on the PC.
The firmware code, all written in plain old C, runs as an Arduino library and can be flashed onto an AVR directly also, i.e. none of the code is dependent on the Arduino libraries. It defines a binary protocol for the transmission of data and commands and provides all the necessary parsing and assembly logic for the protocol. I spent a good bit of time and care getting the protocol and checksumming algorithms right (the initial prototypes turned themselves on magically).
Jump over to the software section for more information.

I’m so interested in your project that I’d like to take part on it, seen that there is a lot of room for improvement.
I would like to ask you if you can increase the length of the ID of the master/slaves another byte to allow room for more slaves. Right now I find 15 slaves too restrictive.
You have done a great job here and I hope you continue improving.
I haven’t even had time to think about taking this stuff to the next step
Lots of ideas, but no time (that job thing is overrated). I do want to extend the garage-door opener with rfid some time soon though…
Feel free to contribute!
Oh, that’s is not good
Anyways, I’m going to order a few of these: http://www.seeedstudio.com/depot/433mhz-rf-link-kit-p-127.html?cPath=139_140&zenid=23171e7f93787b0389637abb8a5d616e
And a few ATtiny85-10PU from Mouser for tinkering.
Do I need an external clock or can I use the internal clock for 1200 Baud?
I don’t think the tiny85’s have UARTs built in to them. Double check, but you want a chip with UART. Doing it in software won’t work with the cheap wireless modules. I used an external clock, the internal was not reliable enough, got too many communication errors. Check out the circuit diagrams..
@Jochen,
I ordered the same components in the hardware section required to make three backpacks.
They should arrive in about 2 weeks. I’ll make sure to let you know of any significant progress on my part.
Thanks for everything!
All parts have arrived! I have also received another Seeeduino and 5 different types of sensors to work with these.
I’ve started my own Domotica application in C# and MySQL, called Domotika.
Since I’m moving next week to a new place, all my stuff is either packed or about to, so I will be developing the software part of Domotika for the time being.
By the way, check out the Femtoduino at http://www.varesano.net/projects/hardware/Femtoduino.