ARDUINO OLED ELEVATOR SYSTEM
The objective of this project is to create a simple elevator simulation using an Arduino, OLED display, push buttons, motor driver, and buzzer. The system allows the user to move between four floors using UP and DOWN buttons.
Supplies
- Deshbot shield
- Arduino Nano
- 0.96-inch OLED Display (128×64, I2C)
- 2 Push Buttons
- DC Motor
- Buzzer
Pin Connections
ComponentArduino Pin
UP Button - D10
DOWN Button - D12
Motor Driver IN1 - D6
Motor Driver IN2 - D7
Buzzer - D11
OLED SDA - A4
OLED SCL - A5
OLED VCC - 5V
OLED GND - GND
Working Principle
The system starts at Floor 1. Two push buttons are used to control the elevator:
- UP button: Moves the elevator to the next floor.
- DOWN button: Moves the elevator to the previous floor.
The elevator can operate between Floor 1 and Floor 4.
When the UP button is pressed, the Arduino increases the floor number, rotates the motor in the upward direction, displays "GOING UP", and produces a buzzer sound.
When the DOWN button is pressed, the Arduino decreases the floor number, rotates the motor in the opposite direction, displays "GOING DOWN", and produces a different buzzer sound.
After approximately one second, the motor stops and the OLED displays the current floor and "READY".
Motor Control
The motor driver uses two digital pins to control the motor direction:
MOTOR_AMOTOR_BOperation
HIGH
LOW
Motor moves UP
LOW
HIGH
Motor moves DOWN
LOW
LOW
Motor STOP
Floor System
The elevator has four floors:
Floor 1 → Floor 2 → Floor 3 → Floor 4
The program prevents the elevator from going above Floor 4 or below Floor 1.
OLED Display
The OLED provides information about the elevator's current operation.
When Ready:
ELEVATOR
FLOOR 1
READY
When Moving Up:
GOING UP
F2
When Moving Down:
GOING DOWN
F1
Buzzer Operation
The buzzer provides an audio indication when the elevator starts moving.
- Moving UP → Higher tone
- Moving DOWN → Lower tone
Program Operation
- The Arduino initializes the buttons, motor driver, buzzer, and OLED.
- The starting floor is set to Floor 1.
- The motor is initially stopped.
- The OLED displays the current floor and READY.
- When UP is pressed, the elevator moves up by one floor.
- When DOWN is pressed, the elevator moves down by one floor.
- The motor runs for approximately one second.
- The motor stops automatically.
- The OLED updates the current floor.
- The process continues until another button is pressed.
Conclusion
The Arduino OLED Elevator System demonstrates basic motor control, button input, OLED display programming, and buzzer feedback. The system simulates a four-floor elevator where the user can control the elevator's movement using UP and DOWN buttons. It provides a simple foundation for developing a more advanced automatic elevator system.