PDA

View Full Version : Light timer



Austinite
09-12-2008, 08:19 AM
I have the Basic Discovery kit but have not gotten anywhere near through the book. What I need to do is be able to have two small clusters of DC powered LED's (call one blue and one white) that can be triggered with a momentary switch to stay on for 30 minutes to one hour and then stay off. I would like two switches - one for blue and one for white and be able to control the times differently. I have seen circuits using 555 chips but this seems a better way. I am certain I will need a relay to control the power to the lights (suggestions?). Is there a simple program like this already? I searched to no avail. Thanks in advance.

metron9
09-12-2008, 09:22 AM
A little more information on the number and type of LED's in each cluster and how accurate of time you would like to keep. Is the time on for both clusters a fixed time or do you want it adjustable using a POT for example.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Think Inside the box first and if that doesn't work..
Re-arrange what's inside the box then...
Think outside the BOX!

erco
09-12-2008, 09:25 AM
You won't need relays to drive LEDs. All you need is two switches, two LEDs, four resistors, and... some quality time to read that book. Parallax makes it so easy with great material. This problem is a perfect intro to the Stamp, and many people here could show you how to wire & code it, but you wouldn't learn anything that way. Try to do it yourself, then please come back for help, but you have to take the first step. Good luck, and let us know how it goes.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"If you build it, they will come."

erco
09-13-2008, 03:17 AM
BTW, everything you need is in WAM (What's a Microcontroller), chapters 1-3.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"If you build it, they will come."

Austinite
09-14-2008, 12:27 AM
I agree with you. I find myself long on needs and short on time. I need to hook up two groups of LED's - about ten per group. As such this will pull around 200mA per group.

From what I have read this is too much. Before I get too involved I want to make sure I have all the parts a reasonable person would need. Do I need to trigger a relay?

Thanks

SJL

Austinite
09-14-2008, 12:28 AM
Also - 10% accuracy is fine and I do not need to adjust the time.

thanks

erco
09-14-2008, 04:26 AM
Adjusting the time (calibrating) is simple, just experimenting with numbers in your program. Once you get it to run, adjusting is very easy.
For 200 mA, definitely use a relay. Radio Shack's reed relay at http://www.radioshack.com/product/index.jsp?productId=2062478 will work well here, just be sure to put a flyback diode across the coil (almost any silicon rectifier diode like a 1N4001) to protect your stamp, like the sketch shows.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"If you build it, they will come."