Step 6 (bonus)
Bonus: Motors & gearboxes
A small fast motor, a gearbox of your choosing: find the ratio that swings the base 90° fastest.
Motors are fast and weak
An electric motor spins fast but pushes gently. A simple model: at standstill it gives its stall torque , and the faster it spins, the less it can give, down to nothing at its no-load speed . At motor speed :
This step's base motor has N·m and rad/s: about as strong as a fingertip, and as fast as a cordless drill.
Gearboxes trade speed for torque
A gearbox with gear ratio turns the motor times for each turn of the joint. The joint gets times the torque at of the speed, so at joint speed it can have
Braking (torque against the motion) is limited to at any speed.
| Gear ratio | 5 | 40 | 160 |
|---|---|---|---|
| Torque at rest | 0.5 N·m | 4 N·m | 10 N·m (the joint's limit) |
| Top speed | 40 rad/s | 5 rad/s | 1.25 rad/s |
Too little gearing can't get the arm moving; too much tops out at a crawl. The fastest move is somewhere in between.
The fastest stop
Go flat out, then brake as hard as possible at the last moment. With inertia (kg·m²), braking torque decelerates the base at . From speed , stopping takes (as in step 3)
so brake as soon as reaches the distance left.
Your task
- Write
stopping_distance(speed, brake_torque, inertia). - The program times a 90° move with each ratio in
RATIOSand plots the speed. Read the times, then setGEAR_RATIO. - The final move must stop within 3° of 90° in less than 1.2× the fastest time any gear ratio allows, and stay there.