I do take requests! A person on the Facebook VEX Coaches of the World group asked if I could write something about how VEX motors work, so here goes.
Another place where I found a lot of useful information that was really old (vintage 2005) but still incredibly useful was from the Carnegie Mellon Online Robotics Academy; sadly, they have taken down most of this useful, basic-knowledge content. This PowerPoint on DC motors is vintage 2005 stuff, but does the basics of mechanics really go out of style? You can also find it on a slideshare website.
What’s Inside a Motor
When you open up a motor to change the gears, there’s a tiny green circuit board on one side, as shown in the diagram below. If you open up the green-cap end of the motor, you’ll see a teeny gear that is not removable. The green circuit board and teeny gear are 2 ends of a cylinder than runs through the whole thing that is the actual DC motor driving your robot. The rest of the stuff inside the black casing is just a set of 4 gears (2 on the cap-end, and 2 on the business-end of the motor), explained more below.
How They Work
According to the PowerPoint presentation from Carnegie Mellon Robotics Academy linked above, VEX motors have very high speed and correspondingly very low torque – “too low to be able to do any useful work directly. If you were to connect a DC motor directly to your robot, you wouldn’t have enough torque to overcome starting friction and your robot wouldn’t move.”
That’s where those 4 other gears inside the motor casing come in – the ones described in my previous posting on motor gears. With the magic of compound gears (see my next post on compound gears), the high-speed output of that tiny little nub gear is funneled through the chain of the other 4 gears inside the motor to become a useful combination of (much-lower) speed and (much-higher) torque output, which is then able to turn an axle of your robot. The following is reproduced from the now-deleted VEX Wiki (most of the wiki content was moved to the VEX product pages, but not all; this is part of the information that went bye-bye):
The metal gear reduction train is made up of the motor’s drive gear, three compound gears, and the output shaft. The drive gear has 12 teeth, the 1st compound gear is 48t:11t, and the 2nd compound gear is 49t:12t. These are all located under the rear (green) cover and are not intended to be changed. The final reduction gear and the output shaft are accessible by removing the front (black) cover, and can be configured either for high-torque (as shipped from the factory) or high-speed (using the alternate gear set).
- For the high-torque configuration, as shipped from the factory, the final (3rd) compound gear is 33t:10t which drives the output shaft with 32 teeth. This makes the high-torque reduction train ratio approximately 156.8:1.
- For the high-speed configuration, using the alternate gear set, the final (3rd) compound gear is 33t:14t which drives the output shaft with 28 teeth. This makes the high-speed reduction train ratio approximately 98:1.
Varying Power with Voltage – Huh?
When I was first reading the VEX curriculum linked above, I got to the section with this title (minus the “Huh?” part), and was pretty perplexed. The curriculum text says the following:
The Power output of a DC Motor varies with the voltage applied. This means that the more voltage is applied, the more power is available and the faster the motor can do work.
If a motor is under a fixed amount of load, and the voltage is increased (resulting in an increase of power), what will it do? It will spin faster! There is more power available to accomplish the same amount of work.
“The power output of a DC motor varies with the voltage applied.” But wait! We don’t change the voltage in anything we do in our VEX programming. We have a battery of a fixed voltage. We change the “power” setting (-127 to 127), but I really didn’t think we were doing anything to the voltage; on retrospection, though, I realized that I didn’t know what that motor “power” setting actually represents. So how do we get more output – more speed, more strength, etc. – by changing the power setting on a motor from 0 to 127?
Well, six paragraphs later, in the middle of the paragraph, the curriculum goes on to say:
A robot designer can vary the voltage going to the motor under load to get different amounts of power, and varying speed. This is done using electrical devices known as motor controllers, which regulate the voltage supplied to the motors.
And that’s it. That’s all they say about the subject, and you’re supposed to put it all together. The Carnegie Mellon PowerPoint linked above adds more substance to the matter, and combined with my “What Are Motor Controllers?” post from earlier this year, we can get everything together here at once.
Yes, VEX batteries do provide a fixed amount of voltage, and yes, we are not directly “varying the voltage applied” to get more out of our motors. That’s where motor controllers come in. Motor controllers are those connector items that go between the motor and cortex and have a little plastic rectangular box in the middle, as shown in the image at left. (Ports 1 and 10 on the cortex have the motor controller built into the cortex and do not require an external motor controller; ports 2 through 9 do need them.)
As I mentioned in my previous post, you can think of the motor controller as operating in a similar fashion as your microwave. When you set your microwave to 50% power, the appliance is not actually outputting a lower power, it’s just outputting full power half the time; you can hear it cycling on and off if you sit and listen. Motor controllers do this with voltage going from the battery to the motor, except that they cycle on and off very very quickly (Carnegie Mellon says 60x/second, but it’s a very old doc, so I’m not sure if that’s still accurate). If we set our battery power to 127, the motor controller will supply full voltage 100% of the time to the motor. If we set the power to 63 (half), the motor controller will supply full voltage to the motor 50% of the time and 0 voltage 50% of the time. This functionality of the motor controller is referred to as Pulse Width Modulation (PWM).
Diving in Deeper – What Happens in Practice
From the VEX curriculum:
The motor draws a certain amount of electrical current depending on how much load is placed on it. As the load increases on the motor, the more torque the motor outputs to overcome it and the more current the motor draws.
So, for a fixed voltage (fixed motor power level; fixed PWM), the more work the motor needs to do, the more current it will draw (and the slower it will turn, since torque and speed always have an inverse relationship). Again from the VEX curriculum:
More torque load means more current draw, but current and rotational speed are inverse. The faster the motor spins, the less current it draws.
At first this sounds kind of fishy, but it’s just another way of reading the graph above. As one moves down the red line (toward the left), current drawn goes down, and torque load goes down—which is the same as saying that it’s spinning faster, since torque and speed are linear tradeoffs (see previous post).
I’m going to devote an entire post to motor stall (a.k.a. motor overload) because I think it’s such an important subject for new coaches and students to understand and be able to identify when it’s happening. But I’ll just touch on it a little here in how it relates to the graph above.
Pulling in explanation from the Carnegie Mellon PowerPoint is useful. Looking again at the graph above, for a fixed motor power (say, 127, the maximum, for simplicity), the motor will draw more and more current to attempt to handle the load placed on it on the robot (stuff to lift, wheel to turn, things to push). But since we live in the real world, this graph does not go indefinitely off to the upper-right. There is a cutoff, a maximum amount of current that the motor can draw. And since there is a maximum current it can draw, there is a maximum load it can handle. These limits are called stall current and stall torque. When you try to ask the motor to do more than this level, it will simply stop working. Looking at the spec sheet for the 393 motor, it says that the stall current is 4.8amps. HOWEVER, if you look at the spec sheet for the motor controller, its stall current is 3amps. So what is the stall current we have to work with? Yes, 3amps.
All the Parts in One (Confusing?) Explanation
So, it’s kind of hard to wrap your head around all of the moving parts here, but I’ll try to wrap it up as best as I can. You’ve got torque, speed, voltage, and current draw.
- Torque and speed will always go in a see-saw fashion, so if one is going up, the other will be going down, even if you didn’t intend for it to do so.
- In VEX programming, the “motor power” we assign in our programs corresponds to voltage.
- 127 or -127 motor power corresponds to full voltage 100% of the time from the battery to the motor.
- 64 or -64 motor power (half) corresponds to full voltage 50% of the time and 0 voltage 50% of the time.
- Increasing voltage to a DC motor will increase the speed at which it is turning, given a fixed load (that is, you have not changed the work you’re asking it to do).
- For a fixed voltage (fixed motor power level), when you put more load on the robot (lift more, push more, etc.), it will draw more current.
- You can keep putting more load on it, and it will keep drawing more current, until it reaches the stall current (or stall torque), at which point it will stop working (sad face).
- Alternately, a faster-spinning motor is drawing less current, as less load is being placed on it.
If you encounter motor stall at a certain voltage (motor power), increasing the voltage will increase the maximum work that you can make the motor do, as shown in the graph at right. Where the colored lines hit the x-axis is where speed = 0, or motor stall. So increasing the voltage shifts the entire curve out to the right, and motor stall will then happen only after a larger load is placed on on the motor.
I hope that you have found these explanations helpful. If I’ve done something terribly wrong here in my interpretation of the facts, our email address is on the Contact Us page; I’d be more than happy to update this post.
For those who really want to know more, here are two VEX Forum threads about motors, torque, and speed with very detailed, technical discussions:
Updated 2012, for new motor specs: https://www.vexforum.com/index.php/8089-motor-torque-speed-curves-rev2/0