Author Topic: Mains Ac to Reg DC Cheep Chinese Way  (Read 11556 times)

0 Members and 1 Guest are viewing this topic.

Offline SirusTopic starter

  • Contributor
  • Posts: 22
Mains Ac to Reg DC Cheep Chinese Way
« on: October 20, 2013, 12:48:01 am »
Cheep plug in the wall chinese and other devices eg. Timers, radio remote mains switches etc seem to use this circuit to drive micros,relays etc.
Is there a name for this type of circuit and or a formula to decide the parts required?
I would assume input AC voltage, hz and outpout voltage and and amps you would need for the formula.
I am aware this is not isolated, that's fine for what i want to do with it and they require a constant ish load to operate. However I would like it to blow a fuse if it gets out of hand.
Like many, I want to get away from AC mains as quick and cheep as possible without mucking around with switch mode modules etc nor a bulky tranny.

I have also noticed that these "psu's" fail quite often, what the pro's and cons of these? BTW creads for the image go to circuits today

« Last Edit: October 20, 2013, 12:49:46 am by Sirus »
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10461
  • Country: nz
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #1 on: October 20, 2013, 12:49:12 am »
Transfomerless power supply, or capacitor mains powersupply

There's nothing dodgy about them. They are very useful for systems that need to be small and have limited inputs/outputs. (Since they are not mains isolated you have to isolate the i/o)

But obviously they can be designed badly/unsafe, just like any circuit.

They work by current limiting the AC mains, usually in the 1-50mA range, then shorting it with a zener to clip the waveform

Current always flows through the zener, weather you're using it or not, so they're not efficient but they are very small.

The current limit can be calculated by working out the Capacitive reactance  (Xc)
(basically the resistance of a capacitor at a specific frequency)
Xc = 1/ (2 x pi x F x C)

F=frequency, so 50hz or 60hz
C=value of the capacitor in farrds

eg, for a 0.3uF cap and 50hz mains  Xc= 10615 ohms 
current = V/I  so 230/10615 = 22mA


Note: For safety reasons the capacitor has to be X rated to be used like this.

« Last Edit: October 20, 2013, 01:03:58 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline niflheimer

  • Contributor
  • Posts: 49
  • Country: ro
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #2 on: October 20, 2013, 12:54:45 am »
There's only one pro to it - it's cheap as dirt. The cons ... well the most important one is that if the clamp zenner fails open instead of shorted you'll get ~ 150v through your load. Also it will be noisy as hell since there's pretty much no filtering on it - that capacitor is not big enough to suppress the 100/120hz ripple.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #3 on: October 20, 2013, 01:01:31 am »
The cons ... well the most important one is that if the clamp zenner fails open instead of shorted you'll get ~ 150v through your load.

Use a backup Zener at a higher voltage. If your load has the capability (for example, a microcontroller with an ADC/comparator and an internal voltage reference), you could even detect the switch to a higher voltage and shut off the circuit. That way, the user knows it's broken and likely disconnects it before the second Zener blows.

If you use a good capacitor, there's not much in this circuit that is under high stress. If they're failing left and right, it's only because of the extremely cheap parts used. That Zener is no more likely to blow than the one my Fluke 45 uses as a voltage reference...
« Last Edit: October 20, 2013, 01:05:19 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline SirusTopic starter

  • Contributor
  • Posts: 22
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #4 on: October 20, 2013, 01:02:08 am »
There's only one pro to it - it's cheap as dirt. The cons ... well the most important one is that if the clamp zenner fails open instead of shorted you'll get ~ 150v through your load. Also it will be noisy as hell since there's pretty much no filtering on it - that capacitor is not big enough to suppress the 100/120hz ripple.

Yup, the zener worrys me, I would like some fail safe to kill a fuse.

The Filter cap would be part of the formula so ripple would be reduced.

there must be som elegant yet cheep way for this to work. You just have to open your mind to the fact that if it fails, then the components die, just without causing a fire. :D

 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10461
  • Country: nz
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #5 on: October 20, 2013, 01:09:14 am »
If the zener fails you don't necessarily get full mains on your circuit.

Remember it's still current limited and your circuit will continue to load this down.
But if your load changes, say between 1mA to 50mA dynamically, like a mcu+relay, then yes, when you're drawing 1mA with a 50mA current limit the voltage will shoot way up.

Since I is constant the voltage is always I*R where R is the resistance of your load.
(RMS current of course)

« Last Edit: October 20, 2013, 01:23:37 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline SirusTopic starter

  • Contributor
  • Posts: 22
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #6 on: October 20, 2013, 01:20:51 am »
Thanks Psi,

That helps loads. I assume the dropping resistor has to handle some heat.

You seem uber maths on this, so Given Vac Hac Vo Ao, could you make a one hit formula for the circuit to give values?

I do all my maths in excel so I'm a bit thick reading normal math expresions however I am learning lol
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #7 on: October 20, 2013, 01:24:15 am »
R1/C1 acts as the limiting "resistance" / impedance.

Not as unusual as you may think.
================================
https://dannyelectronics.wordpress.com/
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10461
  • Country: nz
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #8 on: October 20, 2013, 01:30:43 am »
I assume the dropping resistor has to handle some heat.

Given Vac Hac Vo Ao, could you make a one hit formula for the circuit to give values?

I've seen a few versions of this sort of circuit. Usually the resistors is like 150ohms and there just to keep inrush current low and for safety reasons.
I'm not sure why they have gone for 10k in your circuit but i guess its safer if the cap shorts, not that X rated caps ever do short.

Vac doesn't really matter, since the current is based on frequency and capacitor size.

The formulas you need are in my first post, along with an example.
« Last Edit: October 20, 2013, 02:46:05 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline SirusTopic starter

  • Contributor
  • Posts: 22
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #9 on: October 20, 2013, 02:23:41 am »
Its not my circuit, I grabed it of the net. However let me have a look at two examples I have pulled open. Both one has a the first has a micro and basic radio receiver, the other two pics are from a door bell receiver i think but has a radio board to do all that. anyhows thems the power resisitors and mains caps. they both use the same circuit and both have failed without burning the house down, both have a zener. 240v 50hz UK. Do these math your formulars?
 

Offline SirusTopic starter

  • Contributor
  • Posts: 22
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #10 on: October 20, 2013, 02:34:33 am »
eg1
 

Offline SirusTopic starter

  • Contributor
  • Posts: 22
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #11 on: October 20, 2013, 02:35:29 am »
eg 1a
 

Offline SirusTopic starter

  • Contributor
  • Posts: 22
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #12 on: October 20, 2013, 02:36:23 am »
eg 1b
 

Offline SirusTopic starter

  • Contributor
  • Posts: 22
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #13 on: October 20, 2013, 02:42:21 am »
Sorry I had looking at stuff lag. I forgot how quick a forum can be. Thanks for you help
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10461
  • Country: nz
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #14 on: October 20, 2013, 02:49:39 am »
they both use the same circuit and both have failed without burning the house down, both have a zener. 240v 50hz UK. Do these math your formulars?

eg1

That red one is 0.47U,   so 1/(2 * 3.14 * 50 * 0.00000047F)  = Xc = 6776 ohms

Current = V/R
so 240V / 6776 = 0.0354192 = max current of 35mA
Output voltage is set by the zener voltage.
« Last Edit: October 20, 2013, 02:51:52 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline amyk

  • Super Contributor
  • ***
  • Posts: 8613
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #15 on: October 20, 2013, 05:28:24 am »
Microchip even has an appnote about them: http://ww1.microchip.com/downloads/en/appnotes/00954a.pdf
 

Offline Whuffo

  • Regular Contributor
  • *
  • Posts: 112
  • Country: ph
  • An American Living In Paradise
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #16 on: October 20, 2013, 06:41:51 am »
This kind of power supply has been used for decades - and if well designed, it's very reliable. Only useful where the current draw is small and relatively constant; not very efficient, but it's dirt cheap. A transformer would be much more expensive, and a small SMPS would also cost much more.
 

Offline Niklas

  • Frequent Contributor
  • **
  • Posts: 413
  • Country: se
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #17 on: October 20, 2013, 08:10:40 am »
In an electrically noisy environment the cap's impedance, at least temporarily, will be lower than calculated. This can increase the voltage over the load and the series resistor causing failure due to breakdown or overheating. Even shorter, recurring transients can accumulate extra heat in the series resistor.

If you have several loads, you can also try to optimize the overall system performance by lowering down the voltage in steps. We did a project with a micro, a 12 V rated sensor and a relay a couple of years ago. A 12 V rated relay draws a lot of current so we looked at getting a 48 V relay with a sensitive coil instead. The first voltage step was set to 50 Volts and that was dropped down to 12 V to the sensor using a resistor and Zener combination. The 3.3 V micro got its power from a low current linear regulator that was supplied from the 12 V rail.
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16387
  • Country: za
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #18 on: October 20, 2013, 09:46:10 am »
Major failures on those is the series resistor going open circuit from noise on the supply line and harmonics, and the capacitor going open circuit for the same reasons. Better ones have a low value fuse ( o.1A or so) in series, and a 275V MOV to clamp spikes to a safe level, along with a higher power resistor to handle the spikes and harmonics. As well the Zener diodes tend to go short circuit as they get over run by the harmonic current ( almost invariably short, only open if the capacitor goes dead short and allows a current to flow that burns traces off the board) and damaged by the poorer quality capacitors self healing. the electrolytics as well tend to go open circuit as well as they are the cheapest ones barely capable of handling the ripple current and running right at the maximum voltage across them ( often past both levels as I have seen 10V units used on a 15V zener) so they fail just outside the warranty period.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10461
  • Country: nz
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #19 on: October 20, 2013, 11:18:29 am »
If you have several loads, you can also try to optimize the overall system performance by lowering down the voltage in steps. We did a project with a micro, a 12 V rated sensor and a relay a couple of years ago. A 12 V rated relay draws a lot of current so we looked at getting a 48 V relay with a sensitive coil instead. The first voltage step was set to 50 Volts and that was dropped down to 12 V to the sensor using a resistor and Zener combination. The 3.3 V micro got its power from a low current linear regulator that was supplied from the 12 V rail.

I've seen designs that use 24V zeners with 7805 for 5V mcu power and a 12V relay directly on the 24V line.
The 24V stored in the DC filter cap provides an initial high current push to get the relay energized.
The relay current draw pulls the 24V rail down to 9V pretty quick but 9V is enough to hold the relay in.
This approach allows you to reduce the value/size of your mains capacitor.

Also, no matter how you design it the load always pulls the voltage down a bit, even when you're within the current limit, and the above method gets around this issue too.
« Last Edit: October 20, 2013, 11:24:04 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline Whuffo

  • Regular Contributor
  • *
  • Posts: 112
  • Country: ph
  • An American Living In Paradise
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #20 on: October 20, 2013, 11:49:08 am »
X10 modules use this kind of power supply and they're very reliable and long lasting. Their circuit is a bit odd; you can find the schematics for many of their modules on Ido Bartana's page at http://www.idobartana.com/hakb/. They use it to run the MCU (usually a PIC) and the PLCC transmitter. Line transients / harmonics are a problem long solved.

Applications for this kind of supply are limited; low power, no human contact with the circuitry or wiring, fixed load. You could run an Arduino board from this supply, but you wouldn't be able to connect it to any external peripherals. For running LED lights and things like that, they're great. Some Chinese manufacturers cut corners and leave important components out, but don't take their results as typical of the transformerless power supply.

It's a valuable tool for engineers. If what you're designing is suitable for this kind of power supply, it's the very least expensive option.
 

Offline DutchGert

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: nl
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #21 on: October 20, 2013, 12:25:42 pm »
Microchip even has an appnote about them: http://ww1.microchip.com/downloads/en/appnotes/00954a.pdf

I was just about to post this as well. Very compact en nice appnote
 

Offline Kjelt

  • Super Contributor
  • ***
  • Posts: 6617
  • Country: nl
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #22 on: October 20, 2013, 12:34:53 pm »
Perhaps you can protect the output after the zener with a crowbar circuit.
 

Offline minime72706

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: us
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #23 on: October 21, 2013, 08:19:45 pm »
I've built one somewhat recently for driving a relay and it worked fine, but the large quiescent current draw irked me. I ended up using a more sophisticated solution.
I did reference the Microchip application note.

I used some surplus X2 rated capacitors, a PCB fuse, a few MOVs, and whatnot. I built a full-wave rectified version because they're more efficient. The voltage went to absolute hell in a handbasket when the relay was energized, but as long as the current was high enough to keep it reliably latched, I cared not. It ended up being fairly small, but not small enough to make me happy. As I said before, the current draw bothered me. 50mA all the time... 50mA is a lot when you're talking about mains voltage. Still ... the thing was cheap, easy to build, and most of all, it worked.

I covered mine entirely in heatshrink, by the way!

EDIT: If you want to build one but lack properly-rated components, hit me up. I love an excuse to offload some components to someone else who will use them.

EDIT #2: Are X2 capacitor ratings for capacitors I might have (in the US) even qualify in regions that use 220VAC/50Hz mains power? X2 capacitors seem to be typically rated for 250VAC or 275VAC. That's plenty of headroom when it comes to the range of 110VAC to 130VAC typically seen in The States, but surely not in areas with native 200VAC+ mains. I also have capacitors rated for 400V+, but not X-rated (heh...) ones.
« Last Edit: October 21, 2013, 09:32:04 pm by minime72706 »
I have more incomplete projects than I have digits and toes.
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 10461
  • Country: nz
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #24 on: October 21, 2013, 11:12:14 pm »
I believe the voltage rating on X caps is "working voltage" meaning you can safely use them all the way up to that point.
So 250VAC or 275VAC caps are intended for mains up to 250V.
But yeah, you would probably pick the 275V cap for the international market and only use the 250V cap for 220/230v specific countries, since some people in 240V areas may actually have 250V at the wall.

Pretty sure X rated caps are self healing, so any overvoltage/overload just blows away a small area of the plate, reducing capacity a little but protecting the device. I would imagine you could unofficially put 300VAC on a 250VAC X rated cap and it would probably never fail, they under-rate them quite a lot as part of the X classification.
« Last Edit: October 22, 2013, 12:47:17 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf