Troubleshooting and repairing Switch Mode Power Supplies

Diode Tutorial & How to build an AC to DC power supply

In this tutorial, I’m going to cover silicon diodes, bridge rectifiers, and how you convert AC to DC. Here’s the schematic symbol of a diode and a picture of the real thing. The little stripe on the end of the diode tells you which way to put it in your circuit But what is a diode? A diode is a device that only allows current to flow in one direction. A helpful way of remembering this is to compare diodes to water valves that only allow water to flow one way. So if you feed an AC voltage or current through a diode, the negative voltage will get blocked off, and you’ll be left with only the positive half of the waveform. This process is called half wave rectification… and it doesn’t have to be with only sine waves. It will also work with square waves, triangle waves, or any other waveform that gets into the negatives. Wait a minute… If you zoom in, and put the waveforms on top of each other, there is a voltage missing! Well that is because there is no such thing as a perfect diode.

All diodes will have what is called a forward voltage drop, or “Vf”. This means that whenever current is flowing forwards through a diode, there will be a voltage drop of usually around volts. The exact number will vary with temperature, current, and the type of diode, but for now let’s just say it is 0.7V So a silicon diode will not even turn on until there is 0.7V across it and after it is turned on there will always be that 0.7V drop across the diode. Check out these examples to see what I mean: With a negative voltage on the input, the diode can’t turn on, so you get nothing on the output.

With volts on the input it is still not enough to turn on the diode, so again you get nothing. With volts on the input it is just enough to turn on the diode but because of the voltage drop you only have 0.2V remaining. And with 10 volts, minus volts, you get volts. Sometimes that forward voltage is a problem… sometimes it is not… For the example I was showing you here with the 10 volts peak to peak on the input it was almost unnoticeable. But if I was trying to rectify 0.5V AC, like the signal coming out of my MP3 player, that 0.7V drop becomes really annoying and things do not work. You have to use advanced techniques like super diodes to deal with it, but you don’t need to worry about that for now. Nothing is ever 100% efficient so let’s talk about power ratings. How can you predict whether a diode is going to melt? Well, the power wasted in a diode is given by Vf x the current flowing through the diode.

So for an ordinary silicon diode with a Vf = 0.7V, with one milliampere flowing, only milliwatts are being lost to heat so it’s no problem. But at 3 amps you are generating watts of heat which is quite significant so you will either have to use a bigger diode or use a diode with a lower forward voltage like a schottky diode. And I’ll cover those in another video. By the way, no matter what anyone tells you, you cannot reliably put diodes in parallel for more current.

What happens is that one diode ends up doing all the work, and the others just end up heat sinking the other diode. The last non ideality that I want to talk about is diode switching speed. The 1N4007 I am using here is designed for low frequency power electronics like the 50 – 60 Hz AC in your home. Now watch what happens when I increase the input frequency. After about 15 kHz the diode becomes useless because it starts conducting backwards. This is because it takes a certain amount of time for the diode to switch between allowing current to move forwards, to blocking any current trying to move backwards. Different diodes will have different switching speeds so if I replace the 1N4007 with a 1N4148 things work nicely all the way up to 100 kHz and beyond. For radio frequency applications you will want diodes that switch even faster. So whenever you are designing something you will have to think about your diode’s maximum rated voltage, the forward voltage, the current rating, and the switching speed.

Always Google the datasheet for the diode you are working with. Okay that is most of the diode theory you will ever need to know. So let’s use diodes to build something. The most common use of diodes is to convert AC to DC, to power the different gadgets that you have at home. I’m going to show you how to build simple unregulated DC power supplies and one of them is very similar to this one I have here. I’ll start with a very simple low current supply and then I will show you how to improve on the design so it can handle heavier loads.

You start out by stepping mains voltages down to a lower, safer AC voltage. I show you how to do that in my tutorial about transformers. With zero load my transformer is giving me a nice clean sine wave of around 39 volts peak to peak at 60 Hz. Now when I add a 1N4007 diode and measure the voltage before and after the diode, you can see the negative voltage gets cut off. Technically I have just converted AC to DC with just one diode because I have eliminated all the negative voltage. But this is not very useful DC is it? Half the time you have a weird hump shaped voltage and half the time you have nothing. So you are going to need a little more stability than that if you are going to power anything useful.

So we add a capacitor here to smooth things out. I’m starting 1 microfarad but the more capacitance the better, because you will have a bigger energy reservoir. That’s more like it! Now I have a perfect DC output of volts. Whenever you are creating a DC supply this is ideally what you want to see on the oscilloscope: a constant stable voltage. Now unfortunately the only reason why things look perfect right now is because I have not put any load on the supply yet. The capacitor got charged up through the diode and right now there is nothing that would ever drain that capacitor. So let’s see what happens when I add a kilohm resistor as a load. Ohm’s law predicts that this should only be a 4 milliamp load (which is very little) but take a look at what happens.

What you are seeing here is that when the Ac input is positive, the diode allows current to flow through, so the capacitor gets charged. But as soon as the input voltage starts dropping off, the diode blocks the backwards flow of current and the only energy source left is that tiny one microfarad capacitor. And as you can see it gets drained quickly even under low loads. So what do we do about this? Let’s increase the size of our energy reservoir so that we have got enough to last us until the next time the input waveform goes positive again. Let’s replace that tiny one microfarad capacitor with a bigger 470 microfarad capacitor and see what happens. Hey that worked really well! Now we have a DC power supply that can handle a few milliamps which is enough to power some sensors and op-amps.

Okay let’s turn it up a notch. With a ten ohm load, this circuit should draw a lot more current. Well that sucks… now we are back to the situation where the voltage is sagging in every cycle. The average voltage is 8 volts, so we are only drawing about amps and the magnitude of the voltage ripple is huge. Imagine trying to power something with this…

The voltage would constantly drop so low it would never even stay on! So even 470 microfarads is not enough anymore as an energy reservoir. One thing we can do now is take the brute force approach and add even more capacitance. So let’s see how the circuit performs with 3400 microfarads. Well… it’s better… Now we are getting an average voltage of around volts so we’re drawing an average of about amps, but we have still got 5 volts of AC ripple which is a lot. Now we can keep adding capacitance infinitely to reduce the amount of sagging between cycles. But for loads of several amps, it just becomes really impractical and expensive. So take a look at this cool trick. If you take four diodes and arrange them in this way, you create what is called a “bridge rectifier”.

It works like this: In the first half of the sine wave, where the top wire is more positive than the bottom wire, these two diodes turn on and allow current to flow forwards. The diodes stay off, blocking any possible reverse flow of the current. Now in the second half of the sine wave, where the top wire is negative with respect to the bottom wire, the other two didoes start conducting, and the other two turn off. So instead of wasting the bottom half of the AC waveform by clipping it and never using it, you just reroute it and flip it around. So on the output you get DC at 120 Hz instead of 60 Hz. And just like before you can filter it with capacitors to get a nice smooth voltage. You can buy premade bridge rectifiers but it is also easy to build them yourself. Here is my bridge rectifier connected to my transformer. I made it out of four 1N4007 diodes and it cost me about 4 cents. Take a look at how the voltage used to go from positive to negative at 60 Hz, and now it never drops below zero volts, and instead we get these positive constant voltage bumps at 120 Hz.

This is called full wave rectification because we are rectifying the full AC wave. Now let’s go back to our bread board with the ten ohm load and see how the bridge rectifier performs with 470 microfarads of capacitance compared to the single diode solution that we made earlier. Now we get an average of volts instead of the 8 volts we were getting earlier with a single diode. And you can see that is because the bridge rectifier is charging the capacitor twice as often, because we are using both halves of the 60 Hz mains AC cycle. Now think about how much difference that made given that those extra diodes only cost me three cents.

Bridge rectifiers might be a little harder to understand, but since they work so well, everybody uses them. Now let’s compare the single diode with 3400 microfarads to the bridge rectifier with 3400 microfarads. Now we’re getting an average of volts instead of volts and we only have about one or two volts of ripple. In other words, the combination of a bridge rectifier with high amounts of capacitance, can turn almost any high current AC supply into a useful high current DC supply. Just keep in mind that your diodes and capacitors have to be rated for the voltages you are working with. So what we have now is basically the same thing as what is inside those cheap little unregulated AC to DC power supplies that are used to power radios, clocks, and other gadgets around the house.

You could make a 9 volt version and it could power an old Sega Genesis or Super Nintendo. The final thing that I want to highlight is that these are all unregulated DC power supplies. This means that even though we have successfully smoothed out a lot of the voltage ripple, we will still have the problem of the average voltage changing under load. With no load it is volts. And for 1 amp loads you get 13 volts. Now for some circuits it won’t matter if they are designed to work with a wide voltage range. But for things like microcontrollers and other digital electronics they will want a voltage source that is very precise, and for that you will need to create what is called a regulated voltage supply.

And I’ll cover voltage regulators in another video. In the meantime, now you know what diodes do and how to convert AC to DC. .

Troubleshooting and repairing Switch Mode Power Supplies
LCD Monitor Repair Secrets
Electronic Repair Information

Check Also

How to Restore Headlights PERMANENTLY

Hey guys, ChrisFix here today I am going to show you how to restore your …