Ok to wake clock
Moderators: adafruit_support_bill, adafruit

Ok to wake clock

by BradChesney79 on Mon Dec 17, 2012 11:53 am

I realize I can buy a product that is 'good enough'.
But, then again, I could make something kind of neat. And I want my son to think making things is normal.

What my wife is hounding me to buy is an 'ok to wake' clock for our 2 year old son that has just transitioned to a toddler bed. Basically, between certain hours it indicates via colored light that it is not okay to get up, the lights are off, or a color to indicate that it is ok to wake up. Right now there is not a kit for it. But I saw some parts that might work. Sheilds that would provide enough voltage to power LCD panels, an RTC module with battery backup, arduino maybe (I would not say no to a 555 & PIC solution, but arduino seems like the noob friendlier platform)--

Start supplying power to this grid of LEDs (all off or all on for more lumens to increase visibility) at this set time, turn it off at this second set time... Literally, that is all I am looking for.

Although I am a certifiable nerd with tech chops (blog.rustbeltrebellion.com); this will be my first time using some of this stuff. Would you be willing to suggest the parts and a general plan? Through-hole over SMT if possible... I can chase the details down from the google but a 10,000 ft view would be highly appreciated.

I have a breadboard I used to do simple circuitry on, this has parts that 'think' so I feel like it will be more complicated than things I have done previously. The end result I picture is the whole thing soldered together on a proto-board and put it in some kind of enclosure. I will likely make the enclosure with duct tape, superglue, bubblegum, and/or sugru...

-Brad
BradChesney79
 
Posts: 8
Joined: Mon Dec 17, 2012 11:32 am

Re: Ok to wake clock

by adafruit_support_bill on Mon Dec 17, 2012 1:28 pm

An Arduino and an DS1307 or ChronoDot real-time clock are a good place to start.
http://www.adafruit.com/category/17
http://www.adafruit.com/products/264
http://www.adafruit.com/products/255
grid of LEDs (all off or all on for more lumens to increase visibility)

We have quite a variety of LEDs, including several types of led matrix. You might want to look over the selection and see which one fits best with the your idea for the display.
http://www.adafruit.com/category/37
User avatar
adafruit_support_bill
 
Posts: 31866
Joined: Sat Feb 07, 2009 10:11 am

Re: Ok to wake clock

by BradChesney79 on Mon Dec 17, 2012 4:27 pm

I saw this guy and not only is it small, but it has a USB connection I was hoping for, will go from my breadboard to the proto-board, and is reasonably priced: http://www.adafruit.com/products/1086

I already have a 5V 2A power supply brick doodad from the Droid 3 I killed (much sadness) and I just bought a 10' USB cable to make my Amazon shipping $0.

Since I don't need super precise time, this looks like a winner: http://www.adafruit.com/products/264 .

So far so good?

Will I need any 'relays' or what I would call other glue pieces? The little this and thats that I might not already have.

This guy uses transistors to basically do what I am looking for... as far as on and off is concerned.
http://thecustomgeek.com/2011/08/01/con ... n-arduino/
BradChesney79
 
Posts: 8
Joined: Mon Dec 17, 2012 11:32 am

Re: Ok to wake clock

by adafruit_support_bill on Tue Dec 18, 2012 6:51 am

Those are good choices to start. The drive circuitry for your leds will depend on which leds you decide to use. You can drive individual discrete leds directly from arduino pins, but to drive multiples, you will need a transistor. If you go with one of the led matrix displays, we have 'backpacks' with the drive circuitry built in.
User avatar
adafruit_support_bill
 
Posts: 31866
Joined: Sat Feb 07, 2009 10:11 am

Re: Ok to wake clock

by BradChesney79 on Tue Dec 18, 2012 4:34 pm

I'd like to buy the stuff, put the shipping on hold for the initial order and then work with support to purchase most of the other 'glue' components from adafruit. I don't mind the reasonable markup considering the other places I might buy them probably won't be as helpful as support here has been.

To give full disclosure, I have been looking at blue and green LEDs that are crazy bright that a friend suggested from elsewhere though... it's just that these ones are supposedly blinding bright.

Product Name 50 pcs 10mm Green LED 22000mcd
Emitted Color Green
Size (mm) 10mm
Lens Color Water Clear
Peak Wave Length (nm) 520 - 525
Static Sense Yes
Forward Voltage (V) 3.0 - 3.3
View Angle 20 - 25°
Luminous Intensity (mcd) 20000 - 22000
Maximum Current 20mA Continuous, 50mA peak for 10% Pulse Width
Item Net Weight 100g / 3.2oz

Product Name 50 pcs 10mm Blue LEDs 20000mcd
Emitted Color Blue
Size (mm) 10mm
Lens Color Water Clear
Peak Wave Length (nm) 625-630
Static Sense Yes
Forward Voltage (V) 3.2 - 3.4
View Angle 20 - 25°
Luminous Intensity (mcd) 18000-20000
Maximum Current 20mA Continuous, 50mA peak for 10% Pulse Width
Item Net Weight 105g / 3.7oz
BradChesney79
 
Posts: 8
Joined: Mon Dec 17, 2012 11:32 am

Re: Ok to wake clock

by odometer on Tue Dec 18, 2012 5:24 pm

Why bother? Just get a timer from Wal-Mart. I mean the kind of timer you use to turn the lights on to fool burglars when you're away.
odometer
 
Posts: 98
Joined: Sun Aug 21, 2011 11:01 pm

Re: Ok to wake clock

by adafruit_support_bill on Tue Dec 18, 2012 5:35 pm

Discrete leds like that are not difficult to drive.
This tutorial shows how to wire up individual leds to arduino pins. http://www.ladyada.net/learn/arduino/LEDs.html
Here is one that shows how to drive multiple leds from one pin with a transistor. http://www.ecs.umass.edu/ece/m5/tutoria ... orial.html

I'm not sure that you want 'blinding bright' leds for this application though. Many of our customers ask us how they can dim the displays on their alarm clocks because it disturbs their sleep.
User avatar
adafruit_support_bill
 
Posts: 31866
Joined: Sat Feb 07, 2009 10:11 am

Re: Ok to wake clock

by BradChesney79 on Wed Dec 19, 2012 1:18 am

Your Order Number is: 211171

So, the only things I sourced elsewhere were the LEDs and soon the through-hole resistors.
(I searched for resistor and shunt-- only got the surface mount book in my results, poked around in the products menu to see if I could find them.)

This thing is going to be slick, who knows, maybe later I'll add a LCD display when he can read time...

I will post back the code that makes it work.

If you would like I can also post back what I needed to do to make it happen from Kubuntu linux.
BradChesney79
 
Posts: 8
Joined: Mon Dec 17, 2012 11:32 am

Re: Ok to wake clock

by adafruit_support_bill on Wed Dec 19, 2012 7:42 am

Post a photo of it too. :D
User avatar
adafruit_support_bill
 
Posts: 31866
Joined: Sat Feb 07, 2009 10:11 am

Re: Ok to wake clock

by BradChesney79 on Wed Dec 19, 2012 1:09 pm

Then the math to see what resistors I need--

5v supply - 3.3v consumed by the LED = ~1.7v left over

20 mA = 0.02A

1.7v/0.02A=85ohms of resistance needed according to Ohm's law

Looks like I need a 100ohm resistor which is the nearest single resistor I can use for each LED. (I could put resistors in series and add the resistances but that seems like it is unnecessarily complicating things). I can go as high as 15% on the tolerances as 100ohms-15%=85ohms but 10% or better would be safer.

Check my work via the conveniently available tools online:
http://led.linear1.org/1led.wiz?VS=5;VF=3.3;ID=20

Then when I have everything assembled I'll put my meter on the tail end of things to see what value of resistor between the LEDs and the transistor should be or even if I need one. (I don't trust the numbers I've been given by the site I bought the LEDs from, but they are good enough to speculate on.)

And one 1K resistor between the Arduino and the transistor.

On the Linux side: so far it has just been adding the arduino package with apt-get.

I'll just be posting updates as they happen. From here on out, I think I have everything under control.
BradChesney79
 
Posts: 8
Joined: Mon Dec 17, 2012 11:32 am

Re: Ok to wake clock

by odometer on Wed Dec 19, 2012 5:04 pm

BradChesney79 wrote:This thing is going to be slick, who knows, maybe later I'll add a LCD display when he can read time...


Maybe he'll learn to read time from the display.
odometer
 
Posts: 98
Joined: Sun Aug 21, 2011 11:01 pm

Re: Ok to wake clock

by BradChesney79 on Sun Dec 23, 2012 9:10 am

I had the package in my hands the following Friday. It may have come on Thursday and I just hadn't been looking for it. So, that was two days maximum from adafruit to Ohio. I consider that fast shipping.

I soldered the timer together this morning. I took video of that which will be uploaded to youtube some time later today or tonight.

That was about ten minutes, would have been less if I knew my wire clippers had been abused during my having-babies-and-doing-other-kinds-of-work hiatus. Nipping the excess leads took longer than expected and I had one cold-soldered joint (the shame) which I should have and did fix.

Installing the software on Linux is not as striaght forward as I would have hoped, but it doesn't look all that complicated either.

aptitude installs v1.0 of the sketch IDE and the current release is v1.0.3. The former does not seem to support the Arduino micro and the latter does. Instructions on that and links to the information I used are forthcoming.
BradChesney79
 
Posts: 8
Joined: Mon Dec 17, 2012 11:32 am

Re: Ok to wake clock

by BradChesney79 on Mon Dec 24, 2012 12:42 am

The timer break out board captured on video, proving assembly in under 15 mins is not difficult.

The Packaging
I thought it was interesting to see the boss's name as the return address name.
Assembly Part 1
(Pay no attention to the baby crying in the background, I use orphans on large scale mouse wheels to power my evil empire. Sometimes they cry. --The price of 'going green'. Seriously though, no babies were harmed in the making of this video.)
Assembly Part 2
(I use the dogs to 'motivate' the kids. If they don't run fast enough, the lights dim.)
BradChesney79
 
Posts: 8
Joined: Mon Dec 17, 2012 11:32 am

Re: Ok to wake clock

by ufskenney on Sat Dec 29, 2012 10:59 am

This is a great topic. It is exactly the project I am planning to work on, as well. For similar reasons, I would rather make this instead of buy it. A couple of tweaks that I am thinking about is using a RGB LCD to display the time and switch colors when it is "OK to Wake". I may also add a LED matrix to display an icon (Smilie/Frownie face??). A bicolor matrix might work well for that.
ufskenney
 
Posts: 6
Joined: Sat Dec 29, 2012 10:49 am

Re: Ok to wake clock

by ufskenney on Mon Jan 14, 2013 10:29 pm

I did some breadboarding this weekend with the parts that I had on hand. I modded some chronodot code that I found on the web. The chronodot now tracks time, day, and date for me. The icon displayed on the 8X8 matrix is time dependent. I may futher refine to make icon time and day dependent (i.e., changes to a smilie face at a later hour on the weekends vs. weekdays).

Next steps are to use a bicolor matrix instead of the 8x8 led matrix, to connect a RGB LCD screen, add buttons to change the time, and to put everything in an enclosure.
ufskenney
 
Posts: 6
Joined: Sat Dec 29, 2012 10:49 am