The Shocking Truth About Transformerless Power Supplies

Transformerless power supplies are showing up a lot here on Hackaday, especially in inexpensive products where the cost of a transformer would add significantly to the BOM. But transformerless power supplies are a double-edged sword. That title? Not clickbait. Poking around in a transformerless-powered device can turn your oscilloscope into a smoking pile or get you electrocuted if you don’t understand them and take proper safety precautions.

But this isn’t a scare piece. Transformerless designs are great in their proper place, and you’re probably going to encounter one someday because they’re in everything from LED lightbulbs to IoT WiFi switches. We’re going to look at how they work, and how to design and work on them safely, because you never know when you might want to hack on one.

Here’s the punchline: transformerless power supplies are safely useable only in situations where the entire device can be enclosed and nobody can accidentally come in contact with any part of it. That means no physical electrical connections in or out — RF and IR are fair game. And when you work with one, you have to know that any part of the circuit can be at mains voltage. Now read on to see why!

The Principle

A transformerless power supply (TPS) is basically just a voltage divider that takes the 115 or 220 VAC from your wall and divides it down to whatever voltage you want. If that voltage needs to be DC, it is rectified through a few diodes, and maybe regulated to a maximum voltage but we’ll get to that in a minute.

Normally, DC voltage dividers are made with a pair of resistors. Combined, they define the current flowing through the path, and the top resistor can then be chosen to drop the difference between the input voltage and the desired output. If, in our case, that difference is some one or two hundred volts, even if it only has to pass a few tens of milliamps, that resistor is going to get hot fast.

A better component to use in the top of the divider is a capacitor, with its reactance chosen to give the desired “resistance” at whatever the mains frequency is where you live. For example, say you want 25 milliamps out at 5 V, and you’re in America and need to drop 110 V. R = V / I = 4,400 Ω. Using the reactance of a capacitor, that’s C = 1 / (2 * pi * 60 Hz * 4400) = 0.6 μF. If you need more current, use a larger capacitor, and vice-versa. It’s that easy!

A fully elaborated TPS design requires a few more parts. For safety, and to limit inrush current, a fuse and a one-watt current-limiting resistor on the input are a good idea. A large-value discharge resistor in parallel with the reactive capacitor will keep it from holding its high voltage and shocking you when the circuit is unplugged.

And speaking of that capacitor, it’s a safety-critical part of the circuit. It is subjected to continuous high alternating voltages and if it fails short, the “5 V” output is at mains voltage and parts may catch fire. This is a job for an X-rated capacitor. You’ll see them marked X1 or X2 mostly, with X1 being able to withstand higher voltage spikes. Either one will do, just be sure that it’s rated X and specified for your mains voltage level.

After the capacitor, the AC that passes through needs to be rectified into DC. A normal half- or full-wave rectifier will work here: a handful of diodes and a large-valued smoothing capacitor. If the load isn’t constant, you’ll probably want to limit the maximum voltage seen by the capacitor with a Zener diode, so that excess current is shunted to ground when the load draws less than the 25 milliamps we designed for. These parts only see low voltages, so there are no special requirements here.

Finally, note that there are many possible configurations of this circuit. Instead of dropping most of the voltage between live and our device, it’s also possible to connect our device straight to the live wire, with the capacitor in the lower leg of the voltage divider — the same circuit upside-down. The fuse and safety resistors can be located anywhere in the circuit, of course. But the basics are the same: the capacitor acts as one leg in a voltage divider, followed by some rectification and regulation, with the load as the other leg.

Muphry’s Law

The big caveat with a TPS circuit is that it must be isolated. That’s totally fine for a self-contained IoT switch or DIY light dimmer. A TPS is a good match for radio or IR control. LED lightbulbs all use TPSs inside because they’re cheap and completely sealed up. But if you’re thinking of touching any part of this circuit, or plugging any signal line into it, you should be looking at a transformer instead.

Why the complete isolation? Notice that the wire that serves as the circuit’s ground reference is the same as your home’s neutral line (in contrast with the “hot” line). Now imagine mistakenly putting the plug in backwards. Ground is hot, and although the device works just fine because AC is symmetric, it becomes an electrocution hazard if you can come in contact with “ground”. Plug a USB-serial connector into this device, and you’ve just fried your laptop through the “ground” line. So the first line of defense is to use polarized plugs that can’t be plugged in wrong. If you live in Europe, this may not be an option.

But even polarized plugs are not enough. Some old houses (including an apartment we lived in in Washington, DC) have the neutral and hot lines reversed. Again, you’ll never notice until you touch “neutral” and real ground at the same time, but when you do, it can be fatal. You can, and probably should, test this with a multimeter right now. When referenced to ground, the neutral line should present under a volt AC, while the hot line will read either 115 or 220 VAC. Check these against your local plug types.

Anyway, even if you get the plug polarization right, there’s a difference between your wall socket’s neutral and ground lines. Codes in the US and EU say that neutral is the current-carrying line, and ground should, under normal conditions, not carry any. Ground-fault circuit interrupters (GFCI) enforce this in practice. Still, high loads elsewhere in your house coupled with non-negligible resistance in the wiring can result in some V=IR voltage on the neutral line. An imbalance on the service transformer that splits the “phases” of power entering your home can also pull the neutral voltage away from ground, depending on where it’s grounded. In short, neutral should be around ground, but it’s not guaranteed.

The only way to be absolutely safe with this circuit is to never come in contact with it. Put it in a non-conductive box, or a metal one that’s connected to the earth safety ground. If it gets plugged in backwards, or if the neutral wire goes hot, nobody gets hurt. That’s what the pros do.

What else can go wrong with this circuit? We picked the reactive capacitor to have the right resistance at 50 or 60 Hz, but it’s less resistive at higher frequencies. If you have high-frequency switching devices somewhere in your home, they can push unexpected current through your TPS. Quick power-line spikes pass right through, for instance, and damping them is one reason for the input resistor. Lightning strike? Blammo! Anything else that can go wrong? Leave us a comment! (But don’t mention Muphry.)

A transformer-based power supply is going to be marginally more expensive and a little bit bigger than an equivalent TPS. But if you can’t entirely enclose the device, or you cannot absolutely guarantee the polarity of the incoming power, you cannot use a TPS safely. For personal daily use, I’ll always choose a switch-mode power supply or wall-wart. Isn’t it worth a couple dollars to be galvanically isolated from the wall?

Let’s Take One Apart

On the other hand, TPSs are in all sorts of devices that we like to hack so you need to recognize them in real life. Look for the fuse or big X1- or X2-rated capacitor and you’ll be on the right track. (Does it have a bleeder resistor in parallel? If not, it might be hot.) The current-limiting resistor is the big ceramic thing barely visible behind the X2 cap. The fuse is dressed for a night on the town, wearing a one-piece, black shrink-wrap number.

Next, find your way to the rectification section — a four-diode full-wave rectifier and a 100 μF capacitor in this cheap RF wall switch. The diodes point toward the positive DC rail, and away from the negative.

Now look around for Zener diodes. In the case of this RF-controlled switch, there are two: a 25 V Zener used to activate the relay, and a 5 V Zener that supplies the IC and radio circuitry. This is a handy feature of the TPS circuit. Since the capacitor passes some current as long as the DC voltage doesn’t exceed the AC peaks, you can get practically any, or multiple, voltages out of the same circuit just by picking the right Zeners.

Playing With Fire

You’ll want to avoid working on a powered-up TPS as much as possible, but there are ways to do so safely. This is a prime case for an isolation transformer, which essentially interposes the transformer into the circuit that it’s lacking. There is still a pair of wires in your circuit with 115 or 220 V between them, but at least with the transformer you can attach your ‘scope to the device.


Without an isolation transformer, you can do a lot with a battery-powered (non-grounded) multimeter. Plug the TPS device into an extension cord with a switch, and keep that switch off as much of the time as possible. To take readings: unplug the TPS, tack-solder wires where you want to take a measurement, connect these to your multimeter, stand back and turn the power strip on. Once you’ve made the reading, turn it back off and wait a tick before touching anything.

The one part of a TPS that can hold charge is the reactive capacitor, and that’s why it should have a bleeder resistor across it. In our example circuit, 0.6 μF * 1 MΩ = 0.6 seconds, and you’re probably good waiting at least five of these time constants before touching anything, so count to three. The RF switch bypasses a 0.33 μF capacitor with 220 kΩ, so it’s safer faster. (It also uses two SMT resistors in series, presumably because the voltage rating of either one alone wasn’t sufficient. Smart design.)

You can find out which parts of the circuit are at what voltages by measuring them with respect to the wall socket’s ground pin. For instance, with a 560 Ω safety resistor in the return leg, the RF switch’s “ground” actually floats some 12 VAC above earth ground. This is worth knowing when poking around. Again, connect your probes, stand back, turn on, read, turn off, wait.

And that’s all there is to it. You can now figure out what voltages are in the device, and hijack them for your own purposes. Just make sure that whatever you do, it all fits back inside its nice case. Because although TPSs are ubiquitous, small, and cheap, they’re potentially (tee-hee!) too hot to touch.

114 thoughts on “The Shocking Truth About Transformerless Power Supplies

  1. Ah, yes. AC/DC radios. I’ll never forget them. At age 12 or so I decided the radio I was using for broadcast bad DXing needed a ground for better reception. I *did* get better reception. After I replaced the radio!

  2. I used to have a washing machine that had one of these circuits to power an STM32F uC and some relays.
    The machine had a rudimentary PFC system (self contained in a black-box) and when the machine was getting close to the 7+ years of service the controller would reset due to the massive back EMF (from motor/relays) or something… Couldn’t work it out. Tried to replace the X1 capacitor, the electrolytes, relay back-emf blocking diodes, etc… however I just put up with a manually operated washing machine for a almost a year.
    Until one day it decided it wanted to flood itself and tripped the RCD with a vrooosh sound (as opposed to BANG!)

    I replaced it with something that sounds like a 16khz teenage deterrent powering the controls (I presume…. Won’t open it until it breaks and is out of warranty)

    1. I had to replace my dishwasher’s controller (which also had a transformerless PSU) because a surge fried all its chips. Both the board’s undocumented microcontroller and the SPI EEPROM containing its firmware were destroyed (the microcontroller sent nothing over SPI and the EEPROM was unresponsive when I tried to inject read commands).
      Unsurprisingly, a replacement for that controller board cost $200. I initially wanted to replace the microcontroller of the broken board, but we needed the dishwasher immediately so I had almost no time to reverse engineer it and write code.

        1. @Matt Here is my little project. Out washing machine packed up and have replaced the internal mechanical switch and reversing controller with an Arduino and a set of relays. Works well and uses less water than before, washes clothes better and I have nearly finished a new program that allows for gentle cycles, long wash/ Heavy Duty cycles and a drip dry cycle and as an LCD. Most of out washing is done using cold water but the next version I may add a hot wash as well.

          A full wash cycle takes about 53 minutes.

      1. For years now I have wanted to have my way with a breadmaker. Actually now would be the time to find one to hack. It would be cool to stick an ESP8266 in there and have a web powere bread maker. Time to hit up freecycle for an old breadmaker to play with!

        1. Mostly with a breadmaker, as soon as you put the ingredients in, you’re on an only slightly flexible countdown and schedule, and baking takes as long as it takes, so you have to plan 3 hours ahead at least. So don’t really see the value in using anything but the stock timer and programming. Decent ones, you can set a time for it to be ready in a few hour window. Maybe if you rig it with hoppers and tanks to keep the dry and wet stuff apart you can set it up ready to be remote triggered when you don’t know what DAY you’ll be home, but otherwise a bit pointless.

          1. I already trick my breadmaker by rebooting it part way through it’s cycle to do an extra rise, but I would like the ability to both control the kneed times and the rise times as well as (perhaps) have more control over the temperature. There are a lot of things in a bread maker that would be useful to hack.

      1. Except some of the new fangled “wireless” chargers. At a place I used to work at, they had one on show with clear plastic to show the insides. Basically just a resonant inverter driving a coil from the mains. There’s a microcontroller to switch it to sensing mode if there’s no load (to keep standby power reasonable) and tune the frequency for best performance. It would easily charge a tablet with an inch or two of separation, so I suggested that the charger could be designed to bolt to the bottom of a table (made from wood or other nonconductive material) in order to make an “invisible” charging zone.

        1. It still has a transformer,
          That coil is the transformer primary,
          You construct/build/complete the transformer when you place the secondary over it (Phone)
          You decompose/disassemble the transformer by simply picking up the secondary (phone).

          Why have a fully assembled transformer to isolate the coil (Temporary transformer) when each switching stage adds complexity and reduces efficiencies?

          1. I have seen inductive chargers for electric toothbrushes done both ways (from the same brand, different model/age). With a 50Hz/24V transformer or without any 50Hz or SMPS transformer.

  3. Even the x-rated caps will be damaged after some time because there are several kV spikes per day.
    It´s a good idea to put a varistor and a TVS and an RC just after the mains connector. Then these power supplies will do quite well for a long time. But then you can also use an isolated transfromer design – will cost probably the same today.

    1. In over 20 years, have seen only ONE failed (rated) x-cap. Have seen so many failed varistors that have lost count. MOVs/Varistors are such a recurring theme as fire hazard that UL/IEC60950-1 was updated to address requirements for these components.

      1. I’ve lost count in how many X rated capacitors that have gone open circuit (smoke released from some), but they are all in the same two brand and model of PSUs one that use BJTs in push-pull configuration (Generic) and the other is a HP RP5000 gold-label PSU.

        Said generic PSU, also, lots of those have their MOVs blown apart, sometimes transistors and occasionally the ballast capacitor in the push-pull circuit (the xfmr is connected to a capacitor one end and center-tapped on a cascading/totem-pole pair transistor config)

        HP RP5000 gold label, stick to blue label as the gold is the color of the fireworks: MOVs, X rated capacitors, anti-vibration glue conductively rotten. Usually it seems the voltage doubler had something go short for seemingly no reason (rotten glue?) even though it is out of circuit by a switch here in the UK(Rotten glue?…again?). Somehow everything primary side gets a BIG surge and everything that can go bang does go bang(in a chain reaction, kinda like: pew pow peuuw BOOM!!) And is the only PSU to consistently throughout the model to not often trip the RCD or breakers when they go up either.

  4. Beware that not all X1/X2 capacitors are designed for these kind of application. For example at the top of this datasheet you are warned that it is not for use in “series with mains” applications :

    Some information can be found on this small app note :

    You must ensure that the impedance of the circuit in series with the capacitor will limit a voltage surge at a lower value than the max rated voltage of the capacitor.

    If you don’t know what you are doing, stay away from these kind of projects.

    1. Strange – I am allowed to put it across the mains, but I am not allowed to put extra impedance (circuitry) in series with it. It is not even inductive circuitry, which could lead to resonance – contrary to normal EMI filtering application, where chokes are regularly used together with this capacitors.
      Perhaps this requirement is regarding “series with mains” where it is a safety issue, where you need of course a Y class capacitor.

      1. The reason behind this is about the capacitor stability. If the capacitance value change in the case of an EMI filter, it’s not that much of a problem. In the case the capacitance is used as a voltage divider, its value matters a lot. These capacitor needs to have a dielectric material that is more resistant to internal ionization during continuous operation.

      2. Generally, the reason is that the caps are self-healing when directly across the mains. With a series impedance there may not be enough current to “heal”. Voltage spikes on the line can cause burn through of the dielectric forming tiny shorts. With enough current these shots are burned out and eliminated or “healed”. So in a series application these caps may not have a very long useful life.

  5. “If you need more current, use a larger capacitor, and vice-versa.”

    So… if I need a larger capacitor, use more current?

    vice ver·sa
    ˌvīs(ə) ˈvərsə/
    adverb: vice versa
    with the main items in the preceding statement the other way around.
    “science must be at the service of man, and not vice versa”

      1. It would be nice if you could trick the system by just making two dividers in each leg equivalent to the single leg divider. But reality bites and so does the CURRENT! that the device would allow to pass through the load, would that be the wifi switch or YOU.

        So the bottom line is that you can, and in fact i’ve seen this implemented alot, put dividers in both neutral and live (which makes sense especially in EU countries using the “Schuko” standard plugs that aren’t polarized) but this will only limit the risk of electrocution to the maximum current the circuit is able to supply. Keep in mind that 25mA is already very painful and 70-100mA is, well, accelerated way to the other side.

    1. /if/ your circuit might use say 50 mA, then even with a capacitor in the other line you could draw a fatal current through any of the capacitors.

      The drawback of this technique is that the capacitors are quickly more expensive than a cheap powersupply. Using two of them means you need two of double the value, quadrupling your costs roughly….

    2. There’s no isolation at all in this circuit.

      The downstream lower-voltage part doesn’t care which way you connect active/neutral.

      So you don’t gain anything by using 2 caps to run it at half mains voltage rather than close to neutral or close to active (depending on plug orientation).

      If you are relying on your neutral being “close to ground” for safety, you are living on borrowed time.

  6. A note about your example, the voltage over the capacitor is 90 degree out out of phase with the resistor.
    So with mains at 115V and voltage over the resistor 5V, the voltage over the capacitor is nearly 115V (114.9V).
    square of 115 – square of 5 -> then square root of the result.

  7. If you’re working on one of these (I had to), an isolation transformer is an expensive, but very necessary part of the job.

    Signal made ours, but it aint cheap (or light!)

        1. did you buy it as an isolated variac/does the mfg refer to it as such (or “with isolation”)? if so can you see how the above statement about variacs is valid although you own a [modifier] variac?

          1. @martin, you clearly missed the point of my post or replied to the wrong level person in the thread. if you read again you will see I was trying to break down whats in a name and object classification to rewolf. Aka an object called an isolated variac or variac with isolation has a modifer that excludes it from the statement that [standard/run of the mill] products called variac do not have isolation.

    1. Given that these thing generally don’t need a lot of current, you can hack together a crude isolation transformer from 2 normal ones you can rescue from junk…
      The dirty version is to just connect the secondaries and (somehow) deal with the losses, the better but more difficult version is to take them apart and reassemble into one with 2 mains windings..

      1. Given that most of the transformerless power supplies are low current devices, using two small step down transformers as above works fine. You don’t need a big heavy isolation transformer if you are only pulling a few tens of milliamps.

    1. Yes, if they are very badly designed e.g. use a resistor instead of a capacitor. The above example with 25V and 5V is also a bad design. You have >25V at the electrolytic and waste 80% for the 5V.
      In this case I would consider connecting these things (5V circuitry with zener diode and relay) in series and shorting the relay out, if I want to de-energize it. The relay will be selected for the right coil CURRENT (not voltage). The capacitor is approximately a constant current source, so you do not waste power by this. But you need a second transistor (e.g. NPN – PNP combo) to do this.

    1. Y-capacitors are designed to be used in “line to chassis” applications, for example common-mode EMI filtering on the AC line, where the user has contact with the earthed chassis and a capacitor short may create an electric shock hazard (if the capacitor shorts line to chassis and the chassis earth is broken or disrupted). But in a transformerless power supply any part of the device is an electric shock hazard, and there must be galvanic isolation of the entire system from the user.

      The power supply capacitors are typically quite large, with capacitances of about 0.47 to 1 uF. Finding Y-class safety capacitors that large is unusual and expensive. X-class film capacitors are what is generally used in consumer products – and even these get bulky and expensive at the higher end of the capacitance range.

  8. As an aside, if you do not have the pieces to junk box one of these together, looking at the prices from Mouser, I was in for more than I could get a (supposedly) UL rated 1A 3.3V switching power supply for from eBay or Alibaba.

    1. If it’s a flyback supply, you need to have confidence that every one of the “firewall” components – the PCB layout creepage distances, and the insulation between the transformer windings, and the feedback optocoupler, and the Y-class capacitor to bypass RF EMI between the primary side and the DC ground, are all appropriately rated and high-potential tested for proper galvanic isolation.

      I’d rather have something that is “known not isolated” than something that is “unknown supposedly isolated”.

    2. I feel obliged to mention, that with switching supplies, you pretty much get what you pay for.

      Something from Digikey, or salvaged out of a computer will almost certainly be of higher quality (and potentially safer), than a “supposedly UL-rated” supply from Alibaba.

      Even if the Alibaba supply has a UL mark on it, check the number against their database here:

      It may come as a shock, but there are some sketchy Chinese manufacturers who will place a UL mark on their supplies, without actually having had them tested by UL. I know, crazy, huh?

    3. Hi-Pot test is a must for cheap chinese SMPSs. I test each and every at least at 2.5kV – the failure rate is creepy! Mostly the supperession “safety” caps fail short circuit. Second in line are transformer pri/sec breakdowns.
      I would never use a ebay/aliexpress PSU without testing it myself.

      1. I know I’m late to the game here :)

        I installed a closed frame 12V, 5A SMPS (that I bought on AliExpress for ~$7.00 USD) in a box to power a RPI 3B+ and HDD for a PVR. I’ve been running it constantly for the past 2+ years and, so far, no problems at all and seems fairly stable. The system is in a hacked up, small-format PC motherboard box and I am using chassis grounding w/3 prong plug.

        I expect I’ll know if/when the SMPS decides to develop inappropriate contact with ground (Yikes!!)

        Maybe I’ve just been lucky so far…..

  9. This discussion would not be complete without a mention of Microchip AN954, which is a good addition to the above post.

    Because such a circuit does have its local “common” tied to the mains line, one advantage is that you can directly fire a triac and do solid-state phase angle control (or just switching) of mains loads in an elegant way with minimal components. The microcontroller doesn’t use much power, so the small amount of practical current from a capacitive power supply is OK.

    Here’s one nice little example from Silicon Chip magazine a few years back.

    1. Do you really want the power loss of resistive dropping and the flicker of this devices? When I first saw them on Alibaba I thought about buying one. From the photo I thought the black rectangles would look like ferrite (industors). After the video I was glad that I could resist the impulse to buy :-)

      1. Clive did another video with 400V 2uF capacitor parallel to the diode array = same power draw, same power factor, no flicker. pretty good for $2

        btw this video is a good example of how SHIT cheap soldering irons are. Clive looooved his crap 936 hakko clone, but it fails to solder a wire to led package :) just because there is some extra thermal mass in the way.

    2. I have seen some more interesting driver chips which use multiple “taps” from the LED array, and modulate them with the mains sine wave (sometimes combined with a little inductance), achieving reasonable power factor. Obviously they have modulated light output as well, but they do closely resemble a classic incandescent, and also play more nicely with dimmers.

  10. Had one of those exact plugs as in the picture. The annoying thing was that if used with incandescent bulbs, the fuse would blow when the lamp died.
    Also cool, they would consume less power when the relay was ON than when it was OFF.

  11. In the 90s received a pair of image intensification tube night vision binoculars from the FSU. I was a bit dismayed to see that the circuit board was missing from the battery charger. On opening I was shocked to see only a resistor and diode to one pole of the battery and a bare wire between the other battery pole and mains. SImilar reaction to seeing the internals of an ultrasonic chime based old TV remote clicker. Simplicity in manufacture if not ultimate safety was a hallmark of most Soviet engineering and scientific thought, it helps to take that mindset in a project before seeing every project requiring an Arduino or even battery or mains electricity. It is good to consider, and probably rule out a mechanical or clockwork solution, hydraulic, magneto power, diesel, pneumatic, and other power sources. The English even considered a small chicken coop as a functional component in nuclear bomb to deal with the existing battery shortcomings in cold weather.

      1. So what, you’d have built a time machine, skipped forward 8 years to a point where Pu238 was available in other than sample quantity, taken it back and built the chicken replacement?

        Or maybe you’d have been happy to use a source that wasn’t an almost pure Alpha emitter and might fire a few stray neutrons at the warhead every so often, just for the random detonation excitement factor.

        1. (1 year later)

          At the time Pu238 was available, it was >10 years since the first plutonium bomb and production processes were in place. But enriched uranium would have worked too of course.
          There would be no risk of premature detonation, the critical mass couldn’t change and the components of the weapon would put out higher levels of radiation already.

  12. >Now imagine mistakenly putting the plug in backwards
    Ok, first I hacksaw off the ground pin, then I release the socket’s safety cover over
    Live & neutral by poking a screwdriver into earth, then unplug the plug in upside down…
    Can’t see that happening accidentally! UK plugs FTW!
    And switching live & neutral half way round a ring would trip the breaker! Doing it on a spur is possible, but difficult with colour coded wiring, and it’d not pass a safety test.

    1. Non moulded on plugs, it used to be perfectly possible to delete the ground pin in 30 secs with the most basic of screwdriver like implements (Like a narrow tipped table knife)

      1. Yeah but why would you? To get power out of a UK mains socket you need to stick at least 2 screwdrivers in the holes. It’s widely known as one of the safest sockets in the world, probably the safest. Any offers for a mains plug with better safety features than the UK?

        Note standing on the fucker with bare feet will be excluded from safety requirements for the purpose of this challenge.

    2. Research lifted (open) service neutral, then you won’t be so overconfident. The neutral should be treated with as much respect as the live, and sometimes more so, unless you can prove the circuit is isolated.

  13. Interesting article, and the capacitor info in the comments are great.

    I do think there should be even more stress on the following:
    – transformerless power supplies should ONLY ever be considered for projects where there is ZERO chance of any contact with ANY part of the device or circuit while it’s live.
    – for any mains-powered application where a living thing could ever come into contact with ANY part of the system… use a transformer based power supply.

    From years of shameless dumpster-diving and surplus store trips, I have enough wall-wart power supplies to last a lifetime. As well as transformers and regulator boards from bigger devices. Also, I have drawers full of the little mains to USB power supplies that seem to come with everything. Unless there’s a specific need for a sealed AC-powered device which can’t accomodate a small switching supply, most hackers should try to avoid using transformerless supplies.

      1. I recommended something like the tinyswitch II, you can even use their online design tool so really no excuse these days for non-isolated supplies to low voltage components. Always hipot your transformers!, if in doubt get someone competent to check your work.

  14. Contrary to what’s stated in this article, this application note from Vishay claims that the series capacitance DOES NOT need to be X-rated, as long as the series impedance of the circuit is in the range of 220 Ohm to a few kOhm. I’d be very interested to hear others thoughts on this.


  15. Do Transformer-less power supplies waste more energy than transformers? The reason I ask. Are LED light bulbs truly as efficient on power consumption as they claim? How can I test this? Also, why do these LED lightbulbs burn out in a few months?? to get you to buy more?? I believe its all about quality of parts, and manufacturing/ engineering design. But what do I know… I build my own lightbulbs, but American parts, and compensate for everything to reduce power consumption in my off grid solar travel trailer. I don’t use AC current at all. and most of my light bulbs are 3.5v controlled by a home made voltage regulator box. They are 1-3watt depending on the location. and never get hot or waste solar/ battery resources. It just seems to me that a little 5w light bulb running from a 120v power source is going to waste electricity somewhere in the circuit. They sure do get hot, and smell like burnt plastic. then when they do burn up, they smell horrible and smell up the house something fierce.

    I am a sceptic, and tend to not believe anything anybody tells me unless I can prove it in a lab.

    Any thoughts?

    Kind regards,

    1. Where are you buying your LED bulbs? We changed our house over to almost all LED 2 or 3 years ago. All are still working, no noticeable flicker. I like the light better than that from CFLs.

      Sorry to hear you’ve gone sceptic. Maybe you can get a lab to check that out.

      1. True Value Hardware (local) $1.99. Thought i was getting a deal….. I stopped buying them. Went back to regular bulbs.

        Any response on the heat factor and loss of energy from transformerless circuit??

        Does a voltage regulator waste power? Hmmmm

    2. If a capacitor supply wastes any significant amount of energy through dropping voltage, the capacitor will heat up and explode. Because the capacitor is the part that drops all the voltage. It doesn’t even have a heat sink.

      Some energy will be lost on the current limiting resistor, but only about a quarter of a watt on a 50mA supply (at 100 ohms).

    3. Speaking of efficiency, have you considered that long wire runs of 3.5V power supply will waste a lot of power? Wasted power (transmission loss) is a function of current, and you need a lot of current to get 3W to a bulb at 3.5V, about an ampere. At 120V the same bulb needs only 25mA.

    1. It will not be safe. For you or for your phone. I am not even talking about when it fails, I am talking about when it is working properly and will give you a deadly shock.

      On that note, don’t even use unbranded cheap SMPS chargers with your phone, most of them cut corners on safety.

  16. I’m glad I read this article It explains how I destroyed my desktop PC. My mind is now at ease as I couldn’t understand what went wrong. I was probing a $11 Honeywell wireless doorbell for a project I was working on. I found a 5V digital signal I was going to use into my Arduino (to trigger an IFTTT notification). It seemed simple enough, but trouble started upon grounding the Arduino and connecting it to my PC. The Arduino had a huge flash and my PC shut off instantly. (There was also a thunderstorm in the background which added a more frightening dramatic effect). The Arduino, doorbell, and desktop’s motherboard are all now toast. Luckily my SSD and HDD are still functioning. I have a new Arduino, doorbell, optocouplers (isolate doorbell from Arduino), and USB isolator adapter in the mail. Take two coming soon.

  17. Question,, any thoughts on using two inductors to create a 2:1 voltage divider in front. While not using the circuit above, using a 50ma constant current supply (designed for leds),, and regulator to 3.3v. The entire circuit is potted,, and then mounted in an industrial box. (Think circuit breaker from Jurassic Park,, not quite as big,, but same idea). Trying to get a low cost, auto ranging supply for monitoring from 120v-660v.

  18. As a bit of a rusted electrical engineer (career in software development), this is honestly one of the best articles I’ve read on the internet ever! Properly explained, exactly what I was looking for. Very impressed, thanks for a brilliant article.

  19. I’ve seen a lot of these transformless PSU X2 caps fail with diminishing capacitance in the thermostats of one brand of panel heaters which I happen to possess. Probably a poor component choice by the manufacturer. Changing the cap is easy enough, but finding a good X2 rated cap which is properly suited for this specific purpose of being part of a transformless PSU has a price tag on it.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.