Elevator (motor + distance sensor)

Hey,

I am designing a miniature elevator using ArDuino UNO, DC Motor and a distance sensor. I am planing on using a motor for rising and lowering the elevator through various levels. I need to measure the distance of the elevator from the ground so the motor knows when to stop for a certain level. That is why I need a distance sensor. I never worked with such sensors so I could use some advice. The maximum distance (range of the sensor) would be 150cm and I need the precision to 1 mm. What do you suggest?

Thanks!

I don't think the usual ping sensor will give you that kind of accuracy, never mind that there may be additional issues with reflections off parts of the elevator shaft itself. Other similar implementations have used a magnet at each floor and a hall sensor on the elevator to detect when it is at a particular floor. To simplify the coding, you may prefer to put them the other way round - hall sensors at each floor and a magnet on the elevator.

The maximum distance (range of the sensor) would be 150cm and I need the precision to 1 mm. What do you suggest?

a big budget?

150 cm = 1500 mm and if you want to measure 1mm exact you need at least twice this resolution so you need to be able to detect ~3000 levels.
As the analog input only has 10 bits == 1024 values the internal ADC would be not adequate. So analog sensors are out of scope
OK you could use an external ADC with higher resolution.

How fast does the elevator move?
WHat is the reaction time you expect?

Check at least the newPing() discussion in this subsection as I expect a lot of valuable info for you there.

Yeah I was thinking of hall sensor as the alternative, but I wanted a more sophisticated solution :).

Budget is not unlimited - a few 100€.

Elevator is pretty slow, and the reaction time is not of importance right now. I just want the elevator to move to the desired floor for the time being.

So if the ADC has only 10 bits my only options are to reduce the precision to 3mm or to reduce the size of the elevator.

Lets say I reduce the size to 75cm what sensor is best for such lengths? Ultra-sound, IR, Laser, interferometer? Like I said its price should also be reasonable :).

Thanks for all the help, I will go and read the newPing() thread now!

You are probably better off with a rotary encoder on the cable (assuming the cable doesn't slip). By counting turns you will know where the elevator is at. If the cable is some sort of chain (that won't slip) that should work fine. Otherwise do what real lifts do and have a sensor at each floor. Either magnetic or some sort of optical thing (light beam).

If you had a Hall sensor in the elevator, all you need is one magnet per floor, glued to the wall. Or, alternatively a light sensor in the lift, and it gets covered when it reaches a floor.

A real elevator is actually a bit more sophisticated than that. You should have a hall effect sensor and magnets above and below the actual level you want to stop at, and more sensitive sensors, such as laser sensors or limit switches at the place you want to stop. You move the elevator quickly until the hall effect sensor notices that you are near the correct floor, and then slow down until the "were here" accurate switch says to stop.

A senior of mine once did this project for his senior years, What he did what well one is that he use a couple of strip of black and white paper located at each level and a sensor on the elevator itself to know which floor it is now. for the stopping part he uses a metal strip located at 3 point at the elevator shaft and only 2 light sensor the one that have a beam of light that must be block to make it work .the function of the metal strip, one is to tell the elevator that the level is approaching so slow down. second is the stop position and 3rd is to tell the elevator to now run full speed. but i do think that 2 is enough. just use the falling edge of the stop sensor to start speed up rite.... and the rising edge if the we are near sensor to slow down. i hope my explanation help you in your project

You would need the third, for when the elevator came from the other direction. :slight_smile: