3 Floor Elevator Arduino

56,787

143

76

About: I am from Thessaloniki Greece! I love the world of electronics in every step of my life! I am electronic engineer and my hobby is my job!The summer of 2014 i'm raedy to begin my own company oramasolutions a...

**************** U P D A T E 16th january 2018 ****************

Due to a lot of demand of these boards i have to include a step for the ready ones i have made for this project.

So if you want a professional looking for your project go to last step and see the boards.

you can find more info about these boards at http://www.usbekits.com

***********************************************************************************************************************

Hi there.

Me and 2 friends created this elevator for the grandmother of one of my friends.

George knows very well the metal construction and it is his job.

Bagios is electrician and i am electronic engineer. And voila!

The main board contains the necessary i/o optoisolation and the arduino mini pcb.

3 floors-3 buttons on each floor-3 sensors on each floor-3 buttons and an alarm inside the elevator and 2 terminal safety switches are included for the main installation.

The motor is 230vac and the main board drives it via 2 relay outside the main board to avoid noises from contact relays.But before the current reach the motor it passes through 2 terminal switches in the upper and lower construction.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: The Arduino Main Board

SIx optoisolated inputs and 2 outputs

arduino mini

a pcb mini siren

a bridge rectification stage so to operate with ac power.

Step 2: Arduino Code

To program the mini you need a usb to serial module.

/*
Elevator project with arduino pro mini 328 5v 8mhz - This is a simple elevator project using a single-phase ac motor. - There are 3 floors and a button is placed in every floor and are connected in paraller with 3 button inside the elevator. - 3 proximity switches are attached on every floor to indicate where the elevator is and to stop it. - A buzzer is connected to warn for movement or -alarm stop inside the elevator is attached directly to the reset button. code by:Fanis Katmadas site:oramasolutions.com fanisk@oramasolutions.com */

const int floor1 = 7;//proximity switch attached on floor1 const int floor2 = 6;//proximity switch attached on floor2 const int floor3 = 5;//proximity switch attached on floor3 const int callbutton1 = 4;//push button on the floor1 and in paraller the button for floor 1 in the elevator const int callbutton2 = 3;//push button on the floor2 and in paraller the button for floor 2 in the elevator const int callbutton3 = 2;//push button on the floor3 and in paraller the button for floor 3 in the elevator const int relayup = 12;//the relay that drives up the elevator const int relaydown=10;//the relay that drives down the elevator const int buzzer = 11;//a buzzer warning movement or alarm stop const int poweron=13;

// variables will change: int callelevator1 = 0; // variable for reading the pushbutton status of the floors int callelevator2 = 0; // variable for reading the pushbutton status of the floors int callelevator3 = 0; // variable for reading the pushbutton status of the floors int floor1sense = 0; // variable for reading the proximity status of the floors int floor2sense = 0; // variable for reading the proximity status of the floors int floor3sense = 0; // variable for reading the proximity status of the floors

// the setup routine runs once when you press reset: void setup()

{ // initialize the digital pins inputs. pinMode(floor1, INPUT); pinMode(floor2, INPUT); pinMode(floor3, INPUT); pinMode(callbutton1, INPUT); pinMode(callbutton2, INPUT); pinMode(callbutton3, INPUT);

// initialize the digital pins outputs. pinMode(relayup, OUTPUT); pinMode(relaydown, OUTPUT); pinMode(buzzer, OUTPUT); }

// the loop routine runs over and over again forever: void loop()

{ digitalWrite(poweron, HIGH); // read the state of the pushbuttons value: callelevator1 = digitalRead(callbutton1); callelevator2 = digitalRead(callbutton2); callelevator3 = digitalRead(callbutton3); // read the state of the proximity value: floor1sense = digitalRead(floor1); floor2sense = digitalRead(floor2); floor3sense = digitalRead(floor3);

//start by checking the 3 call buttons. //we read the input and if we have signal we wait for the release before starting. //after the release a pause of a second is added before beggining the motion of the elevator if (callelevator1 == HIGH)// if the floor 1 call button is pressed { delay(200);//software debounce of the button while(callelevator1 == HIGH) { callelevator1 = digitalRead(callbutton1);//check the value of the button again delay(10);//keep running smoothly }//wait for the relese of the button to continue delay(1000); floor1function();//go to the floor 1 fuction of the elevator } else if(callelevator2 == HIGH)// if the floor 2 call button is pressed { delay(200); //software debounce of the button while(callelevator2 == HIGH) { callelevator2 = digitalRead(callbutton2);//check the value of the button again delay(10);//keep running smoothly }//wait for the relese of the button to continue delay(1000); floor2function();//go to the floor 2 fuction of the elevator } else if(callelevator3 == HIGH)// if the floor 1 call button is pressed { delay(200); //software debounce of the button while(callelevator3 == HIGH) { callelevator3 = digitalRead(callbutton3);//check the value of the button again delay(10);//keep running smoothly }//wait for the relese of the button to continue delay(1000); floor3function();//go to the floor 3 fuction of the elevator } digitalWrite(relayup, LOW); //keep the relay for up motion inactive digitalWrite(relaydown, LOW); //keep the relay for down motion inactive digitalWrite(buzzer, LOW);//keep the buzzer quite delay(10);//a few delay just to keep running smoothly }

void floor1function() { if(floor1sense != HIGH) // check the proximity sensor of the first floor to see if the elevator is there {//if the elevator isn't there call it while( floor1sense==LOW) //check that the proximity of the first floor is low //the motor begins and stops when the appropriate floor proximity give the signal { digitalWrite(relaydown, HIGH);//drive the elevator down digitalWrite(buzzer, HIGH);//some noise in the mic floor1sense = digitalRead(floor1); delay(10);//a few delay to keep running the routine smoothly } } }

void floor2function() {

if(floor3sense == HIGH) // check the proximity sensor of the third floor to see if the elevator is there {//if the elevator is there call it while( floor2sense==LOW)//the motor begins and stops when the appropriate floor proximity give the signal { digitalWrite(relaydown, HIGH);//drive the elevator down digitalWrite(buzzer, HIGH);//some noise in the mic floor2sense = digitalRead(floor2); delay(10);//a few delay to keep running the routine smoothly } } else if(floor1sense == HIGH) // check the proximity sensor of the first floor to see if the elevator is there {//if the elevator is there call it while( floor2sense==LOW)//the motor begins and stops when the appropriate floor proximity give the signal { digitalWrite(relayup, HIGH);//drive the elevator up digitalWrite(buzzer, HIGH);//some noise in the mic floor2sense = digitalRead(floor2); delay(10);//a few delay to keep running the routine smoothly }

} }

void floor3function() { if(floor2sense == HIGH || floor1sense == HIGH) // check the proximity sensor of the first and second floor to see if the elevator is there {//if the elevator is there call it while( floor3sense==LOW) //the motor begins and stops when the appropriate floor proximity give the signal { digitalWrite(relayup, HIGH);//drive the elevator up digitalWrite(buzzer, HIGH);//some noise in the mic floor3sense = digitalRead(floor3); delay(10);//a few delay to keep running the routine smoothly }

} }

Step 3: Electrical Wiring

This is the electrical diagram.

I would like to inform you that before 2 days i launched a campaign in indiegogo with a beutiful arduino project.

if you want check it out and share it..

https://www.indiegogo.com/projects/usbeduino-the-arduino-project/x/6872674

Thanks a lot.....

Step 4: Selecting the Motor and the Chain

Because my English isn't good enough i don't know some words in English..

Here in Greece we call "palago" these types of motors.

They have 2 buttons for up and down operation.

I attach some images to understand THE type of motor exactly...

The buttons are now replaced by the high power relays.

These motors have build in metal wire that isn't so strong as the metal chain is...

For this we decide to replace it with the chain...

Some times if you tie very strong the connectors of the metal wire maybe one day will be cut

These motors have build in multipliers that reduces the speed of motion too.

Step 5: Handle the Noises and the Reset Button - Alarm Stop

As you notice there is an alarm switch inside the elevator.

This is to hardware reset the board and stop the elevator.

There are 2 contacts inside that switch. N.C. and N.O.

The N.O. contact is used for the hardware reset.

This contact drives a 12 volt relay near the controller board that applies the ground to the reset pin via its N.O. contact.To the reset pin a pull up resistor is attached too 5.6K.With these we prevent some noises from the motor cables to travel through the ground to the board and prevent unwanted reseting.

To prevent some noises from the motor there is a second power supply for the high power relays.

The High power relays are driven through 2 relays near the controller board.

The ground of the output relays are separated from the main controller ground to prevent noises.

The N.C. contact inside the alarm switch is applying the power of the second power supply to the high power relay's coils to direct cutting the ac power.

Step 6: Some Updates...

I have to inform you from some updates.

I notice some noises in the ground of the controller due too the relay that drives the motor.

So i decided to seperate the grounds with another power supply.

Have a look at the new schematic to understand

Step 7: Thank You for Voting for My Elevator!

Due to your votes our project finished 2nd in the home automation contest!

Thanks a lot!

for any help please leave a comment and i will reply.

Step 8: The Ready Pcbs

Hi all,

thanks a lot for you interest in my instructable.

I have decided a tear ago to build this project in a more professional and compact pcb.

With these boards i was able to help many people that were unable to build their own project.

This board have additional 2 more inputs and one more output.

You can use this board as a plc too.

You can have a look at my site for the presentation too:

http://www.usbekits.com/arduino-nano-plc-board.htm...

for any questions i am here to respond!

Best regards

Fanis Katmadas

Home Technology Contest

First Prize in the
Home Technology Contest

Metal Contest

Participated in the
Metal Contest

2 People Made This Project!

Recommendations

  • CNC Contest

    CNC Contest
  • Make it Move

    Make it Move
  • Teacher Contest

    Teacher Contest

76 Discussions

0
None
usb-e-kitsteletechbdmail

Reply 14 days ago

Hi my friend,

I have prepaired a new version but it will be ready next months...
If you want help for something please feel free to ask me...

0
None
teletechbdmail

5 weeks ago

Une nouvelle mise à jour pour 2019?

0
None
tanveer321

Tip 5 months ago on Step 8

Have a good day .
You are a really honest man ..I appreciate your project .

1 reply
0
None
Yogesh5810

Question 11 months ago on Step 3

I want the wiring diagram of main board

F4GPKR6HWVAUA84.LARGE.jpg
0
None
MikeAlwaysMike

Question 1 year ago

Hi

Love the project and the intuitive way you have solved problems. I have downloaded the PCB pdf file and it seems to be incomplete as the negative is only on half the board, is this correct?

Thanks

Regards

0
None
Instruit

Question 1 year ago on Introduction

I live in a 3 floors house and have an increasing knee problem. Your Instructable is an outstanding solution. However i NEED IT INSIDE the house where a path is available through all the floors for ONE PERSON (Wardrobes for example).

What modifications would you suggest in order to have a lighter structure for a 200 pounds maximum weight and a platform of smaller size? I weight 150 pounds.

I have good mechanical, electrical and electronics skills.

THANKS

1 answer
0
None
usb-e-kitsInstruit

Answer 1 year ago

Sorry friend, i don't have mechanical skills to help you. Only with the electronic parts. The metal construction was made by a friend of mine! if you need anything for the automation i would be glad to help you!

0
None
RehanK24

1 year ago

Sir can i get complete project on email as i am disable person and want to build it for my self for home use.

1 reply
0
None
usb-e-kitsRehanK24

Reply 1 year ago

Hi there,
yes i have some boards.
please contact me via email.
fanisk@oramasolutions.com

0
None
ramasahi

2 years ago

Dear sir, as you stated below, i contacted to your mail on 22/07/17. but not yet get reply. please advise how can get your PCB and code. Thanks.

0
None
ramasahi

2 years ago

Dear sir , how i can order this pcb & components? please advise. Thanks

1 reply
0
None
usb-e-kitsramasahi

Reply 2 years ago

Hi my friend,

please contact me on my personal email fanisk@oramasolutions.com

0
None
FernandoA25

2 years ago

Hi! Great project! Can you help me about J8 Supply? 5V to arduino and what is the voltage about second powet supply? Quat happened sorry with the gnd? bad english!

2 replies
0
None
usb-e-kitsFernandoA25

Reply 2 years ago

Hi my friend.
The second power supply is for handling inputs / outputs.
The gnd must be separate to avoid ground noises from the external environment.

If you wish there is a ready pcb board already so to be sure for your project.

P70209-153437.jpg
0
None
Rick Hubkausb-e-kits

Reply 2 years ago

Love your project. I just got an arduino and am learning but I'm 63 :) I want to make an elevator for my old German Shepherd dog. He can no longer climb stairs. Is it possible to buy a completed PCB from you?

Thanks... Rick from Chemainus BC Canada

1
None
1endell

2 years ago

I made it, but i haven't any image. I want to thank you. You helped me to understand the logic behind and elevator.