In Using AC with LEDs (Part 1) we looked at a simple way to run LEDs with a transformer connected to AC Mains.

Here, we will look at getting our LEDs to work without a transformer and build a simple light that is integrated into an expansion bar.

WARNING: For countries with 110v mains, we'd be working with voltages of 150 volts! For Europe and other countries, we are talking about 300 volts or more! At these levels, electricity is lethal! Do not continue unless you are comfortable with working with high voltages and are aware of the precautions to take!

AC supplies are quoted in rms (root-mean-square) values. The PEAK voltage is sqrt(2) * Vrms, which is about 1.4 * Vrms

Here, we will look at getting our LEDs to work without a transformer and build a simple light that is integrated into an expansion bar.

WARNING: For countries with 110v mains, we'd be working with voltages of 150 volts! For Europe and other countries, we are talking about 300 volts or more! At these levels, electricity is lethal! Do not continue unless you are comfortable with working with high voltages and are aware of the precautions to take!

AC supplies are quoted in rms (root-mean-square) values. The PEAK voltage is sqrt(2) * Vrms, which is about 1.4 * Vrms

The simple and obvious way to get hundreds of volts down to a level to operate a LED at 20mA is to put a resistor in series with the LED. To find out what values we are talking about, we'll use the peak value of 110v, which works out to be 150v for our example (it'll be double for Europeans and Ozzies)

150 / 20mA = 7500-ohms (we should subtract the voltage of the LED from 150v first, but the difference is minor)

7500-ohms? Not too bad... But then let's consider the power rating of this resistor, using the Power rule: P = (V^{2) / R, we get:}

150 * 150 / 7500 = 3 watts, and that's a pretty hefty resistor. Brits with 240v mains will need a 17000-ohm resistor rated for almost 7-watts. And these will be running HOT!

Fortunately, by substituting a capacitor for the resistor, we can get the same reduction on voltage without the (or as much) heat. Capacitors delay the phase angle of AC which we can use to oppose itself, much like receding waves on the shore cancelling out some of the force of incoming ones.

150 / 20mA = 7500-ohms (we should subtract the voltage of the LED from 150v first, but the difference is minor)

7500-ohms? Not too bad... But then let's consider the power rating of this resistor, using the Power rule: P = (V

150 * 150 / 7500 = 3 watts, and that's a pretty hefty resistor. Brits with 240v mains will need a 17000-ohm resistor rated for almost 7-watts. And these will be running HOT!

Fortunately, by substituting a capacitor for the resistor, we can get the same reduction on voltage without the (or as much) heat. Capacitors delay the phase angle of AC which we can use to oppose itself, much like receding waves on the shore cancelling out some of the force of incoming ones.

<p>Forgive me if this is a noob question, but, why the lattice connections with the LEDs? Why not just two straight row connections? Thanks.</p>

<p>The "lattice" arrangement is such that each pair of (top-and-bottom) LEDs protect each other from over-voltage. </p>

Thanks for the reply. Sorry to keep bothering you, but just to clarify: without the lattice connections would there definitely be over voltage or is it just there in the slim chance that there "could" be over voltage?

<p>Since we'll be running this thing 24/7, the over voltage is just about guaranteed. Never play games with safety!</p>

<p>Thanks for educating me on that. Based on this Instructable and some additional research in creating a required resistor array, I have developed a schematic for a small project. If you don't care, could you look it over to make sure everything's right and safe? This will be encompassed in the bottom shell of a spent CFL bulb so as to be able to screw it into a 120V light socket. Thanks.</p>

<p>Ok I have read most all the comments, and I am no closer to my particular situation. Please clarify your formula just a little for me. I am not dealing with 110v a/c, I am using a 36 volt a/c leg and a 16 volt a/c leg. So I should be able to use a smaller resistor, and higher capcitor correct. I used every thing you did but just used a 1n4007 as the second diode, they are just beieng used as panel lights on a power supply I am building. Thanks for the help. Just help me with the formula.</p>

For low voltages (under 50v) use this formula:<br><br>R = (Vi - Vled) / 0.2<br>where:<br>R is the resistance to put in series, (You do not need the 1K or the capacitor!)<br>Vi is the input (source) voltage (for RECTIFIED a/c, multiply this by 1.7)<br>Vled is the total V of the leds you are using (use 2.4 for each Red; 3.3 for White or Blue)<br>and round UP to the nearest standard value<br><br>Hope this helps!

<p>NOTE: The formula should read:</p><p>R = (Vi - Vled) / 0.02 (There should be an extra zero); or you could use:</p><p>R = (Vi - Vled) * 50.</p>

What kind of transformer do I need to install 36 watts LED bar at home 110v ??

For a 36W LED-bar using 12v at 3.6A, the answer is a 12v (DC) power-supply with a capacity of at least 3.6 Amps.<br><br>A quick search online yielded this: http://www.dx.com/p/12v-4-2a-iron-case-power-supply-black-ac-95-260v-163956 which would work for you.<br><br>To make a rectified 12 power supply, you will need a 7 - 8.5 v AC transformer, again, able to supply over 3.6amps. Use a bridge rectifier able to handle over 4-Amps (so the popular 1N400x rectifiers will not work), add a 100-300uF 25v capacitor to get some filtering to reduce flickering.<br><br>12v LED devices are designed for automobile use, which usually means resistors to drop the voltage to 10v or thereabouts. That's why it uses 43.2-Watts to generate 36W, for an 83.3% efficiency.<br>

<p>You will have to look up the Voltage and Current specs of the light bar before figuring out the rest.</p>

3.6amp 12v

<p>sir, It is very beautiful description,but please tell me how to calculate 8 nos LED for each row.</p><p>narayan.nandi@yahoo.com</p>

<p>As mentioned in the article, you can have up to 8 LEDs in each row without changing the other parts.</p><p>This circuit is basically a current limiter which only allows 20mA to go through each LED, regardless of whether you have 1 or 8 per row, or any number in between.</p>

Please read my reply very careful.<br><br>What "any number IN BETWEEN" means any number, as long as it is 1,2,3,4,5,6,7 or 8. Not 100 or 200.<br><br>If you have problems, please ask nicely, I'm spending time to try and help you, not to get snarky (rude) remarks that show you have not paid attention.

<p>Sir,</p><p>Sorry, I do'nt want to hard you. Actually I want to know, how calculated the number of LEDs, or what happen if more than 8 LED per row is used.</p>

<p>Sir,</p><p>Thanks for your reply. what do you mean any number means. It may be 100 or 200 leds per row.There should be a limit according the power.Please clear it. </p>

<p>hello sir, how to connect only one 1watt or 5 watt led on direct 220 volt ac. plz help me</p>

<p>Special Thanks for clearing so many queries with just a few instuctables. Very well explained. When I went hunting for LEDs in the market I came across 5mm and 10mm LEDs. Do they use the same current as the regular ones? Cause I cant really figure out how to do the calculations without the values</p>

Thank you!<br><br>The LED current should be well advertised by the vendor, maybe a query or two would clear things up.<br><br>At the risk of oversimplifying, when it comes to discrete (2-lead) LEDs, 20mA would be the norm. Certainly go with that for the 5mm and even 8mm ones. Some 10mm feature a larger 'dome' to focus the light into a smaller area so they can advertise a higher lux output at the same current.<br> A perhaps semi-useful guideline will be to look at the die size - for white LEDs, that's the yellowish blob under the 'dome'. Larger dies could mean better current capacity. Also the thickness of the leads may likewise give some clues.<br><br>Again, thank you for your mail and I am glad you find my 'ibles helpful.

<p>Hey thanks very much for the overview. I'm wondering about the size of the package.. I want to add an LED to power tools that don't have them. I was hoping for a cheap efficient way that also fit in a small size. The 1k ohm resistor isn't a problem, and I was considering using a diode to half the voltage. An SMD capacitor of .47uf/200v would keep the package small; potentially fitting in the tool body. Could a thyristor be used instead of the diode to further drop the voltage? Any input on these tweaks greatly appreciated!</p>

<p>Not too sure about the availability of a non-polarised 0.47uF/200v cap in smd format. They are necessarily quite large to prevent arc-over.</p><p>There's no need to use tricks with diodes and such -- which only work with incan lighting, not LEDs, btw -- just DECREASE the value of the capacitor to make the LEDs dimmer. Brighter? Add more LEDs in series without changing the C.</p>

i want to use 1 led of 20mA and 230 volt ac supply.what is the value of resistor and capacitor should i have to put.f=50 Hz. <br>thanking you in advance.

The <em>minimum</em> number of LEDs for this circuit is 2, although you can substitute a 1N4001 diode for one of them. Then use R=1K and C=0.2uF (or 0.22uF) as stated in Step 2.

hi! what about connecting a full LED strip to mains. <br>LED strips are organized in modules, each has 3 led in series with a resistor, then all the modules are paralel. in terms os voltage they the led strip is 12vDC <br>can we build a simple Capacitor circuito to feed the all strip? <br>Paulo

Thanks for the comment.<br><br>As noted, the design here is not very efficient and is suitable for low power, multiple-LED applications. The "LED strip" will further cut into this efficiency as they lose another 20% in the resistor. Better to invest in a 12-volt wall-wart for $5 on eBay and use that.<br><br>However, it is completely feasible to cut 15 pieces off the strip and (re-) connect them in series. Then they will run off (a rectified) 120vac mains.

don't forget to put up a diode to protect! <br>thanks! <br>marC:)

When LEDs are placed back-to-back, like they are here, each acts as a diode to protect its 'twin', so no extra diode is needed!

Hi QS,<br><br>I tested with 0.22uF 630V non-polar Caps, one 1K ½W resistor, two white led wired in parallel, it work, so my query is, if I would like to add another 2 x 7 LED in parallel, do I still need another set of C & R ? Is there any limitation number of parallel row added to the circuit ? Thx in advance : )

Hi, each RC set can handle up to 8 pairs of LEDs, in series. You can have more, if you do not mind slightly dimmer LEDs.

Thx for yor reply QS,<br><br>I just built & replaced one of my table lamp with 2 rows of 7 White LED & it works : )<br><br>My question is, if I wish to add another 2 rows of 7 White LED, do I still need another RC set or I just parallel connect to the existing circuit ? Is there any limitation ?<br><br>Btw, if I want to filter out the flicker effect, add one Bridge Rectifier to it correct ? (400V rated @ 1.5A) ?

If you wish to use this method for another 14 LEDs, you would need another RC pair.

the 3/64 bit would be smaller than the 1/16 bit so it probably was a 13/64 bit

Great project, and well described! Just one suggestion as a possible edit for step 6:<br> <br> "Decide the end you wish to work on - whether you want the light to shine UP or DOWN. <strong><em>Then plug it in where you plan to use it and mark the top and bottom." </em></strong><br> <br> Some electricians (at least in the U.S.) always install receptacles with the ground up, others with the ground down, and many like to mix it up. It would be a shame to go through whole project and then find out your UP light was shining DOWN!<br> <br> Once again, nice job, and definitely on my to-do list.<br> <br> <br>

would it be possible to add a photoresistor in line to turn this off at day and on at night? the lowest photoresistor dark rating I could find would be 2-3k ohms. could I use 1/2 watt 100mA superflux leds?

The addition of a photo-resistor will not be advisable - as it will dissipate far too much power when it is turning on or off. The idea is that this is a convenient light in a darker area so it is OK to have it on constantly.<br> <br> For higher power lights, this is not a good circuit, take a look at some of my earlier answers and check out both <a href="http://www.instructables.com/id/Using_AC_with_LEDs_Part_1/">parts 1</a> and <a href="http://www.instructables.com/id/Using-AC-with-LEDs-Part-4-The-New-Technologies/">4</a> of this series

I like the approach in that it seems to be more efficient than using transformers and bridge rectifiers. What value modifications would be required to add additional strings of LEDs in parallel to the pair in this design? Thanks.

What this type of circuit has in terms of simplicity, it gives up in efficiency.<br> <br> A well-matched transformer system can be 80% efficient and off-line (Switched) circuits even higher; using a capacitor (or any other method) to limit current flow is much less efficient, although it slowly increases with the number of LEDs.<br> At the point where the total Vf of the LEDs equal the equivalent DC voltage, about 52 for 117vac, we can direct connect the LEDs and the efficiency then becomes 100%.

So this would be more efficient if you were making something like a led light in a florescent tube type of design using 52 LEDs and no resistor?<br>

Yes, since all available power is sent through the LEDs, the usage efficiency is 100%.<br> <br> The image below is a light just announced by Phillips which uses a cluster of 96 LEDs to operate directly off rectified 230v mains.

I'm a newbie to this stuff, but very interested. Can you tell me more about the calculations? Or better yet if you can guide me to some webpage where I can find more details. If we're to have more LEDs, lets say 20, will changing the capacitor and resistor value be sufficient? Or does it need a more advanced circuit? I used a 1k/ 1W resistor and a 0.6uF/ 400V capacitor. Is this wrong? Your help is greatly appreciated, as it'd help me to get started. We have 220V - 240V AC supply here. Thank you in advance...

Jeevendra,<br> <br> Please reread the values for 220vac carefully! The values you supplied will seriously overdrive the LEDs and permanently damage them. The capacitor value is calculated as: ( 0.02 / ( 2 * pi * f * ((V * 1.4)-Vf) ), so it's not a linear relationship and certainly not directly proportional to the number of LEDs you want to use!<br> <br> For 220v supplies, you can have up to 15 LEDs in each branch <em>without changing the basic values</em>, so you can easily have your 20 by putting 10 in series, in 2 opposing chains. See my response to <em>lurkingdevil</em> for an explanation of this.

How can you wire upto 1-8 leds in each branch without previous calculation? Each added led will drop another ~3.3 volts and reduce the current going through the branch because the impedence is kept constant. I also don't understand how you can just have a range of accepted capacitance as that would directly affect the current going through.

The circuit is designed to allow no more than 20mA <strong>at 150-volts </strong>(for 110v mains), so an extra LED represents less than 2.5% of the total, which is not easily detected. And that is also why I placed a limit of 8 LEDs total in a single branch - by then the drop will be 26-volts, or 17%, which will become noticeable.

"Since we are already using a 1K resistor,"<br /> erm..<br /> can tell me why we need to add the 1k resistor ?<br /> thanks <br />

The resistor is to protect the capacitor, while <em>it</em>, the capacitor, protects the rest of the components.

Depending on the AC phase when the circuit is plugged in, you could get quite a current surge through the capacitor for a brief moment. Even enough to damage the LEDs. The resistor limits the magnitude of this surge to low enough for the LEDs to survive until the capacitor charges up and can limit further current. Other than during this turn on surge the capacitor plays the primary role in limiting current.<br /> <br /> I once tried this same circuit without the resistor. The capacitor was fine, but a string of LEDs got burnt out.<br />

I was very careful with the polarity of the LEDs. <br /> <br /> And it turns out, the capacitor is identical to what you show.<br /> Oh well, 3 pairs are pretty good. Its a good first try for me.<br /> <br /> Turbonut48

I used the .47 /350V cap and a 900 ohm resistor. The most I could put in series were 3 white LED pairs. If I added a 4th, only one side would light ( half of the cycle). <br /> What do you think may have caused this? Cheap LEDs?<br /> <br /> Turbonut48

It's possible there is a wiring problem with your LEDs - this symptom may be caused by having the leads connected + to +.<br /> <br /> Another reason may be the use of a polarized or out of spec capacitor. Make sure it is a 0.47mF (or .47uF or 470nF, which are all equivalent) non-polarized unit.