I wanted a way to encourage small children to stay in their rooms in the morning, leaving their parents to sleep until a specific time. So I modified a VÄCKIS alarm clock so that an LED comes on instead of the alarm sounding, and the kids know that they have to wait until it does.
The NaNo involves a stripboard PCB fitted inside the clock’s case, with an ATtiny85 microcontroller running dedicated firmware. The project requires experience of building electronics projects and Arduino programming, and the amount of detail given in the build steps assumes this.
NaNophotoNics items used:
VÄCKIS Alarm Clock
1. PCB Build
Build the PCB using the layout diagram. It has to be exactly the size given – there’s not much space in the clock case. The tilt switch should be mounted as shown in the photos so that it fits into the case. The LED has to be mounted carefully to match a hole drilled into the front.
The four pins in the SPI header need to be cut down to fit into the case. Leave enough length to allow connections for programming.
An Arduino is used as a programmer (see Arduino ISP info online) and connected to the SPI header.
The firmware source code can be found here: https://github.com/gutbag/AlarmClockLED
The CR2032 button cell should not be fitted during programming.
The 1.5V side of the circuit is connected in place of the clock’s audible sounder. This requires opening up the clock mechanism and desoldering the sounder. It has a red wire (1.5V) and a white wire (alarm signal). These should be wired to the PCB, along with 0V from the nearest battery terminal.
With the PCB installed into the clock case and the battery fitted, turn the clock upside down for about half a second. The LED should flash once, then again 3 seconds later. This proves that the firmware is running correctly.
With the alarm turned on at the back of the clock, change the time so that the alarm goes off. The LED should come on for 10 minutes.
The firmware allows for the alarm being left on all day, and it ignores every other alarm so that the LED comes on only in the morning. But if the alarm time is set more than 12 hours before the morning alarm time, it is necessary to configure the firmware to ignore the next alarm. This is done as follows:
1. Turn the clock upside down for about half a second and wait for the LED to flash.
2. Turn the clock upside down again for about half a second.
3. The LED should then flash twice, confirming the change.
Note that step 2 must be done within 3 seconds of step 1.
The change to configuration can be checked by turning the clock upside down again. The LED should flash twice at the beginning and end of the 3 second period.
The configuration can be changed back by repeating the procedure. One flash indicates that the next alarm will turn the LED on. Two flashes means that the next alarm will be ignored.
Note that configuration should not be done while the alarm is going off. Wait until at least an hour after the alarm time.
~ Mark Lamb