Understanding Pulse Width Modulation - Part 1

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back guys it's been quite a while since we've done an educational video and I thought it would be good to do something about pulse width modulation because you see that stuff everywhere not just in automotive but it's everywhere it's in commercial industrial it's used controlled motors solenoids heater circuits you name it is pretty much everywhere so let's do a video about it and break this down and let's see what this PWM is all about alright guys I'm sick of this a little bit of time here this is probably going to be a little lengthy video but if you stick with it you learned know everything there is to know about PWM alright PWM is a process of where you have two states basically you could take them as digital having two states you're going to have a zero volts and you're going to have a supply of bolts and as five volts can be your battery voltage it can be your charging voltage they give you 24 volt DC it does not matter so you have zero volts and your supply volts now in this case I'm using 10 volts DC makes our calculation is a little bit easier to understand but keep in mind that voltage can vary now there's two different ways that you can switch basically the supply volts and the ground all right and it's basically you're going to get an antelope voltage from these two states and from that we're going to call that pulse width modulation I so for this one on the first circuit here you can see that I have a push button in here and you can see that I have it in the positive side so this is going to be a positive side switch circuit and this is a light bulb over here and over here I have a voltmeter that voltmeter is connected up over here right across basically right across the light bulb right you can see I have this he is going to go to ground and that's difficult if we're talking about a car all right now if you look over yo this circuit this is a negative switch side here we have the push button and now it's in the negative side of the circuit all right and you can see that the voltmeter is hooked up on the negative side of the light after the push-button and the other side again goes to ground just as it does over here on the positive side now let's take a look at this one here first the positive side switch now let's look at the voltmeter right now in this position this here is the normally open push-button now this could be a switch typically in some transistor in silence and ppm with some kind of controller right now it's open so if I was a look at this voltmeter what would I read I've read 0 volts so we look like down here we get 0 volts this is going to be on 0 and then up here we're going to get our 10 volts now I push the button now it's going to go up it's going to rise to 10 volts what's it going to do I'm I hold the button in for so long I have my 10 volts then I will let go of it then it's going to drop back down to 0 and let's say I push this button off and on off and on and so I can repeat this pattern this is what I would get and then on how fast I would open and close that push buttons okay there's two things we need to know we have a time this this is being known that's when I push the button and then we have a time of where is off now when I push the button on up here push it down and closes a circuit I get my voltage so this up here at the top is going to be cold and let me just put it let me put it over here this part up here is going to be my time that its own okay now this is when I push the button now when I let go to the button now it's going to drop back down so it's here in here my time that when it's off okay all right now it's important that you got to know which one of these circuits that you're using when you're going to figure out some of this stuff again this is probably the side switch and you can see that the own time is going to be at the top the off time is going to be down on the bottom now let's take a look at this one over here right now I'm looking at it I have my voltmeter hooked up as you see here and right in this state when it's off I'm not pushing the button what does my voltage going to be well it's going to be 10 volts and the reason for that is is the positive here is coming on down the line it's going through the filament of the bug and now I have my 10 volts sitting here and my voltmeter is actually measuring that 10 volts so right now by me not pushing the button this is my time off now I'm going to push the push button now it goes down to zero volts okay so over here zero volts that's when I push the button now I'm going to keep pushing the button and it's going to stay on for so long in a know how long I push the button and now this is going to be called my time only I let go of the button it rises back to the supplier volts of 10 and I'm just going to push it release the button and then I'm going to get this waveform okay all the pending on how long are opening closed and push the button an important thing to recognize in here that if you have a positive side switch you can see that your time old it's going to be at the top your time off is going to be at the bottom where on the negative side switch your time off is going to be at the top and your time old is going to be at the bottom now most of the solenoids and things on the on the car most of them is negative side switch but you need to verify that because some of the things or positive side switch so you need to verify that you can do that by looking at the diagram now I mentioned that you can get a analog voltage which can vary from zero volts to your supply bolts and it depends on the own time in relation to the period of the waveform now we're going to go over that now first let me put up what the equation is to calculate duty cycle and we're going to break this here down and we'll make it simple not really much to it the duty cycle and you heard that before you know you'll watch some videos somebody said well there's 50% duty cycle it's 20 percent or is 80 percent or whatever the duty cycle is equal to the time on divided by the time on plus the time off times 100% ok now let's break this all down let's see let's go back to a little waveform now I'm going to draw one up you already saw what we had okay I'm going to use a ground side switch alright now remember if this ground side switch this is the time that it's own is that the bottom right the time that is off is up here at the top okay now let's say I'm looking for the time that is off and let's say that it is oh I don't know this make up some number here let's use let's say let's say is for many sends its own for 4 milliseconds okay so this down here is time on okay now what is that time off okay now let's make this one up let's make this one the B say I don't know let's see 1 milli second that's not the scale right they've got to make it a little bit better maybe there'd be like maybe a little bit like that maybe so let's try to get it in perspective here okay and we're going to say that this up here right this is that time this is off and this is going to be time off we're going to say that's one minute second okay all right and let me write down here that this is a switch making it we're switching to the negative side okay all right we good so far all right so now we take a time on what is that item oh it's all so many seconds all right so up here I'm going to put up here or milliseconds what's our time on or milliseconds plus time off the time off there's one millisecond times 100% okay and of course this is going to give us our duty cycle and which is going to be in percent all right now we got four milliseconds right and that's going to be for one that's five milliseconds okay times 100% many seconds cancel out 5 into 4 is going to give us point 8 times 100 cent so I do this cycle which is in percent is equal to 80 percent okay got on that simple it's nothing - all right it makes more room here let's take a look at this right here let's go back to the wave form now let's say that right here at the starting of that pulse right there this is leading edge of this pulse it goes up it stays off for a millisecond drops back down that comes always stays on for milliseconds now it starts back up at that point right there where this here the next course starts right over here okay from there to here that's one cycle of this here pulse train that is equal to time off plus the time own that is equal to what's called a period a period is the time of one cycle of a waveform okay now knowing that we can calculate what the frequency of this pulse train is all right so let's go over here we want to know what the frequency is this is some frequency is equal to one divided by time which is in seconds so now if I take and I want to know what is the frequency at time seconds this is the period okay and this is the time off plus the time own which will give us that one cycle well we look at one millisecond right there's that time plus this time here that puts us back from salt to the start that gives us a total time of five minutes seconds now if we take that that's going to be equal to five point zero five seconds when we divide that out we will get 200 Hertz let's say that we want to figure out what is that voltage based off of a duty cycle what if we know I do your cycle but we don't know where the vulture to be all right let's figure that out let's say that we going to start out we're going to have a mortgage out okay this is what we're trying to figure out and we're going to say that time home if you've already seen divided by time on plus time off okay and then instead of the times 100% okay we're going to put in times voltage P now the voltage in is your max supplied bolts that should be plus now you have to know what that is and let's say you know indicates that I have with examples I'm showing let's say it's 10 volts okay we're going to keep all this simple and use of examples we already presented right now if you remember our time on was for many things okay now a time home first time off is 5 milliseconds now what was that bolt again that's my max of 5 volts that was 10 volts okay all right now we can see the 5 into 4 is going to be point 8 times 10 all right that we multiply that out we can see that we're going to get eight boats okay so for that eighty percent duty cycle that we had we're going to get eight boats out all right so now you can see there's a proportion here it's all about a ratio time on to the time off this time oh of course which is equal to the period that we already discussed okay now let's get to let's get to the last part here let's say that you measured the voltage digital meter and you know what your supply volts is and from that you want to calculate what your duty cycle is alright so it's simply all we have to do as you can see that it's a ratio right one thing you know it based on another quantity alright so now let's say we have a supply volts in my case involves now when we know we got 10 volts we know we have 100 percent duty cycle okay so we're going to write down 100 percent so we know those two go together and now they're going to be equally equal to right we measured we measured 8 volts let's then we measured 8 volts now we know we should get 80 percent duty cycle because we already figured that out so I tend bolts with slide across so it would be eight folks up to here right and then on the bottom well we don't know what our duty cycle is that's what we're trying to figure out now if we take 10 volts times X because are your 10 V X cross multiply right cross multiply here now I'm going to be equal to 8 be 100% okay now I want to solve for X so to get rid of ten B I'm going to divide both sides of the equation by 10 B so I'm going to divide this side by 10 V and I'm going to buy this side by 10 V okay now my 10 B's cancel out leaving me with X on this side okay now my fees are going to cancel out my voltages you just going to cancel out and that's going to leave me with 8 over 10 okay now we already said that this is this is a 10 all right we say that point 8 now we're left with 100 percent which is times 100 percent now if I take point 8 and multiply it times 200 I want to shift my decimal point two places to the right and I'm going to drop the decimal and then I'll be left with percent so that's going to give me 80 percent okay that's pretty much it guys that's pulse width modulation in a nutshell so you can see how the correlation is about how everything is in proportion to the duty cycle so you can get any kind of analog voltage that you want out from 0 volts up to your supplies volts just by changing the amount of time that the load is on and of course now the load can be switched on the ground side or it can be switched on the positive side well there you go guys pretty simple right so now you know everything about pulse width modulation so when you hear that term comes up again now you know everything about it you're not a calculated you're nice to ride and like I said issues everywhere and you can see that it's nothing but a proportional value that you're going to get out and analog value between two states 0 volts your supply of volts and you can get that value out by just varying the percentage of time that the own time use a relation to the period which is the time off plus this time on one cycle all right guys that's going to wrap it up and hopefully have been maybe the next video we can take and do it a practical example we'll get out there on the car I see go ahead forward escape I haven't forgot about it in fact this already fixed just been running for weeks no problem and so we're tied out in a little bit maybe with the idle air control valve and then we can see how these examples here can be applied to the real world and you guys take care we'll see you in the next one
Info
Channel: stuzman
Views: 38,162
Rating: 4.8709679 out of 5
Keywords: Pulse Width Modulation, PWM, freqency, period, cycle
Id: BLCSxkBvL2k
Channel Id: undefined
Length: 20min 0sec (1200 seconds)
Published: Sat Jul 08 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.