Foundation Add a Servo
Next →
Lesson · Foundation

Add a Servo

Students design and build an attachment, add a servo, and discover they have to calibrate its angles — the first full Frame → Design → Build → Iterate loop.

Duration90 min ProgrammingMakeCode blocks — raw servo angles DevicesYes Prep15 min Segments7

Opening Concept

A servo moves to an angle, not just on or off. Today you build your own attachment — a gripper, a flipper, an arm — and drive it with a servo. The catch: the “open” and “closed” angles built into the example are for a different claw. For your build, those numbers are wrong. You’ll find your own by trying, watching, and adjusting. That loop — observe, diagnose, plan, test — is the heart of engineering.

Run Sheet

  1. 0:00–0:08 Frame the job

    Build something your robot can do with a moving part — grab, flip, or lift.

    • Each student names what their attachment should do.
  2. 0:08–0:33 Design & build Design

    Sketch the idea in the notebook, then build the attachment from Lego/Technic parts.

    • Keep it simple — one moving joint driven by one servo.

    If they're stuck: Offer a known-good starting shape (a simple two-bar claw) and let them modify it.

  3. 0:33–0:45 Add the servo

    Mount the servo, attach the mechanism, plug into the servo port (S1), and wire it to a button.

    • Reuse the worked gripper pattern from Lesson 2 to trigger the servo from a button.
  4. 0:45–0:55 First test → the discovery

    Trigger the button. The stock open/close angles don’t fit — the claw won’t close, over-travels, or binds.

    • Name it out loud: the numbers aren’t yours yet.

    Watch for: Servo buzzing or straining — it’s being driven past where the mechanism can go. Back off the angle.

  5. 0:55–1:05 Teach calibration Build

    Introduce the raw ‘set servo angle’ block. Demonstrate finding one good value by adjusting and testing.

    • Show the difference between the named helper (open/close gripper) and choosing a raw angle yourself.
  6. 1:05–1:20 Iterate to fit Iterate

    Students find their own open / closed / center angles by observe → adjust → test.

    • Record each try and its result in the notebook so good values aren’t lost.

    If they finish early: Find a useful middle position too, or make a smaller angle change do more work (leverage).

  7. 1:20–1:30 Share & wrap

    Two or three demos. Everyone records their final angles.

    • Make sure final angle values are written in the notebook before packing up.

Materials

Engineering Connection

Frame → Design → Build → Iterate

This is the first session that runs the whole engineering loop. Students frame a job (what should my attachment do?), design and build a mechanism, build the code to drive it, and then iterate: the servo doesn’t fit, so they observe, diagnose, plan a new angle, and test again. Calibration isn’t taught up front — it’s discovered at the exact moment students need it.

Troubleshooting

Servo doesn't move at all
Check it’s in the S1 port and oriented correctly, and that the button branch actually calls the servo.
Servo buzzes, binds, or strips gears
It’s being commanded past the mechanism’s physical limit. Approach limits gradually and back the angle off when it strains.
Students expect the open/close preset to work on their own build
That mismatch is the lesson. Let them hit it, then introduce the raw ‘set servo angle’ block.
Random guessing instead of systematic tuning
Coach one change at a time: try an angle, watch what happens, write it down, adjust. That’s the iterate loop.
Good angles found, then lost after re-flashing
Insist values go in the notebook as they’re found — the notebook is the record, not the robot.