Elevator Project

Hello, I am working on a four floor elevator project at a moment, and I was wondering if there is anyway to program the arduino that enable the users to select "multiple floor selections" on hall call and car call buttons.

thank you.

I'm fairly sure that will be possible.

Amirtk:
Hello, I am working on a three floor elevator project at a moment, and I was wondering if there is anyway to program the arduino that enable the users to select "multiple floor selections" on hall call and car call buttons.

thank you.

the Arduino seems like a great choice for the project, you could even play Jackie Wilson 'your love' while going up... not sure what to play on the way down.
but, you do need to define what you mean by multiple floor selections.
the button hall button would only have up as the selection
the 3rd floor, would only have down
floor 2 should have either up or down.
the car should have options for all 3 floors.

You may find some ideas for approaching your project in Planning and Implementing a Program - particularly the notion of writing down the steps that the program needs to perform. Once you have that clear, 70% or more of the intellectual effort is done.

...R

what I mean by multiple floor selection is to select all the three floors at a time for example and elevator start serving them in a sequence.

Yes, that's still possible.

Is this an assignment for a programming class?

No this is a part of my final year project. I am doing some improvements on the lift dispatching.

Amirtk:
what I mean by multiple floor selection is to select all the three floors at a time for example and elevator start serving them in a sequence.

You need an array to store the button presses. Then as each floor is attended to the request for that floor can be cleared.

That would allow, for example, the ground floor to be selected after the lift has just left the ground floor and it would eventually get back to it.

Assuming the lift goes all the way up (at least to the highest floor requested) before it reverses direction you don't need to keep track of the order the floors are selected.

...R

Thank you...

Hi, I am new to arduino and have started to work on a 4-floor elevator prototype with arduino mega. But for now i am only considering two floors. I have two buttons for floor1 and floor2 and one proximity sensor at each floor. I wanna have a program similar to the following but dont know how to do it with arduino. Also How can i design a statemachine for this elevator??

Please guide me through this. If you have any website or link please share it here.

thank you.

destinationfloor = floorbuttons;  //Floor buttons
currentfloor = floorsensors;   //proximity sensors

if floor2button == HIGH
{

if (currentfloor == destinationfloor)
{

>>>>stay idle;

}

else if (currentfloor > destinationfloor)

{

>>>>move down;

}


else 
{

>>>>move up;
}

}

Enter "elevator" in the search box on top if this page.
See what others before you have done.
Leo..

What sort of motor are you using to drive the elevator ?

Wawa:
Enter "elevator" in the search box on top if this page.

Here's a link to one of these "elevator" threads. Maybe it has information applicable to this project?

I am using a 12V geared dc motor with NO proximity switches.

@DuaneDegn

I have made that thread a while ago...

Amirtk:
@DuaneDegn

I have made that thread a while ago...

Then why start a new one ?

How far have you got ?
How is the motor connected to the Arduino ?
How is the motor powered ?
What type of proximity sensors do you have and can you read from them ?
Why 2 sensors at each floor ?

I have connected the motor to arduino through the L293D driver and for now the motor is a 5v motor (testing purpose only). Later I am gonna replace it with a 12v motor. I have used a common ground and power for motor and driver with arduino and i have used a 9v battery for powering up the sensors (inductive proximity sensor;voltage range is 6-36V). I have tested the motor and sensors. They works fine. Then I combined the codes but because i used if-else statement, it was too messed up. So for now i am looking for a another way like state-machine with switch-case condition. but i dont know how to do it this way...

Sorry,I have used one sensor for each floor...

So for now i am looking for a another way like state-machine

First decide how many states there will be, what condition(s) will cause an exit from each state and what the destination state is for each exit condition.

I already have made a state diagram but have a problem in assigning the floors. for example i have two buttons (floor1 and floor2 ) which are connected to pins 22, 23 and two sensors connected to pin 24 and 25. How can write a program which shows the current floor and destination floor and based on motor moves up/down or stay idle?