Note: There now is an android bluetooth control app ibble for this project
Note: Though this started out as a project simulating my presence at home, it has grown into a smart home, hence I retitled this Instructable
When people are on holiday, or sometimes even just gone out for a night, their homes are vulnerable for burglars.
So, people tend to have timers on one or two lights to switch on when it is dark so burglars might be fooled in thinking the occupants are still present.
Burglars are not stupid. Especially when one is away for a longer period, it is kinda odd that the lights switch one well, like clockwork. This is even more suspicious in the late fall or winter when it gets darker earlier but without the lights being switched on earlier.
I was faced with a family member going away for a prolonged period who left his house in my care.
So I wanted to quickly put something together that would do a better job than a timer clock., Something that had more variation, would make things look more natural.
Because I didn’t want to mess with too much wires I decided to make it kinda wireless. It helped that I had some 433 MHz Switches and a cheap transmitter module.
My basic idea was to Switch a main lamp in the living room, a lamp in the study and a lamp in the bedroom. The time for the system to switch on needed to be variable, depending on the light. The lamps should not switch on every day at the same moment and there needed to be a natural flow from the living room to the bedroom at sleeping time. An Arduino seemed like the perfect instrument and and as it was I happened to have a few Pro-mini's (that is to say... clones)
Ofcourse it is possible to do this with any arduino.
Anyway, as said, I quickly put something together on a small breadboard and put that to work, but then I wanted one for myself as well, a bit more permanent, and I added features to that.
So I will describe two versions
The very basic version just has a pro Mini, with a simple DS1307 RTC, an LDR, a 433 MHz Transmitter and 3 remote Switches for 3 lamps. The amount of lamps or other devices that on wants basically depends on the amount of Remote Switches you have.
The advanced version has a larger number of Remote Switches, it has sound detection, an internal relay, IRleds, a dog barking, a voice message, bluetooth, a buzzer, a fakeTV, and moving puppet.Update may 2016: this has now grown into a 23 RF switched channels + IR circuit, regulating many functions in and around my house
I will discuss the basic module first
Arduino pro mini/ (or a barebones Atmega328 with bootloader)
DS1307 RTC module (or DS3231 module (see text below))
433MHz transmitter module
17.4 cm stiff wire or or preferably a coil loaded antenna.
3 x 433 MHz Switches e.g. ELRO 440 or a SelectRemote or any other
A USB to FTDI module comes in handy to do the programming
Just a few Remarks:
In its basic form the RTC is a DS1307. I know there is the more accurate 3231, but that lacks the Non Volatile RAM that is needed to store various statuses.
It is possible to use a 3231 module if it is combined with en EEPROM, but that requires a slight adaptation of the code (I do this in the advanced version). I know the Arduino also has EEPROM where one could store statuses, but the writing to the Arduino EEPROM is not infinite. Therefore I try to avoid it, hence the DS1307. The DS3232 also has NVR