railway controlling

29
Railway controlling Abir Sabra Iman Shtayeh 1

Upload: nat

Post on 22-Feb-2016

83 views

Category:

Documents


1 download

DESCRIPTION

Railway controlling. Abir Sabra Iman Shtayeh. Objectives :. Design a network-controlled railway system But , allow human interrupt and monitoring. Our project …. Consist of : Main control station. n-trains. Railway (communication medium + power). Main control station. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Railway controlling

1

Railway controlling

Abir Sabra Iman Shtayeh

Page 2: Railway controlling

2

Objectives :

• Design a network-controlled railway system• But, allow human interrupt and monitoring

Page 3: Railway controlling

3

Our project …

Consist of :• Main control station.• n-trains.• Railway (communication medium + power).

Page 4: Railway controlling

4

Main control station.As a hardware we have main microcontroller.Main M.C have:- Connection to main pc.- connection to each train (I2C protocol).- Connection to Railway direction controller.

Main M.C(bridge)

Railway direction controller

Train(M.C)

Train(M.C)

I2C

Page 5: Railway controlling

5

Trains.• Then we have microcontroller on each train. Train M.C have: - connection to master(I2C). - connection to RFID reader. - connection to local motor through H-bridge.

Train(M.C) Main M.C

local motor

Page 6: Railway controlling

6

Railway. -Tags are arranged on some order as shown.

6

5

4

3

21

0

7

Mechanical Switch

Railway direction controller

Page 7: Railway controlling

7

Software

In S.W we consider

• One master represents main M.C.• Three slaves each one represents microcontroller for train.• I2C as protocol for communication.• C# application for human main controlling.

Page 8: Railway controlling

8

Master

Slave(A0)Slave(A2)

Slave(A4)

Request dataGive data

Master get trains position.

1

Master

Slave(A0)Slave(A2)

Slave(A4)

2Master send any new train position .

Master

3

Main PC

Main PC

Send address of slave

Send command

Slave(address)

address

Send command

Overview, communication.

Send command to trains

Page 9: Railway controlling

9

Master.• Master keeps requesting data from each slave through a

specific order and gives slave period of time to get data from.• Master send each new position of trains to main PC (serial

connection).• Master send each new data about any train to slaves.• Master send command to any train trough our interface on

main PC.

Page 10: Railway controlling

10

Master Flowchart

openMotor()

backF =1.

CmdF

cmdF

sendCmdToSlave()

Delay

cmdF = 0.

Result= requestSlave().

Result>=8 &<8

Result=6

backF=1

openMotor()

sendReadyToSlave()

mainF=0.

sendToAll()

sendToSerial()

newDataF = 0.

Result=7

ReleaseMotor()

ReleaseMotor()

backF = 0

backF =1.

Page 11: Railway controlling

11

Slave• Give data to master when request it. - if new data available, then give master the new position. - if no new data just give master ‘keep a live’.

• Get data from master which may be : - Command from main station, execute command. - Position of other train, store the position and release the previous position.

Page 12: Railway controlling

12

Slave Flow chart SetupPwmDuty(180)

NewPos= 1

MyPos = checkTag()

CheckSpeed().

NewPos = 0.

CmdF = 1

MoveFor(mid)

Cmd = T

P

Stop()W

MoveFor(slow)D

CmdF = 0.

Page 13: Railway controlling

Pre Stop station Action: slow

Case.1

Tag 1,5: stop station.

Tag 0,4: pre stop station.

No action.

Tag 2,3,6,7: along the road.Action: stop.

6

01 2

3

4

5

7

Page 14: Railway controlling

Pre stop station.Action: slow.But, next busyAction: stop.

2

Action: stop.

Action: stop.

6

01 2

3

4

5

7

Page 15: Railway controlling

No action.

3

Action: stop.

Pre stop station.Action: slow.But, next busyAction: stop.

6

01 2

3

4

5

7

Page 16: Railway controlling

Action: stop.

Pre Stop station Action: slow

No action.

4

6

01 2

3

4

5

7

Page 17: Railway controlling

5If maintenance command send to slave A2

Train A2 continue until reach tag6 , then stop action.

6

01 2

3

4

5

7

Page 18: Railway controlling

Action: stop.

No action.

Maintenance is on for A2.Action: stop.

6

6

01 2

3

4

5

7

Page 19: Railway controlling

7

Action: change direction of rail.

Action: stop.

6

01 2

3

4

5

7

Page 20: Railway controlling

Action: move forward.

Pre stop station.Action: slow.

8

6

01 2

3

4

5

7

Page 21: Railway controlling

Action: stop.

No action.

Action: stop.

9

6

01 2

3

4

5

7

Page 22: Railway controlling

Action: return back the rail direction.

10

Action: stop.

6

01 2

3

4

5

7

Page 23: Railway controlling

6

01 2

3

4

5

7

11

If enter to rail command send to slave A2

Action: change direction of rail.

Before.- Make sure tag6 is empty.- Stop all trains.

Action: stop.

Action: stop.

Page 24: Railway controlling

6

01 2

3

4

5

7

12

Action: move reverse.

Page 25: Railway controlling

6

01 2

3

4

5

7

13

Page 26: Railway controlling

6

01 2

3

4

5

7

14

Action: stop.

Page 27: Railway controlling

6

01 2

3

4

5

7

15

Action: return back the rail direction.

Page 28: Railway controlling

6

01 2

3

4

5

7

16

Action: move forward.

Action: move forward.

Action: move forward.

Page 29: Railway controlling

29

THANK YOU