# transformerless low-current power supply design

Hi Friends and Colleagues!

With one of my pupils we are designing a kind of LED light source. It is fed from 220 AC directly with basic diode rectifier - many strips of LED band are soldered sequentially.

Now we want to add some control logic to it (e.g. IR or acoustic switch). The trick is how to power this logic. I.e. how to create low-current 5V as we only have about 310 DC here.

My current idea is to use zener diode and powerful resistor: to draw 5 mA from about 300 V we need a resistor of 60 kOhm / 2 W.

The supposed schematics is below. I'm unsure whether it would be ok to use 5V zener and feed the logic from point A (i.e. without 78L05) or it is better to use 9V zener and take the voltage from point B? And do you believe it is safe design overall, provided that no one is going to touch anything when under voltage (and probably this is going to be used mainly for demo purposes anyway).

UPD: Dear Friends. Thanks a lot for that many hints and opinions. I'm sorry I was impatient and implemented the thing before waiting enough to collect all these answers. I dare to add a couple of words about...

About safety - thanks for your concerns, all this is pretty correct.

However this project is directly aimed to teach safe procedures while working with dangerous voltage. It is not that important to make production ready device (though I hope we'll be able to show it at school conference), but more important that pupils learn to apply proper safety measures.

The matter arose from the fact that several of them after soldering a few 5V schemes decide they are real gurus and started playing with power lines in their homes etc - which led to some hazardous situations. One of their "domestic experiments" included plugging 5V schematics into 220 directly - with enough sparks, smoke etc. When I learned about it, I decided we should cover the topic of working with home switches, bulbs, plugs etc, etc - and particularly about difference between 5 volts for logic, 12/24 for leds and 220 AC...

• Sorry but if you are a teacher and are making so many mistakes in a single circuit... what do you teach? - 1) The 7805 will not be able to work from 5V - 2) How comes you only draw 5mA for so many LEDs? - 3) The Zener will get burnt for the negative AC semicycle.... etc. etc. Too many errors and misconcepts in one circuit. You are going to mess with AC mains with no knowledge of what you are doing. Better stop now before you kill a student. Mar 4 '17 at 8:03
• @ClaudioAviChami NONE of the items that you list as mistakes are actual mistakes on his part. Constructive criticism can be useful BUT you must read and understand what is said. (1) He said +310 VDC. That's NOT AC. Presumably he is rectifying 230 VAC to get that value. (2) He says that the 5mA is for control logic - not for LEDs. (3) He says EITHER 5 VDC from a zener OR 9VDC to feed the 7805, giving it an adequate 4V DC headroom. - Your criticism of him is wrong on all counts in the context - I suggest that an apology is in order. Mar 4 '17 at 9:27
• @RussellMcMahon OK I misread. However, not as an excuse but the main point here is that you DON'T mess with non-isolated AC, and not with high voltage DC, specially NOT with a student. What is being done by irresponsible manufacturers (specially from a specific country that bypasses any security or standards compliance) is not to be done by a teacher and his students, specially when you certainly AREN'T able to ensure it "won't be touched". During debugging, IT WILL. Mar 4 '17 at 11:35
• @ClaudioAviChami "Never did me any harm" :-) :-(. Fortunately, and unbelievably. I generally agree with you, but if they are going to get an unisolated supply from somewhere on the internet then from here with some warnings is perhaps better. I usually add warnings very prominently. I didn't do so here :-(. I'll add some. Thanks. | I've managed 1200 VDC (Ouch!), RF, 230 VAC x N, other HV DC x M, ... . Murphy works to ensure that Soldering irons are hot at the end you pick them up by :-). etc. I've survived 50+ years of it - BUT, some don't. Mar 4 '17 at 11:41
• The LED bulb looks like a real work of art .If you change a filament light bulb while it is going it will be hot .Your educational lamp will be hot in another way .On a full wave bridge with the neutral grounded at the power switchboard which is very normal you will find that all the leds will be very much alive .Measuring this with DVM wrt global ground will be a safe way of educating students . Mar 4 '17 at 12:25

If the power dissipated by the dropper resistor is too high, consider replacing it with a capacitor. Wikipedia link. The capacitor needs to be chosen so that its impedance matches the resistor you would have used. Place a reasonably high value resistor (a few hundred kilohms) in parallel with the capacitor to discharge it when the supply is disconnected. The capacitor needs to be rated for the full mains voltage.

• Yeah, thanks - I too found this solution while disassembling led lamp recently :) Oct 2 '17 at 17:32
• @RodionGorkovenko Pretty much everything I know about capacitive droppers was from watching "bigclivedotcom" on YouTube. It's not something they ever mentioned at college. Oct 2 '17 at 21:07

Warning - mains electricity can kill!

The resistor and the zener is a good starting point for a low current power supply. Add a diode and an electrolytic capacitor to complete it.

You can reduce the resitor wattage by adding an X1 capacitor in series with it when feeding it from AC.

You can also buid a full wave version of the circuit but the common $V_{EE}$ connection can then be problematic.

Use ST viper or similar as buck power supply. Alternatively, if your current is actually very low, use all your diodes as a rectifier.

SAFETY: As Claudio and others have noted

## Non isolated AC mains is very very very dangerous.

230 VAC is much more dangerous than 110 VC. And 310VDC rectified mains should be regarded as at mains potential at ALL parts of the circuit. ALL.Really!

Allowing a student to work with this equipment is very unwise - it's risky both ethically and perhaps legally too.

Operating the equipment from a transformer isolated supply is a minimum precaution you should take.

Use of a "residual current detector" - RCD / ELCB / ... would be an extremely good idea - and even then, it's not "safe".

Note that use of an ELCB and transformer together may nullify the protection given by the ELCB.

_________________________

SOLUTION: The logical solution is to place a zener diode in series with an LED string. Use this to drop say 6 VDC at the LED current and feed a supply capacitor from the zener via a diode. This is probably what Gregory was referring to.

The zener needs to be able to handle a dissipation of >= LED current x Zener voltage. If LED current is >> 5 mA you could take a supply feed from across two of the LEDS with a diode to a separate capacitor.

_______________________________

In the circuits below input voltage (at left) is assumed to be 310 VDC. Low voltage output DC can be either used directly or used to drive a voltage regulator. If LEDs are used to provide the voltage and you want 5V out and are using a voltage regulator then 3 x LEDs may be needed. Use of an LDO regulator will reduce needed Vin.

The left hand circuit uses zener diode ZD1 to clamp the maximum voltage applied to D1. If the 310 VDC supply "ripples" with mains variations D1 passes current when Vz is above (V_D1 + V_C1).
ZD1 must pass the whole LED current so dissipation capability of ZD2 must be >= V_zd1 x I_LED. eg for 50 mA LED current and a 9V zener dissipation with constant 310 VDC applied -s 9V x 50 mA = 450 mW, so a 1 Watt of higher dissipation zener should be used.

In the right hand circuit the LEDs LED N and LED N-1 provide about 6V (for white LEDs) to charge C2 via D2.

simulate this circuit – Schematic created using CircuitLab

• Your circuits seem to be missing the point -- the whole reason for having a power supply for logic is to be able to turn the LEDs off and on. How do you propose to do that? Mar 4 '17 at 12:33
• "Note that use of an ELCB and transformer together may nullify the protection given by the ELCB." An ELCB senses common mode current, and trips over a certain "maximum safe" treshold. An isolation transformer blocks common mode current altogether. Using them together doesn't nullify the protection given by the ELCB, it improves it as you get safety redundancy. I know that you must already know this, possibly better than I do, but that wording was misleading.
– jms
Mar 4 '17 at 13:31
• @jms Yess-ish. It's complex. I did mean "MAY" nullify - but may not and may make better or ... . :-). ie we are not in disagreement. Examples tend to be contrived - but Murphy is good at contriving. SO: A system with an ELCB only will trip if current passes to ground. In the current design say eg the neutral side of the feed is connected to a local ground - maybe chassis, mounting frame etc. Resistance to true ground will vary with circumstance. If a user connects this local ground to true ground with their body ELCB will probably trip but may not. ... Mar 5 '17 at 11:45
• @jms ... If the phase-neutral feed is reversed then a local ground to phase fault still may float and not trip the elcb but a user ground to local-ground connection will trip the ELCB. It is LESS likely that the user will manage a local phase to neutral contact than a one or other lead to true ground one. But with this current construction a P-N contact or a tapped down one via LEDs is very possible. || NOW use JUST an isolating transformer. All local "P" or "N" connections to true ground are now benign. The local_P to local_N connectyion is still lethal. ... Mar 5 '17 at 11:50
• @jms. Getting there :-) || Now add the transformer to the initial ELCB case. For the Local_P to true-ground fault which previously tripped the ELCB tripping does not now occur as the ELCB unbalance path has been broken by the transformer. So if eg Local-Phase is connected to local frame etc or even to true ground a user may be at local_phase potential unawares. If they now contact Local-N with another hand (or part of the same hand with this construction) or whatever then the ELCB sees no fault but they suffer an isolated 230 VAC shock from the transformer secondary. So ... Mar 5 '17 at 11:55