# EEVblog Electronics Community Forum

## Electronics => Beginners => Topic started by: Penwrecker on March 29, 2021, 11:29:59 pm

Title: Gathering PSU components
Post by: Penwrecker on March 29, 2021, 11:29:59 pm
Following up on this thread about power supplies (https://www.eevblog.com/forum/beginners/seeking-guidance-on-used-power-supplies/msg3530908/#msg3530908).

Been putting the "tear" in teardown. Found this transformer inside a wall wart...

(https://i.imgur.com/wJdfx0B.jpg)

That's pretty good, right? I should be able to build a 12v PSU probably, I think. (I found the formulas, but I'm knackered. Gonna save the math for tomorrow.)

And I'm pretty sure this thing is a full wave bridge rectifier, right?

(https://i.imgur.com/J48C4Jg.jpg)

I have an LM317 voltage regulator IC. So the basics are coming together, possibly.
Title: Re: Gathering PSU components
Post by: Gyro on March 30, 2021, 09:01:36 am
What you are measuring there is the open circuit secondary voltage of the transformer and its short circuit current. Neither of these figures will give you the true performance of the transformer (and in the case of the short circuit current, rapid release magic smoke! [Edit: More likely, the blowing of its internal thermal fuse]). You don't get both at the same time.

What you want is the output voltage of the transformer at its rated current, which is neither of the above. Transformers have a 'regulation' figure - how much their output voltage sags with increasing current. Large transformers have good regulation, small ones not so good as losses are higher, wire is thinner, etc.

Yes, that board is a bridge rectifier and small reservoir capacitor.

The most important information is the voltage and current rating from the label on the wall wart. This figure will take into account the losses in the transformer and voltage drop across the regulator, together with the contribution of the reservoir capacitor in turning the transformer RMS voltage into something nearer the peak voltage. So the wall wart label tells you what you can realistically expect without cooking the transformer.

At a rough guess I suspect the label says something like 12V DC @ something like 250 - 500mA.

P.S. Please don't try to measure the short circuit current of any larger transformers or other power sources like that, you will blow your DMM fuse. It's not how the current range is supposed to be used.
Title: Re: Gathering PSU components
Post by: MathWizard on March 30, 2021, 01:21:26 pm
If u have a few resistors around or can pull from something, like 100 ohms, 220, 470, 1k, they are pretty common, you could put them across the rectifier output to see the output voltage and current, thus the power. P=V*I,

However, your average 1/4 Watt resistor will burn out real quick, or burn your finger real easy, if you leave a small ohms value there for even a few seconds. Here you or someone could use something like P=R*(I^2) or P=(V^2)/R

Lets say there is 14V output if you hooked up a 100 ohm resistor, that would be almost 2W, so that WILL toast an average 1/4W 100 ohm resistor in no time, so beware.
Title: Re: Gathering PSU components
Post by: Penwrecker on March 30, 2021, 02:09:02 pm
What you are measuring there is the open circuit secondary voltage of the transformer and its short circuit current.

Oh hell. Alright.

Quote
Neither of these figures will give you the true performance of the transformer (and in the case of the short circuit current, rapid release magic smoke! [Edit: More likely, the blowing of its internal thermal fuse]). You don't get both at the same time.

Ok. Yeah there wasn't any smoke and all the fuses are intact but I probably destroyed it.

I hooked it up with scope probes where the the DMM probes are in the photo. Got a nice sine wave.
Then tried to add the rectifier and  got this...

(https://i.imgur.com/DvLkjNc.jpg)

Channel 2 is before the rectifier, ch 1 is after.
Look how ch 1 pinches to 0, 0 in the middle there despite the surrounding chaos. (it's offset upward -- that's actually 0v). No idea why. It's interesting, though.

Here's where it gets really weird. I unplugged power -- literally pulled the plug, and got this...

(https://i.imgur.com/8wjp1t4.jpg)

The pic doesn't do it justice. Those traces are thrashing around like crazy.

Maybe it's from the capacitor somehow? Since I had it all upside-down & backwards, mabye the cap was feeding the transformer which was damaged from my mishandling, producing that weird trace. IDK just a guess.

Quote
What you want is the output voltage of the transformer at its rated current, which is neither of the above. Transformers have a 'regulation' figure - how much their output voltage sags with increasing current. Large transformers have good regulation, small ones not so good as losses are higher, wire is thinner, etc.

Alright. I didn't know any of that yet. I see now that I'd better do some reading, then order a specific transformer with known specs and a data sheet w/wiring diagram.

Quote
Yes, that board is a bridge rectifier and small reservoir capacitor.

Or it was anyway. It's alright -- I have some more diodes.

Quote
The most important information is the voltage and current rating from the label on the wall wart.

[...]

At a rough guess I suspect the label says something like 12V DC @ something like 250 - 500mA.

Very close...

(https://i.imgur.com/YRl6dfs.jpg)

Quote
P.S. Please don't try to measure the short circuit current of any larger transformers or other power sources like that, you will blow your DMM fuse. It's not how the current range is supposed to be used.

Ok, yeah. It was stupid. I was lucky -- could have been worse. Definitely no more guessing.
Title: Re: Gathering PSU components
Post by: mariush on March 30, 2021, 05:57:16 pm
So yeah... you have a transformer that's probably rated for around 10VA

Without any load, such small transformers have an output voltage higher than normal by around 10-20% ... that's why you measure 16.55v with your multimeter.
As soon as you put some load (for example try a 12v AC incandescent bulb, the kind used on motorcycles, cars etc) the voltage will go down a bit, closer to around 12..13v AC

The bridge rectifier converts the AC voltage to DC voltage, the peak DC voltage will be  Vdc peak = sqrt(2) x Vac - 2 x (Voltage drop on diode)
Those diodes have around 0.8v..1.0v drop at these currents, so the peak DC voltage will be 1.414 x 12v  - 2 x 1v = 15v ... approximately.

That's PEAK dc voltage. to get some minimum DC voltage you need to add a capacitor and you can calculate the capacitance required with this formula that approximates how much is needed:

Capacitance = Current / ( 2 x AC Frequency x (Vdc peak - Vdc minimum desired)

So with your "power supply", which says 13.5v 500mA , let's say we want minimum 13v and 0.5A (500mA) and since you're in US, you have 60 Hz so we put them in formula and you get

C = 0.5 / [2 x 60 x (15 - 13)] = 0.5 / 240 = 0.00208333 Farads  or around 2100 uF

They're using a quarter of that, so basically even at 100-200 mA, the output voltage will be closer to that minimum voltage, as the capacitor rarely gets a chance to charge up

You can use diodes with lower voltage drop, like 1N581x for example (these have around 0.4..0.6v drop at half an amp) and you can use higher capacitance ... 2200-3300 uF is typical for each 1A of current. More capacitance usually isn't worth it, in the sense that it's usually cheaper to just get a bigger transformer instead of buying more expensive and more bulky capacitors... and also with higher capacitance you get higher currents when you plug your power supply which means your fuse has to be rated for higher currents.
Title: Re: Gathering PSU components
Post by: james_s on March 30, 2021, 06:06:35 pm
What are you trying to accomplish with the scope? You can't measure before and after the rectifier at the same time and expect to get anything meaningful, the scope only has one ground reference and there's nowhere to connect that which will work for both measurements. There's nothing exciting there anyway, you'll see a sine wave on the output of the transformer and a flat line on the output of the rectifier, or pulsating DC if you remove the capacitor.

Why did you take apart the wall wart? It was already in a useful configuration as a DC power supply in its original form. Now you have the same thing but in pieces without a housing to hold the transformer and related bits. I don't see how this is an improvement.

It seems like you may want to consider slowing down and learning a bit more theory before you start connecting stuff together and quite possibly damaging something. Trying to measure the short circuit current out of a power transformer for example, you got lucky that it did not burn out, if you left it like that for very long it would. It's a completely useless measurement too that with a slightly larger transformer would blow the fuse in your multimeter.

When you unplugged the transformer, the scope is just picking up noise from the environment, you'd see the same thing if you connected a piece of wire to the probe. It's just electrical noise, it's a garbage reading, completely meaningless.
Title: Re: Gathering PSU components
Post by: Gyro on March 30, 2021, 08:30:21 pm
If you use a variable LDO regulator (LDO to achieve maximum headroom from 13.5V input) you have the basis of a 0-12V (well probably 1.25V-12V for simplicity) 500mA bench supply - enough to be useful for quite a lot of things.

Alternatively, you could use fixed regulators to give you 12V and 5V outputs at the same time. Cheaper, potentially more useful (having 2 simultaneous outputs) and no need for pots and meters.
Title: Re: Gathering PSU components
Post by: Penwrecker on March 31, 2021, 05:06:05 pm
Why did you take apart the wall wart?

1. To find out what was inside.
2. To scrounge parts.

Quote
It was already in a useful configuration as a DC power supply in its original form. Now you have the same thing but in pieces without a housing to hold the transformer and related bits.

It's ok. I have a box of them. Way more than I need.

Quote
I don't see how this is an improvement.

To the wall wart, probably not.

To myself, possibly.
Title: Re: Gathering PSU components
Post by: james_s on March 31, 2021, 09:16:56 pm
You could also just ask what's in a wall wart, all of the heavy ones are the same. Iron core power transformer, and if it's a DC output one it will have a little board with a bridge rectifier and filter capacitor. Nothing exciting.
Title: Re: Gathering PSU components
Post by: ledtester on April 01, 2021, 01:34:43 am
Quote
...
Channel 2 is before the rectifier, ch 1 is after.
...

In a schematic can you show exactly where you are placing your scope probes?
Title: Re: Gathering PSU components
Post by: Jwillis on April 01, 2021, 09:24:47 am
Why did you take apart the wall wart?

1. To find out what was inside.
2. To scrounge parts.

Quote
It was already in a useful configuration as a DC power supply in its original form. Now you have the same thing but in pieces without a housing to hold the transformer and related bits.

It's ok. I have a box of them. Way more than I need.

Quote
I don't see how this is an improvement.

To the wall wart, probably not.

To myself, possibly.

Parts scrounging is great but what parameters would you like for your power supply ?  Random components may not be vary compatible with each other which can lead to early failure or not working at all .  Also can eat up a budgets pretty quickly buying random components .
Constant voltage and constant current or  adjustable voltage and current  ?  How many peak volts and current would you like ?
Once you set up the parameters then you can pick the components required.

Not all transformers are created equally and / or used in the same application or used at the same frequency.
EI core power transformers are around 75 - 85 % efficient where Toroid core power transformers are around 90 to 95% efficient . R core transformers roll in around 90% efficiency .

The RMS (Root Mean Square) is found by dividing the peak amplitude by the square root of 2 (approximately 1.414). This yields the actual, useable voltage .
Secondary AC voltage x 1.414 = rectified filtered DC voltage
So for example , after rectification and filter , a  transformer with a 22VAC  secondary winding would yield around 31V DC

The amps of the secondary can be calculated by The apparent power in volt-amps is equal to current  in amps, times the voltage in volts .
VA = I  x V         Watts(P)  = I x V     VA = Watts(P)
Remember to double the VA to minimize voltage sag and and excessive heat. Heat is not your friend.
example:
So for a 2A transformer at 22V you would need  2 x (22 x 2) = 88VA
You probably wont find a transformer that's is exactly 88VA so go with 100VA .

Diodes or a full bridge rectifier must be able to handle the required current without producing excessive heat. So if you need 2 amps then the diodes or rectifier must have at least 2Amps forward current. Double that to reduce heat.
Rectifiers also need some load to properly measure with an oscilloscope.
An oscilloscope will only draw a very small amount of current in micro amps , And believe it it or not , diodes and rectifiers have a minimum forward current that can be greater than what the oscilloscope will draw . So some rectifiers will not function as expected with only the oscilloscope leds connected leading to incorrect measurements . This can happen more with larger rectifiers .

Filter capacitors must be Voltage rated higher than the voltage after rectification .
For example if your rectified voltage is 31 V then use  at least 35V capacitors. 50V is better to cover potential surges . Using capacitors at voltages higher than the rated value will explode .
The size of capacitor is dependent on the exceptable ripple voltage .
Capacitance in Farads(C)  is equal to load current in Amps(I) divided by 2 times the input frequency times exceptable ripple Voltage peak to peak(Vpp)
C = I / (2 * f * Vpp)
Generally Vpp is set at a reasonable 1V peak to peak
Frequency for North America is 60Hz and 50Hz for Europe

For example  a 2 amp load current  at at 60Hz

2/(2*60*1) = 0.0166F    or  16600uF     1F=1000000uF
But be careful adding more and more capacitors to reduce the ripple voltage . After a point the capacitance needs to be exponentially higher just to reduce small amounts of ripple.  There are a couple methods to reduce ripple without adding more and more capacitors . Chokes and capacitance multipliers are such methods .

This should get you started then we can discuss solutions for regulation. There are many . Some are complex and some are relatively simple . Each with advantages and disadvantages .

Title: Re: Gathering PSU components
Post by: Zero999 on April 01, 2021, 08:57:02 pm
What you are measuring there is the open circuit secondary voltage of the transformer and its short circuit current.

Oh hell. Alright.

Quote
Neither of these figures will give you the true performance of the transformer (and in the case of the short circuit current, rapid release magic smoke! [Edit: More likely, the blowing of its internal thermal fuse]). You don't get both at the same time.

Ok. Yeah there wasn't any smoke and all the fuses are intact but I probably destroyed it.

I hooked it up with scope probes where the the DMM probes are in the photo. Got a nice sine wave.
Then tried to add the rectifier and  got this...

(https://i.imgur.com/DvLkjNc.jpg)

Channel 2 is before the rectifier, ch 1 is after.
Look how ch 1 pinches to 0, 0 in the middle there despite the surrounding chaos. (it's offset upward -- that's actually 0v). No idea why. It's interesting, though.

Here's where it gets really weird. I unplugged power -- literally pulled the plug, and got this...

(https://i.imgur.com/8wjp1t4.jpg)

The pic doesn't do it justice. Those traces are thrashing around like crazy.

Maybe it's from the capacitor somehow? Since I had it all upside-down & backwards, mabye the cap was feeding the transformer which was damaged from my mishandling, producing that weird trace. IDK just a guess.

Quote
What you want is the output voltage of the transformer at its rated current, which is neither of the above. Transformers have a 'regulation' figure - how much their output voltage sags with increasing current. Large transformers have good regulation, small ones not so good as losses are higher, wire is thinner, etc.

Alright. I didn't know any of that yet. I see now that I'd better do some reading, then order a specific transformer with known specs and a data sheet w/wiring diagram.

Quote
Yes, that board is a bridge rectifier and small reservoir capacitor.

Or it was anyway. It's alright -- I have some more diodes.

Quote
The most important information is the voltage and current rating from the label on the wall wart.

[...]

At a rough guess I suspect the label says something like 12V DC @ something like 250 - 500mA.

Very close...

(https://i.imgur.com/YRl6dfs.jpg)

Quote
P.S. Please don't try to measure the short circuit current of any larger transformers or other power sources like that, you will blow your DMM fuse. It's not how the current range is supposed to be used.

Ok, yeah. It was stupid. I was lucky -- could have been worse. Definitely no more guessing.
The DC voltage, under load is 13.5V, but the transformer is still most likely 12V. The voltage on the DC side is always a little higher, than the AC voltage. When it's unloaded, it's near the peak AC voltage, so you'll measure around 23V in this case, but when loaded, the average DC voltage will fall and there will be a lot of ripple. The power supply is probably for a device which either has a built-in voltage regulator, or doesn't require a regulated voltage.

A good way to accurately calculate the short circuit current, without short circuiting the transformer is to apply Thevenin's theorem. Measure the open circuit voltage and record it. Connect a load resistor and measure the voltage. It doesn't matter what the value is, just as long as it will draw enough current to lower the secondary voltage, without significanty exceeding the transformer's maximum current rating. Ideally it should draw a current close to the maximum rating and should have an adequate power rating. It's fine to exceed the resistor and transformer power ratings a little, for a short period of time, just long enough to take the readings is no problem.

Now we have:
RL, the value of the load resistor.

The current can be calculated using Ohm's law.

Calculate the internal resistance:

The short circuit can now be calculated:

By the way, did you know, you can take screenshots with the Rigol DS1054Z? They're 800x480 resolution, which matches the display and saves cluttering up the thread with huge pictures.

Title: Re: Gathering PSU components
Post by: Penwrecker on April 02, 2021, 04:50:30 pm
By the way, did you know, you can take screenshots with the Rigol DS1054Z? They're 800x480 resolution, which matches the display and saves cluttering up the thread with huge pictures.

I did not know that. Thanks for the info. I'll do it that way in the future.
Title: Re: Gathering PSU components
Post by: bobbydazzler on April 02, 2021, 05:21:33 pm
For a lm317 based power supply I think you need a transformer capable of at least 1A preferably 1.5A and at least 15v output(for a 12v dc output for the lm317).
Title: Re: Gathering PSU components
Post by: Penwrecker on April 02, 2021, 05:29:10 pm
Constant voltage and constant current or  adjustable voltage and current  ?

Adjustable voltage and current.

Quote
How many peak volts and current would you like ?

20v at 2 amps.

Quote
This should get you started then we can discuss solutions for regulation. There are many . Some are complex and some are relatively simple . Each with advantages and disadvantages .

Yes, that info is definitely helpful. Thanks a lot. Much appreciated.

One question. I've been browsing transformers on eBay and Ali Express. They have either 220v or 110v primary side input.
Example, this one (https://www.aliexpress.com/item/4000225400181.html?spm=a2g0o.detail.1000023.3.a3e8787d9oj9Vv) is offered with either 220v or 110v.
I need a 110v input, correct? I assume the 220v ones are meant for outside the U.S.

Thanks again.
Title: Re: Gathering PSU components
Post by: mariush on April 02, 2021, 05:54:46 pm
You can buy transformers with two primary 110v windings ....

If you're in 230v+/-10% countries, you connect those two windings in series.
If you're in 110v countries, you can connect them in parallel.

In US, you can buy classic transformers from electronic component distributors like Digikey, Mouser, Newark  .... they may be a bit more expensive than ebay, but at least you don't wait weeks for those to come from China.

For example, here's the Digikey transformers list : https://www.digikey.com/en/products/filter/power-transformers/164 (https://www.digikey.com/en/products/filter/power-transformers/164)

You can filter by AC voltage on secondary  and by current (AC)  or by power  (ex 24V AC x 2A = 48VA)

The peak dc voltage will be as I said  Vdc peak = Vac x sqrt(2) - 2 x [voltage drop on diodes used for rectification]  if you use a classic bridge rectifier.

You can approximate the peak DC current with the formula Idc = 0.62 x Iac

If you want somewhere around 20v DC maximum, you want at least around 21..22v DC so that you can then use a linear regulator with a low voltage drop to adjust output voltage if you choose.
So I'd go for a 18v AC transformer or one that has 2 x 9v  or 2 x 10v secondary windings, because that would allow you to connect them in series to get 18v or 20v ac , or you could use a switch to change from series to parallel the windings and get half the voltage and double the current.

For example, here's 17\$ for a   115/230v in ,  10v + 10v out transformer, 56VA : https://www.digikey.com/en/products/detail/signal-transformer/14A-56-20/952887 (https://www.digikey.com/en/products/detail/signal-transformer/14A-56-20/952887)

parallel primary windings for 115v use.  You can leave the secondary windings in series for 20v AC output, or you can parallel them for 10v AC output.

Or an even better example ...  27\$ for 115/230v in , 12 + 12 , 130va  : https://www.digikey.com/en/products/detail/triad-magnetics/VPS24-5400/666163 (https://www.digikey.com/en/products/detail/triad-magnetics/VPS24-5400/666163)

So for example, the 24v AC 2A  (48VA) transformer, will be around 32v DC peak and  Idc = 0.62 x 2 = 1.24A   ,,,  (32 x 1.24 = 40w ,  8w are lost in diodes rectifying and other places)

Title: Re: Gathering PSU components
Post by: Penwrecker on April 03, 2021, 03:43:49 am
If you want somewhere around 20v DC maximum, you want at least around 21..22v DC so that you can then use a linear regulator with a low voltage drop to adjust output voltage if you choose.
In US, you can buy classic transformers from electronic component distributors like Digikey, Mouser, Newark  .... they may be a bit more expensive than ebay, but at least you don't wait weeks for those to come from China.
...
Or an even better example ...  27\$ for 115/230v in , 12 + 12 , 130va  : https://www.digikey.com/en/products/detail/triad-magnetics/VPS24-5400/666163 (https://www.digikey.com/en/products/detail/triad-magnetics/VPS24-5400/666163)

Excellent. That clears things up enormously.
Thanks so much for the help.

Title: Re: Gathering PSU components
Post by: Jwillis on April 03, 2021, 05:28:04 am
Here's another transformer company in the U.S.A . ANTEK (https://www.antekinc.com/)
I have a few of these and I can say that they are built solid . The data sheets  show load results which I like.
Title: Re: Gathering PSU components
Post by: timenutgoblin on April 03, 2021, 07:05:24 am

I hooked it up with scope probes where the the DMM probes are in the photo. Got a nice sine wave.
Then tried to add the rectifier and  got this...

(https://i.imgur.com/DvLkjNc.jpg)

I noticed that the timebase for the oscilloscope seems to be set to 10ns (nano seconds). That is too fast for measuring 50/60Hz AC (or 100/120Hz full wave rectified AC). Try setting the timebase to 10ms or 5ms instead.
Title: Re: Gathering PSU components
Post by: Jwillis on April 03, 2021, 07:03:15 pm

One question. I've been browsing transformers on eBay and Ali Express. They have either 220v or 110v primary side input.
Example, this one (https://www.aliexpress.com/item/4000225400181.html?spm=a2g0o.detail.1000023.3.a3e8787d9oj9Vv) is offered with either 220v or 110v.
I need a 110v input, correct? I assume the 220v ones are meant for outside the U.S.

Thanks again.

This may seem like nitpicking but you need to be aware for the sake of preventing confusion when taking measurements and doing calculations.

North American domestic Mains voltage is 120V and 240V ±5% @60Hz
European and Australian Mains is 230V @50Hz
China Mains is 220V @50Hz
Japan Mains is 100V and 110V @ 50Hz and 60Hz depending on region.
Some transformers in some devices sold in North America can have primaries which can be wired for 100V ,120V and 240V  . Most often in audio equipment.

Almost all new transformers manufactured for North American use will be rated for 120V single primary or 120VAC parallel  or 240VAC series primary.
Many transformers than are manufacture in China are rated for 110V /220V because China's Mains Voltage is 220V
This won't have a dangerous effect but causes a different voltage  on secondary than what you may expect .
This difference in voltage can also occur with vintage transformers manufactured in North America. These voltages can be  110 V, 115 V and 117 V

Also be aware that using a transformer rated for European(230V) or China(220V) use on North American Mains (120V)will give about half the expected voltage on the secondary side .
****Using a transformer rated for North American (120V) on North American (240V) , European Mains(230V) or China's(220V) mains  will quickly burn up creating smoke and/or fire.****