Elevator Project
Elevator Project
Elevator Project
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).
● inputs that are given by the proximity sensors (i.e used in predicting the current location of the lift
and moving to the target destination
sensor_low , sensor_m_m, sensor_m_p , sensor_top
State machine
F1 → Sensor_low = 1 , m_m = 0
F2 → m_m = 1 , m_p = 1
F3 → m_p = 0, top = 1
Up2 →` (1, 1, 2)
Up3 → (1, 2, 3)
Down2 → (1, 3, 2)
Down1 → (1, 2, 1)
Code Snippets
(For code snippet 1 explanation)
This is the part of the code where we find out the value of the target variable. Here, the value of isMoving
is 0 and thus, the lift is static and is not moving. In each if and elsif clause, we assign values of variables
target, t1, t2, t3. The different btn variables indicate the button pressed. If btn1 is 1, it means the button to
go to the first floor is pressed, and so on. t1,t2, and t3 are indicators to target the floor. If t1 is 1, the target
floor is the first floor, and so on. Thus, the above code snippet is to assign values to some variables which
will be used in the further parts of the code.
After getting the values of the variables t1, t2, t3, and target, different clauses are made for each value of
the target. Here, in this snippet, if the value of the target variable is 1, then there are 2 possible cases :
1) It is already on the first floor.
2) It is moving downwards as the first floor is the lowest floor.
After getting the values of the variables t1, t2, t3, and target, different clauses are made for each value of
the target. Here, in this snippet, if the value of the target variable is 2, then there are 3 possible cases:
1) It is already on the second floor.
2) It is moving downwards.
3) It is moving upwards.
After getting the values of the variables t1, t2, t3, and target, different clauses are made for each value of
the target. Here, in this snippet, if the value of the target variable is 3, then there are 3 possible cases:
1) Lift is already on the third floor.
2) Lift is moving upwards
Novelty
● Our code has also taken care of the case when none of the sensors are on which occurs when
the distance between the two sensors is far apart from each other than the length of the lift
● When we are in a moving state we are not taking any inputs for any other target floor once we
reach the earlier target floor
Conclusion
For this project, we learned the basic idea of how the normal elevators run in many cases, even though it
is simplified, we still spent lots of time designing and figuring out many problems when combining all the
cases, of course, the most challenging and time-consuming part is debugging. However, after
accomplishing it, we learned many things beyond this project, so it is a very helpful assignment
Contribution
Everyone has contributed equally