Instructables
led diode circuit 2.jpg
Image002.jpg
Important: Attempt only if proficient in working with AC Mains

A simple yet effective circuit for a single LED on AC Mains....
 
Remove these adsRemove these ads by Signing Up

Step 1: Parts & Assembly

Parts:

1. An LED - 5mm or 10 mm of any colour
2. A diode, preferably 1N 4007
3. A resistor of 1 watt rating, of value anywhere from 20 kilo ohms upto 100 kilo ohms.
4. A two pin male plug (hollow)

Lower resistor values will give more brightness and higher values will prolong LED life. So choose the tradeoff, depending on requirement. 

Lower wattage of resistor like 1/2 watt or lower will not do and may burn since they are meant for 6v DC circuits, not for 220v AC Mains.

Assembly:

1. Connect black anode of diode to negative of the led. 
2. connect the resistor to the positive of the LED. 
3. Connect the free ends of the diode and resistor to the male pins. 

Done. See the attached pic for clarity. 

Another circuit with the diode connected "across" the LED is also attached. A bulb base adaptor is used instead of a male pin. 

It should work on 110v AC as well as 220v AC Mains systems.

DC Feature:

It will also work on any battery!!

Once again, read "Important" first line, in case you missed it....

how this circuit will perform if space is no bar. Details of diagram is given below:

1)R1= 220 Ω

2)R2= 1MΩ

3)C1= 470nF,400V, Polyester capacitor

4)C2= 10uF, 16V-50V, Electrolytic capacitor

5)D1= LED (any colour)

6)BR1= Bridge rectifier made using the diode IN4007

Comparing between this & your circuit, which will give better performance?

llm1.BMP.jpg
pandyaketan (author)  avishek89_roy1 month ago

If space is not a constraint, better circuits are always available. See "Dipankar" circuits on I'bles.

I have made two - one is without diode bridge (LED Bulb - Part 1) and other is with diode bridge (LED Bulb - Part 2).

In India, we have 220 V AC Mains and have therefore used 220 nF, 400 V rating cap.

No polyester cap was used in AC mains for smoothing....for obvious reasons!

reg

k

rhughes196 months ago

Variant on this idea ...

http://www.marcspages.co.uk/tech/6103.htm

Now need to try & figure out which is best option

pandyaketan (author)  rhughes192 months ago

Here, since i have used a male pin, there is practically "no space" for a capacitor.

The idea was to make something small "and" at the same time simple enough.

Concept:

A single diode (black positive anode part of diode to the negative of the LED) works as a half wave rectifier.

The 22 kilo ohm resistor limits the current (Rated for at least one watt, since it has to reduce 220 volt AC Mains current).

pandyaketan (author)  rhughes192 months ago

That circuit, as suggested, has a full wave bridge rectifier and a capacitor also - which is a robust circuit, useful when you plan many LEDs are in a LED bulb light. See my I'bles LED light part 1 and Part 2.

Part 1 has a different arrangement of LEDs, whereby i eliminate the need for the 4-diode bridge rectifier.

In Part 2, i have used a bridge rectifier to remove a slight flicker (not generally visible to the naked eye). The LED arrangement is different here - 3 LEDs are in series and such triplets are then in parallel, so if one LED fails, it can be identified and replaced - making the bulb EVERLASTING!!

reg

k

tkalfaoglu made it!2 months ago

I kept forgetting to turn off the coffee maker, which has no indicator that it's on.

I used this circuit to add a LED to the coffee maker, it stays on while the machine is on.

I used a 32K ohm resistor and a 1N4007 diode, and a white 10mm LED.
It works great! Many thanks.

img20140427173728476.jpg
pandyaketan (author)  tkalfaoglu2 months ago

Innovative adaption! Congrats for out of the box thinking!

Hope the LED outlasts the coffee maker! ;-DDD

reg

k

KrisBlueNZ1 year ago
Here is an electronics engineer's analysis of this instructable.

1. GENERAL

This design uses a half-wave rectifier to eliminate the negative half-cycles of the mains voltage, and a series resistor to limit the current. The brightness of the LED, and the power dissipated in the resistor, can both be calculated if you know the mains voltage and the value of the resistor. The formulas, written the way you would enter them on a calculator, are:

2. CURRENT AND POWER FORMULAS

I = V / R / 2.22
P = V * V / R / 4000

where:
I = average LED current, in milliamps;
V = mains voltage, in volts RMS (in most countries, either about 115 or about 230);
R = resistance of the resistor, in kilohms.

3. RESISTANCE FORMULAS

These formulas can be rearranged so you can calculate the right resistance for a given current or power dissipation:

R = V / I / 2.22
R = V * V / P / 4000

4. EXAMPLE CALCULATIONS

Using mains voltage = 115V and R = 6.8 kilohms:
I = 115 / 6.8 / 2.22 = 7.6 milliamps;
P = 115 * 115 / 6.8 / 4000 = 0.49 watts.

Using mains voltage = 230V and R = 27 kilohms:
I = 230 / 27 / 2.22 = 3.8 milliamps;
P = 230 * 230 / 27 / 4000 = 0.49 watts.

5. COMMENTS

(a) LEDs are typically operated at 10~20 mA (milliamps) so in both of these examples, you will not get particularly high brightness out of them. If possible, use LEDs with high efficiency, i.e. high light output for relatively low operating current.

(b) The resistor should be rated for at least twice the expected power dissipation. In these examples, use a resistor rated for at least one watt.

(c) You may have noticed that the power dissipation in the resistor is the same in both examples, but the 230V example has only half as much LED current as the 115V example. This is correct. It's a consequence of one of the laws of physics, and ye cannae change those (Cap'n)!

(d) Heating in the resistor is proportional to the power dissipated multiplied by the "thermal resistance" to the surrounding air. The thermal resistance, and therefore the temperature, can be reduced by (a) using a larger resistor with more surface area; (b) thermally coupling the resistor to something with more mass - for example, using a rectangular resistor and squeezing it between the two sides of the plug; (c) there may be other tricks I haven't thought of.

(e) The polarity of the diode and the LED must match. Connect the anode of the diode (that's the end opposite the stripe) to the cathode of the LED (that's the shorter lead).

(f) The version of this circuit with the diode connected across the LED, instead of in series with it, will work but the resistor will dissipate twice as much power as in the main circuit (the one with everything connected in series). The calculations are for the main circuit.

(g) There are various ways to improve the performance of this circuit but none of them are as compact as this design.

(h) Yes, the LED will flicker 60 or 50 times per second (depending on your mains frequency). This is not normally noticeable, but you will notice it if you turn your head quickly from side to side while watching it. You will also see this effect with a clock that has an LED display. When you look straight at it, you probably won't notice the flickering.

(j) Many blue and white LEDs are ESD-sensitive; that means they can be damaged by electrostatic charge from your body during handling. Try to get the manufacturer's data sheet for the device you're using, to see whether it's ESD-sensitive. If so, keep the leads shorted together with a paper clip or conductive foam until the circuit is fully assembled.

(k) If the LED is ESD-sensitive, it can actually be damaged by ESD after the circuit has been assembled and mounted in a mains plug. To protect the LED, connect a low-value capacitor across it before you remove the shorting clip or foam. For example, a 0.1 uF (microfarad), 25~50V ceramic capacitor. To save space you can use an SMT (surface-mount technology) MLCC (multi-layer ceramic capacitor) such as these ones from Digikey:
http://www.digikey.com/product-detail/en/C1206C104K5RACTU/399-1249-1-ND/411524 ("1206" size code)
http://www.digikey.com/product-detail/en/C2012X7R1H104K085AA/445-7534-1-ND/2733606 ("0805" size code - smaller).

(m) Connecting this circuit to your mains supply may be illegal, depending on your country's regulations.

(n) Every point in this circuit must be considered live and dangerous. You must do everything possible to prevent any person from coming into contact with any point in the circuit. Some examples I suggest: (a) replace the screw that holds the socket together with a nylon screw and nut; (b) recess the base of the LED into the plug and/or surround it with glue to prevent any possible access to the LED wires in the area between the LED base and the plug.
t800 KrisBlueNZ4 months ago

Hi Kris, can you tell me why you have the 2.22 in your formulas as opposed to just R=V/I only please? Is it because of the ac?

thanks

KrisBlueNZ t8004 months ago

Yes.


The voltage of an AC sinewave can be measured in several different ways. Normally, the stated value is the RMS (root mean square) voltage.

For more information, see http://www.rfcafe.com/references/electrical/sinew...

In the USA, the AC mains voltage is around 115V. This is the RMS voltage. (It produces the same heating effect as a DC voltage of 115V DC into a given load.)

Using this as an example, several other voltages can be calculated from an RMS voltage of 115V.

The peak voltage is equal to RMS multiplied by the square root of 2, which is 1.414. So it will be 162.6V. The peak-to-peak voltage will be twice this, i.e. 325.3V.

The average (mean) voltage after full-wave rectification is 63.662% of the peak voltage. That will be 103.5V. With half-wave rectification, only half of the waveform is used, so the average voltage will be half that, or 51.8V.

Since all these voltages are in fixed proportions, you can calculate a fixed divisor value that will convert an RMS voltage directly to an average (using half-wave rectification) voltage. This divisor is the square root of 1/2 (about 0.707) divided by half of the 0.63662 from the average formula, which works out to about 2.22.

Therefore you can take an RMS voltage, divide it by 2.22, and you will get the average voltage that will be produced when the voltage is half-wave rectified.

These figures aren't exact because the AC mains voltage varies somewhat, and there are voltage drops in the diode and the LED, but they're close enough.

t800 KrisBlueNZ4 months ago

Thanks for the very thorough explanation; you should be a lecturer (if you are not already)!

rhughes196 months ago

OK ... am I following correctly the Capacitor version ?

IN4003 diode reverse connected across the LED ...

Then a 0.22uF ceramic capacitor in series with anode of the LED .... 220V AC mains then effectively connected to one leg of this capacitor and the anode leg of LED

LED.jpg
pandyaketan (author)  rhughes195 months ago

1. LED and diode polarity is correct in above diagram

2. Since capacitor is non-polarised (no + and -- on it), and THEREFORE its "meant" for use in AC current, so it can be on any leg of the led.

3. See my other I'bles for more details...

PhilKE3FL7 months ago
Thanks for the Instructable, I can see the "flicker" on 60 Hz Mains. Here's the way I've done something similar which may be a safer circuit for AC Mains use. Still, protecting all wires from being touched is STILL a safety MUST!

Ultra-bright LEDs need driving voltages of either 3 or 6 volts depending on what you have around or buy. Using a 3V LED, a resistor and a 5 Volt DC source and 20mA of current a similar circuit will be using only 100mW (0.10 W) - P=I*V. The method described in this intructable which uses a resistor pushes that up to almost 500mW (0.50 W) - thanks KrisBlueNZ. In this case the resistor reduces the current through the LED and produces heat to do so. What happens if we use an AC 250 Volt rated capacitor instead? Will this reduce the current without having to dissipate power as heat & thus bring the power used back down to 100mW? (You ask, why bother? First, the resistor wastes the power by producing heat as some have noted, second, if we get back to 100mW we're now using only one fifth the power, in other words using the resistor uses five times more power than needed! Third, getting rid of the heat reduces the fire hazard.)

While we NEED to use a resistor when using DC voltage, a resistor is NOT needed to limit the current when using AC voltage. Perhaps KrisBlueNZ can help us here. I've built this circuit for AC mains use, but I have not done the calculations and since the capacitor does NOT get hot, and the LED is nice and bright depending on the Capacitor's value, I assume all power used is that used by the LED and so we're down to 100mW or so. I was looking for the short piece I wrote for Nuts & Volts years ago so I could tell you the capacitor's value, it was rather small but still for a cap handling 250 Volts it might be as physically large as the resistor being used. I managed to fit the circuit into a 120 Volt AC un-polarized replacement plug and called it my "traveler's night light."

The circuit I ended up with was an LED, Cap, and a 1N4003 (240 PRV) or so diode on 120 AC Mains. The diode goes between the LED leads and is reverse connected, anode-to-cathode - cathode-to-anode and the cap is attached to the LED anode, if I remember correctly. In this case the diode helped protect the LED. It might also increase the total power used, I'm not sure about that. Even if we don't save power we're not dissipating power as heat in a resistor which has to make this a safer circuit to use. I believe I've now been using this in four of my AC light switches, that control outside lights which cannot be seen from inside the house. We're able to know when an outside light is left on without having to go outside and look now. These have been in use for about 10 years and before I included the reversed diode the light switch controlling the garage light died twice in two years, none have died since.

KrisBlueNZ - Can you do the calculations and tell us if this really will use less power and the value of the cap needed? (0.20 mfd? less? more?)
pandyaketan (author)  PhilKE3FL7 months ago
Yes, a 0.22 uF ceramic capacitor for 220 V AC Mains or a 0.47 uF capacitor for 110 VAC Mains will do in place of the resistor, if heat is a concern, keeping the diode.

Alternately, the diode can be removed and a capacitor can be attached to one lead of the LED and a 1 kilo ohm resistor, rated for atleast one watt can go with the other lead. (Any lead, since the other end of the cap and resistor are directly on AC Mains).

In the above pic, i have used a Male socket pin. There is no place inside for a capacitor. So i have used the circuit, as above - fully aware that heat is produced by the resistor. But since the resistor is rated for one watt, it does not give way and safety is addressed.

There are many "robust" circuits on the internet, however they all require space and will not fit into something this small. This is the first safe circuit (i couldn't find any other, atleast!).

reg
ketan
Right, I ended up using a 47 uF cap, they were easy to get & everything fit inside an non-polarized 120 V AC replacement plug I found at ACE Hardware. I looked up my original circuit, Sept 24, 2006, this was for 120 Volt AC mains:

Anything from 104 (0.1 uf) to 103 (1 uf) works but I found using 474 (0.47 uf) put 2.2 Volts across the 3V ultra-bright LED. I then used a 1N914 (signal diode?) across the LED and also a 470 Ohm 1/4-watt resistor in series with the LED. The resistor and diode were put in to protect the LED and since doing this none of the LEDs have died as of Sept 24th 2006 so that's 7+ years so far. This circuit was published in the Sept 2009 issue of Nuts & Volts magazine.
pandyaketan (author)  PhilKE3FL7 months ago
Great!
Lets illuminate the world!
--------------------------------------------------------
"May the good belong to all the people in the world.
May the rulers go by the path of justice.
May the best of men and their source always prove to be a blessing.
May all the world rejoice in happiness.
May rain come in time and plentifulness be on Earth.
May this world be free from suffering and the noble ones be free from fears"
---- Vedic blessing
thanks i will try .
KrisBlueNZ1 year ago
I should have added the following points to my previous comment.

(p) Using this design is also likely to void your fire insurance. And for good reason.

(q) I can't give you any assurance that this is a complete list of the problems or risks associated with this instructable.
pandyaketan (author)  KrisBlueNZ1 year ago
Haha! Thanks for a detailed analysis, simply amazing!!!
Do post your pics when you make one, my LEDs have been working 8 hrs a day since 2009 and i expect them to last for ten years...see my i'ble dates!

;-)
reg
ketan
The circuit is good and working. I've tested it by my self, but why did not you put another same diode on the other side (leg) of the LED before/after the resistance, what is the reason and effect for this!..... Second thing is this, that you apllied resistance of 1 watt of rating, but it gets soooo hot that, u can't touch this!! I applied for 2 watts in place, still hot, hot, and very hot same resistance!!...... What to do now?
pandyaketan (author) 1 year ago
No flicker visible in my case.... may vary from source to source though, but even so, worth it for the simplest AC-DC design...
;-)
reg
ketan
--------------------
"May the good belong to all the people in the world.
May the rulers go by the path of justice.
May the best of men and their source always prove to be a blessing.
May all the world rejoice in happiness.
May rain come in time and plentifulness be on Earth.
May this world be free from suffering and the noble ones be free from fears"
---- Vedic blessing
Interesting. great to know, thanks for the share!
mysterion1 year ago
Wouldn't only a half wave rectifier give a 60 Hz flicker of the LED?