News:

SMF for DIYStompboxes.com!

Main Menu

AC for LED

Started by nosamiam, February 16, 2007, 09:39:02 PM

Previous topic - Next topic

nosamiam

Hey everybody, got a question.  I just finished building an 8-output power supply using the Weber transformer.  Space in the box is at a serious premium.  You wouldn't believe how everything's crammed in there.  The box is 2.2" x 4" x 5.5" and if you've used this tranny you know that's some A-1 stuffing!

So here's the situation... I have set of 9v secondaries and I don't have room in the enclosure for another jack or the associated circuitry for DC.  At least not in the same part of the box as the rest of the circuit.  I don't have an indicator yet though.  I did just buy a Red-Green-Blue color-changing LED from Auto Zone that I'd love to use.  So my question is, are there any creative options for powering the LED?  Is it possible to power it with 9v AC?  If so, how would I go about it?  If not, any other ideas?  The smaller/tighter the better.

amz-fx

#1
You can power an LED from AC with a simple circuit as shown here:



The LED conducts on the positive cycle and the 1N4001 power diode will conduct on negative cycles to prevent the LED from reverse bias damage. R1 sets the currrent limit and therefore the brightness of the LED.

The voltage powering this circuit is AC, and you calculate the peak-to-peak voltage by multiplying the rms input by 2 times the square root of 2. So if we have 9v rms input AC, then we have 9 * 2 *1.414 = 25.452v pk-pk  This is the voltage we would use to calculate the value of the current limit resistor R1.

Using my LED calculator at http://www.muzique.com/schem/led.htm, we can input the 25.452 as the voltage input, use 1.9 as the LED drop and select a current for our brightness. Let's go with 2ma and we will get a resistor value of  11776 ohms.. The next highest standard value is 12k so we would use that for R1.

If we need it to be brighter, we can use 3ma for the current and the resistor will be 7851 ohms, but we can use a standard 7500 ohms resistor and only be about 3.1ma - close enough.

In this exact setup, you don't even need the 1N4001 as the LED can probably take the low reverse currents...  but it is cheap insurance.

Experiment with R1 values until you find one that gives you the proper brightness because the efficiency of the LED will control how bright it appears at any particular set current.  A high brightness LED will be plenty bright at 2ma but a cheap low efficiency device may need 10ma to have the same apparent light output.

How much power does the R1 resistor have to dissipate?  If 1.9v is droppped across the LED, then the remainder of the voltage is dropped across the resistor, or 23.552v.  We know that P=I * E, so the power through the resistor is 23.552v times the current we have set, if it is 2ma then it is 23.552*.002 = 0.047w and therefore a quarter-watt resistor would be sufficient.  If you are using 10ma (0.236w)  then you are pushing the limits of a quarter-watt resistor and probably would be better off with a half-watt resistor, though this is the peak value and I think the smaller resistor could take it.

Since the LED is only getting the max current on the peaks of the input, you will likely have to set the current higher than you would normally use in order to get the same visual brightness.

What if the voltage input is 125v AC?  The circuit still works but the power dissipation requirements of the resistor go way up, and you need a higher voltage rated diode...  but you can make an AC line voltage indicator this way. 

regards, Jack

nosamiam

Thanks a lot Jack! Just the answer I was looking for.  Very thoughtful reply.

R.G.

It gets a little tricky figuring these things.
Quote
The voltage powering this circuit is AC, and you calculate the peak-to-peak voltage by multiplying the rms input by 2 times the square root of 2. So if we have 9v rms input AC, then we have 9 * 2 *1.414 = 25.452v pk-pk  This is the voltage we would use to calculate the value of the current limit resistor R1.
The biggest voltage that can exist in that circuit at any one instant is not the peak to peak, but the peak voltage. There's nothing there to hold one peak until the   other one happens one cycle time later. So the peak voltage is 9V*1.414 = 12.76.
Quote
Using my LED calculator at http://www.muzique.com/schem/led.htm, we can input the 25.452 as the voltage input, use 1.9 as the LED drop and select a current for our brightness. Let's go with 2ma and we will get a resistor value of  11776 ohms.. The next highest standard value is 12k so we would use that for R1.
IMHO, using special purpose calculators impairs an understanding of what's actually happening. In this case, there is a half-sine-wave across R1 and the LED one way and across R1 and the 1N4001 the other way. The voltage across R1 is a half wave rectified sine wave minus the 1.9V that the LED needs. If the 9Vac is approximated with a rectangular wave with a peak of 12.76V, the resistor would see 12.76V-1.9V = 10.86V with a duty cycle of something less than 50% for the LED's cycle and 12.76-0.7 = 12.06V with a duty cycle of more than 50% for the diode's half cycle.

We can solve this exactly with integrals, but no one wants to go there, eh? So we'll say that the LED is seeing ... about 40% duty cycle. And ... about 9V across R1, mentally approximating the half-sine wave top. So now we can set the LED current.

The LED will closely average in the human eye to the duty cycle times the current it actually gets. So if we want that 2ma of current, at a 40% duty, we need the resistor to be hitting it with about 2ma/0.4 = 5ma. So with our guesstimated 9V, R1 has to be 9V/5ma = 1800 ohms.

The resistor dissipates 9V*5ma = 45mW for the LED half cycle, and maybe 11V*11V/1800 = 68mW. Averaging these by duty cycle gives an exact dissipation, but a 1/4W resistor makes it work fine and has plenty of reserve. I pulled the duty cycles and voltage values out of my ears based on working other problems like that. As I said, we can do the calculus, but this kind of approximation is very useful, and as we say, came up with non-critical values. If we had been at the edge of a power disspation step, we might have to go back through the stuff with better math.

You have to look at what's really happening in the circuit to get close answers. That depends on understanding what the voltages and currents are doing, and at what times.

R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

nosamiam

I'm following along pretty well. Thanks folks.

However, I'm not getting the results I was hoping for.  I can't seem to get anything but the tiniest pinpoint spark from my LED.  I've tried garden variety LED's to make sure that the particular LED isn't the problem.  I can't figure it out.

I even used a 10k pot as R1 and at near 0 ohms the LED gets brightest, but still not anywhere near a usable intensity.  Several times, I've tested the LED out with a 9v battery and it works just fine.  I've rechecked the voltage at the secondaries and it's still 9v.

Any idea where the problem could be?

R.G.

Any chance the LED and diode are pointing in the same direction?
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

nosamiam

I tried turning the LED around in relation to the diode in the DC (battery) circuit just to make sure I had it oriented correctly.  The LED didn't light.  So I'm pretty sure that's not it.  Anything else I should look at?

R.G.

I would try the existing circuit with just the battery. If the LED lights one way with the battery and not the other way, measure the voltage across the LED and diode. Could be a bum diode, or the usual suspects - bad connection, etc.

If the LED won't light either polarity with the battery instead of an AC supply, then there's something wrong with the circuit.

Give that a shot. AC is after all, just periodically inverting polarities.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

amz-fx

nosamiam,

I had a 9v 830ma transformer from an Alesis 3630 compressor so I connected to a breadboard with the exact circuit shown above and it work perfectly. I used 1k for R1 and a low efficiency LED that was in the junk box and it was plenty bright.

Are you connecting across the 9v secondary?  R1 to one of the secondary leads and the diodes to the other secondary lead?

regards, Jack

nosamiam

Don't have it in front of me now but I'll definitely take a closer look.  Thanks for the help.

bancika

In my last amp I connected LED directly to heaters (though resistor of course). I get 50Hz blink but it's visible only if you don't look directly to
it. You'll need some capacitor to prevent blinking in you don't like it.
The new version of DIY Layout Creator is out, check it out here


nosamiam

Maybe that was my problem.  I needed something to store charge.

Anyway, I've found a solution.  I was thinking too hard.  Turns out there is a 9v pedal jack right next to the LED.  I just daisy-chained some juice from that into the LED.  I guess I was so set on having everything on separate circuits (and on using ALL of the secondaries) that I couldn't see what was staring me in the face.

Thanks for all the pointers.  I'm done with this one, but I'll be back with more for certain.