23
Simple Logic Elevator Simple Logic Elevator Group 10: Zhen Yu Wu Group 10: Zhen Yu Wu Wai Wai Seng Seng Ho Ho Tat Chi Tat Chi Chio Chio

Simple Logic Elevator

  • Upload
    dotruc

  • View
    218

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Simple Logic Elevator

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

WaiWai SengSeng HoHoTat Chi Tat Chi ChioChio

Page 2: Simple Logic Elevator

OverviewOverviewProposalProposalSpecificationsSpecificationsFeaturesFeaturesDesign ProcessDesign ProcessComputer CodeComputer CodeCircuit DiagramCircuit DiagramAutoCADAutoCADCost EstimateCost EstimateConclusionConclusion

Page 3: Simple Logic Elevator

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.

Page 4: Simple Logic Elevator

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

Page 5: Simple Logic Elevator

FeaturesFeaturesSmoke detectorSmoke detector

Safety sensory systemSafety sensory system

Page 6: Simple Logic Elevator

Design ProcessDesign ProcessMechanical constructionMechanical construction

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

Page 7: Simple Logic Elevator

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

Page 8: Simple Logic Elevator

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

Page 9: Simple Logic Elevator

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

Page 10: Simple Logic Elevator

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

Page 11: Simple Logic Elevator

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

Page 12: Simple Logic Elevator

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

Page 13: Simple Logic Elevator

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

Page 14: Simple Logic Elevator

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

Page 15: Simple Logic Elevator

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

Page 16: Simple Logic Elevator

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

Page 17: Simple Logic Elevator

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

Page 18: Simple Logic Elevator

Circuit DiagramCircuit Diagram

Page 19: Simple Logic Elevator

Elevator TrackElevator Track

Page 20: Simple Logic Elevator

ElevatorElevator

Page 21: Simple Logic Elevator

Cost EstimateCost Estimate

35boards35Construction Materials

1.680.2Resistors

1.511.5Photodiode

13113Continuous Motor

24212Servo-Motor

881LED

8.461.4Button

subtotal, dollarsQuantitiesPriceComponents

Page 22: Simple Logic Elevator

Cost EstimateCost Estimate

205.75Total Cost

1001100BS2

919Circuit Board

515Piezo-Speaker

0.2510.25Capacitors

subtotal, dollarsQuantitiesPriceComponents

Page 23: Simple Logic Elevator

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