Elevator Project

hey everyone;

im building an elevator, and it is working succesfully but if the electric power goes during movement, the arduino will restart and the code will think the arduino is in 0 location while it is in the middle. What is the best way to overcome this problem?
Things i've considered so far:
Eeprom (but there will be 400000 steps so how can it hold data so fast)
Ground sensor (but what kind of sensor, IR or buttons or Linear potentiometer?)

Thanks for answers

Eeprom (but there will be 400000 steps so how can it hold data so fast)

Store the floor number, not the number of steps taken to get where you are.

If the power is lost, how will you stop the elevator from dropping to the lowest point?

Whatever mechanism you use needs to stop the elevator at a floor, or allow the elevator to hunt for the next floor when power is resumed, so all you need to know, when it finds a floor is which floor it found, which you stored in EEPROM.

Hi,
I think you must have a switch or sensor at the ground position, right??

Is this a mechanical / automation device, NOT for humans?? Otherwise you need a LOT more safeguards.

Many mechanical devices restart by moving SLOWLY to the known end position as shown by a 'limit' switch.

It sounds like you determine your locaiton by number or steps.

I would offter that you can put in holes or whote/black lines, or some such inbetween each floor.
now when you move, you pass the sensor and know where you are.

at the bolttom, you should have an end switch and a home switch.

Hi,
How many floors?
Is it for carrying people?
If so do you have liability insurance?

If your system goes down with power outage, you need to make the arduino default to a standby mode when it powers back up.
Even if you have it on every power up go into a standby mode.
Then a master GO switch for the controller to start its main program, will make sure any emergency situation or starting operation can only be started by human intervention.

Tom... :slight_smile:

You could register the direction (or steady state) to EEPROM, so that when it resets it will continue in that direction. But combine it with a sensor to register when coming to a floor, and also a sensor to register if ground or top is passed.