# elevator algorithm circuit [closed]

I'm trying to make a electirc circuit that features an elevator algorithm. It has five floors and I can only use resistor, capacitor, ua471 (op-amp) and switches. Please help

• Sounds challenging. What have you come up with so far? – Spehro Pefhany Apr 23 '15 at 16:00
• Sounds like homework, and I'm disinclined to offer any advice without seeing an attempt. Try something, and ask perhaps how it can be improved. – R Drast Apr 23 '15 at 16:16
• What sort of algorithm are we talking about here? Could be anything, seriously. Ask a more useful question please. – KyranF Apr 23 '15 at 16:41
• Such homework questions with no attempt at a solution are closed. – Leon Heller Apr 23 '15 at 17:31
• What is up with all these "I want to use rocks and sticks to..." questions lately? – Matt Young Apr 23 '15 at 17:40

An elevator controller is constructed from logic gates, typically in a microcontroller (or in the old days from a set of electromagnetic relays). Using an op-amp as your only active device is possible but impractical because op-amps are intended to handle analog not digital signals.

Consider the controller as a state machine that has inputs from these switches: Up and Down call pushbuttons at each floor (10) Floor pushbuttons in the elevator (5) Position sensor microswitch at each floor (5) The controller has these outputs: Up and Down running indicator lamps (2) - shown on every floor and in elevator A 7-segment number display of current floor position - shown on every floor and in elevator Lamps in floor select buttons in elevator (5) Lamps in call pushbuttons at each floor (10) Door open/close motor control output (1) Motor control outputs for Up and Down (2)

The numbers in brackets are for a 5-floor building. You may add inputs for emergency button(s) and end-of-travel sensors.

In brief the state machine logic follows these rules:

1. At rest the motor is off, door is closed and floor position is displayed

2. When a call button at a floor F is pressed:

• if the elevator is at rest and at floor F, open the door
• if the elevator is at rest and not at floor F, decide direction to get to F. Light calling button on floor F, start motor in the direction, light up or down running indicators, light floor F button in elevator. Continue UNTIL a new floor position sensor signals. Then
• if new floor position !=F then update floor number display, continue.
• if new floor position =F then update floor number display, stop. motor, stop call button lamp, stop running indicator, open door.
3. If no button is pressed for 30 seconds, close door and rest.

4. If a floor select button G in the lift is pressed:

• if the elevator is at rest and not at the floor G, decide direction to get to G. Close door, start motor in the direction, light up or down running indicators, light floor G button in elevator. Continue UNTIL a new floor position sensor signals. Then
• if new floor position !=G then update floor number display, continue.
• if new floor position =G then update floor number display, stop. motor, stop running indicator, open door.

This considers only single-person trips. Actual building elevators have to meet strict safety regulations.

• seems reasonable. I would hate to implement this in op-amps and passives. Perhaps the OP meant they can also use digital gates? Also, more advanced elevators (ones that need to go fast to be useful) often need a look-ahead feature to begin slowing down before reaching the desired floor. I believe state space control (or optimal control using Ricatti equations and parameters for acceptable position, velocity, and acceleration) is used to make the ride more acceptable for squishy humans – KyranF Apr 23 '15 at 17:18
• Yes user friendly elevators need an overdamped 2nd order feedback loop control of position so that it brakes gently to settle at exactly the desired floor. Electric doors should have protection sensors because studies suggest that chopping people in half is unpopular. The algorithm needs to be expanded to allow multiple persons in the elevator to select multiple floors, even during a trip if the deceleration towards a new floor is acceptable. Maximum acceleration and deceleration shall be the same for any number of occupants, except that the elevator will refuse to move if excessively loaded. – cuddlyable3 Apr 28 '15 at 14:18
• Traditionally an elevator cabin loudspeaker provides an endless loop of the most insipid possible background music. – cuddlyable3 Apr 28 '15 at 14:19
• Hahah spot on mate – KyranF Apr 28 '15 at 15:51

simulate this circuit – Schematic created using CircuitLab

This is a simple circuit ( which I think will mostly serve the purpose).

The rules are simple :

• The capacitor holds the charge and based on the amount of charge held by the capacitor, you can decide which floor you want to go on.
• If you want to go on floor 5, press SW1. Entire voltage will appear across capacitor. If you want to go on floor 1, say, press SW5. Only 1/5 th voltage will appear across capacitor. This is for moving in upward direction
• If you want to go down,discharge the capacitor completely ( and quickly) through SW6, and other switches open. Then proceed as in step 2.

(Do correct me or suggest improvements if I'm wrong. Its good to be nice to students :P)

• An elevator (lift in British English) is a type of vertical transport equipment that efficiently moves people or goods between floors (levels, decks) of a building, vessel, or other structure. Elevators are generally powered by electric motors. It would be an improvement to include people and a motor. – cuddlyable3 Apr 28 '15 at 13:52
• @cuddlyable3 Well actually, thats pretty obvious. But the user wanted something comprising of resistors and capacitors and switches. So i made an attempt to provide only the circuit with which he can provide inputs as to what floor he wants to go on. The control logic and other stuff is something which is not possible with this basic inventory. – Plutonium smuggler Apr 28 '15 at 16:17