Introduction: 3 Floor Elevator Arduino

**************** U P D A T E 14th FEBRUARY 2017 ****************

I HAVE READY THE PCBS FOR THIS PROJECT. WITH THE READY PCBS YOU HAVE THE ABILITY TO BUILD THIS PROJECT EASILY. i WILL ADD A STEP TO DEMONSTRATE THE BOARD SOON!

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

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.

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.

Comments

author
ramasahi made it!(author)2017-07-19

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

author
usb-e-kits made it!(author)2017-07-20

Hi my friend,

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

author
FernandoA25 made it!(author)2017-02-13

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!

author
usb-e-kits made it!(author)2017-02-14

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
author
Rick+Hubka made it!(author)2017-04-30

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

author
1endell made it!(author)2016-11-23

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

author
usb-e-kits made it!(author)2016-11-23

i am very happy that you made it my friend. In the next month i will have the pcbs for the project. it will be easier for diy lovers to build their own elevator....

author
antvel made it!(author)2017-02-01

hi is it possible to have the pcb layout on .pcbdoc or .brd as from pdf i cannot make it

author
usb-e-kits made it!(author)2017-02-01

Hi there!

Please tell me why you cant do the pcb with the pdf file?

You have just to print them in a laser printer.

Beside that i have in my hands the ready pcbs that i will test them and inform you in a few days.

Let me know if you are inderested.

author
JanG70 made it!(author)2016-09-12

hey bro! i need some help. is it okay if i use the code and the PCB you provide for the 3-floor elevator in instructables for my 2-storey elevator project? will it affect the system? please help me.. :(

if it is not possible to use the code and the PCB can you help me build the code and the PCB? i am no electronic engineer that's why i need your help.

thanks bro.

author
usb-e-kits made it!(author)2016-09-13

Hi friend,

No there is no worry if you use the same code and pcb.

You will connect 2 inputs and 2 outputs and you will be ok.

Please inform me if you have any problem.

author
JanG70 made it!(author)2016-09-15

hi friend,

will it be okay if i'll use a 3-PHASE synchronous motor to drive the system? do you think your automation code will still work for a 3-phase motor?
one more thing bro, can you give me the specifications of all the components you used for this elevator project? i might as well look and buy for the same items especially the sensors, wires and the floor selector buttons or switch.

Thank you very much friend.

author
JanG70 made it!(author)2016-08-21

HEY BRO. I NEED YOUR HELP. I WANT TO BUILD AN ELEVATOR SYSTEM FOR MY TWO STOREY HOUSE, CAN YOU HELP ME WITH THE CODE AND THE NECESSARY DIAGRAMS? WILL IT BE POSSIBLE IF I WILL USE ARDUINO MICROCONTROLLER ONLY OR IT'S A MUST FOR ME TO USE A PCB? THANKS.

author
hilario+melo made it!(author)2016-06-24

Muito Obrigado ! Os Senhores não sabem o bem que realizam em todo o mundo !

Parabéns !

author
Home+Mechanics made it!(author)2016-06-19

I am planning to make a 3 story elevator and the building is no problem for me but the electrics are. I'm good at building but no good at reading electronic plans :-(

Well done.

author
usb-e-kits made it!(author)2016-06-21

I'm planning to make a ready to plug pcb for this purposes. I hope you will manage to do your elevetor.

author
Home+Mechanics made it!(author)2016-06-21

I don't even know what a PCB is lol. Nice if you could buy the electrics in a kit form. I'm building a house in Philippines and would like to build a elevator instead of a stair case.

Screenshot_2015-12-18-22-46-58-1.jpg
author
usb-e-kits made it!(author)2016-06-21

Hi my friend,

pcb stands for printed circuit board.

author
usb-e-kits made it!(author)2016-06-21

Hi there,

I was busy last year and i didn't have much time to deal with many sites i am a member. I'm really sorry.

In this year i was asked with personal email and messages for help.

I decided to build a pcb for those that are not familliar with electronics.

I hope that i will help some people out there with this pcb.

Thank you all!

Best regards

Fanis Katmadas

author
thafer made it!(author)2015-10-04

That's great job congrats.

I need to make home elevator like yours elevator.can you help me please I need some information from you.my email is Thafer.Hamza@yahoo.com

thank you

author
usb-e-kits made it!(author)2016-06-21

Thanks my friend! I hope you managed to build one!

author
gavinh6 made it!(author)2015-10-09

I wonder if you could add a piston to the bottom so if the cable ever broke it would hold the elevator in place and depndeing on which way its going up or down thats the way the piston locked

author
usb-e-kits made it!(author)2016-06-21

yeap! its good idea if you are a mechanical engineer. I''m electronic engineer...

author
Angel+RoseB1 made it!(author)2016-02-13

Amazing! This is also a big help for my THESIS which is lift management.

author
usb-e-kits made it!(author)2016-06-21

Great!.Its my pleasure!

author
resistbody made it!(author)2016-03-17

Greetings from Bulgaria, used some of your code for mine 3 floor freight lift. Added check for closed doors, and button for door unlocking, because of safety reasons.

I use same type of motor, and also had problems with power supply, so I had to use 2 power supplies. Probably will post instrucatble, but when my nano arrives, as I use my testing Uno now.

2016-03-07 20.52.09.jpg2016-03-11 20.14.25.jpg
author
usb-e-kits made it!(author)2016-06-21

Great! thanks for your good words!

author
building288 made it!(author)2016-04-08

Awesome love the idea and thanks for sharing

author
usb-e-kits made it!(author)2016-06-21

thanks my friend!

author
wkelty made it!(author)2016-04-09

I absolutely love this. Fantastic! One question. You mention 3 proximity sensors per floor. Can you tell me what proximity sensors you used? Thank you!

author
usb-e-kits made it!(author)2016-06-21

general purpose sensors.nothing special. pnp output

author
AKholany made it!(author)2016-04-23

can i use infrared proximity sensor for small project ?

author
usb-e-kits made it!(author)2016-06-21

yes my friend. you can.

author
Kungurov made it!(author)2015-10-05

This is a veryinteresting project!Thank you!I loved itandI want to buildthe same lift.But I haveonlythree phase motor. Pleasetell mecan I usethree phase motorin this project?

author
dineshj921 made it!(author)2015-08-11

that's great job congrats bro.i thought to make same elevator for my also my home.can you help me please i need some of more information from you.my email is dineshj921@gmail.com

thank you

author
miftakhul made it!(author)2015-08-05

author
rowan.delabarre made it!(author)2015-06-08

No broken cable saftey!

author
jatin.puri.94 made it!(author)2015-02-25

What if i want to make a small prototype of this lift, should i use the same motors, sensors and all or different ones. if different, would you suggest some please?

author
usb-e-kits made it!(author)2015-05-10

How small would be your prototype.

All the sensors should be the same but for the motor you should choose a motor that is strong enough for your ptototype.

author
KOTSOS5 made it!(author)2014-12-18

Very good, Well done patrida! Ayto me to ena syrmatosxoino 'h alysida (den mporo na do kala) den einai ligo epifobo...

author
usb-e-kits made it!(author)2015-05-10

Φιλε μετα απο χρονια δοκιμες κατεληξε εκει ο φιλος.

Αν σπασει η αλυσιδα οντως ειναι επιφιβο.

Παντως ειναι κατι που ψαχνει ο φιλος ακομα να βαλει καποια φρενα.

author
usb-e-kits made it!(author)2014-12-23

Να σε καλα πατριδα.
Στην αρχη το εβγαζε με συρματοσχοινο.
Μετα το γυρισε στην αλυσιδα.
Μετα απο χρονια δοκιμες του σιδερα κατεληξε στην αλυσιδα.
τι να πω εγω κοιταξα το ηλεκτρονικο μερος.

author
JohnG9 made it!(author)2014-09-21

poli kali douleia... kai ta elektronika idios...

exeis baleis kapoio mixanismo asfaleias se periptosi poy kopi to sirmatosxino?

author
usb-e-kits made it!(author)2015-05-10

Τωρα δεν υπαρχει ασφαλεια γιαυτο.

Ειναι κατι που ψαχνει ο σιδερας φιλος μου να το κανει με φρενα .

Θα ρωτησω αν εβγαλε καποια πατεντα και θα ενημερωσω

author
marios8543 made it!(author)2014-08-30

Μπραβω φιλε. Συγχαρητηρια. Τελειο πραγμα. Να σε ρωτησω. Για να ανεβωκαταιβενει χρησιμοποιεις διφασικο μοτερ;;

author
usb-e-kits made it!(author)2015-05-10

To moter ειναι ετοιμο και λεγεται παλαγκο.

Εχει επαφη για δεξιοστροφη κινηση και επαφη για αριστεροστροφη.

Ειναι κλασικα μοτερ για μπαλκονια που ανεβαζουν φορτια.

author
hasait made it!(author)2015-01-07

Hi. Its good work friend....can I ask u to send me programs of Arduino please for elevator 4 floor automatic door and two speed motor. Thank you

IMG_20150107_123949.jpgPSX_20150107_202358.jpg
author
wilgubeast made it!(author)2014-08-08

This is awesome! Such good boys. I bet grandma brags about this nonstop.

author
usb-e-kits made it!(author)2014-08-09

Thanks you friend.
You are awesome too!

author
TrollFaceTheMan made it!(author)2014-08-08

Very nice, what you did for your Grandmother :)

About This Instructable

38,433views

136favorites

License:

Bio: 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 ... More »
More by usb-e-kits:screw driver standTv rgb led strip hidden lightlaptop cooler stand (the hard way)
Add instructable to: