Power LEDs from 120 Volts? Sure.


The circuit discussed below is really only acceptable for low power LEDs, such as those in the night light. It will also drive the 10MM LEDs found in a Peggy quite nicely, too.

However, it is completely unacceptable for driving the 100ma+ super bright LEDs that are available these days. For that, you need a proper power supply to achieve any kind of efficiency or longevity.

I think I’ll explore such beasts next.

120VAC LED NightLight Lit

Recently, I have noticed an increasing number of LED based lighting products on the market. One that caught my eye were these tiny night-light lamps that contained 3 LEDs.

Looking through the clear plastic envelope, a handful of discrete components were visible.

Curiosity piqued, I picked up a package of 2 for less than $5 to see if I couldn’t figure out how they worked.

This is not without ulterior motive. We are in the midst of remodeling part of our house and our submitted plans specify that we will not use any incandescent or halogen in the kitchen.

Now, LED technology has been moving quite rapidly and the latest, most efficient, surprisingly cheap, chips haven’t made it into standard lamps.

The question at hand: Can I put together a circuit small enough to drive 2 or 3 super bright LEDs in a GU10 lamp (relatively small, bi-pin, bayonet base, 120VAC, lamp)?

120VAC LED NightLight Top

Looking through the top of the little night light, the lamp contained a circuit board with three LEDs, 4 diodes, and a couple of resistors.

4 diodes. Indicative of a bridge rectifier.

Which means, likely, a little AC to DC power supply of some kind.

Of course, not exactly a lot of room in that tiny package for a transformer and a capacitor.

However, the low power requirements of LEDs is so tiny comparatively that it likely renders quite a bit of flexibility in power supply design.

After a bit more of hackery with the diagonal cutters, I freed the little board from the screw-in base.

120VAC LED NightLight Bottom

Which revealed another capacitor and a resistor.

In particular, the resistor — specifically, a 33K ohm 1/4w resistor — was connected between the board and the light socket. That is, all current passes through said resistor.

The capacitor? Without tracing it out, the combination of the 4 diodes and the capacitor definitely smells like a traditional, low tech, AC -> DC power supply.

The resistor, though, was an interesting find. Assuming the rest of the power supply is straightforward, the resistor in line with the bridge rectifier would mean that the voltage across the bridge — the voltage supplied to the LEDs — is effectively going to be whatever is left over based on whatever voltage is sunk by the resistor.

Which, of course, means that the power to the LEDs is largely dependent on the specific characteristics of the LEDs themselves.

Time to trace this puppy out.

LED 120VAC Power Supply.png

Pulling up EAGLE v5.0, of which the only positive thing I can say is that it no longer uses X11 (seriously, this is one painful UI), I sketched out a schematic of the LED driver circuit.

OK — straightforward enough. The 330 ohm resistor seems like a pretty straightforward means of controlling current/voltage to the LEDs.

The 12M resistor? No idea.

120VAC LED Power Supply (Top View)

The voltage between TP1 and TP3 measured as 9.5VDC. I eliminated the 12M resistor as it isn’t a primary part of the circuit.

Running the numbers against the LEDs I want to drive (3.5v drop, 100ma current), I came up with an appropriate resistor, dropped it in and lit up the circuit.

Down This Path Lies Madness...

Of course, nothing happened. Which was a bit scary given that I was working with a chunk of breadboard hotwired to a 120VAC directly through a couple of pins soldered directly to the end of a power cable.

Turns out, I simply had the two LEDs connected to different rows in the middle.

End result?

I’d like to say that the LEDs were stunningly bright and all was great.

But it wasn’t. The LEDs lit. Nice solid white. But they were about 1/3rd as bright as they should be (I have a benchtop power supply that I can dial in exactly the voltage and maximum current available to the load).

Measuring the voltage between TP1 and TP3 revealed about a 5.1v drop. Much less than the original design.

Thinking it through, the most likely reason is because the resistance of the whole bridge rectifier sub-circuit is no longer at all like what it was originally.

Now, obviously, I need to drop the value of the 33K resistor a bit. But how much?

Or, more specifically, what formula do I use to determine the value of R1 based on which parameters of — in my case — LED1/LED2?

OHM’s law doesn’t quite cut it here.

14 Responses to “Power LEDs from 120 Volts? Sure.”

  1. Stuart Dootson says:

    I eliminated the 12M resistor as it isnÒ€ℒt a primary part of the circuit.

    Maybe that’s the problem – that resistor wouldn’t be in the original product if it wasn’t needed, so why not try adding one to your circuit.

  2. Graeme Mathieson says:

    What you’re asking is, IIRC, calculable with high school physics knowledge. However, I can’t remember my high school physics. πŸ™‚

    I believe the 12M resistor is significant in that it acts as a parallel resistance to the drop across the diodes. Or something like that. Adding it in will, I think, brighten up the LEDs.

    I dimly recall that an application called Spice (link to some documentation on it) will allow you to simulate at least the DC side of the circuit and experiment without any of that messy hardware and %age accuracies. πŸ™‚

  3. Mark Glossop says:

    Are you sure that the LEDs were originally in series? My understanding of the LED lighting market is that one of the selling points is that they “keep on working even if one or more LEDs fail” – granted in your case there’s only 3, but some SSL devices out there have 25 or more LEDs.

    I’m just thinking – if the LEDs were in parallel originally, that would explain why the light output was only “about a 1/3 as bright” – in parallel, the voltage drop across each LED would still be the same (part of the characteristic of diodes/LEDs in general – just check the I-V curve for the model if it’s available), but you’d end up with significantly more current through each LED. The 12M resistor (presumably) is in place as a protective device should one LED fail (as the current would then jump 50% through the remaining LEDs – and probably lead to a cascading failure πŸ™ )

    And SPICE is nice – but it always had (major?) issues with initial condition sensitivity whenever you input a spice deck with many nonlinear components and sinusoidal waveforms – it generally doesn’t lead to nicely converging solutions. Diodes/LEDs are pretty much the most nonlinear devices out there (transistors can be modeled as diodes, resistors and capacitors, so no comments on that one thanks) – and you’ve got a rectifier combined with 3 LEDs – so if you’re thinking about SPICE – my suggestion is “don’t” πŸ™‚

    I’d check that you’re getting a nice clean rectified waveform from the diode bridge + RC smoother – I’m guessing that since you have a breadboarding setup that you’re likely to have some form of oscilloscope. Once that’s a given and you know the properties of your input waveform, that’s more information you didn’t have before – just debug from there…

    Curious to know how it goes…my inner EE’s interest is piqued by all this πŸ˜€

  4. Jason Harris says:

    (My EE madskillzzz are very rusty, so take this all with a grain of salt).

    So the goal is to design a circuit that’ll give you a 3.6V drop across each LED, with 100mA of current through them. Let’s look at the original circuit:

    After going through the full wave rectifier and being filtered by the capacitor, you have a more-or-less DC voltage. It’ll be a bit ripply, and the higher the current, the more ripply it’ll be. The DC voltage will be the original AC voltage times sqrt(2) because the AC voltage was measured RMS. So the DC voltage is 169.7VDC.

    There’s a 0.7V drop through each diode of the full-wave rectifier, giving a 1.4V drop. So now we’re at 168.3VDC.

    You measured the voltage across TP1_3 as 9.5VDC, so we can get the current through the 33K resistor using (168.3 – 9.5) / 33e3 = 4.8mA. This number seems a bit low for an LED supply current, but isn’t insanely low. Maybe the original LEDs were super-low-power ones or something. This also gives a voltage drop for the original LEDs of around 2.6VDC. This number is also reasonable.

    Your spiffy new LEDs spec a voltage drop of 3.6VDC (you said 3.5, but their webpage says 3.4 to 3.8, so lets use 3.6). Three of them in series require a total voltage drop of 3.6 * 3 = 10.8VDC. They also specify 100mA of current. So lets see what we can do to get TP1_3 to 10.8VDC:

    So that you have some wiggle room, lets make use of the 330 ohm resistor in the original circuit. You can change this value to adjust the intensity. 330 * 0.1 = 33VDC, hmm, that’s a bit high, we want around 5VDC of wiggle room. Let’s replace the 330 ohm resistor with a 51 ohm resistor.

    So now our total drop across TP1_3 is 10.8 + 51 * 0.1 = 15.9VDC.

    We just need to replace the 33K resistor with something that’ll get us close to this 15.9VDC drop. Again, our rectified DC voltage after the diode drop is 168.3VDC. We need to drop 168.3 – 15.9 = 152.9VDC. At 100mA, this requires a 1529 ohm resistor. So we need a 1.5K resistor.

    Let’s check things. Using a 1.5K resistor gives us a voltage across TP1_3 of 18.3 volts. We’re a bit high due to rounding. Lets replace the 330 ohm resistor with a 75 ohm one. After the 75 ohm drop, we have 10.8VDC across our LEDs, exactly what we wanted.

    Power is a concern here, 100mA is a lot. Lets look at power through each resistor. The 1.5K resistor dissipates 15W. Fuck, that’s a lot! You need a power resistor for that, and I don’t think you can fit that into the package you want to fit it into. Using a resistor as a voltage drop like this isn’t very good practice anyway, you’re just turning lots of watts into heat, reducing the life of the LEDs and raising your power bill. A transformer is a much better bet, but again, you’ve got space constraints that might limit the ability to use one.

    Hope this helps. Heh, hope this is correct! πŸ™‚

  5. Deadprogrammer says:

    When I renovated my apartment 5 years ago, I left a power cable under the kitchen cabinets with an explicit plan to have led lighting. I could not find anything back then, and after checking recently there weren’t any decent led undercounter lights either (brights enough and without big ass wall warts and such). I have to stare at that piece of BX cable every day when I’m doing the dishes.

  6. Scott Thompson says:

    I would redraw the circuit as follows. Ignore the rectifier and draw the capacitor as a DC power supply (170 volt using RMS technique of a prior poster). R2 and R3 are in series with that power supply and form a voltage divider. The LED’s are applied in parallel across the R3 resistor in that divider. Such a large resistor would mean that most of the voltage supplied to the circuit would also be applied across the LEDs.

    Another reason that R3 may be important is that it allows the capacitor to discharge when the power is removed. Without it, the capacitor would only discharge to the level of the forward bias voltage of the diodes. I don’t remember why you want your capacitors to discharge, but I believe it had something do do with prolonging their life.

  7. Freddy Kill-a-watt says:

    Jason shows a nice attack of the problem. But the line voltage is already given as RMS value

    (Wiki: “Because of their usefulness in carrying out power calculations, listed voltages for power outlets, e.g. 120 V (USA) or 230 V (Europe), are almost always quoted in RMS values, and not peak values.” http://en.wikipedia.org/wiki/Root_mean_square)

    So the numbers come out a bit inflated. Correcting for that shows 120 – Vtp13 = 120 – 9.5 = 110.5 V drop over 33Kohm. Or around 3.35 mA. The resistor is working a bit hard but presumably the wire length and metal in the socket remove enough heat to keep internal dissipation below 1/4 watt.

    Clearly this design won’t give the 100mA feed you are looking for. The resistor would be dissipating just over 12 watts. You would need a switched-mode supply to drop the voltage efficiently. There are cheap ICs that do this, or stack around 34 LED’s in series πŸ˜‰

    The LEDs should be in series. Otherwise the one with the lowest voltage drop will steal the bulk of the current.

    I believe the 12 Meg resistor is to bleed down the capacitor in the event an LED burns out.

  8. Jason Harris says:

    Scott, R3 is so big in relation to everything else that I was sort of stumped as to its purpose. I originally thought of it in terms of discharging the cap on poweroff too, but it’d only be discharging 10V or so. The discharge is enough to annoy someone, but not too terrible.

    But I think it’s actually a poorly implemented safety feature. Assume one of the LEDs dies. They’re in series, so that means that the whole branch with the LEDs becomes on open circuit. There’s no current flowing, so the cap is going to charge up to the rectified voltage, 170VDC. I think R3 is there to prevent that from happening.

    But the cap is only rated for 50V, so it’s going to pop if this happens. So it’s not a very good safety feature. Unless the RC time constant of the cap and the 12M resistor is small enough to prevent the big voltage drop resistor from charging it up to popping value (7.26s vs 264s, yeah probably not).

    Maybe R3 is something they adjust during fabrication to compensate for variance in the other resistors.

    Anyway, that R3 resistor affects the voltage and current by something like 27 parts in a million so it doesn’t need to be considered as a voltage divider. As Bill said, you can just take it out of the circuit for purposes of analysis.

  9. bbum says:

    Thanks for all the responses.

    An offline email from Windell @ EMSL (They rule, btw — buy their stuff!!) pointed out the obvious that Scott also pointed out: The 12M resistor is there to discharge the capacitor. Totally optional during normal operation, but highly desirable for safety reasons — to remove the surprise of zotzing yourself.

    Windell also pointed out that the balance of the circuit is such that screwing with the load — the LEDs — can easily cause the capacitor to experience overvoltage conditions. That is very bad for capacitors. Be careful.

    Windell also pointed out that the LEDs at the likes of Electronic Goldmine aren’t the brightest. True enough. But they are cheap and they don’t generate as much heat as the latest cutting edge LEDs.

    Jason’s explanation is clear and, thinking it through, seems to be accurate. I was also beginning to suspect, and Jason’s math moves this beyond “suspect” and into “know”, that the circuit was likely really only good for low power applications. In effect, the circuit is two resistors; the 33k resistor and the bridge rectifier/cap/LED sub-circuit. Thus, the more power consumed in the light emitting part of the sub-circuit the more current that must be sunk as heat across the resistor and potentially at a much higher voltage.

    Interesting. Next, I’ll likely take apart a CFL ballast and see what kind of supply it has.

    Ultimately, it looks like I’ll end up using CFLs throughout, and then replace with LEDs as the technology matures in the next 2 years or so.

  10. Mark Bessey says:

    Yeah, that circuit is pretty awful. The “safety” bleed resistor can’t really work, and the LED’s aren’t going to make it to a fraction of their design life, and the whole string will blow as soon as one of the LEDs fails. I’d be really surprised (and a bit disappointed) if there was a “UL” stamp on that device.

    You probably already know this, but for high-output LEDs, you’re going to need to use a constant-current power supply. You won’t get maximum brightness out of them without overdriving them otherwise. The good news is that LED lighting is a commercial reality, so you can buy pre-built, potted, constant-current switching supplies. For example: http://ledsupply.com/led-drivers.php

    Disclaimer: I’ve never bought anything from these guys, they just showed up in a Google search.

  11. Papa Joe says:

    Son, just make sure there is enough light so that I do not bang into walls when I have to go to the bathroom in the middle of the night.

    Maybe I should look into buying a miner’s hard hat, Hmmm.
    Of course, it would be solar powered!!!!!

  12. Jason Harris says:

    The page that Mark linked to has a bunch of good options. You could use the 10W version of this guy:
    to drive 4 of your LEDs.

    Or you could use a step-down transformer somewhere in your wiring and then use one of these:

    Fun project!

  13. Lava Lamps says:

    Wow!!!. This is amazing…. I did not know that LED’s of such low power could be created. Wonderful work my friend.Keep it going.

    [Ed: This is such a classic example of Dumbass Spammer Supreme. “such low power” “LEDs”…. heh.]

  14. Steve says:

    My friend, the two resistors (R2 and R3) are referred to in circuit theory as a Voltage Divider. The 12M Ohm and the LED array are in parallel to each other and being that the led’s resistance is significantly lower the voltage drop across this portion of the parallel circuit will be much greater than the voltage drop across the 12M Ohm. This is a very valuable tool when designing circuits along with Current Dividers. Do a quick google search on the two and you will be very happy that you did. (I happened to pay $400 bucks for a Circuits class last year which was very valuable but there is enough information available online these days why pay for something if you are willing to find it yourself?)

Leave a Reply

Line and paragraph breaks automatic.
XHTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>