Add motor control docs#33
Conversation
| ## Open- and Closed-loop mechanisms | ||
|
|
||
| The manner in which you control a mechanical mechanism can be split into two categories: open-loop, and closed-loop. | ||
| Open-loop refers to a mechanism that uses no measurement to correct the output of the motor. |
There was a problem hiding this comment.
A short example would be good here - like:
"Open-loop refers to a mechanism that uses no measurement to correct the output of the motor: like setting voltage or throttle".
|
|
||
| The manner in which you control a mechanical mechanism can be split into two categories: open-loop, and closed-loop. | ||
| Open-loop refers to a mechanism that uses no measurement to correct the output of the motor. | ||
| Closed-loop mechanisms use measurements, such as an encoder reading, to adjust the output of a motor to get closer to a target setpoint. |
There was a problem hiding this comment.
Maybe add "For example, PID control." at the end
| ## Open Loop Control | ||
|
|
||
| Some mechanisms don't require the precision that is gained through closed-loop control. | ||
| Intake rollers, for example, are commonly controlled simply by running the motor at a set duty-cycle. |
There was a problem hiding this comment.
It's probably better to define what duty cycle means before using the term.
Also, 2027 wpilib uses throttle as the term(in MotorController.setThrottle), so it might be better to use that instead
|
|
||
| The two most common open-loop setpoint types are duty-cycle and voltage. | ||
|
|
||
| Duty-cycle is a percentage of input voltage coming from the robot's battery. |
There was a problem hiding this comment.
A nitpick, but the definitions are a bit circular here since you reference voltage when defining duty cycle, and reference duty cycle when defining voltage. You could say:
"voltage is a measure of the electrical output to the motor. If motor A is set to 12 volts and motor B to 6 volts, motor A will eventually reach a speed twice as fast as motor B. "
"duty cycle/throttle measures the proportion of a motor's maximum possible voltage output. This depends on the battery voltage..."
| #### Measuring your mechanism | ||
|
|
||
| The feedback sensor in position-controlled mechanisms is commonly an encoder, a small electronic device that can measure rotation. | ||
| Another option is a potentiometer, which is similar to an encoder, but analog, and may have limited travel distance. |
There was a problem hiding this comment.
I don't think anyone uses potentiometers anymore, so idk if this is necessary
No description provided.