Rencently I bought two wireless light bulb switches. The package consists of a bulb holder and a seperate switch. The switch sends a low power signal over the radio waves to turn the light on and off. It allows me to have an extra lightswitch in my room without my landlord going 'mental.
However, having a simple switch is quite dull...
By hooking up a microcontroller on my Arduino to communicate on the same radio waves, suddenly the possibilites are a bit more interesting. Below is a circuit diagram, and a photo of the prototype setup on a breadboard.
The photo on the right looks more complicated because it also shows the receiver connected
If anyone wants a full description of how the protocol works, drop me an email.
Using the microcontroller to control the light bulb I decided I would two two things:
The plan for the alarm clock was to make a device to turn my main light on a few minutes before the conventional alarm on my phone wakes me up. Waking up to a pre-lit room is considerably less miserable in the winter months.
The latter was a result of my bizarre desire to add a web front end to any electrical device I see, it also serves as a convenient mechanism to set the clock and times for the alarm. Without this I would have had to spend ages connected buttons, an LCD and the whole thing would take up more space.
The web frontend comes in two parts. Some code that sits on my PC hosting pretty images and CSS, and a very small web server written in C on the Arduino which performs all the actions.
The web server code is pretty lightweight, and has a pretty robust platform for parsing the requested URL. Is a good reference if you are building your own web projects.
The next immediate plan is to rebuild the entire circuit from scratch on some stripboard, using a bare ATMega328 and get my Arduino back for more development.
Make use of interrupts, and sleep the processor to save power
Move all the webserver code onto the microcontroller.
I would also like to make the alarm slighlty more complicated - and perhaps parse a vcal feed to know when to turn on...which in 1K of RAM will be a challenge.
Add in some kind of photoresitor to the mix.
test2
test2