Build a hexapod walker lesson plan
Six legs, twelve servos, real gaits: leg geometry, servo maps and calibration, a current budget, tripod, ripple and wave gaits with their support polygons, turning, terrain and a walking demo.
Objectives and materials
By the end, students can
- The leg’s geometry, the pulse math and calibration, and the current twelve or eighteen servos draw.
- Duty factor and phase: tripod, ripple and wave, stability margins, turning and rough ground.
- A scripted demo from one button, extended and made safe.
Materials for the whole unit
- Arduino Uno R3
- Bench power supply
- Hobby servo x 12
- Limit switch, lever microswitch
- Multimeter
- Servo driver, PCA9685 16-channel
Every part is already on the simulator’s bench, so there is nothing to buy or hand out. The counts are the most any one lesson uses, if you build it on real breadboards too.
Legs and servos
The leg’s geometry, the pulse math and calibration, and the current twelve or eighteen servos draw.
| Lesson | Time | What students do |
|---|---|---|
| Leg geometrySix legs with a hip and a knee each. Pose them from the Serial Monitor, see why the right side is mirrored, and work out the stride and the ground clearance from the leg’s lengths and angles. | 60 min |
|
| Servo maps and calibrationAn angle is a pulse width, and the PCA9685 sends it in ticks of 4.88 us. Map degrees to ticks, send a raw pulse, find the servo from another batch that stands off square, and trim it in code. | 60 min |
|
| The current budgetMeter one side of the robot: six servos idle, then all moving. Scale it to 18 servos carrying a body, size the supply, and watch an undersized one collapse. | 50 min |
|
Materials
- Arduino Uno R3
- Bench power supply
- Hobby servo x 12
- Limit switch, lever microswitch
- Multimeter
- Servo driver, PCA9685 16-channel
Check for understanding
Each student finishes "The current budget" on their own, without opening the hints. The simulator checks 5 of its 5 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "An undersized supply".
Gaits
Duty factor and phase: tripod, ripple and wave, stability margins, turning and rough ground.
| Lesson | Time | What students do |
|---|---|---|
| Tripod gaitTwo triangles of legs take turns. Walk the tripod gait, count the feet in the air, work out its speed from the duty factor, read its stability margin, and speed up the swing. | 60 min |
|
| Ripple and wave gaitsKeep more feet down. Switch to the ripple gait (duty 2/3) and the wave gait (duty 5/6), count the feet in the air, and trade speed for a stability margin almost twice as wide. | 50 min |
|
| Turning and terrainTurn on the spot by walking the two sides opposite ways, add an arc turn, lift higher for rough ground, and move the center of mass forward until the tripod would tip. | 60 min |
|
Materials
- Arduino Uno R3
- Hobby servo x 12
- Limit switch, lever microswitch
- Servo driver, PCA9685 16-channel
Check for understanding
Each student finishes "Turning and terrain" on their own, without opening the hints. The simulator checks 6 of its 6 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Shift down on its own".
Project: a walking demo
A scripted demo from one button, extended and made safe.
| Lesson | Time | What students do |
|---|---|---|
| Project: a walking demoScript a demo the robot runs from one button: tripod forward, a turn, a careful wave. Add a turn, raise the lift for the careful part, and make a second press stop it safely. | 70 min |
|
Materials
- Arduino Uno R3
- Hobby servo x 12
- Limit switch, lever microswitch
- Servo driver, PCA9685 16-channel
Check for understanding
Each student finishes "Project: a walking demo" on their own, without opening the hints. The simulator checks 7 of its 7 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Show it".
Teach this unit as a class
Start a class from this course and its 7 lessons are assigned in one go, in order. Students join with a six-character code or printed login cards, and each one’s work comes back to you.
The class tools are free for 30 days for one class of up to 20 students, with no card. The lessons themselves are free either way.