
Vol. 25: A Trippy Crystal Nightlight
Create any color, using 3 LEDs and the trick of pulse-width modulation.
+ Downloads & Extras:
+ Program listing + Breadboard layout + Schematic
» MAKE: NOISE — Discuss this article
You must be logged in to post a talkback.[ Display main threads only] [ Oldest First]
Showing messages 1 through 8 of 8.
- Picaxe current per pin overload?
You must be logged in to reply.
1) For the Picaxe circuit shown on pg 151, I get for blue and green LEDs (Vf=3.5) per pin current of 75 mA, and 33 mA for red LED (Vf=1.7).
Based on the Picaxe manual " each output can sink or source 20mA" ... this seems high.
Is there something I'm missing here?
2) Also, any thoughts if all three LEDS could be driven with one Picaxe 18M2 chip ?
http://www.rev-ed.co.uk/docs/picaxe18m2.pdf
thanks for your help.Posted by paul1823 on February 01, 2011 at 18:35:52 Pacific Time
- Picaxe current per pin overload?
You must be logged in to reply.
Are you using the exact same LEDs specified in the shopping list? They perform differently from generic LEDs.
I am skeptical that one chip such as 18M can do pulse-width modulation of three LEDs. I'm not sure it would be fast enough. But I encourage you to try it!Posted by Charles Platt on February 01, 2011 at 18:41:26 Pacific Time
- Picaxe current per pin overload?
You must be logged in to reply.
696-SSL-LX5093USBC, 696-SSL-LX5093UEGC, 696-SSLLX5093XRC/4 are the Mouser.com part number I got when I searched for the part numbers listed in the article.
I used the Vf values from the data sheets Mouser provided for those parts and used the current calculation method as defined on page 28 of "Make:Electronics."Posted by paul1823 on February 02, 2011 at 10:24:08 Pacific Time
- Picaxe current per pin overload?
You must be logged in to reply.
Thanks, very interesting! Because I built the "night light circuit" quite a while ago I can't remember if I did any calculations. I think what I actually did was vary the series resistors until I got an acceptable measurement for current. My circuit was then duplicated by an intern at Make magazine, to be sure that it worked. I feel certain that I used the same resistors, myself, as those which I listed in the article, and my night-light circuit has been running constantly for several months now.
What may be happening is that the outputs of the microcontrollers are to some extent self-limiting. But this goes beyond my knowledge.Posted by Charles Platt on February 02, 2011 at 18:08:10 Pacific Time
- Arduino?
You must be logged in to reply.
A large portion of this magazine edition is centered on Arduino. I'm curious as to whether the lamp could be modded to use an Arduino controller for the LED's. Would each LED need its own board, or can an Arduino board control three LEDs? If one board will do the job, can a program be written so that the lamp changes colors gradually; creating infinitely possibilities?
Did you research whether a large salt crystal is commercially available? If so, any leads?
I'm also curious as to what the bottom of the crystal looks like. Did you hollow out a small area in the bottom, drill three holes or just have the LEDs contact the bottom?Posted by jyossarian on January 24, 2011 at 12:37:42 Pacific Time
- Arduino?
You must be logged in to reply.
> Would each LED need its own board, or can an Arduino board control three LEDs?
A single Arduino would be easily able to handle this. An Arduino has 6 dedicated PWM outputs which can be controlled using the AnalogWrite function. The following tutorial Secrets of Arduino PWM will also be very useful.
I haven't used a PICAXE before but from a quick look at the relevant data sheets, the underlining micro controller should be able to easily drive three LEDs. Any limitation is likely to be in the complexity and space requirements of the software in using bit-banging to generate the PWM output.
I've worked on a very similar project/product for a Mini Mood Light, which uses a TI MSP430 compatible with the LaunchPad development platform. Six bit-banged PWM outputs are used to control two RGB LEDs along with four buttons for user control.
Posted by Robert Fitzsimonsa on February 28, 2011 at 15:59:25 Pacific Time
- Arduino?
You must be logged in to reply.
I was thinking of trying to use a four-lead RGB LED in conjunction with the randomSeed function on Arduino. It's not perfect yet, but I'm working on it.Posted by DIY PIE on July 25, 2011 at 07:06:25 Pacific Time
- Arduino?
You must be logged in to reply.
As a freelance contributor I was not aware that the magazine would be having a special Arduino issue. Unfortunately I cannot answer your question because I am not familiar with the Arduino myself.
As for the lump of salt, I didn't really expect anyone to go looking for one of these! That's why I suggested alternatives. The one that I was given already had a cavity in its flat base.Posted by Charles Platt on January 24, 2011 at 12:41:29 Pacific Time
|
Showing messages 1 through 8 of 8. |
Join the conversation -- every MAKE article has an online page that includes a place for discussion. We've made these RSS and Atom feeds to help you watch the discussions: subscribe.










