simple logic elevator

Post on 08-Dec-2016

232 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Simple Logic ElevatorSimple Logic ElevatorGroup 10: Zhen Yu WuGroup 10: Zhen Yu Wu

WaiWai SengSeng HoHoTat Chi Tat Chi ChioChio

OverviewOverviewProposalProposalSpecificationsSpecificationsFeaturesFeaturesDesign ProcessDesign ProcessComputer CodeComputer CodeCircuit DiagramCircuit DiagramAutoCADAutoCADCost EstimateCost EstimateConclusionConclusion

ProposalProposalA threeA three--floored elevatorfloored elevatorOne door with safety sensorOne door with safety sensorIndicatorIndicatorSuitable for parking garage, subway Suitable for parking garage, subway station, etc.station, etc.

SpecificationsSpecificationsPrototype is controlled by BS2Prototype is controlled by BS2Safety circuitrySafety circuitryInstantaneous automatic and manual Instantaneous automatic and manual controlcontrolIncluded actuators and sensorsIncluded actuators and sensorsFeedback systemFeedback system

FeaturesFeaturesSmoke detectorSmoke detector

Safety sensory systemSafety sensory system

Design ProcessDesign ProcessMechanical constructionMechanical construction

1.1. TrackTrack2.2. Elevator boxElevator box3.3. Sliding doorSliding door

Design processDesign processProgramming & Electrical circuitProgramming & Electrical circuit

1.1. ElevationElevation2.2. Door movementDoor movement3.3. Status indicationStatus indication4.4. BS2 protectionBS2 protection5.5. User interface hardwareUser interface hardware

Computer CodeComputer Code'{$STAMP BS2}debug "start program", crposition var nibrct var wordx var wordn var worda var bitlog var bit(6)ptr var nibptr=0position=1for x=0 to 5

'initialize array to all 0slog(n)=0next

high 7

mainloop:gosub check0

'constantly checking user inputs

start:for n=ptr to 5 'set pointer to the first destinationif log(n)=1 then setptrnext

for n=0 to ptr 'set pointer to the first destinationif log(n)=1 then setptrnextif in8=0 then alarm

loop:debug "floor = ",dec position,tab, "pointer ", dec ptr, crif (position=1) and (ptr=2 or ptr=3) then goup1fif (position=1) and (ptr=4 or ptr=5) then goup2fif (position=2) and (ptr=0 or ptr=1) then godown1fif (position=2) and (ptr=4 or ptr=5) then goup1fif (position=3) and (ptr=0 or ptr=1) then godown2fif (position=3) and (ptr=2 or ptr=3) then godown1fif a=1 then stopelevatorif (position=1) and (ptr=0 or ptr=1) then donothingif (position=2) and (ptr=2 or ptr=3) then donothingif (position=3) and (ptr=4 or ptr=5) then donothinggoto mainloop

goup1f:gosub close_doorfor x=1 to (8*42)pulsout 11, 300pause 10gosub check0nextgosub open_doorposition=position+1goto start

goup2f:gosub close_doorfor x=1 to (16*42)pulsout 11,300pause 10gosub check0nextgosub open_doorposition=position+2goto start

godown1f:gosub close_doorfor x=1 to (8*36)pulsout 11, 1700pause 10gosub check0nextgosub open_doorposition=position-1goto start

godown2f:gosub close_doorfor x=1 to (16*37)pulsout 11, 1700pause 10gosub check0nextgosub open_doorposition=position-2goto start

check0:

if (in0=1 and log(0)=0) then location0check1:if (in1=1 and log(1)=0) then location1check2:if (in2=1 and log(2)=0) then location2check3:if (in3=1 and log(3)=0) then location3check4:if (in4=1 and log(4)=0) then location4check5:if (in5=1 and log(5)=0) then location5return

location0:log(0)=1if ptr>=4 then setptrto0goto check1

location1:log(1)=1if ptr>=4 then setptrto0goto check2

location2:log(2)=1if ptr>=4 then setptrto0goto check3

location3:log(3)=1if ptr>=4 then setptrto0goto check4

location4:log(4)=1if ptr>=4 then setptrto0goto check5

location5:log(5)=1if ptr>=4 then setptrto0return

setptrto0:ptr=0goto mainloop

setptr:ptr=ngoto loop

alarm:a = 1freqout 9,200,2900ptr = 1debug "alarm", crgoto loop

stopelevator:stop

open_door:out7=1for x=1 to 100pulsout 10, 1200pause 10nextlog(ptr)=0for x=1 to 500gosub check0nextreturn

open:for x=1 to 100pulsout 10, 1200pause 10nextclose_door:for n=1 to 100pulsout 10, 400pause 10high 6RCtime 6,1,rctif (rct>5000) or (rct=0) then opennextdebug "here"out7=0return

donothing:log(ptr)=0goto mainloop

Circuit DiagramCircuit Diagram

Elevator TrackElevator Track

ElevatorElevator

Cost EstimateCost Estimate

35boards35Construction Materials

1.680.2Resistors

1.511.5Photodiode

13113Continuous Motor

24212Servo-Motor

881LED

8.461.4Button

subtotal, dollarsQuantitiesPriceComponents

Cost EstimateCost Estimate

205.75Total Cost

1001100BS2

919Circuit Board

515Piezo-Speaker

0.2510.25Capacitors

subtotal, dollarsQuantitiesPriceComponents

ConclusionConclusionEasy operationEasy operationClear indicationClear indicationEffective safety designEffective safety designLow cost with multipurpose featuresLow cost with multipurpose features

top related