This Arduino Project is about Domotica: projects for your home. I use a wireless system to control some lamps in my living room. The remote can be programmed but the disadvantage is that the lamps switch on at a specific time. I have to re-program about every week but that is just too much. So in summer light are switched on too early and during winter too late.
To solve this, I’ve used a Arduino Duemilanove with a LDR (Light Dependent Resistor), a 433 Mhz switch device (from Quasar UK Ltd. QAM-TX1-433 MHz ASK. Only Euro 2.50) to measure the amount of daylight and switch my lamps on at a programmable light level.
An Arduino library for the remote switching set was already written, so that part was easy. There are several systems in the Netherlands but I used the so called: KaKu (Klik-Aan-Klik-Uit) To switch the lamps off, I want to use a specific time so a clock is needed as well.
My original idea was to use a software clock based on the Millis function. I was planning to store daylight times over a year and my measuring sunset and sunrise it should be possible to synchronize the clock. A project with lots of challenges.
To begin and quickly use the system I started with the software clock without synchronization. That was not a success because somehow the deviation can be more than 30 minutes in a day !! I don’t really understand what is going on but decided to use a 1Hz external signal. That needs to be done. Maybe I will use a DCF77 module later or dev elope the sunset/sunrise synchronization.
The wiring, as you can see, is really a mess but it works 🙂
KAKU CLOCK PROJECT
Features:
- Measures daylight to switch on (programmable)
- Remembers last switch on time
- 433 Mhz remote transmitter Klik-Aan-Klik-Uit system
- Clock with time set and adjustment
- 2×16 LCD with back-light
- Deals with Rollover of Millis
- Running Average (3 times a minute over 5 minutes) in daylight measurement using a small array (15 values stored).
- Libraries used: LiquidCrystal.h, RemoteSwitch.h
UPDATE: I also build the system with DCF77 receiver for the clock. But the receiption of the signal was to weak. I have rebuild the system again but now with a hardwareclock DS1307. That system is working fine since april 2011.