Skip to content

Add motor control docs#33

Open
ArchdukeTim wants to merge 2 commits into
frcsoftware:mainfrom
ArchdukeTim:tim/motorControl
Open

Add motor control docs#33
ArchdukeTim wants to merge 2 commits into
frcsoftware:mainfrom
ArchdukeTim:tim/motorControl

Conversation

@ArchdukeTim

Copy link
Copy Markdown

No description provided.

@Daniel1464 Daniel1464 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good!

## 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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Comment thread src/content/docs/misc/motor_control.mdx Outdated

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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..."

Comment thread src/content/docs/misc/motor_control.mdx Outdated
#### 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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think anyone uses potentiometers anymore, so idk if this is necessary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants