4 Level Elevator Control System

Thread Starter

TheLegion

Joined Jan 20, 2012
3
Hi Everyone!

I need your help with an Elevator project I have. I have uploaded the Assignment and provided the link below, either way I'll give a short description.

Project Description
You are to design and implement a simulation of an elevator control system. The elevator is in a building of 4 floors (floor 0 to floor 3). You will use green LEDs to indicate where the elevator is at the moment, push buttons to press the needed button on each floor (the upper button when needing to go up and the lower button when needing to go down), red LEDs to indicate which button was pressed, and a 7-segment display to indicate at which floor the elevator is at the moment.


The more detailed functioning of the elevator is inside the PDF document attached.

I have been working on this project for almost 3 weeks now, but I still could not get it to work. I tried all sorts of approaches, all combinations of State Diagrams and FSMs, but nothing seemed to work.

This last approach I am trying consist of a 3 State FSM. A Hold, an Up, and a Down. These simply represent the state of the elevator, whether it is stationary, going up, or going down. I have also uploaded the truth tables for each state. I believe they are correct, but I'm not sure. It would be great if you guys could look through them and give me any advice, hints, and corrections.
My main problem at this point remains designing some sort of memory or register to save all the inputs. Again, this is what I believe. You see I need a way to control the inputs, which are supplied by push buttons that represent where the elevator is being called from and in which direction, so that I can pass them in an intelligent manner to the elevator so that it would know what to do next or where to go. In short I believe I need some sort of intelligent control for the inputs to pass them to the elevator and then reset them when their conditions are met.

I know it's a lot to read, but I am really desperate, I am down to my last 3 days before my deadline and I can't get the thing to work properly.

If it helps, I am simulating my design using Altera Quartus 2 Web Edition, which is the software we use in this course.

Below are the links for the Description of the project and the 3 truth tables.
Full Description of the Project:
http://www.mediafire.com/?i6yiiiy27b94p06
Truth Table of the hold state:
http://www.mediafire.com/?tyn4n1xpg7whi5f
Truth Table of the down state:
http://www.mediafire.com/?3aqav7wyqbh3w2a
Truth Table of the up state:
http://www.mediafire.com/?ao0nhr2wma162o2

ANY help,any, is GREATLY appreciated. I really need to get this elevator working.

If you need any extra information from me, please don't hesitate to ask or send me a pm.

Thanks in advance!! :)
 

Georacer

Joined Nov 25, 2009
5,182
It would really help if you grouped all your excel sheets into one.

Once someone gets into an elevator, how will he input the floor he wants to go to? Also, using your method, you cannot handle multiple calls.

There are plenty of similar projects on the forum. Have you taken a look at them?

I 'll come back with more suggestions.
 

Thread Starter

TheLegion

Joined Jan 20, 2012
3
We are not responsible for the internal commands of the elevator.

The elevator, however, HAS to be able to handle multiple requests from the outside of the cabin. It is this problem that I can't seem to overcome.

I had come up with different designs, but they seemed more complex, with the state diagram of one having 10 states, 3 for the going up states, 3 for the going down states, and 4 for the parked states. I changed that design, even though I am convinced it would work, because I did not have sufficient knowledge to translate that state diagram into truth tables and then build the circuits; but even in that complex diagram, I could not figure out how to save several commands and process them into the FSM.

By the way, I literally looked through every post with a similar topic, but couldn't find anything regarding this issue, as in only controlling the movement of the cabin and serving call requests that are only on the cabin's direction of movement, using only an FSM, without any micro-controllers and/or PLCs.

Any more suggestions would be of great help.

Thanks again.
 

Georacer

Joined Nov 25, 2009
5,182
Multitude of inputs is always a problem for similar assignments. It's doable but too big of a truth table to be worth it.

Do you have to create a single FSM for the whole system?

Why don't you try something like the following:

  • One 6-bit register for holding the elevator calls
  • One 2-bit register for encoding the current elevator level
  • One 2-bit register for encoding the current direction
  • A combinational logic circuit that determines if the current level can be served by the elevator - inputs: elevator level, direction/ total input bits 10, let output be stop
  • One combinational logic circuit that determines if there are levels to be services above, let output be exists_above
  • One combinational logic circuit that determines if there are levels to be services below, let output be exists_below
  • An FSM that decides the elevator direction with input stop, exists_above, exists_below
  • A combinational circuit that looks at the elevator and each time it is stopped, it deactivates the corresponding red button - inputs: elevator level, elevator direction, input bits 4, output bits 3 with use of a decoder
What do you think about that? It breaks the system down to modules. You will need to create some more circuitry, probably MUXs to control the register input.


Give it a shot, buy you might want to hurry if you only have 3 days. The devil is in the details.
 

Thread Starter

TheLegion

Joined Jan 20, 2012
3
Hey Georacer,
That's the problem that I faced with the 10 state FSM, especially as I was using One-Hot encoding . . .the truth table was far too big.

I am not obliged to create a single FSM for the system, no, I am free to break it down if I want.

I like the ideas you presented above. Registers were hinted to be of good use.

But you see, my problem is, that I haven't had any proper introduction to or experience with registers; I do not know how they work. As in how will they store the inputs, and how can I take those inputs I want from them? As for the reset of these inputs, how exactly is that done?

I'm sorry to bother you with such details, but I really have no clue about registers. I tried looking up examples on google but I couldn't find any, probably due to my lack of experience and knowledge in successfully identifying such an example.
It would be great if you could tell me how that 6-bit register would work, or if you can give me an example circuit.

I hope I am not bothering you too much, but I really am stomped.

Thank you so much for your help already. :)
 

Georacer

Joined Nov 25, 2009
5,182
In this basic example, you could think of registers as arrays of D-Flip Flops. Are you familiar with them?

For example, the 6-bit shift register would include 6 D-FFs, with one common clock input. This array changes its 6-bit value every new clock cycle.

If you find the need to keep the registers' value unaltered during many cycles, you could use a MUX to achieve that.

An example for the 6-bit register:
Place a 12-to-6 MUX (it's a hypothetical one, not a real life model) in front of the register. The first 6 inputs of the MUX will derive from the external circuit. The other 6 will come from the register's output.
By having one 1-bit control input for the MUX, you can control if the register will be fed external signals or its own output. In the second case, its value will remain the same, no matter what the external input will be.
But of course you can do that only if you also know what a MUX (multiplexer) is. :D

Anyway, I 'm not 100% sure you will need a MUX, it's just that that the latching function it gives the register is useful sometimes, not necessarily in your example.
 

WBahn

Joined Mar 31, 2012
30,058
You are resurrecting and hijacking a thread that is almost a year and a half old.

On top of that, it sounds like your constribution is basically, "I have to do the same project, will anyone give me a solution on a silver platter?"

Please start a new thread (feel free to include a link to this one or others that might be relevant), clearly state what your problem is and describe what YOU have down to develop a solution to YOUR problem.
 
Top