Lesson plan

Build a robot arm lesson plan

A four-servo arm set up and put to work like a technician does it: safe starts, limits and speeds, joystick control, inverse kinematics on a real linkage, teach and playback, a gripper that feels, and a pick-and-place cell.

3 chapters, 6 lessons, about 7 hours, on the Arduino Uno R3. Every lesson runs in the browser, with nothing to install.

The unit

Objectives and materials

By the end, students can

  • A home pose first, limits and speeds, and a joystick with a deadband and expo.
  • Inverse kinematics on the real arm, and poses taught and played back together.
  • A gripper that feels the part, payload at reach, and the pick-and-place project.

Materials for the whole unit

  • Arduino Uno R3
  • Force-sensing resistor
  • Half breadboard
  • Potentiometer x 2
  • Resistor
  • Robot arm, 4 servos
  • Servo driver, PCA9685 16-channel
  • Thumb stick

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.

Chapter 1. About 2 h 20 min

Set it up, drive it

A home pose first, limits and speeds, and a joystick with a deadband and expo.

LessonTimeWhat students do
Joints, limits and a safe startSet up a four-servo arm before anyone drives it: a home pose sent before any other pulse, software limits where the linkage jams, every move slewed at a set speed, and the PCA9685’s counts for a pulse.70 min
  1. A safe start
  2. Move a joint
  3. Software limits
  4. A speed limit
  5. What the board really sends
  6. Twice as fast
Joystick controlDrive four joints with one stick: rate mode so the arm stays put when you let go, a deadband so it never creeps, a click to swap joint pairs, and an expo curve for fine moves.70 min
  1. Rate mode
  2. The deadband
  3. Full stick
  4. Swap the pair
  5. Expo
  6. A narrower deadband

Materials

  • Arduino Uno R3
  • Force-sensing resistor
  • Resistor
  • Robot arm, 4 servos
  • Servo driver, PCA9685 16-channel
  • Thumb stick

Check for understanding

Each student finishes "Joystick control" 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: "A narrower deadband".

Chapter 2. About 2 h 10 min

Moves that mean something

Inverse kinematics on the real arm, and poses taught and played back together.

LessonTimeWhat students do
Inverse kinematics on a real armPut the law of cosines on the desktop arm: two knobs set where the claw goes, the sketch solves the shoulder and elbow, and the arm’s own linkage and servo limits decide what it can really reach.60 min
  1. Run it
  2. Solve a target
  3. Out of reach
  4. In reach, past a limit
  5. Measure, then widen
Record and playbackTeach an arm poses the way a teach pendant does, store them in EEPROM, and play them back with every joint slowed to arrive at the same moment, so the arm moves as one piece.70 min
  1. Run it
  2. Teach a point
  3. Teach another
  4. Play it back together
  5. What is stored
  6. A gentler playback

Materials

  • Arduino Uno R3
  • Force-sensing resistor
  • Half breadboard
  • Potentiometer x 2
  • Resistor
  • Robot arm, 4 servos
  • Servo driver, PCA9685 16-channel
  • Thumb stick

Check for understanding

Each student finishes "Record and playback" 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: "A gentler playback".

Chapter 3. About 2 h 20 min

Put it to work

A gripper that feels the part, payload at reach, and the pick-and-place project.

LessonTimeWhat students do
Grippers: force and payloadA force sensor on the jaw: turn its reading into grams, close until the jaw feels the part, know when it shut on nothing, and work out whether the shoulder can hold a payload at a reach.70 min
  1. Run it
  2. Close until it feels the part
  3. Grams from a reading
  4. Closed on nothing
  5. Torque at reach
  6. A firmer grip
Project: a pick-and-place armA pick-and-place cell as a state machine: taught poses, synchronized moves, a force-checked grip, a checked release, faults that stop the arm when a part is missing or dropped, and a cycle time to beat.70 min
  1. Run it
  2. Start a cycle
  3. No part
  4. A whole cycle
  5. A dropped part
  6. Beat the cycle time

Materials

  • Arduino Uno R3
  • Force-sensing resistor
  • Resistor
  • Robot arm, 4 servos
  • Servo driver, PCA9685 16-channel
  • Thumb stick

Check for understanding

Each student finishes "Project: a pick-and-place arm" 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: "Beat the cycle time".

Your class

Teach this unit as a class

Start a class from this course and its 6 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.