On / Off Panel of LED Circuits - Wiring

Thread Starter

imruffsdad

Joined Jul 18, 2008
17
Actually, 8 and 11 are blinking LED's, 8 on purpose and 11 because it fell out and I lost it and I didn't have my red LED's labeled so it ended up being a blinking one. The rest all look good to me, could be the angle.

I'm actually building a rocket ship playhouse for my 5 and 3 year old daughters and this is one of the components. The finished version will have things like Life Support, Thrusters, Etc, under each switch. Hope to have the whole rocket done by Christmas (it's always summer in California) with these panels and then some other cool stuff I found at a recycled electronics store (they don't do anything, they just have big dials that click and stuff).

Thanks again for all your help. I'll send you pictures of the finished product.

All the best,

Dennis
 

Thread Starter

imruffsdad

Joined Jul 18, 2008
17
And if you have the time, I'm still a little confused over what the front ended resistors are doing R1/220 and R2/510 in your schematic.

Thanks again for all your help.

Is this correct?
SgtWookie,

If you find a moment. I'm building the second version of this and was wondering if you could be bothered to explain the up front part of the circuit you sent me. I've attached it here so you don't have to search. I'm going to be using a different wall wart on this one and I have a choice of several and I'm wondering how that was calculated into your up front usage of the LM317. I've studied up on the LM317 and I get what it does but I was hoping you could give me a little tutorial on the LM317 and why you chose the capacitors and resistors that you used up front. The back of the box of the LM317T I bought has a similar diagram to yours with different capacitor and resistor values.

I would certainly appreciate any help you can give. Or would you prefer I launch this as a new thread?

Thanks a bunch,

Dennis
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
Hi Dennis,
It's perfectly fine to continue on in this thread, as it's all related to this same project. :)

As far as capacitors, the values I chose were "somewhat" arbitrary. Precise voltage regulation wasn't terribly important; the caps are basically there only to keep the LM317 from oscillating.

The 220uF cap is there to help ensure that the regulator gets a more or less steady supply of current from the wall wart. An input capacitor is necessary if you have more than a few inches of wire between the actual voltage source and the regulator IC. Wire is inductive; the longer the wire, the greater the inductance. This can cause problems if there is no capacitance to act as a buffer. You can think of it as a "cushion", like the anti-hammering piping that plumbers install at washing machine water faucets.

At the output terminal of the LM317, I suggested that you use a 1uF capacitor. Normally, one might use a 0.1uF and 10uF (or larger) cap to suppress both large and small transients (rapid changes in voltage that take time for the regulator to compensate for).

However, for your application a single 1uF capacitor was sufficient. The only transients you will experience is when your power gets turned on, and momentary transients when LEDs get turned on and off. But, the resistors I used weren't small enough to ensure proper regulation without at least 1 LED being turned on, and I didn't want to use a large cap to store up lots of energy while regulation wasn't guaranteed. Read on.

For R1, the schematic on your package probably shows 120 Ohms. This is because the LM317 requires a minimum of a 10mA current in order to guarantee regulation, and the nominal voltage between the OUT and ADJ terminals is 1.25v; minimum being about 1.2v and maximum about 1.3v. This particular reference voltage is called Vref. You can find out exactly what your Vref is by using a voltmeter across the OUT and ADJ pins when the power is on and an LED is turned on.

The LM317 does it's best to keep the Vref between the OUT and ADJ terminals the same at all times. It does this by varying the current supplied to the OUT terminal.

In your particular case, if all switches are off, we really don't care about voltage regulation that much. However, as soon as one of the LEDs are turned ON, we know that we will have at least 10mA current flowing out of the LM317. This means that we can be a lot more flexible with the resistors that we can use between the OUT and REF terminals. I chose a resistor value that is very popular, and very easy for you to obtain.

In my schematic, I assumed the worst case scenario. The Vref for the LM317 in my simulation is 1.295v.
Since I = E/R (Current in Amperes = Voltage / Resistance in Ohms)
I = 1.295/220
I = 5.9mA (rounded off)
So, the regulator is going to do it's best to ensure that the current through R1 will remain the same. However, that depends upon the path to ground from the OUT terminal. That's where R2 comes in.

We already know for this particular simulation that Vref = 1.295v, and the current through R1 is about 5.9mA. The LM317 has a variable dropout voltage (difference between the IN and OUT terminal) depending on temperature and current, but for your purposes I assumed 2.1V worst case (derived from National Semiconductor's LM117/LM317 datasheet). This is one of the big reasons why I settled on an output voltage of 4.3v.

So, the LM317 will be trying to send a current of 5.9mA to ground in order to keep that Vref constant (between the OUT and ADJ pins.)

We already know the Vref is 1.295v, and the current through R1 wants to be 5.9mA.
So what value of R2 do we need to ensure that the output voltage will be near 4.3V?

You don't really think that I'm going to continue to do all of the work, do you? ;)

You show us how to calculate R2. It's basically straight Algebra and Ohm's Law.

Go to National.com and download the datasheet for the LM117. The datasheet for the LM317 is contained within that same datasheet. It has lots of information about the IC; far more than what was on the package you bought.

And yes - I'm trying to teach you how to fish. :)
 
I have row of three blue leds connected in series along with resistor of 220 ohms, like this 38 rows r mounted on single pcb. I am providing 12V , 8.3A supply to 6 pcb at a time. the problem is that some of the blue leds get burn out and the intensity does not remain constant all the time. Is constant current source required? If yes, how many and how it will work please let me know . any other suggestion are well-comed.
thanking you.
 
Top