last updated: 21/01/18
Yes I'm getting older! So I needed an alarm clock with bright LEDs to be seen in the night without glasses. After reading an article from Julien Thomas about an energy efficient alarm clock in the German ham-magazine Funkamateur in 2008 I decided to build my own version of this clock. I found especially interest in the idea of using a capacitive power supply to reduce electric smog (reduced magnetic field). Changes to Julien's concept were an ATmega8 (instead of ATiny2313), a real time clock (RTC DS1307) with gold-cap and a DCF77 receiver witch is synchronizing the clock at 4am. The software was written in assembler. For more details about the old version look at the end of this page My old alarm clock worked without flaws until today (and still does its job), but the sound of the buzzer wasn't very attractive. So I decided to rebuild the clock with newer components. The new clock has the following features:
THE CIRCUIT PRESENTED HERE IS AT AC MAINS POTENTIAL, AND THEREFORE EXTEMELY DANGEROUS TO TOUCH IN SWITCHED ON POSITION. UTMOST CARE AND CAUTION IS ADVISED. NEWBIES PLEASE KEEP AWAY.
USE AN ISOLATION TRANSFORMER FOR TESTING !! DO NOT TOUCH THE PCB. The circuit has to be housed in a case that will not allow to touch any metallic parts (appliance class II). Its advised to use an electrical insulating spray for the PCB. NEVER USE THE USB CONNECTOR WHEN THE CLOCK IS POWERD BY THE CORD.
If you build this alarm clock, it is on your own risk. I accept no responsibility for any damage that may result in building this clock.
First you need to get all the components. I ordered the Teensy and the Adafruit components directly in the US, but it is also possible to get them in Europe from different shops (ex.: http://www.watterott.com).
The capacitive power supply is mainly the 2.2µF (XC = 1/2πfC = 1447Ω) cap connected in series with the 47Ω resistor, two diodes (0.7V) and the zener diode (5.1V). This gives 230V-2*0.7V-5.1V = 223.5V on Z=1448Ω (R is not relevant) and a current of I = U/Z = 154mA. The heat on R is 47Ω*0.154^2 = 1.1W and so the loss of our clock is under 2W (17,5kWh/a).The clock needs about 100mA when playing music.
It is important to use X2 caps! because ordinary capacitors will be destroyed by the rushing current from the mains. X2 caps are suitable for connection directly to the mains (film caps)
The PCB was designed with kicad an open source software. The simplest way is to etch a single sided board (100*160mm) by using the following postscript file for the exposition to light. The rotary encoders where fixed on a piece of standard breadboard. A bricked raspberry was recycled to hold the SD-Card. Alternatively an SD-card breakout-board can be used or a piece of breadboard with a soldered SD-Card-holder.
To fix the speaker I used a 3D-printed part (PLA). It will fit in an 69mm hole, that was drilled with an 68mm keyhole saw. Another piece is hiding the metallic parts on the back. If you have little children it would be wise to cover the USB-hole. The aeration slits are needed because of the heat generated by the 5W resistor. A 3d-printed stand is used for the LED-backpack. A distance holder and caps for the rotary encoders are other 3d-printed parts.
The software was written with Arduino (1.6.4) and Teensyduino. Some libraries are included in the folder
alarm_clock_v1_2. You have to adjust the sketchbook location (whole path to folder
alarm_clock_v1_2) in Arduino preferences before compiling. The Board to choose is Teensy 3.1.
Copy your wav-files from a cd to the SD-card and rename them to from 1.wav to 99.wav (case insensitivity).
If you don't want to change the software you can use the
hex-file an with the Teensy-Loader App.
The software is written in assembler.