RGB LED night light
| Attachment | Size |
|---|---|
| RGB.bas | 936 bytes |
I had some RGB LEDs lying around and decided to make a night light for my kids.
An Arduino was a bit overkill so I went for PICAXE instead. The first problem was that there is only one PWM on the 08M and I needed 3 (one for each color). So I decided to use 3 each of the 08M, one for each LED color. Then it hit me that I could use more than one RGB LED and get different colors by hooking up the colors differently. So that the Green signal in one has the same input on the Blue channel on another one. Giving me 3 distinct colors all the time. The problem with this is that all the lights have the same brightness and not fading individually, but that’s ok my kids aren’t that picky. The second problem was that the PICAXE random function is not really random at all, it will always produce the same sequence and with this setup I would only get fading of white with little color. So I changed the steps for the fading sequence slightly on every chip so that they would come out of sync.
An Arduino was a bit overkill so I went for PICAXE instead. The first problem was that there is only one PWM on the 08M and I needed 3 (one for each color). So I decided to use 3 each of the 08M, one for each LED color. Then it hit me that I could use more than one RGB LED and get different colors by hooking up the colors differently. So that the Green signal in one has the same input on the Blue channel on another one. Giving me 3 distinct colors all the time. The problem with this is that all the lights have the same brightness and not fading individually, but that’s ok my kids aren’t that picky. The second problem was that the PICAXE random function is not really random at all, it will always produce the same sequence and with this setup I would only get fading of white with little color. So I changed the steps for the fading sequence slightly on every chip so that they would come out of sync.
The video really doesn’t give it credit. It looks great in a dark room and my kids love it.
The board


I used sandpaper on the LEDs to spread the light

Final assembly


And some ping-pong balls on the top




@ Tue, 2011-01-18 04:33
Nice
Very nice project and one thing, this looks exactly like the ball on top of the playstation controller!
I bet they read this and stole you idea of the colored ball ;)
@ Tue, 2011-01-18 12:56
You’re probably right
You’re probably right GranTotem. I’ll get my lawyers to contact Sony straight away :-D
@ Tue, 2010-10-26 22:58
Great idea. What could i use
Great idea. What could i use instead of ping pong balls - something slightly bigger.
@ Wed, 2010-10-27 20:08
I used a plastic light
I used a plastic light fixture for a more scary version :-)
http://www.youtube.com/watch?v=aBx9GM8s62o
This is an entry for a .NetMF competition http://www.tinyclr.com/forum/9/1119/ . I'll do a post on it later.
@ Wed, 2010-10-27 21:28
Love it!
Love it!
@ Wed, 2010-10-27 00:31
Polymorph plastic glows
Polymorph plastic glows nicely with an LED inside it, and you could make it whatever shape and size you like.
@ Tue, 2010-09-28 19:18
Whoa guys
This is the "how to make a distance sensor with a 3-pin IR sensor" guy. I think he's cool. And trust me, I don't cater to spammers.
@ Tue, 2010-09-28 19:52
to clarify this mysterious comment by my friend
Chris responded to the allegation (by me) that a certain comment was pure spam. I removed that comment now (and all responses to it disappeared as well).
The user's account was less than a day old and had no other contributions to his name. It was a spammer al-right. Chris, you must've been thinking of someone else.
@ Sun, 2010-02-28 23:56
RGB LED's
@ Sat, 2010-02-27 16:33
Reminds me of this guys
Reminds me of this guys project which I've been considering doing for a while now.
Maybe you could do something similar as he did with the phototransistor and use that value with the random function?