User Tools

Site Tools


tutorials:learn:powersupply:transformeracdc.html

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

tutorials:learn:powersupply:transformeracdc.html [2010/10/26 00:30]
ladyada
tutorials:learn:powersupply:transformeracdc.html [2016/01/28 18:05]
Line 1: Line 1:
-====== Transformer-based AC/DC converters ====== 
  
-The most common and inexpensive plugpack power supply type you'll see is the chunky transformer based plug. Whenever you buy some consumer electronics you'll be getting one of these 
- 
-{{http://​www.ladyada.net/​images/​metertutorial/​wart_t.jpg}} 
- 
-Before we talk precisely about these guys, lets go back in time to when engineers had to build their power supplies with their bare hands! 
- 
-====== The good old days! ====== 
- 
-Back a couple decades ago, the only way to build a power supply was to start a big chunky 120VAC/​12VAC transformer. The transformer was used to bring the high voltage from the wall down to a less dangerous level. Then diodes and capacitors were used to turn the AC into DC. 
- 
-===== Transformers ===== 
- 
-{{:​tutorials:​learn:​powersupply:​xformtop_t.jpg}} 
- 
- We aren't going to get into the heavy detail of the electromagnetic theory behind transformers except to say that they are made of two coils of wire around a chunk of iron. If the number of coils are the same on both sides then the AC voltage is the same on both sides. If one side has twice the coils, it has twice the voltage. They can be used '​backwards'​ or '​forwards'​! For more detailed information,​ be sure to [[http://​en.wikipedia.org/​wiki/​Transformer|check out the wikipedia page]] 
- 
-{{:​tutorials:​learn:​powersupply:​xformpri_t.jpg|}} 
- 
-To use it, one half would get wired up to the wall (the '​primary'​ 'high side'​) ​ 
- 
-{{:​tutorials:​learn:​powersupply:​xformsec_t.jpg|}} 
- 
-and the other half would output 12V AC (the '​secondary'​ 'low side'​). The transformer functioned in two ways: one it took the dangerous high voltage and **transformed** it to a much safer low voltage, second it **isolated** the two sides. That made it even safer because there was no way for the hot line to show up in your electronics and possibly electrocute you.  
- 
-We'll use a schematic symbol to indicate a transformer,​ its two coils inside which are drawn out, the schematic symbol will have the same number of coils on either side so use common sense and any schematic indicators to help you out in figuring which is primary and which is secondary! 
- 
-{{:​tutorials:​learn:​powersupply:​xformsch.png|}} 
- 
-===== Half wave rectification ===== 
- 
-Now that the voltage is at a non-electrocutey level of around 12VAC it can be converted into DC. The easiest and cheapest way to convert (also called **rectify**) AC to DC is to use a single diode. A diode is a simple electronic '​valve'​ - it only lets current flow one way. Since AC voltage cycles from positive to negative and we only want positive, we can connect it up so that the circuit only receives the **positive half** of the AC cycle. 
- 
-{{http://​www.ladyada.net/​images/​parts/​1n4001.jpg?​350}} 
- 
-You'll want to use a [[http://​www.ladyada.net/​wiki/​partfinder/​diodes#​power_blocking|**power diode** such as a 1N4001]], they'​re extremely common and can put up with a lot of abuse. The side with the silver stripe matches the schematic symbol side that the '​arrow'​ in the diode symbol is pointing to. Thats the only direction that current can flow. The output is then chopped in half so that the voltage only goes positive 
- 
-{{:​tutorials:​learn:​powersupply:​halfsch.png?​500|}} 
- 
-This will convert 
- 
-{{:​tutorials:​learn:​powersupply:​ac.png?​500|}} 
- 
-into  
- 
-{{:​tutorials:​learn:​powersupply:​halfwave.png?​500|}} 
- 
-What we have now isnt really AC and isnt really DC, its this lumpy wave. The good news is that it's only positive voltage'​d now, which means its safe to put a capacitor on it. 
- 
-This is a 2200 microFarad (0.0022 Farad) capacitor, one leg has (-) signs next to it, this is the negative side. The other side is positive, and there should never be a voltage across is so that the negative pin is '​higher'​ than the positive pin or it'll go POOF 
- 
-{{http://​www.ladyada.net/​images/​parts/​2200uf.jpg?​300}} 
- 
- A capacitor **smoothes** the voltage out, taking out the lumps, sort of how spring shocks in car or mountain bike reduce the bumpiness of the road. Capacitors are great at this, but the big capacitors that are good at this (electrolytic) can't stand negative voltages - they'​ll explode! 
- 
-{{:​tutorials:​learn:​powersupply:​halfwavecapsch.png?​500|}} 
- 
-{{:​tutorials:​learn:​powersupply:​halfwavecap.png?​500|}} 
- 
- ​Because the voltage is very uneven (big ripples), we need a really big electrolytic-type capacitor. How big? Well, [[http://​en.wikipedia.org/​wiki/​Ripple_%28electrical%29|there'​s a lot of math behind it which you can read about]] ​ but the rough formula you'll want to keep in mind is: 
- 
-       ​Ripple voltage = Current draw / (Ripple frequency) * (Capacitor size) 
- 
-or written another way 
- 
-       ​Capacitor size = Current draw / (Ripple frequency) * (Ripple Voltage) 
- 
-For a half wave rectifier (single diode) the frequency is 60 Hz (or 50 Hz in europe). The current draw is how much current your project is going to need, maximum. The ripple voltage is how much rippling there will be in the output which you are willing to live with and the capacitor size is in Farads. 
- 
- 
-So lets say we have a current draw of 50 mA and a maximum ripple voltage of 10mV we are willing to live with. For a half wave rectifier, the capacitor should be **at least** = 0.05 / (60 * 0.01) = 0.085 Farads = **85,000 uF**! This is a **massive** and expensive capacitor. For that reason, its rare to see ripple voltages as low as 10mV. Its more common to see maybe 100mV or ripple and then some other technique to reduce the ripple, such as a linear regulator chip. 
- 
-===== Full wave rectifiers ===== 
- 
-One thing that can be done to reduce the ripple/​capacitor size by half is to use a full wave rectifier instead of a half wave. A full wave rectifier uses 4 diodes arranged in a peculiar way so that it both lets the positive voltage through **and** manages to 'flip over' the negative voltages into positive 
- 
-{{:​tutorials:​learn:​powersupply:​fullsch.png?​500|}} 
- 
-So now we get:  
- 
-{{:​tutorials:​learn:​powersupply:​fullwave.png?​500|}} 
- 
-As you can see, there are twice as many humps - there isnt that "half the time, no voltage"​ thing going on. This means we can divide the calculated capacitor size to half of what it was in the previous. ​ 
- 
-{{:​tutorials:​learn:​powersupply:​fullwavecap.png?​500|}} 
- 
-Basically, a full wave rectifier is way better than a half wave! So why even talk about half-wave type rectifiers? Well, because they'​re useful for a few other purposes. In general, you're unlikely to see an AC/DC converter that uses a half wave as the cost of the diodes makes up for the saving in capacitor size and cost! 
- 
-===== The transformer AC/DC in practice ===== 
- 
-[[http://​www.flickr.com/​photo_zoom.gne?​id=1280805698&​size=l|{{ http://​www.ladyada.net/​images/​metertutorial/​wartdetail.jpg?​nolink |}}]]  
- 
-OK now that we've reviewed transformers,​ diodes when used as rectifiers and big capacitors, lets look at that chunky plugpack again. This time, we'll look inside by cutting it in half! This power supply is rated at **9VDC @ 200mA** 
- 
-{{:​tutorials:​learn:​powersupply:​xformerpack_t.jpg|:​tutorials:​learn:​powersupply:​xformerpack.jpg}} 
- 
-We can pull it out completely to see the circuit board parts 
- 
-{{:​tutorials:​learn:​powersupply:​xformerpack2_t.jpg|:​tutorials:​learn:​powersupply:​xformerpack2.jpg}} 
- 
-Wow so this looks really familiar, right? From let to right, you can see the wires that come into the transformer from the wall plug, the transformer output has two power diodes on it and a big capacitor (2,200uF). You might be a little puzzled at the **two** diodes - shouldn'​t there be **four** for a full-wave rectifier? It turns out that if you have a special transformer made with a '​center tap' (a wire that goes to the center) you can get away with using only two diodes. So it is a full wave rectifier, just one with a center-tap transformer. 
- 
-These transformer-based plug-packs are **really cheap** to make - like on the order of under $1! 
- 
-So now we will take a fresh power supply (don't use one you sawed in half, of course) and measure the output voltage with a multimeter. 
- 
-{{http://​www.ladyada.net/​images/​metertutorial/​maswart_t.jpg|http://​www.ladyada.net/​images/​metertutorial/​maswart.jpg}} 
- 
-Yow! 14V? That's not anything like the 9V on the package, is this a broken wall wart? No! Its totally normal! Transformer-based wall adapters are not designed to have precision outputs. For one thing, the transformer,​ if you remember, is made of coils of wire. The coils for the most part act like inductors but they still have some small resistance. For example, if the coil is 10 ohms of resistance, then 200 mA of current will cause V = I * R = (0.2 Amps) * (10 ohms) = 2 Volts to be lost just in the copper winding! Another thing that causes losses is the metal core of the transformer becomes less efficient as the amount of current being transformed increases. Also, there is going to be more and  Altogether, there are many inefficiencies that will make the output fluctuate. In general, the output can be as high as **twice** the '​rated'​ voltage when there is less than 10mA of current being drawn. 
- 
-Lets look on a scope: 
- 
-With no current being drawn on the supply, the voltage is about 14V 
- 
-{{:​tutorials:​learn:​powersupply:​150ohm.jpg?​320|}} 
- 
-When I connected a 100 ohm resistor (110 mA draw), it dropped to 11.2V 
- 
-{{:​tutorials:​learn:​powersupply:​100ohm.jpg?​320|}} 
- 
-Connecting a 60 ohm resistor (~160 mA draw), it goes down to 10.3V 
- 
-{{:​tutorials:​learn:​powersupply:​60ohm.jpg?​320|}} 
- 
-With 35 ohms (230 mA draw) the voltage plummets to 7.7V! 
- 
- For example, with this adapter it means that when drawing 300mA, the voltage is guaranteed to be higher than 9V. 
- 
-Since the output is unregulated,​ the voltage supplied will droop as more current is pulled from it, which means that open-circuit (connected to nothing) the measured output can be as high as 14V. 
/home/ladyada/public_html/wiki/data/pages/tutorials/learn/powersupply/transformeracdc.html.txt · Last modified: 2016/01/28 18:05 (external edit)