Go Down

Topic: Alarm clock w/ light control (w/ touch backlight panel) (Read 5665 times) previous topic - next topic

qwertysimo

Mar 01, 2013, 09:56 pm Last Edit: Mar 05, 2013, 07:32 am by qwertysimo Reason: 1
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.

Still reading? Requirements/functions overview so far:

  • regular clock showing time of day, date and day of week,

  • two independent alarm clocks, snooze function, audio and visual alarm,

  • two independent lights and light controllers, intensity control, auto-off,

  • large, good visible and easy to use interface,

  • elegant case.



More to come...

201303031217: Modified topic subject.
201303050732: Modified topic subject.

CrossRoads

I don't know, this part:
"large, good visible and easy to use interface, elegant case."

seems to contradict this part:
"no room for bedside tables with bedside lights, alarm clocks, books, mobile phones or spectacles"

Seems more detail is needed...
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Udo Klein

IMHO the requirements could be translated to:
- use a projector to display anything at the ceiling and
- use a standard IR remote (plus a IR decoder on the Arduino side) as an input.
Check out my experiments http://blog.blinkenlight.net

qwertysimo

Thanks for comments.


I don't know, this part... seems to contradict this part...


I will show we accomplished to combine these two somehow.



... requirements could be...
... projector...
... IR remote...


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.

qwertysimo

#4
Mar 02, 2013, 11:50 am Last Edit: Mar 02, 2013, 11:54 am by qwertysimo Reason: 1
Let's start with the controller board...











(Click on the thumbnail to see full size.)
The power section takes 12 V as input which is needed for lights. Reduced to 5 V and 3.3 V for other components, available via screw terminals as well for future use.

Serial line and ISP - I found comfortable to use UNO board with removed 328, wired to my boards for serial communication when debugging instead of having USB/serial adapter. ISP, no comment.

I2C lines - pulled up to 5 V and 3.3 V for used ICs, common logic level converter with MOSFETs used.

Lights outputs - screw terminals to connect LED lights. Switched by MOSFETs driven by PWM output from 328.

ATmega328P - running at 16 MHz, standard standalone wiring, reset button. Left unpopulated soldering pads next to IC holder for future use.

Battery - power backup for RTC IC, with IC reset button.










(Click on the thumbnail to see full size.)
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.


More to come...

qwertysimo

Large, good visible and easy to use interface... I did not mention I decided for a capacitance touch sensing instead of using push buttons for several reasons like limited design etc.












(Click on the thumbnail to see full size.)
Board size is 20 x 14 cm, single sided. It is mainly based on info display PCB dimensions plus extra area to take rather large buttons for light control.

Info display - HD44780 controller based LCD, 20 x 4 characters, blue backlight, white characters.

Buttons to interact with display - with fuctions related to info shown on LCD, basicaly 4 pairs of general purpose increase/decrease buttons.

Light intensity increase and decrease buttons - primary function is to control two independent lights; used to turn off/snooze the alarm as well.

Alarm indicator - alarm on/off indicator, active alarm/snooze indicator.











(Click on the thumbnail to see full size.)
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.





More to come...

qwertysimo

Time to complete the panel component.











(Click on the thumbnail to see full size.)
Board size is 18 x 12 cm, double sided, exact fit on acrylic glass component.

MPR121 - capacitive touch sensor controller for I2C bus, 12 touch electrodes supported (datasheet).

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.


TLC59116 - 16-channel LED driver for I2C bus (datasheet). Very easy to solder (compared to IC above).











(Click on the thumbnail to see full size.)
12 pcs blue LED, 4 pcs white LED, 120 deg. viewing angle.

Pin headers to stack the other board.












(Click on the thumbnail to see full size.)
Applied reflex layer from the previous post.












(Click on the thumbnail to see full size.)
With the acrylic glass component in place.













(Click on the thumbnail to see full size.)
All layers stacked.

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.






More to come...

qwertysimo

#7
Mar 05, 2013, 07:30 am Last Edit: Mar 05, 2013, 08:02 am by qwertysimo Reason: 1
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.
















































(Click on the thumbnail to see full size.)


Step 1. Two laminated chipboards, 180 cm x 20 cm in size, 1.8 mm thick each.

(Click on the thumbnail to see full size.)


Step 2. Made hole 18 cm x 12 cm to accept the touch panel. Jig saw used.

(Click on the thumbnail to see full size.)


Step 3. Made slots for lights. Plunge router with 15 mm bit used.


(Click on the thumbnail to see full size.)


Step 4. Hole outline transfered to the top board.

(Click on the thumbnail to see full size.)


Step 5. Drawn area hollowed out in top board as the touch panel is 2.5 cm thick.

(Click on the thumbnail to see full size.)


Step 6. Both boards stacked.


(Click on the thumbnail to see full size.)


Step 7. Other areas hollowed out for controller PCB and wiring.

(Click on the thumbnail to see full size.)


Step 8. Slot for controller PCB on the right side.

(Click on the thumbnail to see full size.)


Step 9. Both boards sticked together.


(Click on the thumbnail to see full size.)


Step 10. All four edges aligned by cutting few millimeters. Circular saw used.

(Click on the thumbnail to see full size.)


Step 11. Rounded two edges - safety meassure and aesthetic design.

(Click on the thumbnail to see full size.)


Step 12. Prepared aluminium profiles and plastic diffusers.


(Click on the thumbnail to see full size.)


Step 13. Applied ABS edge.

(Click on the thumbnail to see full size.)


Step 14. Imbeded aliminium profile with sticked LED strip.

(Click on the thumbnail to see full size.)


Step 15. Finished case w/o touch panel.





More to come...

qwertysimo

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.

It is quite impossible here to buy aluminium profile I wanted (reasonable ammount for reasonable price) - U profile, 6 mm x 6 mm x 6 mm, so I bought E profile and tuned it. Resulting profile is 6 mm x 8 mm x 6 mm - two milimeters higher then planned. I am considering to hollow out the wooden shelf a little more to imbed the panel couple of milimeters deeper...

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






























(Click on the thumbnail to see full size.)


Step 1. Original spare E profile on left. Spit E profile into U profile and waste.

(Click on the thumbnail to see full size.)


Step 2. Four pieces to make up the frame.

(Click on the thumbnail to see full size.)


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.

(Click on the thumbnail to see full size.)


Step 9. Finished touch panel in it's frame.





More to come...

qwertysimo

Case modification. However I decided to imbed the panel deeper to shelf because of high aluminium profile.












(Click on the thumbnail to see full size.)
Hollowed out area extending original hole.











(Click on the thumbnail to see full size.)
Panel in place. Visible panel high is 4,5 mm instead of 8 mm. Looks much better now.





More to come...

qwertysimo

Shelf installation. So, I am done with preparation. Assembled shelf is ready to be mounted on wall.






















(Click on the thumbnail to see full size.)


Step 1. The bed.

(Click on the thumbnail to see full size.)


Step 2. Mounted shelf on wall brackets.

(Click on the thumbnail to see full size.)


Step 3. Top side of the shelf.


(Click on the thumbnail to see full size.)


Step 4. Bracket detail, top.

(Click on the thumbnail to see full size.)


Step 5. Bracket detail, bottom.

(Click on the thumbnail to see full size.)


Step 6. Bottom view, all components in place.





More to come...

rbqaa

WOW!  Very nice, clean project!

Looking forward to some more photos.  Great documentation on the project.


qwertysimo

#13
Mar 10, 2013, 08:51 pm Last Edit: Mar 10, 2013, 09:06 pm by qwertysimo Reason: 1
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.


http://www.youtube.com/watch?v=NQgnaMsppB0


(I found that large LCD font on Seetron site. Hoping they do not mind using it in personal, non-commercial project.)


Go Up