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.
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.
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 callsFour 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 |
|
| A state machineIDLE, 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 |
|
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".
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 homingA 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 |
|
| DoorsDoors 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 |
|
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".
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 |
|---|---|---|
| SafetyThe 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 |
|
| Project: a four-floor modelThe 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 |
|
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".
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.