Source: https://mokxi.com/teachers/plans/build-claw-machine
Updated: 2026-11-11

Lesson plan

# 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.

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

Start a class from this course

The unit

## 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.

Chapter 1. About 2 h 15 min

## The gantry

Two stepper motors that go exactly where the stick says.

Lesson | Time | What students do

One stepper on a driver Start 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

- Why a stepper, and why a driver
- Run it: the test move
- Read what the sketch says
- Speed is timing

Steer with a joystick Add 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

- Two pots in one stick
- Push it right
- The dead zone
- Counting is the position

The second axis Copy 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

- Same driver, two new pins
- Both test moves
- Push it forward
- Never wait in loop()

### 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()".

Chapter 2. About 1 h 30 min

## 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 switches Mount 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

- A stepper forgets where it is
- Home the X axis
- Then Y, and a switch that never closes
- The switch guards the end

The claw and the drop Wire 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

- The winch, the claw and a button
- Press Drop
- One state at a time
- Grip strength

### 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".

Chapter 3. About 2 h 15 min

## 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 countdown Add a coin switch and a 16x2 LCD, and load the full game: insert a coin, beat the clock, and drop. | 45 min

- A coin is a pulse
- Insert coin
- Beat the clock
- Drop, or run out of time

Knowing you won Wire the infrared beam across the prize chute, so the machine knows a prize really fell and can call a win. | 45 min

- A beam across the chute
- Play a round
- Win a prize
- Why not trust the claw

Lights, sound and the whole machine Finish the cabinet with a NeoPixel marquee and a speaker, and meet the payout setting real machines use. | 45 min

- Marquee and speaker
- Attract mode
- A coin and a jingle
- The payout setting, honestly

### 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".

Your class

## 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.

Start a class from this course See the demo class

More units

## Other lesson plans

Electronics basics 20 lessons, about 10 h. Embedded on the Arduino Uno 16 lessons, about 12 h. Embedded on the ESP32-C3 13 lessons, about 11 h. Embedded on the Raspberry Pi Pico 7 lessons, about 6 h. Build your own fight stick 5 lessons, about 4 h. Embedded on the STM32F411 6 lessons, about 6 h. C++ on a board 13 lessons, about 10 h. Digital logic and memory 4 lessons, about 4 h. Interactive devices on the Uno 9 lessons, about 8 h. From gates to a computer 23 lessons, about 16 h. Build a vending machine 6 lessons, about 5 h. Every unit All the courses as ready-made units, on the teachers page.
