Author Topic: Mains Ac to Reg DC Cheep Chinese Way  (Read 11580 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: 10482
  • 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: 10482
  • 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: 10482
  • 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: 10482
  • 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: 8625
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.
 

Online 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: 10482
  • 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: 6618
  • 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: 10482
  • 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)
 

Offline minime72706

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: us
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #25 on: October 22, 2013, 12:07:27 am »
I think you're right, PSI. They test them at thousands of volts apparently!
I have more incomplete projects than I have digits and toes.
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16387
  • Country: za
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #26 on: October 22, 2013, 06:18:15 pm »
Just remember that with time X2 capacitors degrade, and they can fail as a short circuit as well ( allowed as the spec calls for them to be used across the lines, not between line and PE) so they need to have a fuse in the line to them. I have seen many fail after a few years of use.
 

Offline minime72706

  • Frequent Contributor
  • **
  • Posts: 267
  • Country: us
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #27 on: October 22, 2013, 07:35:03 pm »
Suppression capacitors are supposed to last quite a while. It should last longer if you protect the input with something other than the capacitor itself. A MOV or TVS may prevent surges from hitting the capacitor full-force, increasing the lifetime. Definitely include a thoughtfully-chosen fuse in the circuit.

EDIT: Here's a couple of pictures of random stuff I have laying around.



Picked the big gray one below up at the MIT Swap Fest (flea market) on Sunday. Got like 12 for a buck.

« Last Edit: October 22, 2013, 07:51:41 pm by minime72706 »
I have more incomplete projects than I have digits and toes.
 

Offline SirusTopic starter

  • Contributor
  • Posts: 22
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #28 on: November 02, 2013, 11:39:11 pm »
Thanks for all your help guys, I have gained a lot from this. Now I know what these PSU's are called I
have been doing a bit of research.

After a google of capacitive reactance, I found a free usefull and small program/calculator that does
this and some other handy stuff, sorry if you all know about it. Electronics Assistant v4.31.

Sorry not noting anyones name, I am using notepad to type this out as forums usualy drop out on me when
I submit :D

It just so happens, that one of the failed units was a radio controled mains switch with a manual button
on the plug pack. I have 4 of them. They have loads of room for my custom boards in my simple projects
below. I looked a little bit deeper on the board and found that they are using the 2 stage method some
one mentioned, They are using a double drop type of zener regulation, at first I thought they where
using a half wave rectifier, but it is full wave, but 2 diodes are 24v zeners.I thought that was quite
smart as that should double your power rating also, then for the logic a 5v Zener after that.

I striped the dead one for parts and tested them against a working one. I couldn't test the 24v Zeners
in reverse as my power supply only goes up to 20v but they test good forward. I also checked the mains
cap esr's, they where quite close. so I just swapped the mains cap and 24v zeners on the working one, and
it worked fine. So I baged up the PSU parts, labeled it Tranformerless kit 240ac to 24v, 35ma and put it
in the new draw in the part bin :D.

I think the fail must have, as some one mentioned, transients ripping the logic or a transistor on the
board.

As these are going to be usefull as project cases I didn't dig any further, I am using one for my desk
light, but I may kill it as its a nice case, lol.

The projects I was hoping to build from this type of psu are..

Timed once only Mains switch--
This is to turn my 5 & 7 year old daughters bed blankets off after 30mins, so I don't cook them. I
forget to set my alarm 50% of the time, don't worry, waterproof sheets just to be on the safe side. They
haven't done that since they where 3. Might even make another 2 for our bed, as we often forget due to
drifting orf to nodland.

Plug in the wall Power failure lighting--
We have had a dodgy mains feed to our street for around 2 years now. So if the power goes, we are
plunged into darkness, my youngest get quite distraught because of that bang of silence and sudden
darkness. And I get really peeved while finding the ladder in the dark. Using some rechargeables and
bright leds in one wallwart type box, I might even get flash and do it all with diodes, resistors and
the mains and smoothing cap. I am making a heavier duty 12v backup system for the fridge and freezer, I
was also thinking of rerouting the house lighting circuit through a UPS, anyhow that's all another story.

DIY suse vide controller--
My only concern on this would be the temperature sensor, it is waterproof but I was thinking of earth
grounding the metal tube it is epoxyed in for belt and braces.
Using an arduino, been trying to make one for 2 years now. In the beginning I was trying to figure out
thermal mass and the delays involved to make some kinda formula, then around a 3 months after I found
out about PID control, HALLELUIAH, learned all of that then discovered adafruit do a kit based on
some bodys library's 3 months later, using a long timebase PWM. I am already to go on this using just the
library's the fella made, my program and hardware.

TTFN
 

Offline SirusTopic starter

  • Contributor
  • Posts: 22
Re: Mains Ac to Reg DC Cheep Chinese Way
« Reply #29 on: November 03, 2013, 12:29:04 am »
Here is a few pics of the "new" project boxes. Now I have figured out photobucket again.
http://s245.photobucket.com/user/Mr_Sirus/media/Wallprojectbox1_zps8de9c3e4.jpg.html
http://s245.photobucket.com/user/Mr_Sirus/media/Wallprojectbox2_zpsc3bb82f8.jpg.html
There's lots of room in them and if you don't need to control the socket you can just jump it, so you don't lose the use of the wall socket. The in built push button directly hits the board to a pcb micro switch.
Does anyone know where this type of case could be purchased? I think this is a custom package.

IRC I bought 4 of these 12 years ago at £15 a pop. they also had a 4 button remote with each one to control up to 4 of the plug packs.

For £15 you couldn't buy such a versitile case in my opinion, even back then.

TTFN
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf