Simple Elevator Design

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Simple Elevator Design

EL 203 Project

Project By:
202001017 Mihirkumar Patel Code, Assembling, Report
202001018 Kamal Patel Code, Assembling, Report
202001019 Ruchi Detroja Report
202001020 Aditya Patel Code, Assembling, Report
202001021 Shrey Pobaru Report

Introduction:
In this project, an elevator controller is implemented on an FPGA board using
VHDL language. The elevator controller consists of combinational logic circuits
and a finite-state machine. We have created an elevator that is programmed to
move across 3 floors. It also displays where the elevator position is, what
requests have been made, and in which direction the elevator is currently
moving in (up or down direction).

The system uses a Finite State Machine (FSM) to take floor inputs from inside
the elevator and up and down calls from outside the elevator, to determine the
movement of the elevator from the current state to the desired next state. States
have been defined floor-wise, depending on whether the elevator doors are to be
opened or closed. Sensors are used to improve the reliability and safety of the
elevator by positioning it appropriately. This elevator controller system has
been successfully implemented on Xilinx Zynq FPGA Board using Very High-
Speed Integrated Circuit Hardware Description Language (VHDL).

1
Data Flow Graph:

State Diagram:

2
Here the state diagram consists of 7 represented by Floor0, Floor1, Floor2 and 2 Move
Up states and 2 Move down states. The Floor states represent the state of the lift i.e.,
on which floor the lift is currently. And the Move states represent whether the lift is
moving upwards or downwards.

Stationary State:

State Floor0: Represents Lift is stationary on floor 0.


State Floor1: Represents Lift is stationary on floor 1.
State Floor2: Represents Lift is stationary on floor 2.

Moving State:

State Move Up to 1: Represents Lift is moving upward to floor 1.


State Move Up to 2: Represents Lift is moving upward to floor 2.
State Move Down to 0: Represents Lift is moving Downward to floor 0.
State Move Down to 1: Represents Lift is moving Downward to floor 1.

Push button inputs given by the user for each floor are taken in variables as follows:

inp 0: Represents the call button for floor 0


inp 1: Represents the call button for floor 1
inp 2: Represents the call button for floor 2

Inputs Given by the Proximity Sensor (Used in predicting the current Location of the
lift):

Sensor for Top floor:


irt: The Top floor is reached when the sensor is activated
Sensors for Mid floor:
irmp: Middle plus sensor. The sensor activates to signal alignment of
lift’s floor for
the middle floor.
irmm: Middle minus sensor. The sensor activates to signal alignment of
lift’s floor for
the middle floor.
Sensor for Bottom floor:
irb: The bottom floor is reached when the sensor is activated

Motor state 0:
Mdn = 0 and Mdp = 0 ⇒ represent the motor turned off.
Motor state 1:
Mdn = 0 and Mdp = 1 ⇒ indicates the downward movement of the elevator
Motor state 2:
Mdn = 1 and Mdp = 0 ⇒ indicates the upwards motion of the elevator

3
VHDL snippets:

• Snip 1
• Snip 2

• Snip 3
4
In our code inp0, inp1, inp2 are mapped to the three push button inputs given by the user to
request the lift at floor 0, floor 1 and floor 2 respectively. On based on these 3 inputs and 4
inputs from IR sensors for each particular floor we give outputs to the Leds, then to the motor
through mdp and mdn bits which determines the motion of the motor as mentioned above.

Snippet 1 (From all Floors to Floor 0):

• If Current floor is 0 ⇒ The motor would be in state 0 i.e.; lift would be stationary.
• If Current floor is 1 or 2 ⇒ we change the motor state to 1, hence the lift would be
moving down to floor 0.
• Led of floor 0 is turned on during the time when the lift is moving down.

Snippet 2 (From all Floors to Floor 1):

• If Current floor is 1 ⇒The motor would be in state 0 i.e.; lift would be stationary.
• If Current floor is floor 0 or only the mid-minus sensor is on ⇒ we change motor state
to 2, hence the lift would be moving upwards to floor 1.
• If Current floor is floor 2 or only the mid-plus sensor is on ⇒ we change motor state
to 1, hence the lift would be moving downwards to floor 1.
• Led of floor 1 is turned on during the movement of the lift.

Snippet 3 (From all Floors to Floor 2):

• If Current floor is 2 ⇒ The motor would be in state 0 i.e.; motor would be stationary
• If Current floor is floor 0 or 2 ⇒ we assign variable up 1 and change motor state to 2.
• Led of floor 0 is turned on during the time when the lift is moving down.

Shortcomings:
• In some cases, none of the sensors are activated, which happens when the distance
between the two sensors is greater than the lift's length. Since the motor has no input
in this situation, it begins to rotate unevenly.
• We built a structure in our code that resembles a mutex lock to ensure that when the
lift is in moving state it doesn’t take any input till it has reached the input.

Novelty:
• We built a structure in our code that resembles a mutex lock to ensure that when the
lift is in moving state it doesn’t take any input till it has reached the input.

Acknowledgment:
Rameshbhai Prajapati.

You might also like