Elevator project for technology class

FunduinoPublished on

Ein Aufzugmodell aus Aluminiumprofilen aufbauen und programmieren

Ein Aufzug mit Schrittmotor, Lichtschranken und Etagentastern: Das Modell gibt den Aufbau für die ganze Klasse vor und lässt bei der Programmierung trotzdem viel Raum für eigene Lösungen.

Die Anleitung führt Schritt für Schritt durch den Aufbau der Aluminium-Version, stellt gestufte Aufgaben für den Unterricht vor und zeigt ein Beispielprogramm für vier Etagen mit OLED-Anzeige.

The fully assembled elevator

The elevator project in class

When all students work completely independently, assessment becomes difficult. The elevator project solves this: The structure is the same for everyone, while the programming still leaves plenty of room for individual solutions.

Using the ready-made model, the class builds and programs a realistic elevator. The materials from the Funduino learning sets can be used, so students work with components they already know. The model can be extended to offer a higher level of challenge.

Benefits for teachers

  • Individual assignments
  • Better comparability when grading
  • Creative solutions
  • Use of materials students already know from the learning sets
  • Durable materials that can be used by multiple cohorts – individual parts can be reordered as needed

There is now a second version of the elevator, made entirely from aluminum profiles. These instructions show how to assemble this version.

The elevator model for technology classes

Inspect and sort all components

Assembly is quick, and many steps are self-explanatory. The following instructions are nevertheless very detailed so that students can build the elevator independently.

First, lay out all the components and sort them.

All elevator components sorted on the table

Prepare the upper crossbar profile

Attach two small angle brackets to the 10 cm-long aluminum profile. This profile has a hole in the middle that the lifting cable will pass through later.

Make sure you can tighten the small grub screws on the angle brackets from the outside later. If necessary, remove the screws and reinsert them from the other side.

The 10 cm long aluminum profile with a bore and two small angle connectors
Detailed view of the angle brackets on the aluminum profile
Detail view: The set screws of the angle connectors face outward.
1 / 3

Build the base

  • Prepare the large angle brackets with screws, washers, and T-slot nuts.
  • Fit angle brackets to the second 10 cm profile - the one without a hole. The grub screws must also be accessible from the outside here.
  • Attach this profile to the ends of the two 30 cm profiles.
  • Place the black lift housing flush against the 30 cm profiles on the other side. Temporarily place the 6 cm profile between them so that it sits flush against the housing - this will help you determine its position.
  • Fit two large angle brackets to the 6 cm profile and attach it between the 30 cm profiles.
  • Fit two more large angle brackets on top of the 30 cm profiles. The 50 cm-high frame will be mounted here later.
The large angle brackets with screws, washers, and profile nuts
Detailed view of the angle brackets on the aluminum profile
The 10 cm long profile without a hole at the end of the 30 cm long profiles
The elevator housing sits flush against the 30 cm profiles; the 6 cm profile is temporarily placed between them.
The 6 cm-long profile piece with two large angle connectors
The 6 cm long profile section is fastened between the 30 cm long profiles.
Two large angle connectors on top of the 30 cm-long profiles for the 50 cm-high frame
1 / 7

Install the motor and photoelectric sensors

  • Fit the stepper motor with screws and slot nuts.
  • Fit the mounts for the photoelectric sensors with screws and slot nuts as well.
  • Mount the photoelectric sensor holders on the 50 cm-high frame, then attach the frame to the base. The easiest way is to clip the photoelectric sensors into the holders first.
The stepper motor with screws and T-slot nuts
The stepper motor from the other side, with screws and T-slot nuts
The mounts for the light barriers with screws and T-slot nuts
The light barrier mounts on the 50 cm-high frame, the frame on the base
The built-in light barriers on the frame
1 / 5

Attach the motor to the top of the frame

Mount the stepper motor at the top of the frame. Position the pulley so the cord runs as close to the center of the hole in the profile as possible.

Route the motor cable through the cable guide on the topmost photointerrupter bracket and extend it with 100 cm jumper wires. If the wires don't fit tightly enough, secure them with a dab of hot glue.

At the bottom, plug the wires into the stepper motor driver in the same order - match the colors in the photo. A dab of hot glue can be useful here too.

The stepper motor at the top of the frame
The pulley above the hole in the aluminum profile
The motor cable in the cable guide, extended with 100 cm-long jumper wires
The cables in the same color order on the stepper motor driver
1 / 4

Insert the gondola and cable

  • Loosen the screws on the angle brackets and place the elevator gondola between the frame profiles. Before tightening, align the frame so the gondola is flush with the base at the front and there is still 3 to 5 mm of clearance at the back from the 6 cm profile.
  • Thread the elevator cable from above through the small hole in the pulley and secure it with a knot to keep it from slipping out.
  • Feed the cable down through the hole in the aluminum profile.
  • Attach the cable to the bottom of the elevator gondola.
The elevator gondola between the frame profiles
The rope is secured to the pulley with a knot.
The rope runs down through the hole in the aluminum profile.
The rope is attached to the bottom of the elevator gondola.
1 / 4

Base plate and stepper motor driver

If needed, you can also insert a bottom plate into the base. This is worthwhile if you want to fit a breadboard there for the wiring. The stepper motor driver is also located in this area.

This completes the assembly, and you can start programming.

A base plate provides space for a breadboard.
The stepper motor driver on the base plate
The fully assembled elevator
1 / 3

Exercises with standard materials

You need basic knowledge of Arduino programming. It’s best to practice with the stepper motor, light barrier, and display separately first – you’ll find suitable tutorials at funduino.de.

The following tasks can be completed using the materials in the Funduino learning kits:

  • 1 – Arduino, cables, stepper motor: Move alternately between two floors, like a construction site elevator. Only the stepper motor needs to be programmed.
  • 2 – add an LCD display: Move alternately between two floors and show the current floor on the display.
  • 3 – add a piezo speaker: Indicate the floor reached with sound – three beeps means the third floor.
  • 4 – add two buttons: Move to either of two floors depending on which button is pressed.
  • 5 – two buttons and an LCD display: Move to either of two floors depending on which button is pressed and show the floor on the display.

Tasks with supplementary materials

Additional components can be added for more extensive projects:

  • The elevator stops as soon as a light barrier is triggered.
  • A second display in the gondola shows the floor - LCD or OLED.
  • An MP3 module with a small speaker announces the floor.

There are many other ways to customize the elevator.

Example program: four floors with OLED display

The following program controls the elevator across four floors. You’ll need:

  • four light barriers, one per floor
  • four buttons, one per floor
  • an OLED display with 128 × 64 pixels

When it starts, the elevator moves down until the bottom light barrier is triggered - this is the home position. It then waits for a button press. In the loop section, the sketch compares the target floor with the current floor and moves the motor step by step up or down until they match. The display is updated only when the floor or destination changes.

The sketch uses pin 22, which is only available on the Arduino MEGA. The buttons are configured as INPUT without pull-ups and therefore require external pull-down resistors.

Four floors with buttons, light barriers, and an OLED display
#include <Stepper.h> // Add the program library.
int SPU = 2048; // Steps per revolution.
Stepper Motor(SPU, 11,9,10,8); // The stepper motor is named "Motor", and the pins it is connected to are specified.
int T1=22, T2=2, T3=3, T4=4, S1=17, S2=16, S3=15, S4=14;// Assign pins for buttons and sensors
int  sT1=0, sT2=0, sT3=0, sT4=0, sS1=0, sS2=0, sS3=0, sS4=0;// Assign status variables for buttons and sensors
int EtageSoll=0, EtageIst=0;// Input storage for buttons and sensors
int F=0; // Variable for operating mode or pause mode
int EtageAlt=0;
int EtageSollAlt=0;
// Initialize OLED
#include <Wire.h>
#include "SSD1306Ascii.h"
#include "SSD1306AsciiWire.h"
#define I2C_ADDRESS 0x3C
SSD1306AsciiWire oled;

void setup() // Setup begins here.
{
Serial.begin(9600);
Motor.setSpeed(6); // Set the speed in revolutions per minute.
pinMode (T1, INPUT);
pinMode (T2, INPUT);
pinMode (T3, INPUT);
pinMode (T4, INPUT);
pinMode (S1, INPUT);
pinMode (S2, INPUT);
pinMode (S3, INPUT);
pinMode (S4, INPUT);
// OLED setup
Wire.begin();
Wire.setClock(400000L);
oled.begin(&Adafruit128x64, I2C_ADDRESS);
  oled.setFont(Verdana12); // Select the font
  oled.clear(); // Clear the current display
  oled.println("TESTFAHRT"); // Text on the first line. "Println" adds a line break.
  oled.println("Aufzug faehrt"); // Text on the second line. "Println" adds a line break.
  oled.print("zum Startpunkt"); // Text on the third line.
  delay (2000);
// Move the elevator to the starting position
 for (int i = 0; i <= 1; i++)
{
Motor.step(-1);
sS1 = digitalRead(S1);
if (sS1!=1) i=0;
 Serial.println(sS1);
}
EtageIst=0;
EtageSoll=0;
delay(1000);
Serial.println("Setup beendet");
oled.clear();
oled.println("Betriebsbereit");
oled.print("Etage:   ");
oled.println(EtageIst);
oled.print("Ziel:        ");
oled.print(EtageSoll);
}


void loop()
{
// Input
Serial.print("Waiting for floor selection ");
sT1 = digitalRead(T1); if (sT1==1) EtageSoll=0;
sT2 = digitalRead(T2); if (sT2==1) EtageSoll=1;
sT3 = digitalRead(T3); if (sT3==1) EtageSoll=2;
sT4 = digitalRead(T4); if (sT4==1) EtageSoll=3;
// Save the previous position before reading the new one so changes can be detected
// Read the current elevator position
sS1 = digitalRead(S1); if (sS1==1) EtageIst=0;
sS2 = digitalRead(S2); if (sS2==1) EtageIst=1;
sS3 = digitalRead(S3); if (sS3==1) EtageIst=2;
sS4 = digitalRead(S4); if (sS4==1) EtageIst=3;
Serial.print(sT1);
Serial.print(EtageSoll);
Serial.println(EtageIst);
// Operating mode
 if (EtageSoll-EtageIst >0) Motor.step(8); // If the value is greater than 0 (the target floor is higher than the elevator's position), move up.
 if (EtageSoll-EtageIst <0) Motor.step(-8); // If the value is less than 0 (the target floor is lower than the elevator's position), move down.
// Display control
   if (EtageAlt!=EtageIst || EtageSoll!=EtageSollAlt) // Update the display with the new values if the elevator reaches another floor while moving, OR if the floor selection changes
   {
    oled.clear();
    oled.println("Betriebsbereit");
    oled.print("Etage:   ");
    oled.println(EtageIst);
    oled.print("Ziel:        ");
    oled.print(EtageSoll);
   }
EtageAlt=EtageIst;
EtageSollAlt=EtageSoll;
}

The older version V1.0

For comparison: This is what the elevator looked like in the first version, before it was switched to aluminum profiles.

The older version V1.0 of the elevator
The older version V1.0 of the elevator from a different perspective
1 / 2
Rate the instructions

Comments

Ask a question or share an experience

Contact us if something doesn’t work. Please include your board and the error message.

We review every comment before publication. Your email address remains with us.