Build a claw machine lesson plan
Build a real arcade claw machine piece by piece, from one stepper motor to coins, a clock, a win sensor, lights and sound.
Objectives and materials
By the end, students can
- Two stepper motors that go exactly where the stick says.
- Find zero at power-up, then drop, grab and carry a prize home.
- Coins, a countdown, a sensor that knows you won, and the lights and sound of a real cabinet.
Materials for the whole unit
- Addressable RGB LEDs
- Arcade button
- Arduino Uno R3
- Character LCD with I2C backpack
- Claw machine cabinet, stepper gantry
- Full-size breadboard
- Limit switch, lever microswitch
- Motor driver, DRV8833
- Piezo speaker
- Resistor
- Stepper driver, A4988 x 2
- Stepper motor, NEMA 17 x 2
- 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.
The gantry
Two stepper motors that go exactly where the stick says.
| Lesson | Time | What students do |
|---|---|---|
| One stepper on a driverStart the claw machine with one axis: a NEMA 17 on an A4988, two signal wires from the Uno, and a test move that proves the wiring. | 45 min |
|
| Steer with a joystickAdd the thumb stick so a player can drive the gantry, and turn how far it is pushed into how fast the motor steps. | 45 min |
|
| The second axisCopy the first axis for Y: a second A4988 and NEMA 17, two more wires, and the claw can reach the whole cabinet floor. | 45 min |
|
Materials
- Arduino Uno R3
- Full-size breadboard
- Stepper driver, A4988 x 2
- Stepper motor, NEMA 17 x 2
- Thumb stick
Check for understanding
Each student finishes "The second axis" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Never wait in loop()".
Home and grab
Find zero at power-up, then drop, grab and carry a prize home.
| Lesson | Time | What students do |
|---|---|---|
| The cabinet and its home switchesMount the two motors in the cabinet, and wire the lever switch at the home end of each axis, so the machine finds zero at power-up the way printers and real cabinets do. | 45 min |
|
| The claw and the dropWire the cabinet's winch and servo claw and add the Drop button, and write the grab as a state machine: lower, close, lift, carry home, open. | 45 min |
|
Materials
- Arcade button
- Arduino Uno R3
- Claw machine cabinet, stepper gantry
- Full-size breadboard
- Motor driver, DRV8833
- Stepper driver, A4988 x 2
- Thumb stick
Check for understanding
Each student finishes "The claw and the drop" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "Grip strength".
The game
Coins, a countdown, a sensor that knows you won, and the lights and sound of a real cabinet.
| Lesson | Time | What students do |
|---|---|---|
| Coins and a countdownAdd a coin switch and a 16x2 LCD, and load the full game: insert a coin, beat the clock, and drop. | 45 min |
|
| Knowing you wonWire the infrared beam across the prize chute, so the machine knows a prize really fell and can call a win. | 45 min |
|
| Lights, sound and the whole machineFinish the cabinet with a NeoPixel marquee and a speaker, and meet the payout setting real machines use. | 45 min |
|
Materials
- Addressable RGB LEDs
- Arcade button
- Arduino Uno R3
- Character LCD with I2C backpack
- Claw machine cabinet, stepper gantry
- Full-size breadboard
- Limit switch, lever microswitch
- Motor driver, DRV8833
- Piezo speaker
- Resistor
- Stepper driver, A4988 x 2
- Thumb stick
Check for understanding
Each student finishes "Lights, sound and the whole machine" on their own, without opening the hints. The simulator checks 4 of its 4 steps as they go.
Then ask each one to explain, in a sentence or two, the last thing it asked of them: "The payout setting, honestly".
Teach this unit as a class
Start a class from this course and its 8 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.