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

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
tutorials:learn:powersupply:transformeracdc.html [2010/10/25 23:58]
ladyada
tutorials:learn:powersupply:transformeracdc.html [2010/10/26 16:07]
ladyada
Line 4: Line 4:
  
 {{http://​www.ladyada.net/​images/​metertutorial/​wart_t.jpg}} {{http://​www.ladyada.net/​images/​metertutorial/​wart_t.jpg}}
 +
 +These guys are **everywhere** - all sorts of voltage and current ratings. They'​re available for sale at any store just about, but there are some big things to watch out for! One is that the output voltage is not going to be 9V (for example) out of the box, that voltage rating is just the minimum output for the current rating (200mA for example). And also, the output is going to have a lot of ripple on it!
  
 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! 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!
Line 35: Line 37:
 {{http://​www.ladyada.net/​images/​parts/​1n4001.jpg?​350}} {{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+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|}} {{:​tutorials:​learn:​powersupply:​halfsch.png?​500|}}
Line 71: Line 73:
  
 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. 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.
 +
 +You don't have to measure that formula, but you should keep the following in mind: When the current goes **up** and the capacitor stays the same, the ripple goes **up**. If the current goes **up** and you want the ripple the same, the capacitor must also **increase** ​
  
 ===== Full wave rectifiers ===== ===== Full wave rectifiers =====
Line 90: Line 94:
 ===== The transformer AC/DC in practice ===== ===== The transformer AC/DC in practice =====
  
-{{http://​www.ladyada.net/​images/​metertutorial/​maswart_t.jpg|http://​www.ladyada.net/​images/​metertutorial/​maswart.jpg}}+{{:tutorials:​learn:​powersupply:​9v200ma_t.jpg?300|}}
  
-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**+OK now that we've reviewed transformers,​ diodes when used as rectifiers and big capacitors, lets look at 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}} {{:​tutorials:​learn:​powersupply:​xformerpack_t.jpg|:​tutorials:​learn:​powersupply:​xformerpack.jpg}}
Line 100: Line 104:
 {{:​tutorials:​learn:​powersupply:​xformerpack2_t.jpg|:​tutorials:​learn:​powersupply:​xformerpack2.jpg}} {{:​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.+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 [[http://​en.wikipedia.org/​wiki/​Full_wave_rectifier#​Full-wave_rectification|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 really ​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! 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)+===== Testing the 9V supply... ===== 
 + 
 +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. 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. 
 + 
 +===== Let's look in detail ===== 
 + 
 +Lets look on an oscilloscope,​ that way we can see in detail what is going on. 
 + 
 +{{:​tutorials:​learn:​powersupply:​9vopen.jpg?​320|}} 
 + 
 +With no current being drawn on the supply, the voltage output is about 14V 
 + 
 +{{:​tutorials:​learn:​powersupply:​150ohm.jpg?​320|}} 
 + 
 +When I connected a 100 ohm resistor (110 mA draw) from the positive pin to the negative pin, 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! 
 + 
 +As the resistance gets smaller and smaller, the current draw gets higher and higher and the voltage **droops** (that'​s the technical term for it!) You can also see the ripple increase as the current goes up.  
 + 
 +Now we can at least understand the thinking behind saying "9V 200mA" on the label. As long as we are drawing **less than 200mA** the voltage will be **higher than 9V** 
 + 
 +===== What does this mean for you? ===== 
 + 
 +OK so after all that work, you're wondering why does this even matter? The reason it matters is that everywhere you look are these wall warts that are '​unregulated'​ and thus extremely suspicious. You simply can't trust 'em to give you the voltage you want! 
 + 
 +For example, lets say you have a microcontroller project and it requires 5V power as many DIY projects do. You shouldn'​t go out and buy a 5V transformer supply like the one above and just stick the power output into your microcontroller - you'll destroy it! Instead, you will need to build a 5V regulator like the common LM7805 that will take the somewhere-around-9V from the transformer and convert it to a nice steady 5V with almost no ripple.  
 + 
 +So here is what you should always do: 
 + 
 +  - Always check your power supply brick with a multimeter to see what the maximum voltage is 
 +  - Assume that the voltage can be twice as high as you expect 
 +  - Assume that the voltage will droop as you draw more and more current 
 +  - If you're using a brick for low-power usage, say your circuit draws 100mA max, find one that has a very similar current rating. 
 + 
 +You might be wondering well why on earth doesn'​t someone make a power plug that takes a transformer and some diodes and a LM7805 and that will give you a nice 5V output instead of having everyone build it into the project circuit? While its an interesting idea there are a few reasons they don't do that. One is that the enclosed wall adapter would overheat. Another is that some projects need more than one voltage, say 5V and 3.3V both. But in the end, its probably for manufacturing simplicity. The factory that makes the wall plugs makes 100's of thousands in predictable sizes and rates, each country has plenty of factories to makes the right plug packs for the wall voltage and plug style. The designers of, say, the DVD player have an easier time of it when they can just say "​anything above 7V and below 20V input will work for us" and the plug-pack maker matches them up with the closest thing they already make.  
 + 
 +Nowadays, there are switch-mode power plugs that solve much of this problem. They are thinner and lighter than transformers and have almost no heating problems so they can have precise outputs that don't fluctuate. They are of course much more expensive than transformer-supplies,​ perhaps 5-10x the price, and have a downside that they'​re '​noisier'​ electrically. But, because the parts and assembly cost is going down, they'​re much more popular than they were even 10 years ago. 
/home/ladyada/public_html/wiki/data/pages/tutorials/learn/powersupply/transformeracdc.html.txt · Last modified: 2016/01/28 18:05 (external edit)