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
tutorials:learn:powersupply:transformeracdc.html [2010/10/26 00:51]
ladyada
tutorials:learn:powersupply:transformeracdc.html [2016/01/28 18:05] (current)
Line 37: 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. That'​s ​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 49: Line 49:
 {{:​tutorials:​learn:​powersupply:​halfwave.png?​500|}} {{:​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.+What we have now isnt really AC and isn'​t ​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 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
Line 55: Line 55:
 {{http://​www.ladyada.net/​images/​parts/​2200uf.jpg?​300}} {{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!+ A capacitor **smooths** 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:​halfwavecapsch.png?​500|}}
Line 63: Line 63:
  ​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:  ​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)+       ​Ripple voltage = Current draw / (Ripple frequency) * (Capacitor size)
  
 or written another way or written another way
  
-       ​Capacitor size = Current draw / (Ripple frequency) * (Ripple Voltage)+       ​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. 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.+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 of 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 92: Line 94:
 ===== The transformer AC/DC in practice ===== ===== 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 ​|}}]] +{{: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 102: 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!
Line 112: Line 114:
 {{http://​www.ladyada.net/​images/​metertutorial/​maswart_t.jpg|http://​www.ladyada.net/​images/​metertutorial/​maswart.jpg}} {{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.+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 ===== ===== Let's look in detail =====
Line 143: Line 145:
  
 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. ​ 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.  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 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.+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/attic/tutorials/learn/powersupply/transformeracdc.html.1288054275.txt.gz · Last modified: 2016/01/28 18:05 (external edit)