#772 Basics: Switching Power Supplies (part 1 of 2)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
okay um got a lot of good comments from the power supply series i did uh so i thought i would do a series on switchers uh this is switching power supplies and uh they look quite complicated but the basic idea of them is similar all across the board so i wanted to find a a switching power supply that we could uh go through together and understand um this one is not it so i looked around on uh probably ebay and i found this little guy which is super cute he is a 12 volt 2 amp now if you go into ebay and look for switching power supplies a lot of times will be one vendor who's like sells like 24 different types of power supplies you just tell it which voltage you want what current you want you want a single output double output all kinds of stuff and they're super cheap you know even the big fancy ones are like 20 bucks this is a little tiny one this one is a 12 volts at 2 amps and i thought that would be a good one to uh a good one to go through and they all look very similar they're in these bent metal metal cages and they're actually quite nice for the and they're super cheap i mean they're super cheap and they they seem to they seem to hold up okay but i found this one so this is the one that we're going to be going through uh this one is a ac input 100 volts 240 volts plus or minus 15 percent dc output 12 volts at 1.25 amps so one and a quarter amps and uh yeah so uh what i want to do is we'll open this one up take a look at it we will reverse engineer it we will draw a schematic for it and then we'll go through the schematic and i'll try to instruct everyone on how switching power supplies work and once you get the basic ideas then you can apply that to maybe maybe a bigger one now this one's fancy this one is a 5 volts at 12 amps yeah 12 amps pretty heavy duty so it's got a lot beefier components it's got a fancier input section and stuff but the way that this operates is going to be exactly the same as the way this operates so so let's get started let's uh let's open this thing up and uh and uh see what's inside okay so the uh the top just pops off it's just uh held in there by friction and then there's one screw and you take that screw out and then the uh circuit board will come out okay so this is all just uh metal and it's not used as a heatsink uh it doesn't do anything at all it's just a rf shield uh i suppose and uh more importantly uh so you don't get your fingers in there and get electrocuted so uh so this is the board let me uh let me get rid of these things all right so this is gonna be the circuit board and it looks pretty simple not strange my camera my camera timed out i i don't know why it shut down anyway um let's um let's start drawing the circuit uh there's not much of the pc board it's a single sided pc board so it's easy to see the traces and easy easy to see where things go so let's start let's start drawing a schematic for this thing and then i think we'll have a better understanding of of how what how things get from one side to the other side okay let's take this a step at a time so i've traced out the front end of the circuit uh about that oops about that much of it okay um the bridge rectifier and this uh capacitor and the fuse and then the connection here okay so that looks like this the ac comes in it goes into the bridge rectifier all of the all of the positive things go in the positive direction all the negative things go in the negative direction so we end up with this capacitor here and we have a pretty nice capacitor uh let's see what value it is it is a 10 microfarad but at 450 volts so lots of volts there so let's go ahead and turn it on let's measure the voltage that we get here we can measure the ac voltage coming in and we can measure the dc voltage coming out okay so let's go ahead and let's go ahead and do that okay let's uh let's turn it on uh we do go to we do get a green light i think we can just oops let me move this up uh i think you can see the green light down here so it is working and in fact let's measure the output since we're here uh let's go ahead and measure measure the output and we're getting 12 volts out pull that output i guess minus over this direction we're getting uh 12.1 volts 12. oh it volts out that's good okay so let's take a look at the input we'll go to ac on our meter we'll measure the ac so be careful about this uh so we're measuring 119.4 volts input so that's the ac coming in and then it's going to go through this bridge rectifier and it will get rectified so we'll go to volts and i know that ground is right here and plus is right here [Music] and i don't want to zap myself there so we are measuring 164 volts okay 164 volts all right so let's write a couple of these things down turn this off so i don't zap myself all right so we have 164 volts volts dc they had 119 volts ac coming in all right so 164 volts all right so the next thing we're going to do is we're going to take our ac we turned it into dc now we're going to take the dc we're going to turn it back into ac again okay so the next part of our circuit now looks like this okay it's a transformer so we have ac on this side which means we have ac on this side and then it gets rectified instead of a fancy bridge rectifier it's just a single rectifier and we will have a dc voltage again all right and so how do we generate ac volts here now if you watch my series on dc to dc converter okay you can bring this down and you can uh short these together out remember when i tap the wire you go go here and you go tap tap tap tap tap tap tap and that would create a an alternating signal here which would cause an alternating signal here which would get rectified and cause a dc over here all right so how do we do this well we're going to use a fancy chip okay and so we have it we have a fancy chip to do that i won't draw it in yet one of the things though that the circuit has that we have to explain is whenever you have a coil and you let it go it's going to generate what's called back emf it's going to generate a negative pulse remember when we when i did the tap tap it created that big spike well we're going to get a spike here we're going to get good current flow but then when we release it we're going to go we're going to get a big spike and we have to we have to kill that spike and we're going to put a a lot of times you'll see this off of on motors or on solenoids and stuff on relays very often you'll have a diode a reverse diode uh across the uh across this winding now they do have a diode in there but they made it a little fancier they went ahead and they put a resistor here too to limit the current okay and so they have that going like that going across there and then they got even a little fancier than that and they said well we want to limit the current but we don't want to slow it down and so we're going to put a capacitor here that will be really good at taking off the edges it will allow large currents to flow but only on really really high frequencies only on that sharp edge as soon as we get rid of that high frequency sharp edge we'll let this resistor do its job and this this will be our snubber circuit right so that's what they have in there so that's what that is all right so now we have need some way of uh tying this to ground and pulsing it on and off okay and so if we take a look at our circuit now we've explained where's where's my pointer we've explained all the input and we've explained the uh snubber circuit over here and now uh we're we end up with an ic there's an eight pin ic here and here's our transformer okay transformers here the transform has its diode which is down here that's this diode and it has its capacitor and in this particular design it actually has two capacitors so they did that to make the capacitor bigger right so that's what that's what these two capacitors are these two here are those two so we almost have the whole thing already but okay so we have an ic that's going to do all the magic the ic is going to have an fet in it that does the pull down it's going to be pulsing this thing but it also is going to have the feedback loop and it also is going to have the oscillator remember i had a 555 timer that was going and then we had some circuit that said you know don't tick or tick right and we had some kind of feedback and that's all going to happen in this ic so this ic is made for this purpose so let's go ahead and draw that in next so i've drawn in the circuit it's an eight pin device okay so this is pin one two three four five six seven eight pins seven and eight are tied together and they have this fet that's inside and that fet is going to pull down on this coil and to ground so it's going to complete the circuit right this will be the the circuit here and it'll go tap tap tap tap so this will be doing the tapping this this uh built-in fed okay now some uh power supplies like like these big beefy ones they'll have external power power transistors because they're really really big and they need to be big but this one this is good enough for one or two amps and so it's built into the built-in vic but it has that transistor in there okay it also has the oscillator has a whole bunch of other things now to make this thing work you have to put a you have to put a capacitor here and then the only other thing is this pin so this is not used and this is not used and this is not used but this is going to be the feedback this is the one that tells it whether you're too high or too low that's going to be our feedback so we'll draw that in later but you get the idea now uh that we have dc now we're going to turn it back into ec back into ac by having this transistor and going and then we're going to then turn it back into dc again this way and these will actually go to the outside so that is actually this little green connector on the back and this is our our plus connection and this is our minus connection so this is where we're going to get our 12 volts okay 12 volts over here all right so we basically have the whole circuit now um there's very little else except for this feedback okay we need to figure out how to do this feedback and we have to be very careful because we have really high voltage things over here we have very low voltage things over here so we don't kind of we don't really want to connect them together remember this is 164 volts over here and we want to we want to isolate those so we want to isolate those so how do you isolate something well you can use an optocoupler okay so this here what it needs to do is you need to pull down on this wire in order to regulate and so we're going to come and we're going to put in a transistor okay so this is what the uh this is what the circuit needs all right and then they want to uh make that nice a nice voltage a nice smooth voltage as well so they put a capacitor here okay so this is how you regulate this guy with this right all right but this we can put in an optocoupler okay this can actually be light a light photodiode okay an opto an opto opto transistor up and the way that it works is there's a led over here and that led outputs its light so when the led is on the transistor is on okay and so we can control over here and it turns it into these optical signals and that'll control over here so that's how they isolate the two halves they use an optocoupler okay so the optocoupler there's my pointer all right so the this is the ic the the dka can i zoom in on that's all i can do uh this is the dk1203 and this is the optocoupler right here this is the optocoupler has four pins uh two pins here and two pins here so the diodes over here and the transistors over here so that is the optocoupler all right so now all we have to do now is figure out how do we get the right signal how do we tell this guy he's either too too big a voltage or too little of a voltage and so let's figure out how to do that right all right so this is the data sheet for the controller chip and they give a sample circuit here and this sample circuit looks almost identical to our circuit it's pretty much identical on the left hand side on the high voltage side it's a little different on the low voltage side but they tell you how to use this optocoupler here's the led part of the optocoupler and here's the phototransistor part of the optocoupler and so we've already drawn this in but this is how they turned on and off their led and monitored the voltage so they wanted to monitor they wanted to regulate to 12 volts and so they used an 11 volt zener all right so if this voltage gets high enough it needs to get above 11 volts and it needs to get above the forward voltage of the led so let's say the led is a one volt forward voltage and then you have 12 11 plus one is 12 you'll get current flow in the system and that led will turn on so the higher you go the brighter that led will become and if that led becomes very very bright then it will turn on that transistor in the optocoupler right this is part of the optocoupler there's a there's a transistor over here remember and so if it gets too bright it turns this on harder and harder and that will tell the modulator the the controller that has the tickle tickle tickle thing to stop right you're getting too much voltage and that's the way it will modulate it does a pulse width modulation scheme and that's how it will regulate by this method so this is quite easy to understand right 11 volts if it's bigger than 11 volts and bigger than the forward diode then it's turns on and you can imagine how this how this works right but it's a little hard to adjust right you kind of would like to have maybe an adjustable zener here or something right and that's just too hard to do so they came up with a clever circuit and the circuit's a little bit complicated but if you remember in i don't remember which video it was in i talked about a tl uh 4 431 and it was a funny part it looked like a zener diode but it had a control pin on it okay and it was like two and a half volt device it wanted it wanted this control voltage to be two and a half volts this was ground and this was two and a half volts if you tie these together the output would be two and a half okay but if you put a divider here if you put a resistor here and a resistor here and these were both the same resistor then you'd get five volts out here it did whatever it needed to do in order to get this two and a half volts and so this particular circuit uses a a tl431 now that's a very very stable part and so you have a good voltage reference in order to control this so this will be able to be tuned in very very accurately and we'll draw this ricket and i'll show you how that works okay so we're going to use this part in a little bit of a strange way we are going to use that control pin and we need to put two and a half volts on that control pin okay and we're going to be monitoring our 12 volts okay so we need a resistive divider that gives us two and a half volts now if this two and a half volts gets a little too high it will it will start drawing current through this device and if it glows below two and a half volts then it will stop current in this device so that's the way this is that's the way this is going to operate so you can see that we're going to have this divider on our 12 volts and we're going to be able to set this two and a half volts in fact one of these is going to be a potentiometer and that's right down here that sets our voltage we can adjust it and that will be here so this resistive chain all its function is to take our 12 volts and regulate it to two and a half and do that by adjusting this resistance divider once we have our two and a half volts now we have this section here where we either have current or we don't have current and guess what we can put in our our led in this chain so if this thing starts to conduct current our led will turn on okay and so that's what the circuit looks like so let me let me see if i can draw in the circuit okay i didn't draw it the best way i could uh but i did fit it on the page and it's not too important to understand exactly how this thing works it's what's really important to understand is that this is how the regulation happens that you somehow you turn this led on it turns this transistor on and this thing stops pulsing right and so the way that we're going to do that we're going to set up this uh voltage chain here this goes up to the 12 volts so we have these two resistors and then a potentiometer and that allows us to fine tune this two and a half volts and then the led has a little resistor in it i think it's a 470 ohm or something like that and then it goes through the led and then through this uh tl 431 and then to ground so that's how the led gets turned down so that's it um there's only one other thing in the circuit and that is that there is an on led and there is a led in there uh oops plus 12. the led goes in this away and goes to ground okay so there's an led and that is all that is on this board okay uh well there's one part left one part left okay okay but everything else we've we've actually covered everything on the on the board now except for this one blue blue capacitor and we'll talk about it later so so i hope you understand everything now ac comes in it gets into a high ac and then we're going to turn it into 12 volts over here okay so we're going to need you know somewhere around somewhere around 12 volts here and so you can see that if we need let's say this is 16 volts ac here and then we rectify it down to 12 or something we have 160 volts here we have 16 volts on this side so this transformer has to have about a a ten to one wind ratio okay there's going to be ten times more windings on this side than this side and this ten to one uh transformer takes us from this high voltage to this low voltage and so ac dc ac ac dc and then the dc is monitored and then it is communicated to this chip with this optocoupler hey you're either too high or hey you're either too low you know pulse some more because you're too low or don't pulse as much because you're getting too high and that's it that's all there is in this thing um so it's a nice little uh it's a nice little first circuit to look at for uh uh switching power supplies and uh gets you the uh gets you the idea of what's uh what's going on so hope uh hope that helps so we have one component left to go and that is the strange blue capacitor what is that blue capacitor doing in there well that blue capacitor goes right here it goes across the transformer so you can imagine the transformer windings kind of being in proximity to one another right they're all wound around the same core so there is some uh when you put two wires together i showed this in one of my videos i called it a mimic you take two wires and you spin them together you get like a five picofarad capacitor and if you if you look at wires close together they're going to have some capacitance across each other and what does that capacitance do well it lets it lets uh signals pass it lets high frequency signals pass and it also stops any signals that you want to have grounded so if you have ground on one side and you need a high a high high frequency path to ground on the other side it'll it'll short those out that's what this does this height is a high frequency capacitor that allows these high high frequency spikes uh to be snubbed well you can kind of think of this as a snubber too but for it for a different reason um this this this side is going to create a whole bunch of high frequency noise and the high frequency noise uh is going to go every which way and so it's found that by putting this capacitor in here and shorting out any high frequencies between these two coils um you can lower the emi uh radiation of this rfi radiation of this um of this device so without that it it would be noisier it would output more radio interference waves than having that in there so that's why it's in there and it has to be a high voltage capacitor and it has to be ac rated and so they use a y capacitor i don't know why they don't use an x capacitor but they use a y capacitor so y capacitors are used to filter the input from rfi situations also they're generally put on the ac lines to ground so there'd be a capacitor here to ground and a capacitor here to ground you'd have these two ac's that would be a y capacitor and then you could also put one across the two ac's directly and that would be an x capacitor so yeah i don't know anyway that's what that one does i don't really have a good gut feel why it works but that's why it's in there
Info
Channel: IMSAI Guy
Views: 194,779
Rating: undefined out of 5
Keywords: s100, s-100, cpm, cp/m, cpm80, intel 8080, 8080, 8085, zilog z80, vintage computer, vintage computing, IMSAI, IMSAI 8080, ALTAIRTTL CPU, cpu design, eagle cad, eagle pcb, 8-bit CPU, 8bit CPU, diy cpu, 74181, 74381, 74382, ALUZeta, Zeta2, ROMWBW, Zeta SBCelectronic test equipment, vintage electronics, DIY electronics, electrical engineering, electronic engineering, electronics, PCB design, Circuit design
Id: 9bFVTa8FEM4
Channel Id: undefined
Length: 26min 17sec (1577 seconds)
Published: Thu Apr 22 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.