EveryCircuit
Contact
Reviews
Home
2ctiby
modified 9 years ago

PWM.....How to .....read description here below

10
5
564
07:01:51
See the little orange oscilloscope trace blips....they occur with a timing of once every second without changing. ie: the frequency of 1Hz here stays the same at all times...... frequency = 1/time ..... and time is 1s here. The blue mosfet gate pulses do exactly that same thing....but we are going to alter the duration of each blue pulse... Look at the oscilloscope ....See how long a time the blue pulse stays active within each (see orange) one second period. Now go in to the pulse generator settings at the left end of the blue mosfet gate wire and carefully turn the WIDTH dial clockwise as you watch the blue scope trace duration and lamp stay active longer. ...don't alter any other pulse generator settings. The main point to note is that when we alter the width of the blue pulse, its frequency (seen by the orange blips) does not alter....turn that dial up and down to get used to the idea of altering that pulse width without altering the frequency of their occurance....the blue pulses always re-start at every orange one second blip. So now you know what is happening ....When you alter the Pulse Width (ie when you modulate the pulse), the frequency of the pulsing should stay the same. ....That is basic 'Pulse Width Modulation' ....PWM The amount of time the lamp stays on....ie the width of the active blue trace, is called the MARK. The remaining time that it is off is called the SPACE. (20ms on, and 980ms off, for this default setting) Those two (Mark plus Space) form the time PERIOD between the start of one pulse to the start of the next pulse. ( 1s ie 1000ms default period here) . The Mark divided by the Period (ie the percentage of the time the lamp stays on) is called the DUTY CYCLE. ( 0.02 ie 2% default duty cycle here ) Now use the pulse generator Width setting again and set a duty cycle of 0.5 (blue trace mark on for half of the period...50% as per lamp flashing).....The world of PWM is now your oyster! (although modulating/demodulating radio carrier wave pulse widths may need further consideration), but remember.... Create a Pulse Width Modulation wherever you want, with any Duty Cycle, but check that the Frequency is not altering unless you are designing it to do so....A PWM of short duty cycle giving a brief lamp flash does not mean that it is occuring more frequently if done properly as above here....The shorter pulse width Mark (duty cycle) makes the lamp appear dimmer than if the Mark were to be wider thus keeping the lamp on longer within each fixed period as a larger duty cycle. Here is a 555 timer pulse generator circuit placed on EC by @ewok a while back....see how the Pulse Width can be modulated......(you are performing a PWM) by using the pot. The frequency of 417Hz at the far right 1kΩ resistor there remains the same. http://everycircuit.com/circuit/4664733085204480 PWM in this way is widely used for dimming some lights, and for motor speed control....it does not waste power as heat in the way that a variable resistor would. With PWM the volts and current amplitude are switched full on/off , giving an average power output according to the pulse width, with minimal power loss at the switch, ... not gradual volts/current as with a (power wasting) variable resistor....The more width you give it...the more average power you are giving...ie greater speed to your motor or brighter light to your lamp. (Mosfet Rds₍ₒₙ₎ = 0.05Ω in this demo, but not really relevant here).
published 9 years ago
BillyT
9 years ago
Yep
kiani
6 years ago
[BLOCKED]
kiani
6 years ago
[BLOCKED]
kiani
6 years ago
[BLOCKED]
kiani
6 years ago
[BLOCKED]

EveryCircuit is an easy to use, highly interactive circuit simulator and schematic capture tool. Real-time circuit simulation, interactivity, and dynamic visualization make it a must have application for professionals and academia. EveryCircuit user community has collaboratively created the largest searchable library of circuit designs. EveryCircuit app runs online in popular browsers and on mobile phones and tablets, enabling you to capture design ideas and learn electronics on the go.

Copyright © 2026 by MuseMaze, Inc.     Terms of use     Privacy policy