simple question, what does PWM stand for? seen it a lot on the posts
Pulse Width Modulation
oh okay, thanks, so what is that then?
Learn something today…heres some good examples about the basics of PWM, that I found awhile ago.
Basically, its a method of controlling a motor’s output without worrying about using a variable resistor (and therefore avoiding the waste of energy involved–it would dissipate it as heat).
Instead of delivering full power all the time and worrying about how to reduce the output later, the Victors (i.e. Innovation First’s PWM speed controllers) vary the output’s “pulse width” according to some clock signal. They’re on for some portion of the time, and then for some proportional amount of time, they’re off. On average, the output is equivalent to some percentage, but at any given time, the signal is either off or on. So, for 30% power (average), they would be on for 3/10 of a cycle, and off for 7/10.
Try these links, for more information (I just grabbed a few off a web search).
http://www.powerdesigners.com/InfoWeb/design_center/articles/PWM/pwm.shtm[Edit: DJ Fluck beat me to it…]
http://www.embedded.com/story/OEG20010821S0096
-Tristan Lall
This should probably be moved to the Q/A forum … just a thought
- Katie
okay thanks guys. this will help a lot in building our first gear shifting drive system
thanks guys
If you haven’t been totally confused yet, you might want to search older posts here on CD.
Here is a thread that you might find helpful. I am sure there are others.
Glad to hear the beginnings of real conversation returning to CD (build season starting)!
*Originally posted by Katie Reynolds *
This should probably be moved to the Q/A forum … just a thought
No, not really.
Pulse Width Modulation is a neat little method of turning a digital signal into, effectively, an analog one. It alters the average voltage in a signal by varying the length of time it is on, versus the length of the time it is off, without varying the period.
Why? It’s cheaper to produce than to recreate a varying analog signal. To recreate an analog signal would require dozens of inductors and capacitors, whereas this does it effectively, without really doing it. Effectiveness is all that matters.
If you want mathematical stuff… say if you turned a 12V signal on for half the period, and off for the other half… you would have an average voltage of:
1/2 * 12 + 1/2 * 0 = 6V
Now, if you turned it on for 25% of the period, and off for the other 75%, you would have:
1/4 * 12 + 3/4 * 0 = 3V
It works the other way too:
3/4 * 12 + 1/4 * 0 = 9V
Here’s a picture that might help you a little. See how the period in the signals is the same. The the amount of time the voltage is applied is varied.
A cheap, cheezy, JPL/NASA trinket, of my choosing, goes to the first non-engineer who gives the best explanation of why a motor “sees” this pulse train as a variable voltage. No fare doing a web search and a quick cut and paste job. I want to see some real creativity here. I’m the sole judge and will award the winner with a prize commensurate with the quality of the work. The “Prize” will probably consist of one or more of the do-dads that have been multiplying in the top drawer of my desk for the last eighteen years. A quick survey of said drawer reveals cool stuff like: A photo of my buddy, Michael Hoenk, wearing a really goofy sombrero hat during a birthday celebration at the local Mexican restaurant, a Mars Observer-era 8086 programmer’s pocket reference guide, a JPL “Medical Parking Permit” from 1996 or an ultra-cool 1985 receipt from a Burger King in Paris (Can you say Le Whopper Avec Frommage?). That last item holds great memories for me because I used it to gross-out my then girlfriend (now Wife) by helping to convince Her that I ate at BK for every meal beacuse “I couldn’t stand the local cuisine” :D. If the explanation is really good, maybe I’ll throw in a JPL baseball cap.
-Kevin
A motor is essentially an inductor. An inductor resists change in current flow.
As the voltage is applied, the inductor charges up to the applied voltage, but resists the change of current flow. The magnetic forces induced in the wire causes the motor to spin. When the voltage source is removed, the inductance of the motor will still apply a little bit of power as it discharges, but mostly the motor will act as a flywheel and will continue spinning due to its momentum. It will continue spinning until it either comes to rest due to frictional and magnetic forces, or until it is pulsed again.
As soon as we use a word like “inductor”, we loose most if not all of the intended audience. We need an explanation that everyone that frequents the forums can understand. How 'bout relating what’s happening to something where folks can use their innate physical intuition? Here’s a little hint: Your average household light dimmer uses PWM to control the brightness of the attached light bulb.
Remember, this is for some grade A cruft from my desk drawer :).
-Kevin
An inductor is kinda like a funnel, or a strainer. When you pour water through it, it still flows through, but all of it doesn’t go through, only some of it. Once it fills up, everything you put into the funnel goes “through” it (overflows out the edges) so you have 100% flow. Once you turn the faucet off, the funnel keeps draining because it has water stored up in it.
Inductors are just like this funnel that stores water (funny how electricity can be compared to water so well, but they don’t go together at all – except for pure water). The only difference is, inductors store energy rather than water. To further elaborate, they store energy as a magnetic field. When you put electricity through a piece of wire, it creates a magnetic field around the wire. When you take away the electricity, the magnetic field begins to dissipate. Now, electricity can be generated under a changing, or in this case, dissipating magnetic field. As the magnetic field dissipates and becomes weaker, it generates smaller amounts of electricity until it goes away completely. Of course, all this happens in fractions of a second.
The problem with the piece of wire is that it doesn’t generate a strong enough magnetic field to be considered an inductor. Typically, an inductor is a piece of wire wrapped around something else, or in a coil, so that the magnetic field of the wire is compounded (combined) on itself. Remember how when you break a magnet in half, you get 2 weaker magnets each with 2 poles? Well, this is kinda the reverse, you are putting together 2 weaker magnets to form a stronger one.
Now, to connect my example to how PWM is applied to a motor. Okay, lets say we need to power a waterwheel with buckets of water. However, it takes too long to get the buckets of water. So, put a funnel above the waterwheel. Then, pour the water in, the funnel will drain and the waterwheel will spin, until the funnel is empty. However, it will keep spinning because of momentum (and inertia - an object in motion will stay in motion), kinda like how a bicycle wheel keeps spinning when it’s not on the ground. The water wheel will keep spinning until friction in it’s bearings stop it, or until you add another bucket of water to the funnel to keep it spinning longer.
The PWM signal that is sent to the Victors and the servos is never seen by the motor.
In the Victor, the length of time of the signal pulse is counted out (most llikely) in the on-board CPU, which also directs the MOSFET bridge to turn on and off providing a varying-average dc, while supplying the motor with full (12V) voltage bursts of current which vary in their on-time. The motor cannot change speed as fast as the FETs turn on and off (200 kHz ?), but the current provides a burst of torque, which maintains the rotation, and the motor’s turning-generated EMF keeps the voltage between M+ and M- at the average.
If the Victor fails to see a pulse in a reasonable amount of time, it will change to output corresponding to neutral.
The servos read the input pulse and probably count it out, then decide what the motor should do to make the pot inside the servo out put the analog of the pulse-length. They probably turn on a transistor bridge full time to make the motor turn for a large movement, some might even start pulsing as they got near, to prevent overshoot. When pot and signal agree, the motor is stopped.
On full value pulses controlling average values :
The servos are the descendants of escapements powered by rubber bands : the escapements were modofied relays, which were pulled by a tap on the control on the operator interface. This allowed the rubber band to turn a three- or four-eared wheel 120 or 90 degrees. With four ears, to make a plane or boat turn a certain number of degrees, you turned the rudder full in the required direction for a time, then flipped through to neutral (3 pulses), then if the turn were not enough, you’d repeat the previous. Proportional control needed right turn - left turn - right turn - left with more time on the way you wanted to turn.
With a three eared wheel, one wheel (0 degrees) was neutral control position, one (120 degrees) was right, and another (240 degrees) was left.
This is sort of the way the Victor output works. The vehicle with the escapement steering would not turn significantly with a pulse, but with several cycles, going more often to one side, a biased average, a turn could be accomplished.
*Originally posted by Jnadke *
**Now, to connect my example to how PWM is applied to a motor. Okay, lets say we need to power a waterwheel with buckets of water. However, it takes too long to get the buckets of water. So, put a funnel above the waterwheel. Then, pour the water in, the funnel will drain and the waterwheel will spin, until the funnel is empty. However, it will keep spinning because of momentum (and inertia - an object in motion will stay in motion), kinda like how a bicycle wheel keeps spinning when it’s not on the ground. The water wheel will keep spinning until friction in it’s bearings stop it, or until you add another bucket of water to the funnel to keep it spinning longer. **
You’re getting closer. PWM is all around us. What is needed is an explanation that a layman can understand (yes, it can be done). Here’s an example of PWM in the real world: Ever push a child on a swing? The longer you push through the cycle, the higher the swing goes (more energy). At some “push-duration” (duty cycle) you can maintain the same height by just putting in the same amount of energy as you loose to friction. In the above example, the “chopping” frequency is, say, one push/cycle. Now imagine what happens as you decrease the frequency to one push/three cycles, one push/ten cycles, etc…
-Kevin
I kind of like the water wheel analogy and it could lend itself to PWM discussion very easily.
Good thing I don’t fit your “non engineer” requirement, Kevin, I have my own drawer full of stuff.
*Originally posted by Al Skierkiewicz *
**I kind of like the water wheel analogy and it could lend itself to PWM discussion very easily.Good thing I don’t fit your “non engineer” requirement, Kevin, I have my own drawer full of stuff. **
Hi Al,
Yeah, the water wheel has great possibilities. Okay, maybe another hint? Suppose we take that same water wheel, but all we have to drive it is a very high pressure (which is analogous to high voltage in a circuit) fire hose that has a fast valve at the nozzle. Given the above, how do we get a continuously variable angular velocity to do our work? Explain how it works too.
Maybe you can throw in some of your desk cruft to sweeten the pot :). Okay, like I said above, I’ll throw in one of the cheezy items found here for a really good explanation of PWM using the above example or one of your own choosing.
-Kevin
Well I think of it like this,
Remember when you were young you turned your bicycle upside down and slapped the wheel to make it spin, well if you slapped it really fast… it went really fast, I don’t mean the speed of your arm, but the number of times per second that you slap the wheel.
If this was PWM, you would be slapping the wheel as hard as you could every slap, but say if you wanted the wheel to go slow… You slap, and wait a few seconds, slap again, if you wanted it to turn a little faster… you slap a little more often and so on.
PWM is doing basically the same thing
or you could think of it as a huge force. We all know that end speed will equal the amount of force multiplied by the time that force is applied… take for example you shoving say… a trash can on wheels, well you shove it and it goes a few feet… well what would happen if you shoved it one time every second… it would continually move at approximately the same speed all the time, well if you shoved it every half a second… it would move faster wouldn’t it? Because that huge force (you shoving) would be acting on the can for a longer period of time per second.
Same thing with a motor, the power is the force and the speed controller is basically flipping the power switch really fast on and off.
:]
Justin,
You are getting closer. Kevin will need to intervene here since he posed the original question. I have a hint running around in the back of my head for your bike tire analogy but I will wait for Kevin to rule on hints…
Each victor has it’s own power and is like a volume knob controlled via the PWM’s signal.
When you want a stereo louder, you turn the knob to a certain number higher than current state, 0 - 10. 0 volume being off, 10 volume being loudest possible.
For quieter, you turn the number lower than current state.
The PWM/Vicotor combination work the same way. The position of the “volume knob” is determined by the signal percentage. (See the image attached in Jnadke’s post)