Pulse Width Modulation (PWM) - Electronics Basics 23

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello again and welcome to episode 23 of simply electronics basics today we're going to have a look at pulse width modulation or PWM pulse width modulation has many different uses because it allows us to finally control different electronic devices in this case I'm pulse width modulated an LED which means that I'm pulsing the power supply on and off at a certain frequency and with a certain pulse width pulse width modulation allows us to control the brightness of lighting whether that's a standard bulb or LEDs or it allows us to control the speed of motors pulse width modulation also allows us to make very efficient power supplies such as step up step down and regulated power supplies all known as switch mode power supplies the switch mode in the name refers to the pulse width modulation technique now bear in mind that every circuit doesn't run fast enough for me to show you what the LED would do but in this case the LED would actually dim and brighten depending on the pulse width that I'm sending to the LED so let's just have a look at the power supply which I am applying a pulse width to in this case in every circuit it's shown in a much simpler form this would actually usually be some sort of microcontroller that is sending pulses at a certain frequency and at a certain width turning a power supply on and off so when this power supply is turned on it's sending current through to this LED and when it's turned on its voltage when it's high or on is three volts and when it's low also known as off it's zero volts so for every on pulse there is three volts and 20 milliamps going through this LED and for every off or low pulse there is no current flowing through the circuit in this case it's pulsing everyone Millicent with a pulse width of 50% the pulse width of 50% means that current is flowing through the circuit 50% of the time and current is not flowing through the circuit 50% of the time so that on time is equal to the off time if I increase the pulse width to 80% you can see the result on the graph at the top current flowing through the circuit is now on more of the time versus the off time so the current flowing through the circuit is flowing 80% of the time during the pulse width and no current flows through the circuit for only 20% of the time if I further increase the pulse width to 100% you can see what's happened because the pulse width is 100% current is flowing through the circuit 100% of the time so there is now no point in time where the circuit is turned off if I decrease the pulse width to 10% you can see that the circuit is off most of the time and only pulses on very quickly 10% of the time if I change the pulse width to 0% you can see that the circuit remains off all of the time the other thing to look at here is the frequency at which we're pulsing this circuit currently we're pulsing it at one kilohertz if I increase the frequency of these pulses you can see that the pulses get much faster and appear shorter on the graph although this is still 50% pulse width modulation it's on 50% of the time and off 50% of the time but now the frequency has gone from one kilohertz all the way to 10 kilohertz and this means that we are pulsing this circuit 10,000 times per second I can also slow it down by decreasing the frequency you can now see that the frequency is 502 Hertz which means that this would be pulsing 502 times per second in this case one-way pulse width thing in LED if we pulse it too slow we would be able to see the visible pulses which would not be ideal so let's go on to a visual example of pulse width modulation using an Arduino to dim and brighten an LED so here we are with our example of pulse width modulation on an LED I have here a simple Arduino microcontroller we will be going into the Arduino and many fun projects you can do with the Arduino in future videos so make sure you subscribe for that so we've got the Arduino microcontroller here which is sending pulse width modulation to this LED now I've got a little potentiometer here potentiometer is basically a variable resistor so in this case the potentiometer is used as a voltage divider so that we can get a digital value from 0 to 255 to change the pulse width to the LED so watch what happens when I adjust this potentiometer you can see that the LED is dimming when I adjust it and I can also control the brightness so by adjusting the potentiometer this way I'm increasing the pulse width so the LED is on more of the time and by turning it this way I'm decreasing the pulse width so that the LED is off more of the time and that's how pulse width modulation works this can be done to control motors and even to create very efficient power supplies so just note that this this LED is not being dimmed in an analogue fashion with a variable resistor its dimming through pulse width modulation through this microcontroller which is sending those on and off pulses to the LED it's just that the on and off pulses are so fast within the kilohertz range meaning it's pulsing at thousands of times per second so the pulses are not visible to the human eye but the effect of the dimming and brightening of the LED is visible to the human eye because the LED in this case when it's dimmer is off more of the time and when it's brighter is on more of the time so in effect it's changing the average voltage to that LED and the good thing about this is that I can apply this not only to one led but I could use a series of transistors to apply this to much bigger loads like huge high power motors I can send a digital pulse width signal to to speed the motor up and down but we'll get into things like that in later videos if you do enjoy my videos make sure you subscribe for many more videos to come you can also support me on patreon comm and get many more benefits when becoming a patron for simple electronics the link to my patreon page is in the description
Info
Channel: Simply Electronics
Views: 423,364
Rating: 4.9054503 out of 5
Keywords: electronics, basics, current, electric, electron, flow, tutorial, how, to, energy, power, circuit, solder, iron, soldering, simple, simply, making, bigclive, big, clive, bigclivedotcom, diy, hack, roman, ursu, arduino, pi, motor, transistor, what is pwm, what is pulse width modulation, how to pwm, arduino pwm, smps, how does pwm work, how to dim an led, control speed
Id: GQLED3gmONg
Channel Id: undefined
Length: 7min 27sec (447 seconds)
Published: Sun Oct 09 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.