Sunrise lamp add-on for nixie alarm clock.

IMG_0848Finnish winter days are dark and cold. The sun rises only for short moment, and even then it is often cloudy, or the sun is so low that it can rarely be seen. A circadian clock is synchronized with daylight changes, and so without external stimulus from sunlight, my daily rhythm started to lag and spin around. Waking at morning was difficult task.

There is a ready-made solution for this, e.g. Philips does sell alarm clocks with build in wake-up lamps, that turn on at morning to artificially sync humans internal clock. Me being hacker, I had to make my own solution, as usual.

IMG_0857I already had my nice nixie alarm clock, that still by the way works perfectly and is daily use, so I only needed a way to control lights with wake up alarm. I bought cheap remote controlled sockets from hardware store. These use 433Mhz ASK coded rf remotes to activate relays in socket unit.

Luckily, these use fairly standard implementation, and eBay is full of 433Mhz transmitter+receiver kits due popularity of 433Mhz ISP radio band. There is also a ready-made ASK library for the arduino to control these remote outlets, and all sorts of home automation things. I connected the receiver module to the arduino, and fired up example sketch from library. This allowed me to capture rf data coming to remote.


 Now I had the data needed to send  rf commands to switch these outlets on and off. I had to make small board housing AVR attiny44 MCU and 433MHz transmitter module.IMG_0852Bit of a wire spaghetti and deadbug style soldering to prototype board. I need to start make my own PCB’s as we have CNC-milling machine at Tampere Hacklab that is perfect for making our own MCB’s, Milled Circuit Board that is.IMG_0851Transmitter module just plugs into the board, and there is couple of jumpers to change settings without need of reprogramming whole board. I was kinda clever, and as my clock has ISP port in back panel, I used it to transfer signal from alarm clock to this module thing. I can program both devices just plugin them into usbasp programmer, and connect them together with just normal 10 pin AVR ISP cable.

I used arduino to code small firmware to attiny44. I’m amazed how much even smallest mcu can do, run whole arduino sketch with libraries etc.

This sends codes to outlets when state of SCK pin in ISP port changes. I made small modifications to nixie clocks firmware, just one line  that toggles SCK pin, when alarm goes off or snooze is on. I left option to change behavior of lights with jumpers on board, so I can enable turn off commands, and delay for those. In use I found out that actually I want lights to stay turned on after alarm, as anyway I will wake up and it is nice to have some light during day.


Plugged in to the back of nixie clock and some outlets connected to lights, I can now turn on lights when wakeup alarm goes off. Of course this solution was not as subtle as real wake-up lamps, as there is no brightness control or smooth ramp up before actual alarm, but they do wake me up much better than just piercing beeping in the dark. I probably could sleep over nuclear war, when I’m in deep sleep no sound can wake me up, but with these lights, after third snooze I’m able to wake up kinda alert.

Conclusion: This was useful and needed project, and first step for home automation. Sending rf commands to remote outlets works really well with cheap transmitter module and avr mcu, and this can be extended to other 433mhz device too. In the future, good improvement would be using dimmable outlets, and start ramping up brightness before auditory signal. At this moment I have 3 on/off outlets connected to lights on my nightstand, besides soffa and red led strip behind my computer desk. It would be nice also to get ceiling light behind remote-controlled dimmer. This system could be extended to full home automation system where I can control lights and devices from smart device or central control panel.

You should put your comment here!

This site uses Akismet to reduce spam. Learn how your comment data is processed.