Hi. I am working on my recent project. To be precise, on it's final phase - bringing all components together. I wonder if there is somebody interested to see another Arduino based alarm clock when there are so many great alarm clock projects. However, I decided to go public with it and document some parts of my work to motivate Arduino fans.

There were couple of reasons for this project. Our bedroom is rather small with no room for bedside tables with bedside lights, alarm clocks, books, mobile phones or spectacles. Together with my wife we discussed and combined all these requirements into a project I am writing about - clock, alarm clock and light controller - 3-in-1 solution.

When we decided to include an alarm clock in project, I reasearched alarm clocks available on market in effort to find some must-have features missing on our list.Ceiling projection has not impressed us at all. As we both wear prescript eyeglasses, we prefer objects to be closer when not wearing eyeglasses IR remote - good tip for another project, thanks. No practical use or need for it in this case.

DS3231 - real time clock IC. I prefered this one to DS1307 for this project because of the precision.

555 - operating in astable multivibrator mode to drive a piezo buzzer. I prefered this to use tone() & delay() combo.

As you can see I use home made PCBs. To be honest, I have never used any PCB fabrication service for my DIY home projects - never had a good reason for it. I tuned my PCB creation and I can safely go down to 0.2 mm tracks. You can see I place SMD components at bottom layer. Reason is obvious - to minimize via count. I leave as much copper on board as possible/reasonable to save etching solution. I usualy use UV curable solder mask from eBay as well but I just ran out of it. Many damn it - I believe they don't know how to work with it. Results are very nice when you master the procedure. No silk screen so far, just etched text/symbols. It takes less than hour to make etched double sided PCB, measured from template printing. You can calculate the costs.

I2C/GPIO adapter - based on PCF8574 IC, common wiring found on internet, with a pot to adjust contrast; to reduce wiring.

Touch electrodes - there are several application notes on electrode size, shape, spacing, grouding areas, track widths and lenghts etc. It is a must-read to get basic knowledge but after all you end up with a common sense design. I did a mistake in my previous "capacitance touch" project and placed some components too close to electrodes and their tracks. I was getting many false touch indications; hard to troubleshoot.

You may notice pins below the info display - for stacking another board.

Other thing I did not mention is the button backlighting. This fulfills the "good visibile interface" requirement. It would be much more complicated to backlight common push buttons unless you decide to pay for something like illuminated MEC switches; no guarantee you will find what you need. Anyway, this is a DIY project, I stick to this concept as much as possible.

One important thing. When you backlight a PCB and you care about the color on the other side, search for PCB with neutral base lamitate (dielectricum). I have one last board on my shelf that has almost colourless laminate, no color cast. If I use blue LED, PCB just dims intensity a bit but I still get blue color. Imagine you use blue LED with a greenish PCB laminate. Guess what color you get. Anyway, does anybody know where to buy PCB with grey or clear laminate? See this picture to see the difference. AFAIK, FR4 material is colourless itself but there are additives needed for automated optical inspection process - this is what I was told. Local vendor I bought that clear PCB from is out of stock with them. Other solution would be to use a thin PCB instead of 1.5 or 1.6 mm that would not impact color of traversing light that much but it would be too flexy to be a touch panel I bet.

Let's backlight it...

(Click on the thumbnail to see full size.)

I want each element on panel to have individual backlight. It is neccessary to build cells for all of them. I use acrylic glass, 2 mm thick. I cut the sheet to many 2 cm wide strips afterward cutted to required length. Using a hot glue gun to assemble the whole thing works fine and is very quick.

To prevent light crosstalk between cells, spray the whole thing with black color.

LEDs have given viewing angle. Based on area you need to backlight, used LEDs may not be able to cover all the area and you get very uneven backlight. You can make the cells higher if your size limitations allow it. If there is a depth limit, you can apply some reflex layer to each cell. I bought A4-size chrome selfadhesive foil on eBay and sticked it on cutted acrylic strips before joining them (no black spray needed). My internal opinion: such reflex layer provides better light distribution.

(Click on the thumbnail to see full size.)

A piece of tracing paper as a light diffuser to soften light. PCB has a internal structure, softened light makes it a bit blured.

(Click on the thumbnail to see full size.)

Let's stack prepared layers.

(Click on the thumbnail to see full size.)

I will use another reflex layer to maximize amount of light reaching the PCB. Made from the same reflex foil I sticked to acrylic glass strips. Placed on the top, reflex side facing the touch electrodes of course.

You can start without that reflex stuff to see the backlight quality. I just like details.

It is 3 mm x 3 mm 20 lead QFN package IC - if you are able to etch 0.2 mm tracks, I bet will handle to solder it. This works for me: no stencil, manual spread of solder paste via thin needle to IC itself, not the PCB; hot air gun reflow; solder wick to clean up traces. Trick is to apply as little solder paste to IC pins as you are able to apply to avoid bridges under the chip. I use 0.8 mm needle - a bit harder to get the solder paste through it but not impossible. Applying solder paste to PCB did not work for me. When applying it to IC directly you have better control and possibility to remove excessive paste using a knife or similiar tool - apply the paste close to IC edges.

I do not stick layers together. 2x 6-pin headers seem to be strong enough to hold it all together on the assumption there is no gap between layers. Shorten pins to remove existing gap if neccessary. Very easy to disassemble this way.

Case building. This has nothing to do with electronics but it is integral part of the project so I will document it here too.

As I wrote in the first post, there is no space beside our bed for bedside tables. Only suitable place for installation is the wall behind the headboard. Storage space provided by bedside tables will be substituted by this case - shelf. It will contain the control panel and lights as well.

Warning: If you are not skilled in woodworking, don't try this at home.

Frame building. The touch panel PCB is pretty ugly to be a visible interface itself. I made aluminium frame that has two basic functions - aesthetic element and an aid to hold all layers firmly closely together. There cannot be any gap between layers otherwise the capacitive touch sensing is degraded.

Step 3. Regular glass, 2 mm thick. Ready to cut. Used material has impact on capacitive touch sensing because of it's dielectricum constant and thickness. I tried acrylic glass as well, other thickness as well. I am happy with 2 mm glass.

(Click on the thumbnail to see full size.)

Step 4. Final glass layer to protect underlying one from scratches.

(Click on the thumbnail to see full size.)

Step 5. All parts are prepared. You can see black mask printed on transparency film. Needed to get sharp backlighted shapes. With cut hole for display to prevent unnecessary reflections. Film is protected by glass layer from previous step.

(Click on the thumbnail to see full size.)

Step 6. All frame parts sticked together using hot glue gun.

(Click on the thumbnail to see full size.)

Step 7. Final panel is 8 mm high.

(Click on the thumbnail to see full size.)

Step 8. When cutting the profiles, be precise, otherwise you get ugly looking corner joints.

Hello World! I made a short video showing basic functionality (HD on youtube site). No sound in video but there is piezo beeping when alarm is triggered on. Timing is customized for better demonstration. Don't turn of annotations to see more info.

First tap on idle panel activates given button group. Consequent taps are interpreted as commands. Alarm settings are backed up in EEPROM after each change. You can snooze alarm as many times as you want. Timeout for LED lights is indicated by very short blink in addition to visual indicator.