Final Thesis elevator

140
TABLE OF CONTENTS ABSTRACT................................................ 5 CHAPTER 1: INTRODUCTION................................. 6 1.1 History of Elevator................................6 1.2 General approach...................................7 CHAPTER 2: CAR STRUCTURE AND COUNTERWEIGHT..............9 2.1. Car...............................................9 2.1.1. Car structure................................9 2.1.2. Car dimensions determination.................10 2.1.3. Calculation of the weight of the car.........10 2.1.4. Cases of forces applying on the car..........13 2.1.5. Strength examining...........................19 2.2 Analyzing car structure using Ansys program.......21 2.3 Counterweight.....................................22 2.3.1. General design...............................23 2.3.2. Number of counterweight plates...............23 CHAPTER 3: ELEVATOR MACHINE............................24 3.1 Specification and selection of elevator ropes.....25 3.2 Specification and selection of traction sheave and diverting pulley......................................26 3.2.1 Traction sheave...............................26 3.2.2 Diverting pulley..............................26 3.2.3 Sheave groove................................. 26 3.3 Examining the contacting condition between the ropes and the sheave........................................28 3.3.1Operation under rated load.....................28 3.3.2 Operating under the sample load...............31 1

description

This is the final thesis of designing a elevator with 7 floor using mircro-processor, using gear motor and can be apply to high building.

Transcript of Final Thesis elevator

Table of ContentsABSTRACT5CHAPTER 1: INTRODUCTION61.1 History of Elevator61.2 General approach7CHAPTER 2: CAR STRUCTURE AND COUNTERWEIGHT92.1. Car92.1.1. Car structure92.1.2. Car dimensions determination102.1.3. Calculation of the weight of the car102.1.4. Cases of forces applying on the car132.1.5. Strength examining192.2 Analyzing car structure using Ansys program212.3 Counterweight222.3.1. General design232.3.2. Number of counterweight plates23CHAPTER 3: ELEVATOR MACHINE243.1 Specification and selection of elevator ropes253.2 Specification and selection of traction sheave and diverting pulley263.2.1 Traction sheave263.2.2 Diverting pulley263.2.3 Sheave groove263.3 Examining the contacting condition between the ropes and the sheave283.3.1Operation under rated load283.3.2 Operating under the sample load313.3.3 Operating with no load323.4 Specification and selection of motor333.4.1 Requirements for the motor of the elevator333.4.2 Power of the motor333.4.3 Elevator machine34CHAPTER 4: SUSPENSION SYSTEM374.1 The principle of operation374.2 Compute hanger system384.2.1 Pull bar384.2.2 Springs38CHAPTER 5: BUFFER415.1 Force acts on buffer415.2 Compute the spring of the vibration reduction42CHAPTER 6: SAFETY GEAR AND LIMITED SPEED INSURANCE446.1 Safety gear446.1.1 Compute grip equipment446.1.2 Dimensions of wedge486.2 Limited speed part486.2.1 Cable of the speed control part496.2.2 Pulley496.2.3 Compressive Force necessity of spring and spring to keep the centrifugal weight496.2.4. Spring with throw ball51CHAPTER 7: GUIDE RAIL537.1 Leading the cabin537.2 Compute the guide rail547.2.1 The force apply on the guild rail557.2.2 Compute temperature effects by the gripping of the instructor567.2.3 The slenderness of the guide rail57CHAPTER 8: DOOR MECHANISM OF THE CABIN588.1. Principle of operation588.2.Computing transmit movement in the door58CHAPTER 9: ELECTRONIC AND PROGRAMMING609.1 Introduction609.2 Specification609.2.1 Features609.2.2 Concept609.2.3 Basic block diagram619.2.4 Limitations619.3 Hardware design629.3.1 AVR Microcontroller629.3.2 Power supply629.3.3 Users input and Floor sensors639.3.4 Display module639.3.5 Motors Driver649.3.6 Schematic Circuit:659.4 Software Design669.4.1 System Events669.4.2 Implementation669.4.3Functions679.4.4Flow Charts699.4.5Elevator Algorithm73CHAPTER 10: HYDRAULIC ELEVATOR DESIGN8710.1. Principle8710.1.1. Telescopic Cylinders8710.1.2. Main and Stages8710.1.3. Basic Cylinder Types8810.1.4. Bearings and Seals8910.1.5. Principle diagram of the hydraulic system9010.2 Calculation and design of the cylinder9110.2.1 Principle9110.2.2 Requirements9110.2.3 Length of the cylinder9110.2.4 Diameter of the cylinder9210.2.5 Structure9310.3 Calculation and selection of pump9510.4 Valve selection9510.4.1 Relief valve9510.4.2 Distribution valve9610.4.3 Flow regulating valve9710.4.4 Check valve9810.5 Reservoir9910.5.1 Function9910.5.2 Figure and dimension9910.5.3 Structure9910.6 Filters10010.7 Pipes10010.8 Fluid10010.9 Assembly drawings of piston and cylinders100CHAPTER 11: CONCLUSION10111.1 Result10111.2 Limitation10111.3 Conclusion101REFERENCE103

ABSTRACT

Currently industrial products are playing an important role in the national economy. Especially technical and scientific achievements are developing strongly and are more common and widespread in the industry. Recognizing the importance of this issue can influence how the country develop. Our government has tried to train scientific and technical research, aiming to encourage investment in fast goal of industrialization, modernization of the countryAlong with the development of society, more and more tall buildings appear to suit the requirements of life. Elevators become very important and far more convenient than the stairs. Elevators help people save time and effort. In this project we try to make the model of a six floors elevatorIn the process of working, with young on the level of professional knowledge, practical experience and time constraints of the project so we can not avoid mistakes. Therefore, we are looking forward to more help of the teacher, and the contribution of friends.

CHAPTER 1: INTRODUCTION1.1 History of ElevatorThe first reference to an elevator is in the works of the Roman architect Vitruvius, who reported that Archimedes built his first elevator probably in 236 B.C. In some literary sources of later historical periods, elevators were mentioned as cabs on a hemp rope and powered by hand or by animals. It is supposed that elevators of this type were installed in the Sinai monastery of Egypt.In 1000, the Book of Secrets by the Arab Ibn Khalaf al-Muradi in Islamic Spain described the use of an elevator-like lifting device, in order to raise a large battering ram to destroy a fortress.In the 17th century the prototypes of elevators were located in the palace buildings of England and France.

In 1793 Ivan Kulibin created an elevator with the screw lifting mechanism for the Winter Palace of Saint Petersburg. In 1816 an elevator was established in the main building of sub Moscow village called Arkhangelskoye. In 1823, an "ascending room" made its debut in London.

In the middle 1800's, there were many types of crude elevators that carried freight. Most of them ran hydraulically. The first hydraulic elevators used a plunger below the car to raise or lower the elevator. A pump applied water pressure to a plunger, or steel column, inside a vertical cylinder. Increasing the pressure allowed the elevator to descend. The elevator also used a system of counter-balancing so that the plunger did not have to lift the entire weight of the elevator and its load. The plunger, however, was not practical for tall buildings, because it required a pit as deep below the building as the building was tall. Later a rope-geared elevator with multiple pulleys was developed. Henry Waterman of New York is credited with inventing the "standing rope control" for an elevator in 1850.

In 1852, Elisha Otis introduced the safety elevator, which prevented the fall of the cab if the cable broke. The design of the Otis safety elevator is somewhat similar to one type still used today. A governor device engages knurled roller(s); locking the elevator to its guides should the elevator descend at excessive speed. He demonstrated it at the New York exposition in the Crystal Palace in 1854.

On March 23, 1857 the first Otis passenger elevator was installed at 488 Broadway in New York City. The first elevator shaft preceded the first elevator by four years. Construction for Peter Cooper's Cooper Union building in New York began in 1853. An elevator shaft was included in the design for Cooper Union, because Cooper was confident that a safe passenger elevator would soon be invented. The shaft was cylindrical because Cooper felt it was the most efficient design.

The first electric elevator was built by Werner von Siemens in 1880. The safety and speed of electric elevators were significantly enhanced by Frank Sprague.

The development of elevators was led by the need for movement of raw materials including coal and lumber from hillsides. The technology developed by these industries and the introduction of steel beam construction worked together to provide the passenger and freight elevators in use today.

In 1874, J.W. Meaker patented a method which permitted elevator doors to open and close safely.

In 1882, when hydraulic power was a well established technology, a company later named the London Hydraulic Power Company was formed. It constructed a network of high pressure mains on both sides of the Thames which, ultimately, extended to 184 miles and powered some 8,000 machines, predominantly lifts (elevators) and cranes.

In 1929, Clarence Conrad Crispen, with Inclinator Company of America, created the first residential elevator.

1.2 General approachThe elevator is a useful device used to transport cargo and people vertically. The advent of the elevator begins from the need to travel, quick transportation of people from low position to high position and vice versa. Lifts help to increase labor productivity, reduce costs of time and energy of human labor. So, elevators are widely used in all sectors of national economy. In industry, elevators used to transport goods, products, materials and help workers to work at different height. In some industries such as mining, construction, metallurgy ... the elevator played a key role is indispensable. In addition, the elevator is also widely used and no less important in buildings, offices, hospitals and hotels. Elevators help people save time, energy, increased job. Currently, the elevator is an important factor in the competitive business of building construction systems. In terms of value for the buildings, from 25 floors or more, the lifts up 10-70% of total project value. Therefore, the elevator has been created and developed very early in the advanced countries. All large elevator company in the world are always looking for ways to meet product requirements and demands of people on a higher quality. In Vietnam today, elevators are mainly used in industry to carry goods and are in rudimentary form. In this environment, the economy has significantly grown that makes the demand for elevators in all areas of social life is increasing.

CHAPTER 2: CAR STRUCTURE AND COUNTERWEIGHT2.1. Car 2.1.1. Car structureThe car carries passengers and other loads. It should be easily assembled so that the components can be taken apart and then installed in the hoistway. It is composed of the sling, a metal framework connected to the means of suspension, the platform which forms the floor of the car and directly supports the load and the car enclosure attached to the car platform.

Figure 2.1: Car frame1. Vertical frame2. Horizontal frame3. Wedge4.Guide shoes5. Suspension device6. Cable clip7.Lever arm8. LinksCar frame (platform) consist of vertical frame 1 and horizontal frame 2 connected to each other by bolts. Vertical frame 1 is constructed from two vertical bar made of equal-leg angle steel and two horizontal beam made of U steel. Horizontal frame 2 is constructed from equal leg angle steel and the car floor is placed on it. The upper beam of the vertical frame is connected to the suspension device 5, make sure that all the suspension ropes have the same stretch. Since the car frame has large dimensions, the horizontal and vertical frames should also be connected by the links 8. The lever arm 7 and the wedge 3 of the safety gear are also attached to the car frame. The lever arm 7 is connected with the cable of the overspeed governor through the cable clip 6. If the speed of the car exceeds a predetermined value, the safety gear will be activated and the car will be stopped, resting on the guiding rails.The guide shoes 4 are fixed to the endings of the upper and lower beams, providing guiding for the car sling along the car trajectory.2.1.2. Car dimensions determinationCar dimensions determination should consider the service ability and economic factor. The car dimensions can be determined from the rated load and the service ability. The elevator designed in this thesis has the rated load Q=500kg and rated velocity v=0.63m/s. We choose an elevator with the dimensions: Width x Length x Height = 1110 x 1400 x 2200 mm (Reference:?). The width of the door is 800mm.2.1.3. Calculation of the weight of the car

Figure 2.2: Car frame dimensionsTo calculate the strength of the car frame, we choose the dimensions of the beams first and then examine their strength.Upper beam: Pressed U steel

Figure 2.3: Upper beams cross sectionWe have:A = 3900 mm2Jx =20142500mm4

The mass of the upper beam: G = 3900.1280.7852.10-9 =39 kgLower beam: Pressed U steel

Figure 2.4: Lower beams cross sectionWe have:A =8100 mm2Jx = 56087500 mm4

The mass of the lower beam: G =8100.1280.7852.10-9 =81 kgUprights (Vertical beams): equal-leg angle steel

Figure 2.5: Uprights cross sectionWe have:A =1550 mm2Sx =28125 mm3yc =18 mmJx =972617 mm4

The mass of the uprights:G =1550.3000.2.7852.10-9 =73 kg

Horizontal frame: pressed steel, four U75x75x5 and two U60x40x5

Figure 2.6: Cross section of bars of horizontal frame.A1 =725 mm2G1 = 725.(1400+1120)..7852.10-9=14,8 kgA1 =650 mm2G1 = 650.1250.7852.10-9=6,5 kgThe mass of the horizontal frame:G =2.G1 + 2.G2 =42,6 kgFor the car floor we use 3mm tole. Then the mass of the car floor is:

For car enclosure we use 2mm tole. Then the mass of the car enclosure is:

2.7852.10-9=143 kgThe mass of the door is about 50kg.Then the total mass of the car is:39 + 81 + 73 + 42.6 + 40 + 143 + 50 = 468.6 kgThe car also has other accessories such as: links, guide shoes, wedge of the safety gear, etc. Therefore, we take the mass of the car as 500Kg.2.1.4. Cases of forces applying on the car2.1.4.1 General principle to calculate the strength of car:The calculate the strength of the mechanisms that always function during the activating time of the elevator, we have to consider their operation in several cases: Case 1: Nominal load Case 2: The safety gear and/or the buffer is assembled Case 3: Technical examine, 150200 % of nominal load. Case 4: The car is stuck on the guiding rails.

The general principle to calculate the strength of car is based on the permissible stress:Where:

- maximum stress applied on the part

- permissible stress

- ultimate strength, fatigue strength or yield strength ( depends on each case).n- smallest factor of safety.Material of the car frame: Shaped pressed steel: CT3Yield strength: y = 240N/mm2Ultimate strength: u = 400N/mm22.1.4.2 Cases for calculation:Case 1: Qt= Q.kd Gt= Gcar. kd WhereQt Rated load Qt=500 (kg)Gcar Mass of the car: Gcar =500 (kg)a: acceleration of the car a=1,5 (m/s2)g: free-fall acceleration g=9,81(m/s2) kd: dynamic factor

Then :Qt = 5000.1,15=5750 NGt = 5000.1,15=5750 NCase 2: Increase Q by 10%, increase kd by 2030% The car is assembled with the safety gear:Qt= 1,1.Q.kd Gt= Gcar. kd Force from the wedges act on the car frame at two ends of the vertical beam:

kd=1,15+1,15.0,3=1,495

Then:Qt = 8223 NGt = 7475 N The car is assembled with the buffer:

Qt=1,1.Q.kd = 11000 NGt= Gcar. kd = 10000NCase 3: Technical examineQt= Q.kol Gt= Gcar. kolWhere :kol Overload factor. kol=2 for traction drive with sheaveThen :Qt=10000 NGt=10000 NCase 4: Car stuck on the guiding railsPmax =Qt + Gcar + Gcable + W Gcw =292,34 (kg) =2923,4 N

2.1.4.3 Calculation of strength of the car:Case 1:

Figure 2.7: Force diagram on the car frame in case 1The equilibrium equations:

For Qt =5750N, Gt=5750N, J1 =20142500 mm4, J2 =972617 mm4, J3 =56087500 mm4, A=1280 mm, H=3000 mm. Then we have: M1= 61027 Nmm, M2 =-12101 Nmm

Case 2: Car assembles with the safety gear:

Figure 2.8: Force diagram on the car frame in case 2

The equilibrium equations:

For Qt =8223N, Gt=7475N, P=7849N J1 =20142500 mm4, J2 =972617 mm4, J3 =56087500 mm4, A=1280 mm, H=3000 mm, we have: M1= 15656 Nmm, M2 =32281 Nmm

Car assembles with the buffers:

Figure 2.9: Force diagram on the car frame in case 2The equilibrium equations:

For Qt =11000N, Gt=10000N, P=21000N, J1 =20142500 mm4, J2 =972617 mm4, J3 =56087500 mm4, A=1280 mm, H=3000 mm, we have:M1= -7875 Nmm, M2 =-16238 Nmm

Case 3: Technical examination:

Figure 2.10: Force diagram on the car frame in case 3

The equilibrium equations:

For Qt =10000N, Gt=10000N, J1 =20142500 mm4, J2 =972617 mm4, J3 =56087500 mm4, A=1280 mm, H=3000 mm.We have: M1= 987138 Nmm, M2 =-453027 Nmm

2.1.5. Strength examiningUpper beam: only bending momentThe maximum stress in the beam:

Taking data from case 3 for examination, we have:

Permissible stress :

Where: - yield strength =240N/mm2n- factor of safety n =23

Since : , the upper beam satisfies the requirement.Uprights(vertical bars): both stress and bending moment

Taking data from case 3 for examinationMaximum and minimum stress inside the bars:

Permissible stress :

Where: - yield strength =240N/mm2n- factor of safety n =23

Slenderness of the uprights:

Where: - coefficient of connection between two ends = 0,5l- length of the uprights l=3000mm

imin- minimum radius of gyration

Then

We also have: , the uprights satisfy the requirementsLower beam: bending moment and torque. Bending moment caused by P, Gt, Qt, torque caused by Qt placed eccentric by a distance C1 ( C1 =B/6 =1400/6 =233mm)Taking data from case 2, the car assemble with the safety gear.Mtorque =8223.223 =1833729 Nmm

Shear stress:

With -area enclosed by the middle lines of the cross section.

Stress caused by the bending moment :

Then : The lower beam satisfies the requirements.2.2 Analyzing car structure using Ansys program

2.3 CounterweightTo reduce the power requirement of the motor and the load applied on the elevator machine, as well as maintaining the friction between the ropes and the sheave, we have to use the counterweight. The counterweight and the car are connected to the same ropes.The weight of the counterweight is determined by the following formula:

Where:Q:maximum loadGcab: weight of the car: coefficient taking account of the percentage of the rated load balanced by the counterweight.If the weight of the counterweight equals the weight of car combined with the load, the motor only has to overcome the friction force and inertia force to raise or to lower the car. But when there is no load, the motor will have to overcome a resistance force which equals the load Q. Therefore, we have to choose the counterweight with coefficient which can satisfies that the force needed to raise a car with maximum load equals the force needed to lower a car with no load.The maximum static moment applied on the diverting pulley when raising the car with full load from the lowest floor:

: weight of the ropes suspense the car

: coefficient of lifting power utilizing of elevatorD: diameter of the diverting pulleyWhen lower the car from the highest floor with no load:

This moment has the opposite sign to .

In this formula : weight of the ropes suspense the counterweight

Equalizing and we have: The balancing coefficient is often taken as =0,5 corresponds to =1. Then the weight of the counterweight is:

= 2.3.1. General designA counterweight normally consists of a frame and counterweight plates. The frame is made of U steel, joined by bolts. Similar to the car, counterweight also has guiding shoes to guide it sliding follow the guide rails.The counterweight plates are made of concrete with the mass 30kg each.2.3.2. Number of counterweight platesThe approximate weight of the frame is 90 kgThe number of plates is : n = (750-90)/30 = 22 (plates)The dimensions of the plates is showed in the following picture.

Figure 2.11: Counterweight plate

CHAPTER 3: ELEVATOR MACHINE

Elevator has two kind of traction drive: Without gearbox: traction sheave are fixed directly to the shaft of the motor With gearbox: auxiliary transmission mechanism between the motor and the sheave or drum.

Figure 3.1: Diagram of elevator machine with gearbox and sheaveElevator machine consists of motor 1, brake 2, worm gear box 5 and traction sheave 3. All components are attached to the steel frame 4. To reduce the noise during operating time of the elevator, the gearbox should use the worm gear transmission. Worm gear transmission has the advantage of high gear ratio, small size and self braking.Worm gear box can use the cylindrical worm or globoidal worm. Globoidal worm gear are widely used for elevator machines thanks to its smaller dimensions in comparison to the cylindrical type with the same power rating. The worm gear box can be manufactured with the worm placed above or below the worm gear. Traction sheave is attached directly to the worm. The wear of the traction sheave is usually high, therefore the sheave collar should be easily disassembled for replacement. The shaft of the worm is placed on the bearing. At an end of the worm which is opposite to the motor, a hand crank is attached so that we can control the machine manually. It is also removable.The worm gear boxes are now manufactured according to the standard. We only have to select the suitable one based on the torque and the gear ratio. 3.1 Specification and selection of elevator ropesElevator ropes always bear the load during the operation of the elevator, changing state between straight and curving over the traction sheave. Two important factors that can affect the strength of the ropes is the maximum tension and curvature radius. To calculate and select the rope, we have the following formula:

Where:Smax- maximum stretch (tension)k- factor of safety, take k=10.

-tensile strength of the ropesThe maximum stretch Smax can be calculated by the following formula:

Where:Q- rated load Q=500 KgGcar mass of the car, Gcar= 500 KgGcab- mass of the rope when the car is at the lowest floori-. Number of ropes i=35, take i=3a- scale factor, a=1According to ISO 4344, we choose the round-strand equal lay 6x19 (9/9/1) rope. The construction 6x19 (9/9/1) means 6 strands, 19 wires in each strand, namely 9 wires in the outer layer, 9 inner wires and 1 central wire (king wire) in the strand. The same number of both the outer and inner wires is typical for the Seale construction. The outer wires are of larger diameter, which results in larger contact area and lower unit pressure between the wires of both layers and, as a consequence, a considerable improvement in rope life is achieved in comparison with ropes of normal construction used earlier such as 6x19 (12/6/1).

Figure 3.2: Cross-sectional view of the rope

The specification: , dc= 10 mm, =49,5 KNThe mass of the rope: Gcab = 14,5.0,352.3=15.3 kg

Then:

The rope satisfies the strength requirement.3.2 Specification and selection of traction sheave and diverting pulley3.2.1 Traction sheaveThe minimum diameter of the traction sheave is determined by the following formula:D d.ed- diameter of the ropee- coefficient depends on the kind of elevator and rated speed, take e=40Then: D 40.10=400 mm3.2.2 Diverting pulleyDiameter of the diverting pulley can be about 70% of the traction sheave: Ddp=0,7.D3.2.3 Sheave grooveTo prevent the ropes from slipping on the traction sheave, the sheave must have groove which results in increasing friction between the sheave and the ropes.The sheave groove might has one of the following profiles: Channel shape (semi-circle):

Figure 3.3: Semi-circular shapeThis kind of shape has a good advantage in prevent the rope from wearing. However, because of the small coefficient of friction, it is mostly used for the sheaves with large contacting angle, for instance: elevator machine without the gearbox. Semi-circular shape with slot:

Figure 3.4: Semi-circular shape with slotThe sharp edges of the slot may affect the strength and durability of the ropes Wedge shape:

Figure 3.5: Wedge shape

This kind of shape is most commonly used. For this profile, the angle of the undercutting of the groove is The coefficient of friction between the ropes and the sheave without the groove is:0 = 0,12The coefficient of friction between the ropes and the sheave without the groove is:

The sheave groove has the following dimensions:

Figure 3.6: Sheave groove3.3 Examining the contacting condition between the ropes and the sheaveCases for examining: Operating under rated load Operating under sample load Operating with no load3.3.1Operation under rated load

The coefficient taking account of the percentage of the rated load balanced by the counter weight The car is pulled up from the first floor. Without the compensating cable, the maximum tension S1 in the travelling cable connected to the car at starting time is:

Tension S2 of the cable connected to the counterweight:

Where: Q rated loadGcar, Gc, Gdt mass of the car, rope and counterweightW resistance forcesa starting acceleration coefficient taking account of the rated load balanced by the counterweight The resistance forces:

The friction forces at the guide rails:

Where: A width of the car A=1220mmB length of the car B=1400mmh vertical distance between the centers of the guiding shoes h=3100mm - coefficient of friction between the guiding shoes and the guiding rails, with the guiding shoes made of steel = 0,12.Then:

The friction forces at the sheave and pulley:

Where: buckling factor, =0,02 angle of wrap of the traction sheave =150S total stretch of the cable wrap over the diverting pulley

Figure 3.7: Force diagram when operating with rated load

S2 = Gdt =7500 N , Where: - coefficient of friction between the cable and diverting pulley, =0,12 angle of the undercutting of the pulley groove

Then:

The total resistance force:

Then:

To prevent the rope from slipping on the sheave, the following condition must be satisfied:

Where: angle of wrap of the traction sheave (rad), =150 (2,26rad)* - coefficient of friction between the ropes and the traction sheave with = 40Then:

We have:

Therefore the angle of undercutting of the groove = 40 can prevent the ropes from slipping on the sheave groove.3.3.2 Operating under the sample load

Therefore the angle of undercutting of the groove = 40 can prevent the ropes from slipping on the sheave groove.3.3.3 Operating with no loadThe counterweight is pulled up from the lowest floor.

Figure 3.8: Force diagram when operating with no load.

Resistance force:

=0

=133N

Then

We have:

The angle of undercutting of the groove = 40 can prevent the ropes from slipping on the sheave groove.3.4 Specification and selection of motor3.4.1 Requirements for the motor of the elevator Based the speed of the elevator, we choose the motor with one speed or multi speed. Guarantee that the elevator stop at the exact position according to technical specification. Initial acceleration is not too high ( a < 1,5m/s2) Motor is suitable for repeatedly short term working, reversible Simple structure, light, sufficient power rating. Dimensions does not depend on the height of liftingWe choose the elevator machine with traction sheave, placing on top of the building, satisfies all the features above.3.4.2 Power of the motorApplying the formula:

Where:P load on the traction sheave (N)v speed of the car, v = 0,63m/std efficiency of the machine. = 0,6 0,8 for worm gear box, take td = 0,65.p efficiency of the sheave, p = 0,96 0,98. take p = 0,96We calculate the power of the motor in case that the load on the sheave is largest:Pmax = Q + Gcar + Gcablecar + W Gdt = 5000 + 5000 + 153 + 333,3 7500 = 2986,3 N

Power of the motor: 3.4.3 Elevator machineBased on the calculated power and the rated speed, we choose the elevator machine TW63 of Thyssen Aufzugswerke Elevator Gmbh, with the following parameters:

Figure 3.10: TW63 Machine Traction sheave: Diameter D=450mmWidth b=96mmThe sheave groove has the wedge shape profile with angle of undercutting 0=40 and rope diameter d=10mm

Figure 3.11: Profile of the sheave groove Diverting pulley: Diameter: Ddp = 0,7.450 = 360mm; the other parameters are similar to the traction sheave Brake:Type: 2 clamp, normal closedMaximum braking moment: 2*90NmmBrake disk: 200mmClamping force: 2*2500N

Figure 3.12 Brake Motor: From the catalogue of Thyssen Aufzugswerke Elevator Gmbh, we choose the motor with the following parameters:Power: 4,5kWR.p.m: 1360Mass: 37,35kgWorking moment: 31NmInitial moment: 78Nm Gearbox:Type: worm gearGear ratio: 48:1Shaft length: 155mmMass of the machine: 370KgEfficiency: 0,65 0,76Required r.p.m of the sheave:

Roping factor:

For the selected machine ic = 48, then:

Since i < 5%, the selected machine satisfies the requirement.

CHAPTER 4: SUSPENSION SYSTEM

For the lift use pulley action to lead the movement, it based on friction force between cable and pulley groove. Therefore these requires the cable must have good branch tension to create friction force on each branch cable. Therefore the requirements of hanging system is having equal friction force on each cable. Suspension equipment is used in common day is spring because of it high reliability

Figure 4.1: Spring1. Pull bar 2. Gate 3. Spring 4.Gate under 5. Nut

4.1 The principle of operationCables tension is adjusted by spring. If a branch cables tension is higher than the other, the spring will shorten until the force balance the other cables tension. That's why the tension on all the cable is always equal.The disadvantage of the system is the car has larger vibration when open the machine and when brake.

4.2 Compute hanger system4.2.1 Pull barIn all cases calculation for the lift, the case when load is put into use is the case cabin frame have to endure the biggest forceThe largest force on the beams of the frame cabin on the load test is :

The pull bar is made from CT3 steel that have limited melt is ch = 240 N / mm2

We have n0 is safety parameter, we choose n0 = 3 The durable pull rate:

The area of the pull bar:

Diameter of the pull bar To ensure durable conditions, we choose d = 16 mm4.2.2 Springs

- Select materials to make the spring crom-vanadium has

Diameter ratio: Wahl stress correction parameter is determined as follow

Spring diameter: In which: Pimax = 6667 N[] =0,5 . 1600= 800 N/mm2

According to the standards we choose d = 12 mm- Average diameter of the spring is: D = c.d = 12.5 = 60 mm

- The amount of working round of the spring: In which: Pmax - the largest compressive force subject to the spring. Pmax = 6667 N.Pmin - the smallest compressive force subject to the installed spring, we choose Pmin = 2000 Nx deformation of the springs from Pmin to Pmax force, choose x = 30 mmG: sliding module of steel. G = 8.104 MPa

Choose n = 7 rounds- The other parameter:The entire round number: n0= n + 2 = 7 +2 = 9 roundsHeight of spring when those rounds close together: Hs = n0.d = 9.12 = 108 mm

Step of the spring when not subject to load: In which

So

Initial height: H0= pn + 2.d = 19,6 .7 + 2.12 = 161.2 mm

Check the oven stability of springs So the spring is stable

CHAPTER 5: BUFFER

Buffer in lift is a safety device. The structure is put under the well to keep the car and the counterweight not beat up and cause shake for people in the cabin. In the case of going down over the first floor the structure will hold the cabin and keep it safe. Also the structure ensure no details of elevators touch the bottom of the well, to avoid causing damage We use elastic spring to be the buffer. This is the structure has relatively simple design, works safety, high working life, is used in many kind of elevators.

Figure 5.1 Buffers5.1 Force acts on bufferThe force acts on the lift must be calculated in the most dangerous situations when the brake system and the insurance system do not operate. In this case the buffer system have to endured all the force of the mass of the cabin and the counterweigh with the dynamic load parameter

In which:amax the maximum acceleration of the car, amax = 9.81 m/s2( falling ) g = 9.81 m/s2kn -difference distribution ;consider kn = 1 (because use only a buffer )

5.2 Compute the spring of the vibration reduction

- Select materials of the spring: crom-vanadium has

Diameter ratio

Wahl parameter

Spring diameter: In which: Pmax= 21000 N[] =0,5 x 1600= 800 N/mm2

According to the standards we choose d = 24 mm- Average diameter of the spring is: D = c.d = 6.24 = 144 mm- The amount of working round of the spring:

In which:Pmax - the largest compressive force subject to spring. Pmax = 21,000 N.Pmin -the smallest compressive force subject to spring when installed, we choose Pmin = 0N x the deformation of the springs from Pmin to Pmax force, choose x = 100 mmG: sliding module of steel . G = 8.104 MPa

Choosing n = 6 rounds- The other parameters The entire round number: n0 = n + 2 = 6 +2 = 8 roundsHeight of spring when all rounds close together: Hs = n0.d = 8.24 = 192 mmStep of spring when no load:

In which

So Initial heigh H0=pn + 2.d=44,8.6 + 2.24= 316,8mm

The stable of the spring So the spring is stable

CHAPTER 6: SAFETY GEAR AND LIMITED SPEED INSURANCE

To avoid the falling down of the cabin when the cable is broke or the cabin goes with speed exceeds allowed value, the safety gear and limited speed insurance will automatically stop and keep cabin on the guide rails. Cabin of all the elevators have to equip with the safety gear and limited speed insurance 6.1 Safety gearTo eliminate cabin falling when the cable is broke or cabin speed up when the lift is going down, according to safety offenses, cabin need to be equipped insurance department function. The counterweigh is also equipped with the department of insurance when the cabin speeds greater than 1.5 m/s2. Safety gear includes three main parts: grip equipment, operating system, transfer department.6.1.1 Compute grip equipmentThis equipment has the function of keeping firmly the cabin on guide rail when the cable is broke or when the speed of the car excess 15%.Determine wedge angle : When the brake system activities there are 3 process occurs:Closed wedge:

Figure 6.1 Closed wedgeIt happens from the time the wedge slips at the rolling ball to the time it contact with the guide rail. The wedge has to subject the effect of force subject as drawings.P - pull force of the standing bar N1 - reflective force from sliding rollerF1 - the friction force between wedge and the sliding roller. F1 = f1.N1f1 - the friction force parameter between wedge and sliding roller, f1 = 0.05 0.1Gn - weight of wedgeProject all the force on the wedges direction:( P Gn ).cos > F1( P Gn ). cos > f1.N1 = ( P Gn ).sin . f1

Since P Gn > 0 so: f1 < cotg Transition process:From the time the wedge slips on the guide rail. The force action on the slop as Figure

Figure 6.2: Transition processP - pull force of the standing bar N1 - reflective force from sliding rollerN2: reflective force from the guide railF1 - the friction force between wedge and the sliding roller. F1 = f1. N1F2: the friction force between wedge and guide rail f1 - the friction force parameter between wedge and sliding roller, f1 = 0.05 0.1Gn - weight of wedgeProject all the forces on horizontal lineX = N2 N1.cos + F1.sin = 0

N2 = N1.(cos - f1.sin )To keep the wedge firmly on the guide rail F2 > F1.cos, which is the sliding cheeks would roll with the wedge more relatively to wedge with guide rail.We have: F2 = f2 . N2 = f2 . N1 . (cos - f1.sin )

f2 . N1 . ( cos - f1.sin ) > f1.cos . N1

f2.( 1 f1.tg ) > f1Because tg < 1/ f1 so ( 1 f1.tg ) > 0 F2 > F1.cos when f2 > f1Choose: f1 = 0,05; f2 = 0,25 Fix the wedge:Process occurs when sliding roller and the wedge make a single block and slide along guide rails. At this time weight of lift tranfer through the wedge to sliding roller and P no longer effective.

Figure 6.3: Fixed wedgedThe motion equaltion when breaking: V22 V12 = 2.a.sThe break system acts when the velocity of the cabin excess 15% the permited valueV1 = V . 1,15 = 0,63.1,15=0,7245 m/sWhen the break stop on the guide rail V2 = 0The break distance: S = (150200)mm, choose S=150 mm

So The condition for the cabin to stop: F2 > Pk

With(6.1)In whichQ load of the elevator, Q = 500 kgGcabin the weight of the cabin, Gcabin = 500 kgn number of wedges, n = 4amax maximum acceleration when the break operate , amax = 1,7 m/s2

We have: F2 = f2 . N2 > 308 Kg

N2 > 308 / f2 = 308 / 0,25 =1232 kg But:N2 = N1 . ( cos - f1.sin )With: N1 is the force the cabin acts on wedge

N1 =

SoN2 =

cotg - f1 4,928 cotg 4,978

arctg ( 1 / 4,978 ) = 11,30We choose: = 60

6.1.2 Dimensions of wedgeTo determine the size we must determine gripping force of the wedge on the guide rail that is the reflective force N2Pkc = N2 = Pk / f2 = 308 / 0,25 = 1232 NThe stable condition of the wedge:

In which:q - pressure of work which are subject to wedge (kg / cm2)Pkc -gripping force acts on guide rail (kg)b, h - width and height of work surfaces[q] - allows pressures. [q] = 250-300 kg / cm2

We choose the height h = 15 cmChoose the wide b =4 cmWe have b.h = 4 . 15 = 60 > 4,928 cm2

6.2 Limited speed partThis part will act on the break insurance to stop the cabin when the down speed of the cabin excess the permit value. These values must greater at least 15% because if it is lower than it is easy to happen the random stop incident .This part contact with cabin and rotate when cabin move by the cable of the limited speed part.. This part is put on the machine room

6.2.1 Cable of the speed control partWe choose cable has diameter d = 8 mm, cable type according to ISO 4344 standard 6x19. According to structural of the well and distances between wells and cable tension pulley and the bottom of lift we have a cable length L = 15.8 m.

6.2.2 PulleyPulley diameter is determined by formula:Dp = e.dc In which:dc - cable diameter, dc = 8 mme - parameter depends on the type of elevator and its speed, e = 30So Dp = 8.30 = 240 mm

6.2.3 Compressive Force necessity of spring and spring to keep the centrifugal weight

Figure 6.4: Force diagram

We have forces act on the limited speed part:Centrifugal force of the centrifugal weight PltThe compression force of spring PLxThe equation at AMA = PLX.b 2.Plt.a = 0

WithPlt = m.2.r = m..r

So We have:m-weight of centrifugal weight, choose m = 2 kg weight a-distance from A to Plt , a = 70 mmb-distance from A to PLX, b = 35 mmr-distance from A to the centrifugal weight, r = 55 mmSo

If the friction is taken into account Plx =(0,94 0,98)PlxWe choose Plx = 0,95 Plx SoPn = 0,95.30.v2 = 28,5 v2 (N)We have to calculate the spring so that at normal the cabin will suffer the forcePmin =28,5.0,632 = 11,3 NWith speeds greater than 15% normal speed, v = 0.7245 m / s, the spring is subject to a compressive force PmaxPmax = 28,5. 0,72452 = 15 N6.2.4. Spring with throw ball

The material of the spring is crom- vanadi

- Diameter ratio : - Wahl parameter is calculated as folow

Diameter of spring In which Pmax= 10 N[] =0,3.1600= 480 N/mm2

According to the standards we choose d = 1.5 mm- Average diameter of the spring is: D = cd = 12.1,5 = 18 mm- Number of working round

In which:Pmax - the largest compressive force subject to spring. Pmax = 15 N.Pmin -the smallest compressive force subject to spring when installed, Pmin = 11.3 Nx: deformation of the spring from Pmin to Pmax force,choose x = 10 mmG: sliding module of steel. G = 8.104 MPa

So roundsChoosing n = 24 rounds- The other parameter: The entire number of round: n0 = n + 2 = 24 +2 = 26 roundsThe height of the spring when all the round close together: Hs = n0.d = 26.1,5 = 39 mmStep of spring when not subject to load:

In which

So Initial height : H0= pn + 2.d=3,4.24+ 2.1,5= 84,6mm

The stable of the spring Not stable, we use steel core case

CHAPTER 7: GUIDE RAIL

In the working process of the elevators often the load do not place on the center of the floor cause inclined and when traveling, the cabin will shake and easy to hit the fixed part inside the well. As a result, corrective to this matter, it requires a systems guide rail when the elevator on operating7.1 Leading the cabin The smooth in movement of the cabin depend significantly on accuracy and quality of the guide railWe use wood or steel to make guide rail. Wood guide rail is used extensively for transportation people, it is usually manufactured from trees has section 60x 60 to 80 x80 mm, length from 1-1.5 m. The main strengths of this type of wood guide rail is that the cabin moves with less noise and vibration when break insurance department sudden braking. Disadvantages is high price, working life is not high, curved easily and fire risk. Therefore today's wood guide rail types are used less.Steel guide rail manufacture from the T piece, this types of guide rail primarily used for good transportation in small elevators, little used for transportation of large good . Today the elevator for people and good use guide rail have special shape, the head of the guide rail manufacture carefully.

Figure 7.1: Setup of guide railsUsually these guide rails are lay on the foundation of the well (Figure a). In some cases these guide rails shall be hung on ceiling of the well (Figure b) and endure the pull force, this characteristic improves the working conditions when the cabin combines on the insurance department. But this style will increase the load hanging on the well and ceilings. When the height of lift is large we use guide rail type c. The load acts on guide rail will transfer to all element of the building or the well. For elevators are designed here we use the type of guide rail that lay on the floor of wellAccording to the scale height of the well, these instructions are commencing firmly into the wall by transplant or by bolt, distances between these places depends on scale structures of the well. The distances between these places is 2.2 meters

7.2 Compute the guide railWe proceed computing in two cases: working with load and when the cabin hang on the insurance department. For most cases the decision is when cabin hangs on the insurance department. For this case presented drawings below show the calculating graph

Figure 7.2: Force diagram7.2.1 The force apply on the guild rail- Pressure H by inclined. Load is placed on the surfaces of the guiding shoe at distance e from the center of guiding rail and creating torque. We often overlook this because e too small.- S side load act on important parts of insurance part, is calculated by formula:

In which Pk -force by wedge act on the frame of the cabin when cabin combines at the insurance part , Pk = 308 kg friction parameter between cheek and guide rail, = 0.25.

So

S is also designed in between the sliding roller and the safety gear and causes lead trends and torque With e is the distance between guide shoe to centered of cut face of guide rail Select preliminary guide rail according to ISO 7465 number T89B have cut face such as drawings.

Figure 7.3: Cross section of the guide rails

The dimension is:b = 89 mm, h1 = 62 mm, k = 15.88 mm, n = 33.4 mm, f = 11.1 mm, y = 20.7 mm

Horizontal cutting surface area

Torque

Inertial torque is Distance from middle point of the ray's centered e = 36 mmThe bending moment act on the rail is

The stress in the rail is :

In which yA is the distance from point x to the applicable rate needed.

According to the section, the horizontal cut surface

We have applicable rates for steel made rail is

By so the rail is stable when the cabin combines at the insurance part

7.2.2 Compute temperature effects by the gripping of the instructorLargest number of stress temperature may determine from stress in bolt

In which Z0 the total number arrested bolt. We have Z0 = 2 F-horizontal cut surface area of instruction, F = 15.7 cm2 x-stress in bolt by bolt force, x = (400 500) kG1-friction parameter , 1= 0.15 to 0.2f-area of the section of the bolt, we can use M16 bolt which the area is:

So we have the temperature stress by the gripping instruction is

We see t < [] = 37 KN/cm2

7.2.3 The slenderness of the guide railBeside calculate the stable we must test the stiffness of the instructionThe slenderness is:

Here we consider: = 1 l- Distance between two bracket, l = 2.4 m ix- radius of the cut surface , ix= 19.5mm

Meanwhile permitted levels of slenderness of the compress bar is 120. The thickness of the guide rail T89/B lays within the good range.Therefore we select steel sign T89/B to be the guide rail of the elevator

CHAPTER 8: DOOR MECHANISM OF THE CABIN

In every lifts the door is the convenience part, can help people easy to go into and out of the elevator, transport good, and it keeps the user safe when using the elevatorWe choose door mechanism is the kind that goes to 2 side of the cabin with 800mm width.8.1. Principle of operationWhen a signal come to electric motor it will turn and spread movement through teeth transmission. The first door with deer teeth will move with speed v, the same time the first door is connected with the second door through cable so when the first the door move with uniform speed v, the second door will move with speed v / 2 because the second door is connect with the center of the pulley Closing case is also similar. The cabins door is connected with the floors door, so when the cabins door is close or open the floors door will close and open too. Floor s doors can be opened from outside by using specialist equipment.

8.2.Computing transmit movement in the door

Figure 8.1: Door mechanismThe prevent force is the friction force by the mass of the cabins door and floors door Information about the parameter of the wheel and pulley:The wheel door made by iron and use a roller gearsWheel diameter: Dbx = 60 mm.Diameter of axis: dbx = 20 mmPulley of the transmission gear and the cable : Dp = 40 mm.Friction force :

In which:Gc-weight of doors , Gc = 50 kg: roller friction parameter, = 0.3 mmf: friction parameter, f = 0.015Dbx diameter of door wheel, Dbx = 60 mmk: friction force at the side and the head of the wheel, k = 2.2

Overall efficiency transmission = 12 22 =0,942.0,9952=0,871- efficiency of the belt, 1=0,942- efficiency of a pair of roller, 2 =0,995

Efficiency of the motor with v1 = 2v2 When the cabin door open entirely, the first door move the distance S = 800 mm, with t = 2.5 seconds so the velocity v 1= S / t = 0.32 m /s =19.2 m / min

CHAPTER 9: ELECTRONIC AND PROGRAMMING9.1 IntroductionThis section of the paper describes the design and development of control system of an elevator model with following requirements: Serve passengers quickly Highest proficiency and safety Low cost

9.2 Specification9.2.1 FeaturesThe problem concern the logic required to move elevator between floors according to the following constrains: Each floor, except the first floor and top floor has two buttons, one to request an up-elevator and one to request a down-elevator. These buttons illuminate when pressed. The illumination is canceled when an elevator visits the floor and then moves in the desired direction. Inside the cabin, there is panel consisting of 8 buttons, these buttons illuminate when pressed. The illumination is canceled when an elevator visits the floor and then moves in the desired direction. Continue traveling in the same direction while there are remaining requests in that same direction. When an elevator has no requests, it remains at its current floor with its doors closed.9.2.2 ConceptExpending on our list of attribute, we speculate that the elevator circuit would consists of five modules: Users inputs Elevator button panel: consists of 6 buttons corresponding to 6 floors, in addition to close door button and hold button which take the request to the visited floor. Each floor, except the first floor and top floor has two buttons, one to request an up-elevator and one to request a down-elevator. Display module Indicating the position of the cabin on 7 segments LEDs Showing the direction of the elevator car on an 8x8 Matrix LED Illuminate the buttons when pressed using Red LEDs. Sensors Floor sensors: each floor has a limit switch to indicate which floor that the cabin has reached Secondary floor sensors: located at the haft way between floors, also use limit switch Opened and closed door sensors which signal that the doors have completely opened or closed Motors driver: control two motors, one to lift the elevator cabin and one to drive the doors. Power supply9.2.3 Basic block diagram

Figure 9.1: Basic block diagram9.2.4 LimitationsBecause we are dealing with a simulation meaning that not all features of the real world can be implemented, these limitations can be summarized as follows: The door system includes several safety devices. Sensors detect passengers or objects in the door opening, preventing the continued closing of the doors. A special fire emergency system has been installed. It may be manually activated, or may respond to smoke sensors in the building. Exact operation varies by local codes, but generally such systems return the elevator to the main floor, open the doors to allow passengers to exit, and make the elevators available to emergency personnel.9.3 Hardware design9.3.1 AVR MicrocontrollerThe ATMegal6 was chosen for the prototype development. The Mega16 is pin-for-pin compatible with the smaller-memory model ATMega8535 as well as with the larger-memory model ATMega32. This allows some freedom during the design phase. The option of increasing the memory model may be needed, since we do not know exactly how much code space is required in either unit. At the end of the project, and after the features have ceased to creep, if the code would fit into a potentially less expensive component with a smaller memory size, that choice is available as well.

Figure 9.2: ATMega16 Microcontroller9.3.2 Power supplyThe supply power of the implemented circuit need to have a capability of maintaining a steady voltage level despite vary current demands and input voltage variations. For this purpose, we use IC 7805.

Figure 9.3: Power supply blockWe use the power supply of the PC to generate the 12V sources from the 220V AC at the input of IC7805. The role of capacitors is to store and release electricity to smooth out noise, surges, and sags. Without the capacitors, the 7805 would still output 5 V but wouldnt react as quickly to changes in supply and demand, and thus it wouldnt provide as clean of a regulated output.

9.3.3 Users input and Floor sensorsBecause ATmega16 has a limited number of pins and this system requires quite many buttons to operate, except the button panel inside the cabin using four pins of microcontroller, we use each of three pins to take the input of each group of buttons and sensors. We can see the circuit of matrix 3x8 in the following figure

9.3.4 Display moduleIndicating the position of the cabin using 7 segments LEDs, showing the direction of the elevator car using an 8x8 Matrix LED and to illuminate the buttons when pressed we use Red LEDs. Finally, to control all of these LEDs, we use six ICs 74HC595

The 74HC595 shift register has an 8 bit storage register and an 8 bit shift register. Data is written to the shift register serially, then, latched onto the storage register. The storage register then controls 8 output lines.

Figure 9.4: IC 74HC595 Pin 14 (DS) is the Data pin. When pin 11 (SH_CP) goes from Low to High, the value of DS is stored into the shift register and the existing values of the register are shifted to make room for the new bit. Pin 12(ST_CP) is held low whilst data is being written to the shift register. When it goes High, the values of the shift register are latched to the storage register which are then outputted to pin Q0-Q7.Thus, to control all of the LEDs, we just have to use three pins of the Microcontroller which is an advantage of this method.9.3.5 Motors DriverThe motors driver circuit is required in order to drive the motors, for pulling or lowering the elevator car, and for opening or closing the doors. The digital control signal provided by ATMega16 Microcontroller does not deliver sufficient current to drive the motors. Hence, a driver circuit, which is capable of changing the direction of motors using the logic signals and is capable of being driven at high current, is used.

Figure 9.5: H-bridgeInitially MOSFET is not enabled, no circuit currents, voltage at pin S= 0. When the MOSFET is enabled and conduct, the conduct resistance DS is negligible compared to impedance voltage of the motor so the voltage at S is 12V. To enable the MOSFET the voltage at G must be greater than S at least 3V, means 15V at least while we use the microcontroller to trigger MOSFET, it is difficult to create voltage 15V. So N-channel MOSFET is not so suitable for the top locking in the H-bridge circuit. P type MOSFET is used in this case. However, a drawback of P-channel MOSFET is the conduct resistance DS is greater than that of N type. So, even well-designed, P-channel MOSFET in the H-bridge circuit using two types of MOSFET is often hotter and easy to be broken than the N type MOSFET, and the power of circuit is reduced also. Figure 9.5 shows an H-bridge circuit using two types of MOSFET.We use 2 IRF540 N-channel MOSFET and 2 P-channel IRF9540. This type of MOSFET can endure high current (possibly up to 30A, nominal) and high voltage, but its disadvantage is the conduct resistance is relatively large (you find our datasheet for more). To trigger the N-channel MOSFET below it is not too difficult, just use the microcontroller triggers directly on the line L2 or R2. For top lock (IRF9540, P-channel) we have to use BJT 2N3904 to trigger. When BJT 2N3904 is not triggered yet, pin G of the MOSFET is connected to VS with 1K resistors, voltage at G nearly equal to the voltage VS and is also at S of MOSFET IRF9540, so it would not conduct. When you trigger the line L1 or R1, the BJT 2N3904 conduct and leads the voltage at G fall close to 0V .Then, the voltage at pin G is much smaller than the voltage at pin S, MOSFET will conduct. Microcontroller can be used to activate the lines L1, L2, R1 and R2.9.3.6 Schematic Circuit: (These following figures depict the schematic circuit of the elevator controller)

9.4 Software Design9.4.1 System EventsThe system events can be summarized as follows: Process Elevator Calls: These scenarios includes that the elevator receives calls from the passengers outside the cabin, turns on or turns off the light of elevator call buttons, updates the record of elevator calls stored in system queues, etc. Process Floor Calls: Similar to Elevator Call processing, this use case includes that the elevator receives Floor calls from the passengers inside the cabin, turns on or turns off the light of Floor calls buttons, updates the record of floor calls in system queues, etc. Move/Stop elevator: The main function of an elevator, how to make the decision of stop, and driving directions of the elevator. Indicating Moving Direction: This mechanism let the passengers know the current moving direction of the elevator such that the passenger might decide whether to enter the elevator or not. Indicating Elevator Position: Similarly, the elevator let the passengers know whether his/her destination floor is reached so that the passenger may decide to leave the elevator. Open/Close the Doors: The elevator is able to open and close the doors for the passengers to get in and out of the elevator. The door function also enables the passengers to make door reversals when the doors are closing and the passenger wants to get in the elevator or close door sooner than usual when there is no other passengers entering cabin. On/Off illumination: The elevator and floor buttons are able inform the passenger that his call has been scheduled and inform him that his call has been requested, in which button illumination will be needed.

9.4.2 ImplementationThe basic concept of the software is to collect the inputs from users and sensors (floor sensors and door sensors); base on these inputs, program will drive the motors to serve every request, one after another, while displaying the present status of the elevator to the users.The task list is as follow:1. Scan all the input ports of the Microcontroller to collect request from users and signal from sensors every 200 milliseconds.2. Display the elevator status every 14 milliseconds.3. Have algorithm to process the inputs, and then drive the motors correspondingly.The first two tasks are handled on an interrupt basis, and the third task will be put into the main operating loop of the software.9.4.3 Functions9.4.3.1 Queue FunctionsThe following functions are used to interact with queues: Create a new queuevoid QueueCreate(Queue *q); Check if the queue is empty or not int QueueEmpty(Queue *q); Put the requested floor into queue void QueueEnter(const unsigned char c, Queue *q, unsigned char x); Take out the first queue element unsigned char QueueRemove(Queue *q); Sort the queue elements in ascending order void QueueSort_Up(Queue *q); Sort the queue elements in descending order void QueueSort_Down(Queue *q); Copy all of element from source queue to destination queuevoid QueueCopy(const unsigned char c,Queue *sourceQueue, Queue *destQueue); Check the value of queue elements int CheckSecQueue(const int c,Queue *qs,Queue *qd); int CheckDup(Queue *q,unsigned char x); int CheckDir(const int c,Queue *q,unsigned char currentFloor);

9.4.3.2 Elevator Algorithm FunctionsThe elevator algorithm will be based on the following functions: Scan all buttons and sensors to take the input from users and sensors (called every 200 ms)void scan(void); Display function using 74HC595 (called every 14 ms) void display(void); Control the door void Door(void); Main function implements the elevator algorithm void Elevator(void); Turn off the light of buttons void Turnoff(void);

9.4.3.3 Secondary Functions Initialize TIMER1 and TIMER2 interrupt and TIMER0 PWM void Init_Timer(void); Assign the first elevator state void Elevator_init(void); Function put data into IC 74HC595 used in Display function void PutData(unsigned char data); Swap the position of two queue elements void swap(unsigned char *a, unsigned char *b);

9.4.4 Flow Charts9.4.4.1 Door Function

9.4.4.2 Elevator Algorithm Activity Diagram 1: User calls elevator

Activity Diagram 2: User travel in elevator

Activity Diagram 3: User presses a floor button while traveling

9.4.5 Elevator Algorithm9.4.5.1 Problem StatementThere are different algorithms that could be used for designing the elevator controller: Shortest seek first: Serve the request closest to the present floor.This algorithm is irrespective of the time at which request is placed, it only caters to the request closest to the present floor.E.g. If someone places a request for 6th floor, there are a lot of other requests for nearby floor as it is a busy section, also if they keep coming, then that persons request is not served for a long time. First come first serve: Serve the request as they arrive.This is inefficient as far as power requirements are concerned and more time will be taken on an average to reach the required destination. Elevator algorithm: Serve the entire request in one direction and then reverse the direction.After considering the advantage of all algorithms, we finally choose the elevator algorithm to implement in this project.9.4.5.2 ImplementationTo implement the elevator algorithm, we use three queues (upQueue to store requests going up, downQueue to store requests going down and secQueue to store the requests that have not processed yet) and the elevator has three states: IDLE State: Cabin is not movingIn this state, the elevator keeps checking the upQueue or downQueue, if one of these queues is not empty, the elevator will change to GO_UP state or GO_DOWN state, correspondingly. GO_UP State: Cabin goes upIn this state, the elevator will take the destination floor from the upQueue, and then goes to this floor. While moving, if there is request going up to the floor that is closer to the cabin than the destination floor, the previous destination will be put into upQueue, and destination floor will be assigned to this request. Other requests will be put into corresponding Queue. GO_DOWN State: Cabin goes downIn this state, the elevator will take the destination floor from the downQueue, and then goes to this floor. While moving, if there is request going down to the floor that is closer to the cabin than the destination floor, the previous destination will be put into downQueue, and destination floor will be assigned to this request. Other requests will be put into corresponding Queue.9.4.5.3 Coding/**************************************************** * Main.c ****************************************************/

#include "Main.H"#include "Port.H" #include "Elevator.H"#include "Queue.H" unsigned char currentFloor=1, button, callUp, callDown, destFloor, secSensor;unsigned char buttonLed, upLed, downLed, direction, index=0, column = 1;

Elevator_State E_State;Queue upQueue, downQueue, secQueue;

void main() { Port_Init(); // Initialize Port QueueCreate(&upQueue); QueueCreate(&downQueue); QueueCreate(&secQueue); Init_Timer(); // Initialize TIMER Elevator_init(); while(1) { Elevator(); }}/************************************************* * Elevator Function ************************************************/void Elevator(void){ switch(E_State) { case IDLE: TCCR0=0x05; //Turn off PWM PORTB.4=0; PORTB.3=0; direction = 0; if(!QueueEmpty(&upQueue)) E_State = GoUp; else if(!QueueEmpty(&downQueue)) E_State = GoDown; break; case GoUp: if(secSensor == currentFloor) secSensor = currentFloor - 1; destFloor = QueueRemove(&upQueue); direction = 1; TCCR0=0x6D; //Turn on PWM // Car goes up while(destFloor != currentFloor) { if(secSensor == (destFloor - 1)) { PORTB.4=1; OCR0=170; } else { PORTB.4=1; OCR0=0; } }; TCCR0=0x05; PORTB.4 = 0; PORTB.3 = 0; Turnoff(); Door(); // If there is no command going up and there are commands // going down, change state to GoDown if(QueueEmpty(&upQueue)&&!QueueEmpty(&downQueue)){// If the highest floor in downQueue is above the current // floor, add it to upQueue if(CheckDir(2,&downQueue,currentFloor)) { uChar temp; temp = QueueRemove(&downQueue); QueueEnter(1,&upQueue,temp); } else { E_State = GoDown; if(!QueueEmpty(&secQueue)) { // If the lowest floor in the temporary queue is below // the lowest floor in downQueue, add it to downQueue, // and copy the rest to upQueue if(CheckSecQueue(1,&secQueue,&downQueue)){ uChar temp; temp = QueueRemove(&secQueue); QueueEnter(2,&downQueue,temp); QueueCopy(1,&secQueue,&upQueue); }

// If the lowest floor in temporary queue equals the // lowest floor in downQueue, remove it, and copy the // rest to upQueue

else if(CheckSecQueue(3,&secQueue,&downQueue)) { QueueRemove(&secQueue); QueueCopy(1,&secQueue,&upQueue);}else QueueCopy(1,&secQueue,&upQueue); }}} //If there is no command going up and downelse if(QueueEmpty(&upQueue)&&QueueEmpty(&downQueue)){ if(!QueueEmpty(&secQueue)) { uChar temp = QueueRemove(&secQueue); QueueEnter(2,&downQueue,temp); E_State = GoDown; QueueCopy(1,&secQueue,&upQueue); } else E_State = IDLE; } break; case GoDown: if(secSensor < currentFloor) secSensor = currentFloor; destFloor = QueueRemove(&downQueue); direction = 2; TCCR0=0x6D; // Car goes down while(destFloor != currentFloor) { if(secSensor == destFloor) { PORTB.4 = 0; OCR0= 85; } else { PORTB.4 = 0; OCR0 = 255; } }; TCCR0=0x05; PORTB.4 = 0; PORTB.3 = 0; Turnoff(); Door(); //If there is no command going down and there are commands going up, change state to GoUp if(QueueEmpty(&downQueue)&&!QueueEmpty(&upQueue)){// If the lowest floor in the upQueue is below the // current floor, add it to downQueue

if(CheckDir(1,&upQueue,currentFloor)) { uChar temp; temp = QueueRemove(&upQueue); QueueEnter(2,&downQueue,temp); } else { E_State = GoUp;// If the highest floor in the temporary queue is above // the highest floor in upQueue, add it to upQueue, and // copy the rest to downQueue

if(!QueueEmpty(&secQueue)) { if(CheckSecQueue(2,&secQueue,&upQueue)) { uChar temp = QueueRemove(&secQueue); QueueEnter(1,&upQueue,temp); QueueCopy(2,&secQueue,&downQueue); }

// If the highest floor in temporary queue equals the // highest floor in upQueue, remove it, and copy the rest // to downQueue

else if(CheckSecQueue(3,&secQueue,&upQueue)) { QueueRemove(&secQueue); QueueCopy(2,&secQueue,&downQueue); }

else QueueCopy(2,&secQueue,&downQueue); }}}

//If there is no command going up and down

else if(QueueEmpty(&upQueue)&&QueueEmpty(&downQueue)) { if(!QueueEmpty(&secQueue)) { uChar temp = QueueRemove(&secQueue); QueueEnter(1,&upQueue,temp); E_State = GoUp; QueueCopy(2,&secQueue,&downQueue); } else E_State = IDLE; } break; } } /**************************************************** * Scan the keys and Sensors****************************************************/

void scan(void) { //Scan In-car Buttons button = PINA&0x0F; if(button !=0) { if(button= currentFloor) QueueEnter(1,&upQueue,button); else { if(button > destFloor) { QueueEnter(2,&downQueue,destFloor); destFloor = button; } else if(button < destFloor) QueueEnter(2,&downQueue,button); } break; case IDLE: if(button >= currentFloor) QueueEnter(1,&upQueue,button); else QueueEnter(2,&downQueue,button); break; } } else { if(PORTB.4==0&&OCR0==0) if(PORTD.3==1&&PORTD.4==1) if(button==8) { do { PORTD.3=1; PORTD.4=0; }while(PINC.7!=0); PORTD.3=0; PORTD.4=0; } } } buttonLed |= (14)&0x07; if(callUp!=0) { switch(E_State) { case GoUp: if(callUp > currentFloor) { if(callUp < destFloor) { QueueEnter(1,&upQueue,destFloor); destFloor = callUp; } else if(callUp > destFloor) QueueEnter(1,&upQueue,callUp); } else QueueEnter(1,&secQueue,callUp); break; case GoDown: if(callUp == 1) QueueEnter(2,&downQueue,callUp); else if(!CheckDup(&downQueue,callUp)&&(callUp!=destFloor)) //Do not enter to upQueue if it's already been in downQueue or destination floor QueueEnter(1,&upQueue,callUp); break; case IDLE: if(callUp >= currentFloor) QueueEnter(1,&upQueue,callUp); else QueueEnter(2,&downQueue,callUp); break; } } upLed |= (1