MEC-01: A lift or arm on two motors - same power, same moment
- Your robot needs: Lift or arm with an encoder.
- Starter bots that fit: none (it needs parts the starter bots do not have).
- Library version: v0.17.0 or newer.
- The docs it tests: Robot module (the robot in five files).
Why
Many lifts have a motor on each side. If the two motors get different powers, or one turns the wrong way, they fight: they get hot and can break a gearbox or bend the slide. alsoMotor and alsoMotorReversed send every power to both motors in the same loop. We tested it in the simulator and with the test kit; real two-motor lifts are needed.
Safety
- Chain or belt OFF for steps 1 and 2. Two motors that fight can break a gearbox.
- Low power first (
maxPower0.3 in the lift's Tunables section). Fingers out of the slide. - A hand on STOP. Hard stops at both ends.
Setup
- The lift's line in
Robot.javawith its second motor:lift = add(Lift.slide("lift_left").alsoMotorReversed("lift_right"));(oralsoMotorwhen both turn the same way). An arm:Arm.motor(...).alsoMotorReversed(...). - The encoder cable in the FIRST motor (
lift_left). The Tunables section is the first motor's name in CamelCase (Tunables.LiftLeft).
Steps
- Chain or belt off. INIT: read
LiftLeft: two motors, "lift_left" (its encoder is read) and "lift_right" (...). - START. Push the lift's stick up a little. Both motor shafts must turn the way that lifts. One wrong? Use the other method (
alsoMotororalsoMotorReversed), rebuild, try again. - Chain or belt on. Run the lift to each named position (low, high...) 3 times.
- Pause with gamepad 1 BACK while it moves up: both motors stop at once.
- After 2 minutes of use, touch both motors: they should be about as warm as each other.
Pass rule
Both motors turn the lifting way (2 of 2) in step 2, the lift reaches each position within its tolerance in all runs of step 3, and neither motor is clearly hotter than the other in step 5.
Record
Write these down while you test. The report form has them as a list to fill in.
- lift or arm, motors (model and gearbox), which method you used (
alsoMotororalsoMotorReversed) - how the motors face each other (mirror images, or the same way)
- any position it missed, and by how much (counts or inches)
- the motor temperatures by hand (cool, warm, hot)
If your robot is different
An arm driven from both ends works the same way: test its positions in degrees. If your two motors drive separate slides that are only joined at the top, report how far apart the two sides got (inches), since only the first motor's encoder is read.
Report your result
Pass, fail, or could not run: every result helps. The form opens on GitHub with this test filled in (a free GitHub account is needed). No student names, please.
Report resultNo reports for this test yet: yours would be the first. Every test's reports.
All tests · Next: SHOT-01 Flywheel Finder - gains that hold the speed
Something wrong on this page? Tell us with a short GitHub form.