I - Disclaimer
ALL ELECTRIC CIRCUITS PRESENTED HERE HAVE ONLY A PEDAGOGIC PURPOSE. DON'T BUILD THEM. EXPERIMENTING WITH HIGH VOLTAGE CAN BE LETHAL.
II - Preamble
I was so surprised to see on this page that LEDs could be lit up from a house's main electrical supply only with a few electronical components - and especially with no electrical transformer. Lets see how it is possible.
II.1 - LED characteristic
![]() |
Fig 01 |
- ud<ud0:i=0
- ud<ud0:i=K×(ud−ud0)
- K=0.03;ud0=0.7V
- > LED treshold
- not too high, else the current will burn it
- positive
- not too high, else it will burn the LED
- a small variation of V induce a big variation on i
- a big variation of i induces only a small variation on v
II.2 - Power characteristic
We will use the french 220 VAC, 50 Hz power supply :![]() |
Fig 02 |
which equation will be taken as A(t)=A0×sin(2piT×t), with
- A0=325 Volts
- T = 1f = 0.02 s
III - LED on AC
Consider this circuit :
![]() |
Fig 03 |
Let be t=0.0005 s. We have A=50.82 V. Given the characteristic of the LED, you can see that the current will be very high - the LED is destroyed.
So we need a supplementary device on the circuit that maintains either the tension or the current in the LED's safety operation area ( SOA ). A condensator will match that, and we will see why.
IV - Adding a condensator
Let's take the following circuit,
![]() |
Fig 04 |
IV.1 - Establish the interesting equation
Characteristic relation of a condensator is :- [R0] ic(t)=C×duc(t)dt
- [R1] ic(t)=id(t)
- [R2] uc(t)+ud(t)=a(t)
=>ic(t)=C(ddt(a(t)−ud(t)))
=>ic(t)=C(ddt(A0×sin(wt))−ddt(ud(t)))
=>ic(t)=CA0w×cos(wt)−ddt(ud(t))
Combinating with [R1], we finally get :
id(t)=CA0w×cos(wt)−ddt(ud(t))(R3)
( Please note that since the LED characteristic is composed of 2 distincts regions, there is no global equation for describing it mathematically ; so it is kept "as is" )IV.2 - Resolve
At t=0, a(t)=0 and start to increase.* Lets suppose a(t)<ud0
- the LED is blocking current ( because a(t) is shared between the LED and the capacitor, so ud(t)<ud0 too ).
- Since the LED is blocking current, remembering [R0] means that uc(t) is constant.
- And since the voltage at terminals of a capacity is continuous, and that at t=0 the capacitor is discharged, uc(t) is zero.
* Now suppose a(t) reaches ud0 : a(t)>=ud0 ; using [R3] :
id(t)=CA0w×cos(wt)−ddt(iK+ud0)
id(t)=CA0w×cos(wt)−1K(R4)
Since cosinus is limited by 1, If we choose C judiciously, - id(t) will stay in the SAO for the LED
- we shall be able to neglect −1K
Here is all the magic :
in sinusoidal mode, the sin and cos functions are limited
the LED has a quasi-NULL resistance 1K ( rotate the LED characteristic by 90° to see that )
( Physically talking, the LED oppose no resistance to the current, so the current is determined by the capacitor. Since sin / cos function are limited, we only need to choose a good C value to keep the current in the LED's SOA ).
* So,the capacitor gets charged through the LED. As soon as a(t) starts to decrease, the capacitor should discharge ; but the doesn't allow a reverse current ; so the capacitor stay charged, and the LED blocks.
* When a(t) starts to grow again, nothing happens, because the capacitor is already charged.
IV.3 - Values
Using (R4), we get : C=0.020325∗2∗3.14∗50=1.96e−7≈2e−7=0.2uF=200nFSo we are gonna use the normalized value 220nF for C.
IV.4 - Simulation
Here is a simulation done with the excellent gEDA and ngspice softwares :
![]() |
![]() |
Fig 05 | Fig 06 |
We can zoom the first 20 microseconds to see the LED becoming non-blocking at nearly 0.7V, and the capacitor starting charging:
![]() |
Fig 07 |
Now focus on the current, its maximum is about 22mA, which is good for a LED ( it is negative because I think ngspice takes the generator convention, I begin with gEDA and ngspice ):
![]() |
Fig 08 |
IV.5 - Remarks
IV.5.1 - Focus on a ud(t)≈ud0
When a(t)<ud0, i is zero.When a(t)>ud0, i is not zero. But what about a(t)=ud0 ? i=CA0w×cos(wt) with t≈0 ; so i≈CA0w, which is far from zero. In fact uc(t) is not mathematically derivable for ud(t)=ud0, so i(t) is not continuous at this point.
That's why you see on Fig 08 i growing quasi-instantaneously from 0mA to 23mA, then growing down to stabilize to 22mA. On the LED characteristic below ( Fig 09), phase 1 is the growing a(t) before it reaches ud0, the current discontinuity is the discrete jump from phase 1 to phase 2, and the stabilization is phase 2.
![]() |
Fig 09 |
IV.5.2 - Reverse tension problem at LED's terminations
As said above, you can see the voltage at LED terminations growing down up to -600 Volts. Thats a problem because LEDs only accept a reverse tension up to -5, -10, -15 Volts.V - Resolving the huge reverse tension problem at LED's terminations
The problem is that the capacity is not discharging. Ideally, when a(t) goes negative, the capacitor should act as a generator, discharging itself and compensing the negative values of a(t).
Resolving this is as simple as putting a second LED in parallel with the first one that allow the current flowing in both directions.
![]() |
![]() |
Fig 10 | Fig 11 |
As you see, the tension across LEDs terminals are now clamped.
VI - Finally - adding resistors
We have to add resistors for three reasons :- Your AC input may vary, due to electric network fluctuations
- Handling the so-called "inrush currents" ( see IV.5.1 for example )
- Allow capacitor to discharge when circuit is powered off
For 3., the resistor will be parallel with the capacitor and have a value of 1MegaOhm ( for not disturbing the running of the circuit ; the current flowing through it will be neglectable in regard of that flow through the LEDs )
So you get the final circuit :
![]() |
![]() |
Fig 12 | Fig 13 |
Does it work ? Yep, here is a quick & dirty realisation :
2 capacitors of 100nF,250VAC ( 200nF instead of 220nF ), 7 resistors of 100ko each ( 700ko instead of 1Mo ), 2 cheap blue LEDs, 1 resistor of 2ko ; all the stuff plugged on the french 230VAC. ( the burned marks are from other circuits, some TIP142s died there )