Source: https://mokxi.com/teachers/plans/build-elevator
Updated: 2026-11-19

Lesson plan

# Build an elevator lesson plan

A four-floor model lift on a stepper: calls and the elevator algorithm, a state machine, homing a lead screw hoist, doors with an eye, a safety chain, and a rush hour to measure it.

3 chapters, 6 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

- Latched calls, the elevator algorithm and its direction preference, and a state machine that says what it is doing.
- Steps per millimeter, homing and a top limit, and doors that reopen and nudge.
- Inhibits, the safety chain, faults and a watchdog, then the whole lift in a rush hour.

### Materials for the whole unit

- Arduino Uno R3
- Four-digit display, TM1637
- Hobby servo
- Limit switch, lever microswitch x 3
- Obstacle sensor, FC-51
- Pushbutton x 4
- Stepper driver, A4988
- Stepper motor, NEMA 17

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 1 h 50 min

## Calls and states

Latched calls, the elevator algorithm and its direction preference, and a state machine that says what it is doing.

Lesson | Time | What students do

Floors and calls Four call buttons on a model lift: calls that are remembered until served, stops made on the way, the elevator algorithm against first come first served, and why a car going up finishes going up. | 55 min

- Run it
- Call the car
- Stop on the way
- Two ways to choose
- Going up stays up

A state machine IDLE, MOVING and DOORS_OPEN, and the events that move between them: a call, an arrival, a dwell that runs out, a call that comes in while the doors are open, and a call at the floor the car is already on. | 55 min

- IDLE to MOVING
- Arrive, open
- Back to IDLE
- A call while the doors are open
- A call where you are

### Materials

- Arduino Uno R3
- Four-digit display, TM1637
- Hobby servo
- Limit switch, lever microswitch x 3
- Obstacle sensor, FC-51
- Pushbutton x 4
- Stepper driver, A4988
- Stepper motor, NEMA 17

### Check for understanding

Each student finishes "A state machine" 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: "A call where you are".

Chapter 2. About 2 h 25 min

## The hoist and the doors

Steps per millimeter, homing and a top limit, and doors that reopen and nudge.

Lesson | Time | What students do

Steppers and homing A stepper hoist on an 8 mm lead screw: steps per millimeter and a floor table, refusing to move blind, homing to a bottom switch with a backoff and a slow touch, a drift check, and a normally closed top limit. | 90 min

- Run it
- Steps to floors
- Refuse to move blind
- Home it
- Go to a floor
- Check for drift
- The top limit
- A finer screw

Doors Doors that open on arrival, dwell and close; an infrared eye across the doorway that reopens them; nudging after three tries; and the dwell time set for the people using the lift. | 55 min

- Open on arrival
- Dwell and close
- Something in the doorway
- Nudging
- Doors for people

### Materials

- Arduino Uno R3
- Four-digit display, TM1637
- Hobby servo
- Limit switch, lever microswitch x 3
- Obstacle sensor, FC-51
- Pushbutton x 4
- Stepper driver, A4988
- Stepper motor, NEMA 17

### Check for understanding

Each student finishes "Doors" 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: "Doors for people".

Chapter 3. About 1 h 40 min

## Safety and the project

Inhibits, the safety chain, faults and a watchdog, then the whole lift in a rush hour.

Lesson | Time | What students do

Safety The rules that come before the logic: no motion with the doors open, a normally closed safety chain that stops the car dead, a fault that only a person can clear, overtravel, and a watchdog on every move. | 55 min

- No motion with the doors open
- The safety chain
- Only a person clears it
- Overtravel
- The watchdog

Project: a four-floor model The whole lift in service: home it, call it from the buttons, run a scripted rush hour that measures floors traveled and waiting times, then switch to first come first served and compare. | 45 min

- Into service
- Ride to the top
- Rush hour
- First come, first served

### Materials

- Arduino Uno R3
- Four-digit display, TM1637
- Hobby servo
- Limit switch, lever microswitch x 3
- Obstacle sensor, FC-51
- Pushbutton x 4
- Stepper driver, A4988
- Stepper motor, NEMA 17

### Check for understanding

Each student finishes "Project: a four-floor model" 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: "First come, first served".

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.

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 claw machine 8 lessons, about 6 h. Every unit All the courses as ready-made units, on the teachers page.
