SlideShare a Scribd company logo
VisualizeGate Control andTrack Switching
1
INDEX
Ch.No. Chapter Name Page No.
1 Introduction 01
2 Specification 03
3 Design Procedure 08
4 Hardware
 Principle of Operation 09
 Hardware Details 10
 Block Diagram 13
 Circuit Diagram 14
5 Software
 Algorithm 17
 Flowchart 19
 Software Listing 23
6 Circuit Preparation(PCB making &
Trouble Shooting)
66
7 Advantages, Disadvantages & Application 73
8 Future Scope 74
9 Cost Sheet 75
10 Conclusion 77
11 References 80
12 Datasheet 82
13 Photograph 102
VisualizeGate Control andTrack Switching
2
INTRODUCTION
VisualizeGate Control andTrack Switching
3
INTRODUCTION
Indian railway has the 2nd largest railway network in the world. As the 21st century is
moving ahead, the Indian railway system is also moving ahead in terms of technology. But then
also, till today our system have not been developed to such a level that it can able to avoid the
train accidents in India. In the last 2 years, total 46 major accidents occurred in which more than
9000 Indians and over 859 foreigners lost their lives.
Most of the train accidents in India occurs due to the miscommunication, bad weather
conditions (fog), human errors, non-update information about the train. Due to these reasons
many Indian people lost their life’s and also the foreigners. Today railway is one of the main
source for the transportation of people as well as goods in India. In train accidents almost 19% of
the total goods get wasted, it may be coal, steel, iron, petroleum, oil etc.
In today’s competitive world lot of things works on automation, this reduces use of
human resources to a great extent and because of this time and money are also saved. Which is
economically profitable in today’s life. In this system more work is done with less investment,
proper management and discipline is maintained.
As we want to solve the problems of accidental damage of railway system, to maximize
the people security, and to get the more information about railway position. We found the best
solution for that are “VISUALIZE GATE CONTROL AND TRACK SWITCHING” in
Railway system.
For this project we design a circuit which gives whole information about the Railway
system. In this project we use the IR sensors and it is placed before and after the Railway
Crossing so when any Train enters the area of Railway Crossing at that time gate is automatically
closed.
If two trains arrived on same track and cuts IR sensors in opposite directions the red
signals is given to both train to avoid the accident. If we want to switch the train on different
tracks then we can switch it using master control.
VisualizeGate Control andTrack Switching
4
SPECIFICATION
VisualizeGate Control andTrack Switching
5
Specification
IR Sensor
This is a simple yet effective IR proximity sensor built around the TSOP 1738 module.
The TSOP module is commonly found at the receiving end of an IR remote control system; e.g.,
in TVs, CD players etc. These modules require the incoming data to be modulated at a particular
frequency and would ignore any other IR signals. It is also immune to ambient IR light, so one
can easily use these sensors outdoors or under heavily lit conditions.
Such modules are available for different carrier frequencies from 32 kHz to 42 kHz. In
this particular proximity sensor, we will be generating a constant stream of square wave signal
using IC555 centered at 38 kHz and would use it to drive an IR led. So whenever this signal
bounces off the obstacles, the receiver would detect it and change its output. Since the TSOP
VisualizeGate Control andTrack Switching
6
1738 module works in the active-low configuration, its output would normally remain high and
would go low when it detects the signal (the obstacle).
Microcontroller 89S52
 Compatible with MCS-51® Products
 8K Bytes of In-System Programmable (ISP) Flash Memory
 4.0V to 5.5V Operating Range
 Fully Static Operation: 0 Hz to 33 MHz
 Three-level Program Memory Lock
 256 x 8-bit Internal RAM
 32 Programmable I/O Lines
 Three 16-bit Timer/Counters
 Eight Interrupt Sources
 Full Duplex UART Serial Channel
 Low-power Idle and Power-down Modes
 Interrupt Recovery from Power-down Mode
 Watchdog Timer
 Dual Data Pointer
 Power-off Flag
Push –Pull Four Channel Driver with Diodes (L293D)
 600mA output current capability per channel
 1.2A peak output current per channel (non repetitive)
 Enable Facility
 Over Temperature Protection
 Logical ”0” input voltage up to 1.5 V to 5V
 High Noise Immunity
 Internal Clamp Diodes
VisualizeGate Control andTrack Switching
7
MAX232
 Operate from Single +5V Power Supply
 +5V and +12V (MAX231/MAX239)
 Low-Power Receive Mode in Shutdown (MAX223/MAX242)
 Meet All EIA/TIA-232E and V.28 Specifications
 Multiple Drivers and Receivers
 3-State Driver and Receiver Outputs
 Open-Line Detection (MAX243)
Voltage Regulator IC 7805
 Output current in excess of 1A
 Internal thermal overload protection
 No external components required
 Output transistor safe area protection
 Internal short circuit current limit
 Available in the aluminum TO-3 package
VisualizeGate Control andTrack Switching
8
DESIGN
PROCEDURE
VisualizeGate Control andTrack Switching
9
DESIGN PROCEDURE
a) HARDWARE:
• Principle of Operation:
1. We are using the Infrared sensor (IR) pairs for detecting the train. As the train
obstructs IR signals, IR will send the received signals to the controller indicating that
the train is arrived. When the train obstructs the 1st IR sensor, it will turn ON buzzer
for particular period of time and then the gate will automatically get closed.
2. The buzzer is basically used as a warning alert for people near the railway gate.
3. We can calculate the speed of train using distance between two IR sensors (fixed) and
the time difference required by train to obstruct the 2 IR sensors.
4. When the train is arriving from 1 side, the signal on the same track will indicate red
signal to opposite direction.
5. If we want to route the train on different tracks then we can switch the tracks using
master controller (PC).
6. These all are represented on computer (master controller) and provide master control
to operator. [I.e. gate status, signal status, tracks switching, speed measurement,
position of train.]
7. IR sensors are also used for the automatic railway gate control which is performed by
using the outputs of the IR sensors which are given to the DC motor used for the gate.
8. The status of the railway gate is represented on the PC and it is also controlled by the
master controller (PC).
VisualizeGate Control andTrack Switching
10
• HARDWARE DETAILS
1. MICROCONTROLLER 89S52
We are using ATMELS AT89c/s51 microcontroller. The controller executes instructions as
per the clock cycles; this clock is generated using a crystal which is connected to the XTAL1 &
XTAL2 pin of the microcontroller, the two capacitors C1 & C2 are connected between the two
XTAL pins & the ground. They are required for the crystal to oscillate.
A Power ON reset circuit is connected to the RESET pin of the microcontroller, the controller
must be reset properly whenever is power is turned on, which is done by applying a Vcc to the
reset pin & for normal operation of the controller the pin should be pulled low. So an RC (R1,
C3) circuit is connected to the RST (9) pin of the microcontroller. Whenever the power is turned
ON the Capacitor is fully charged & the RST pin gets 5 v. Then the capacitor slowly discharges
through the resistor & is then pulled to ground.
Microcontrollers Port 0 does not have an Internal Pull Up resistor so we need external Pull Up
resistors on port 0. For which we use 9-Pin SIP resistor which are basically eight resistors with
one end common.
Components: XTAL=11.0592 MHz, C1=C2= 33pf, R1=10kΩ, C=10uf
2. TSOP 1738basedproximity sensor
This is a simple yet effective IR proximity sensor built around the TSOP 1738 module.
The TSOP module is commonly found at the receiving end of an IR remote control system;
e.g., in TVs, CD players etc. These modules require the incoming data to be modulated at a
particular frequency and would ignore any other IR signals. It is also immune to ambient IR
light, so one can easily use these sensors outdoors or under heavily lit conditions.
Such modules are available for different carrier frequencies from 32 kHz to 42 kHz. In
this particular proximity sensor, we will be generating a constant stream of square wave signal
VisualizeGate Control andTrack Switching
11
using IC555 centered at 38 kHz and would use it to drive an IR led. So whenever this signal
bounces off the obstacles, the receiver would detect it and change its output.
1. POWER SUPPLY SECTION
We require 5 volts for microcontroller, LCD, EEPROM & approximately 12 volts for the
Relay. These voltages are generated from 230v line voltage. Initially A step down Transformer is
used to step down 230volts to 9olts, so a 0-9; 500ma step down transformer is used. The output
of the step down transformer is also AC, we convert this AC voltage into DC by using a Full
wave bridge rectifier consisting of Diodes D1, D2, D3 & D4. During the positive half cycle
diodes D1 & D4 conduct whereas in the negative half cycle diodes D2 & D3 conduct thus the
diodes keep switching the transformer connections so we get positive half cycles in the output.
Even though half wave & full wave rectifier give DC output, none of them provides a constant
output voltage. For this we require to smoothen the waveform received from the rectifier. This
can be done by using a capacitor at the output of the rectifier this capacitor is also called as
“FILTER CAPACITOR “or “SMOOTHING CAPACITOR” or “RESERVOIR CAPACITOR”.
Even after using this capacitor a small amount of ripple will remain.
We place the capacitor at the output of the rectifier the capacitor will charge to the peak
voltage during each half cycle & then will discharge its stored
energy slowly through the load while the rectified voltage drops to
zero, thus trying to keep the voltage as constant as possible. If we
go on increasing the value of the filter capacitor then the Ripple
will decrease. But then the costing will increase. The value of the
VisualizeGate Control andTrack Switching
12
Filter capacitor depends on the current consumed by the circuit, the frequency of the waveform
& the accepted ripple.
C=VrF/I
Where,
Vr= accepted ripple voltage.( should not be more than 10% of the voltage)
I= current consumed by the circuit in Amperes.
F= frequency of the waveform.
After filtering the rectifier output the signal is given to a voltage regulator. The maximum input
voltage that can be applied at the input is 35V.Normally there is a 2-3 Volts drop across the
regulator so the input voltage should be at least 2-3 Volts higher than the output voltage. If the
input voltage gets below the Vmin of the regulator due to the ripple voltage or due to any other
reason the voltage regulator will not be able to produce the correct regulated voltage. We require
5v output so we use IC 7805 where 78 indicates that it’s a positive series & the 05 indicates the
output voltage.
Another capacitor C4 is used after the voltage regulator, this is used to remove any ripples or
noise generated in the Vcc. D7 is an LED used to indicate the Power Status
Components: Transformer: Step Down 0-9; 500ma, Diodes: 1n4007 (D1, D2, D3
and D4), Capacitor (c11) = 1000uf, Voltage Regulator= 7805, Capacitor C4 =
100uf, Resistor R10 =2.2KΩ. LED1 = 3mm Transparent white LED.
VisualizeGate Control andTrack Switching
13
BLOCK DIAGRAM:-
Micro
controller
8
9
S
5
2
MAX 232
DC MOTOR
DRIVER
(L293D)
PC
LED
DC motor
VisualizeGate Control andTrack Switching
14
CIRCUIT DIAGRAM:-
IR SENSORS
VisualizeGate Control andTrack Switching
15
LAYOUT:-
VisualizeGate Control andTrack Switching
16
COMPONENT PLACEMENT & DESIGN :-
VisualizeGate Control andTrack Switching
17
b) SOFTWARE
 ALGORITHM
Gate Controlling
1) start
2) initialize all i/o pins.
3) Open the gate
4) wait for sensor to be cut
5) send the sensor cut location to PC
5) Close the gate
6) wait for other sensor to be cut
7) send sensor cut location to PC
8) Open the gate
9) go to 4
10) Stop
Track Switching
1) Start
2) Initialize all I/O pins.
3) Wait for data from PC
4) If data received = cmd_track1_side1 then move track1 to side 1 and go to 3
5) If data received = cmd_track1_side2 then move track1 to side 2 and go to 3
6) If data received = cmd_track2_side1 then move track2 to side 1 and go to 3
7) If data received = cmd_track2_side2 then move track2 to side 2 and go to 3
VisualizeGate Control andTrack Switching
18
8) go to 3
9) stop
Anti-Collision System
1) Start
2) Initialize all i/o pins
3) show green led on both sides
4) wait for sensor to be cut
5) Show red led on other side
6) wait for second sensor to be cut
7) go to 3
8) stop
VisualizeGate Control andTrack Switching
19
FLOWCHART
VisualizeGate Control andTrack Switching
20
Gate Controlling
START
Initialize all I/O pins.
GATE OPEN
Send the Signal to
the PC
GATE CLOSE
Check the First
IR Sensor Cut
or Not
Check the
Second IR Sensor
Cut or Not
VisualizeGate Control andTrack Switching
21
Track Switching
START
Initialize all I/O pins.
Wait For Data from
PC
If Data
Received
Cmd_track1_side1 move to track1 to side 1
Cmd_track1_side2 move to track1 to side 2
Cmd_track2_side1 move to track2 to side 1
Cmd_track2_side2 move to track2 to side 2
STOP
VisualizeGate Control andTrack Switching
22
Anti-Collision System
START
Initialize all I/O pins.
Turn ON Green LED
on both Sides
Check the First
IR Sensor Cut
or Not
Turn ON RED LED
Check the
Second IR Sensor
Cut or Not
Turn OFF RED LED
& Turn ON Green
LED
VisualizeGate Control andTrack Switching
23
Software Listing
A] Assembly language programming
A51 MACRO ASSEMBLER MAIN
MACRO ASSEMBLER A51 V8.01
OBJECT MODULE PLACED IN main.OBJ
ASSEMBLER INVOKEDBY: C:KeilC51BINA51.EXEmain.asmSET(SMALL) DEBUG EP
LOC OBJ LINE SOURCE
1 ;$include (ini.inc)
0093 +1 2 SENSOR1 BIT p1.3 ;for gate
0092 +1 3 SENSOR2 BIT p1.2 ;for gate
0091 +1 4 gate_close_sensor bit P1.1
0090 +1 5 tracksw_fb1 bit P1.0
0096 +1 6 tracksw_fb2 bit P1.6
0094 +1 7 SENSOR3 BIT p1.4 ;forspeedsame tra
ck
0095 +1 8 SENSOR4 BIT p1.5 ;forsame track
VisualizeGate Control andTrack Switching
24
+1 9
00B7 +1 10 led_red bit P3.7
00B6 +1 11 led_red1 bit P3.6
00B5 +1 12 led_green bit P3.5
00B4 +1 13 led_green1 bit P3.4
+1 14
+1 15
+1 16
+1 17
0083 +1 18 en1 bit P0.3 ;track swit
ch 2
0084 +1 19 in1a bit P0.4
0085 +1 20 in1b bit P0.5
+1 21
0080 +1 22 en2 bit P0.0 ;track swit
ch 1
0081 +1 23 in2a bit P0.1
0082 +1 24 in2b bit P0.2
+1 25
00A5 +1 26 en3 bit P2.5 ;gate contr
ol
00A3 +1 27 in3a bit P2.3
00A4 +1 28 in3b bit P2.4
+1 29
00A2 +1 30 en4 bit P2.2
VisualizeGate Control andTrack Switching
25
00A1 +1 31 in4a bit P2.1
00A0 +1 32 in4b bit P2.0
+1 33
+1 34
+1 35
00A6 +1 36 buzzer bit P2.6
+1 37
+1 38
+1 39
+1 40
+1 41
+1 42
+1 43
+1 44
+1 45
+1 46
+1 47
+1 48
0000 +1 49 GATE_CLOSE_F BIT 00H
0001 +1 50 track1_side1_f bit 01h
0002 +1 51 track2_side1_f bit 02h
+1 52
+1 53
+1 54
VisualizeGate Control andTrack Switching
26
A51 MACRO ASSEMBLER MAIN
0030 +1 55 delay0 equ 30h
0031 +1 56 delay1 equ 31h
0032 +1 57 DELAY2 EQU 32H
0033 +1 58 sensor_ram equ 33h
0034 +1 59 sametrack_ram equ 34h
+1 60
+1 61
0031 +1 62 s_location1 data '1'
0032 +1 63 s_location2 data '2'
0033 +1 64 s_location3 data '3'
0034 +1 65 s_location4 data '4'
0035 +1 66 s_gate_open data '5'
0036 +1 67 s_gate_close data '6'
0037 +1 68 s_track1_side1 data '7'
0038 +1 69 s_track1_side2 data '8'
0039 +1 70 s_track2_side1 data '9'
0030 +1 71 s_track2_side2 data '0'
+1 72
+1 73
0041 +1 74 cmd_track1_side1 data 'A'
0042 +1 75 cmd_track1_side2 data 'B'
0043 +1 76 cmd_track2_side1 data 'C'
0044 +1 77 cmd_track2_side2 data 'D'
VisualizeGate Control andTrack Switching
27
0045 +1 78 cmd_gate_open data 'E'
0046 +1 79 cmd_gate_close data 'F'
80
0000 81 org 0000h
0000 758160 82 MOV SP,#60H
0003 11E4 83 call stop
0005 C2A6 84 clr buzzer
0007 C2B4 85 clr led_green1
0009 C2B5 86 clr led_green
000B 1144 87 call delay
000D 1144 88 call delay
000F 1144 89 call delay
0011 11F9 90 call baudrate
0013 7448 91 mova,#'H'
0015 3105 92 call send
0017 7469 93 mova,#'i'
0019 3105 94 call send
001B D2A6 95 setbbuzzer
96
001D 11B4 97 call GATE_close
001F 11CE 98 call gate_open
0021 753300 99 mov sensor_ram,#00h
0024 753400 100 mov sametrack_ram,#00h
0027 1144 101 call delay
0029 31C9 102 call track1_side1
VisualizeGate Control andTrack Switching
28
002B 1144 103 call delay
002D 31EC 104 call track2_side1
105 ; call receive
106 ;call send
107
002F 108 loop:
002F 115A 109 call check_gate
0031 315A 110 call check_same_track
0033 312E 111 CALL check_serial
0035 80F8 112 JMP LOOP
113
0037 114 Ldelay:
0037 7530FF 115 movdelay0,#0ffh
003A 116 l1_Ldelay:
003A 7531FF 117 movdelay1,#0ffh
003D 118 l2_Ldelay:
119 ; MOV DELAY2,#1
120 ; DJNZDELAY2,$
VisualizeGate Control andTrack Switching
29
A51 MACRO ASSEMBLER MAIN
003D D531FD 121 djnzdelay1,l2_Ldelay
0040 D530F7 122 djnzdelay0,l1_Ldelay
0043 22 123 ret
124
125
0044 126 delay:
0044 7530FF 127 movdelay0,#0ffh
0047 128 l1_delay:
0047 7531FF 129 movdelay1,#0ffh
004A 130 l2_delay:
004A D531FD 131 djnzdelay1,l2_delay
004D D530F7 132 djnzdelay0,l1_delay
0050 22 133 ret
134
0051 135 sdelay:
0051 7F00 136 mov r7,#00h
0053 137 sl1_delay:
0053 7E01 138 movr6,#01h
0055 DEFE 139 djnzr6,$
0057 DFFA 140 djnzr7,sl1_delay
0059 22 141 ret
142 ;$include (gate_control.inc)
005A +1 143 check_gate:
VisualizeGate Control andTrack Switching
30
005A 1161 +1 144 call check_sensor1
005C 118A +1 145 call check_sensor2
005E 22 +1 146 ret
+1 147
+1 148
+1 149
005F +1 150 R1_check_sensor1:
+1 151 ;NOOBSTACLE
005F D3 +1 152 SETB C
0060 22 +1 153 RET
+1 154
0061 +1 155 check_sensor1:
0061 3093FB +1 156 jnb SENSOR1,R1_check_sensor1
0064 7F30 +1 157 mov r7,#30h
0066 +1 158 deb1_loop:
0066 3093F8 +1 159 jnbSENSOR1,check_sensor1
0069 DFFB +1 160 djnzr7,deb1_loop
+1 161
006B 7431 +1 162 mova,#s_location1
006D 3105 +1 163 call send
+1 164
006F 2093FD +1 165 jbsensor1,$
+1 166
0072 E533 +1 167 mova,sensor_ram
0074 B40007 +1 168 cjne a,#00h,c1_check_sensor1
VisualizeGate Control andTrack Switching
31
0077 753301 +1 169 mov sensor_ram,#01h
007A C3 +1 170 CLR C
007B 11B4 +1 171 CALL GATE_CLOSE
+1 172 ; mova,#'2'
+1 173 ; call send
007D 22 +1 174 RET
+1 175
+1 176
007E +1 177 c1_check_sensor1:
007E B40206 +1 178 cjne a,#02h,c2_check_sensor1
0081 11CE +1 179 call gate_open
0083 753300 +1 180 mov sensor_ram,#00h
0086 22 +1 181 ret
+1 182
0087 +1 183 c2_check_sensor1:
0087 22 +1 184 ret
+1 185
+1 186
VisualizeGate Control andTrack Switching
32
A51 MACRO ASSEMBLER MAIN
+1 187 ;**************************************
+1 188 ;**************************************
+1 189 ;**************************************
0088 +1 190 R1_check_sensor2:
0088 D3 +1 191 SETB C
0089 22 +1 192 RET
+1 193
+1 194
008A +1 195 check_sensor2:
008A 3092FB +1 196 jnb SENSOR2,R1_check_sensor2
008D 7F30 +1 197 movr7,#30h
008F +1 198 deb2_loop:
008F 3092F8 +1 199 jnbSENSOR2,check_sensor2
0092 DFFB +1 200 djnzr7,deb2_loop
0094 2092FD +1 201 jb sensor2,$
+1 202
0097 7432 +1 203 mov a,#s_location2
0099 3105 +1 204 call send
009B 2092FD +1 205 jb sensor2,$
+1 206
009E E533 +1 207 mova,sensor_ram
00A0 B40007 +1 208 cjne a,#00h,c1_check_sensor2
00A3 753302 +1 209 mov sensor_ram,#02h
VisualizeGate Control andTrack Switching
33
00A6 C3 +1 210 CLR C
00A7 11B4 +1 211 CALL GATE_CLOSE
+1 212 ; mova,#'3'
+1 213 ; call send
00A9 22 +1 214 RET
+1 215
+1 216
00AA +1 217 c1_check_sensor2:
00AA B40106 +1 218 cjne a,#01h,c2_check_sensor2
00AD 11CE +1 219 call gate_open
+1 220 ; mova,#'4'
+1 221 ; call send
00AF 753300 +1 222 movsensor_ram,#00h
00B2 22 +1 223 ret
+1 224
00B3 +1 225 c2_check_sensor2:
00B3 22 +1 226 ret
+1 227
+1 228
+1 229
;***********************************************************************
+1 230
;***********************************************************************
+1 231
;***********************************************************************
+1 232
;***********************************************************************
VisualizeGate Control andTrack Switching
34
+1 233
;***********************************************************************
+1 234
;***********************************************************************
+1 235
;***********************************************************************
+1 236
;***********************************************************************
+1 237
+1 238
00B4 +1 239 GATE_CLOSE:
00B4 C2A6 +1 240 CLR buzzer
00B6 309104 +1 241 jnbgate_close_sensor,r1_GATE_CLOSE
+1 242 ; jbgate_close_f,r1_GATE_CLOSE
00B9 11EB +1 243 call forward
+1 244 ; call Ldelay
00BB 80F7 +1 245 jmpGATE_CLOSE
+1 246
00BD +1 247 r1_GATE_CLOSE:
00BD 11E4 +1 248 call stop
00BF D200 +1 249 setb gate_close_f
00C1 7436 +1 250 mova,#s_gate_close
00C3 3105 +1 251 call send
00C5 D2A6 +1 252 SETB bUZZER
VisualizeGate Control andTrack Switching
35
A51 MACRO ASSEMBLER MAIN
00C7 22 +1 253 ret
+1 254
+1 255
00C8 +1 256 r1_GATE_open:
00C8 7436 +1 257 mova,#s_gate_close
00CA 3105 +1 258 call send
00CC C3 +1 259 clr c
00CD 22 +1 260 ret
+1 261
+1 262
00CE +1 263 GATE_open:
00CE 3000F7 +1 264 jnb gate_close_f,r1_GATE_open
00D1 11F2 +1 265 call reverse
00D3 1137 +1 266 call Ldelay
00D5 1137 +1 267 call Ldelay
00D7 1137 +1 268 call Ldelay
00D9 1137 +1 269 call Ldelay
00DB 11E4 +1 270 call stop
00DD C200 +1 271 clr gate_close_f
00DF 7435 +1 272 mova,#s_gate_open
00E1 3105 +1 273 call send
00E3 22 +1 274 ret
+1 275
VisualizeGate Control andTrack Switching
36
+1 276
+1 277
+1 278
00E4 +1 279 stop:
00E4 C2A5 +1 280 clr en3
00E6 C2A3 +1 281 clr in3a
00E8 C2A4 +1 282 clr in3b
00EA 22 +1 283 ret
+1 284
00EB +1 285 forward:
00EB D2A5 +1 286 setben3
00ED D2A3 +1 287 setbin3a
00EF C2A4 +1 288 clr in3b
00F1 22 +1 289 ret
+1 290
+1 291
00F2 +1 292 reverse:
00F2 D2A5 +1 293 setben3
00F4 C2A3 +1 294 clr in3a
00F6 D2A4 +1 295 setbin3b
00F8 22 +1 296 ret
+1 297
+1 298
;***********************************************************************
+1 299
;***********************************************************************
VisualizeGate Control andTrack Switching
37
+1 300
;***********************************************************************
+1 301
;***********************************************************************
302
303 ;$include (serial.inc)
+1 304
;**********************************************************************************
+1 305
;**********************************************************************************
+1 306
;**********************************************************************************
00F9 +1 307 baudrate:
00F9 759850 +1 308 movscon,#50h
00FC 758921 +1 309 mov tmod,#21h ;Timer1 in Auto-reloadmode , TIMER 0 FOR
GETTING COUNT
FROM SUB PLC
00FF 758DFD +1 310 movth1,#0fDh ;Reloadvalue for4800 baud@ 11.059 Mhz
0102 D28E +1 311 setbtcon.6 ;Turn on timer1
0104 22 +1 312 ret
+1 313
;**********************************************************************************
+1 314
;**********************************************************************************
+1 315
;**********************************************************************************
+1 316
;**********************************************************************************
0105 +1 317 send:
VisualizeGate Control andTrack Switching
38
A51 MACRO ASSEMBLER MAIN
0105 F599 +1 318 mov sbuf,a
0107 +1 319 lsend1:
0107 3099FD +1 320 jnb scon.1,lsend1
010A C299 +1 321 clr scon.1
010C 22 +1 322 ret
+1 323
;**********************************************************************************
+1 324
;**********************************************************************************
+1 325
+1 326
;**********************************************************************************
+1 327
;**********************************************************************************
010D +1 328 receive:
010D 3098FD +1 329 jnbscon.0,receive
0110 C298 +1 330 clr scon.0
0112 E599 +1 331 mova,sbuf
0114 22 +1 332 ret
+1 333
;**********************************************************************************
+1 334
;**********************************************************************************
+1 335
+1 336
;**********************************************************************************
VisualizeGate Control andTrack Switching
39
+1 337
;**********************************************************************************
0115 +1 338 newline:
0115 740A +1 339 mov a,#10
0117 3105 +1 340 call send
0119 740D +1 341 mova,#13
011B 3105 +1 342 call send
011D 22 +1 343 ret
+1 344
;**********************************************************************************
+1 345
;**********************************************************************************
011E +1 346 send_dptr_string:
011E E4 +1 347 clr a
011F 93 +1 348 movc a,@a+dptr
0120 7003 +1 349 jnz c1_send_dptr_string
0122 02012B +1 350 ljmpr1_send_dptr_string
+1 351
0125 +1 352 c1_send_dptr_string:
0125 3105 +1 353 call send
0127 A3 +1 354 inc dptr
0128 02011E +1 355 ljmpsend_dptr_string
012B +1 356 r1_send_dptr_string:
012B 22 +1 357 ret
+1 358
;**********************************************************************************
+1 359
;**********************************************************************************
VisualizeGate Control andTrack Switching
40
+1 360
;**********************************************************************************
+1 361
;**********************************************************************************
012C +1 362 r1_check_serial:
012C C3 +1 363 clr c
012D 22 +1 364 ret
+1 365
012E +1 366 check_serial:
012E 3098FB +1 367 jnbscon.0,r1_check_serial
0131 C298 +1 368 clr scon.0
0133 E599 +1 369 MOV A,SBUF
0135 B44103 +1 370 cjne a,#cmd_track1_side1,c1_check_serial
0138 31C9 +1 371 call track1_side1
013A 22 +1 372 ret
+1 373
+1 374
013B +1 375 c1_check_serial:
013B B44203 +1 376 cjne a,#cmd_track1_side2,c2_check_serial
013E 31D9 +1 377 call track1_side2
0140 22 +1 378 ret
+1 379
+1 380
0141 +1 381 c2_check_serial:
0141 B44303 +1 382 cjne a,#cmd_track2_side1,c3_check_serial
0144 31EC +1 383 call track2_side1
VisualizeGate Control andTrack Switching
41
A51 MACRO ASSEMBLER MAIN
0146 22 +1 384 ret
+1 385
+1 386
0147 +1 387 c3_check_serial:
0147 B44403 +1 388 cjne a,#cmd_track2_side2,c4_check_serial
014A 31FC +1 389 call track2_side2
014C 22 +1 390 ret
+1 391
+1 392
014D +1 393 c4_check_serial:
014D B44503 +1 394 cjne a,#cmd_gate_open,c5_check_serial
0150 11CE +1 395 call gate_open
0152 22 +1 396 ret
+1 397
+1 398
0153 +1 399 c5_check_serial:
0153 B44603 +1 400 cjne a,#cmd_gate_close,c6_check_serial
0156 11B4 +1 401 call gate_close
0158 22 +1 402 ret
+1 403
+1 404
0159 +1 405 c6_check_serial:
0159 22 +1 406 ret
VisualizeGate Control andTrack Switching
42
407
408 ;$include(display.inc)
409 ;$include (sametrack.inc)
015A +1 410 check_same_track:
015A 3161 +1 411 call check_sametracksensor1
015C 3197 +1 412 call check_sametracksensor2
015E 22 +1 413 ret
+1 414
+1 415
+1 416
+1 417
+1 418
015F +1 419 R1_check_sametracksensor1:
+1 420 ;NOOBSTACLE
015F D3 +1 421 SETB C
0160 22 +1 422 RET
+1 423
0161 +1 424 check_sametracksensor1:
0161 3094FB +1 425 jnb SENSOR3,R1_check_sametracksensor1
0164 7F30 +1 426 mov r7,#30h
0166 +1 427 deb1_loopa:
0166 3094F8 +1 428 jnbSENSOR3,check_sametracksensor1
0169 DFFB +1 429 djnzr7,deb1_loopa
016B 7433 +1 430 mova,#s_location3
016D 3105 +1 431 call send
VisualizeGate Control andTrack Switching
43
016F 2094FD +1 432 jbsensor3,$
+1 433
0172 E534 +1 434 mova,sametrack_ram
0174 B4000C +1 435 cjne a,#00h,c1_check_sametracksensor1
0177 C2B6 +1 436 clr led_red1
0179 D2B4 +1 437 setbled_green1
017B D2B5 +1 438 setbled_green
017D D2B7 +1 439 setbled_red
017F 753401 +1 440 movsametrack_ram,#01h
0182 22 +1 441 ret
+1 442
+1 443
0183 +1 444 c1_check_sametracksensor1:
0183 B4020E +1 445 cjne a,#02h,c2_check_sametracksensor1
0186 C2B5 +1 446 clr led_green
0188 C2B4 +1 447 clr led_green1
018A D2B7 +1 448 setbled_red
018C D2B6 +1 449 setbled_red1
VisualizeGate Control andTrack Switching
44
A51 MACRO ASSEMBLER MAIN
018E 753400 +1 450 mov sametrack_ram,#00h
0191 1137 +1 451 CALL LDELAY
0193 22 +1 452 ret
+1 453
+1 454
+1 455
0194 +1 456 c2_check_sametracksensor1:
0194 22 +1 457 ret
+1 458
+1 459
+1 460 ;*****************************************************************
+1 461 ;*****************************************************************
+1 462 ;*****************************************************************
+1 463 ;*****************************************************************
+1 464
0195 +1 465 R1_check_sametracksensor2:
+1 466 ;NOOBSTACLE
0195 D3 +1 467 SETB C
0196 22 +1 468 RET
+1 469
0197 +1 470 check_sametracksensor2:
0197 3095FB +1 471 jnb SENSOR4,R1_check_sametracksensor2
019A 7F30 +1 472 movr7,#30h
VisualizeGate Control andTrack Switching
45
019C +1 473 deb1_loopb:
019C 3095F8 +1 474 jnbSENSOR4,check_sametracksensor2
019F DFFB +1 475 djnzr7,deb1_loopb
01A1 7434 +1 476 mov a,#s_location4
01A3 3105 +1 477 call send
01A5 2095FD +1 478 jb sensor4,$
+1 479
+1 480
01A8 E534 +1 481 mova,sametrack_ram
01AA B4000C +1 482 cjne a,#00h,c1_check_sametracksensor2
01AD C2B7 +1 483 clr led_red
01AF D2B5 +1 484 setbled_green
01B1 D2B4 +1 485 setbled_green1
01B3 D2B6 +1 486 setbled_red1
01B5 753402 +1 487 movsametrack_ram,#02h
01B8 22 +1 488 ret
+1 489
+1 490
01B9 +1 491 c1_check_sametracksensor2:
01B9 B4010C +1 492 cjne a,#01h,c2_check_sametracksensor2
01BC C2B5 +1 493 clr led_green
01BE C2B4 +1 494 clr led_green1
01C0 D2B7 +1 495 setbled_red
01C2 D2B6 +1 496 setbled_red1
01C4 753400 +1 497 movsametrack_ram,#00h
VisualizeGate Control andTrack Switching
46
01C7 22 +1 498 ret
+1 499
01C8 +1 500 c2_check_sametracksensor2:
01C8 22 +1 501 ret
502
503 ;$include (trackswitching.inc)
01C9 +1 504 track1_side1:
01C9 309004 +1 505 jnbtracksw_fb1,r1_track1_side1
01CC 5131 +1 506 call track1_close
01CE 80F9 +1 507 jmptrack1_side1
+1 508
01D0 +1 509 r1_track1_side1:
01D0 5123 +1 510 call track1_stop
01D2 D201 +1 511 setbtrack1_side1_f
01D4 7437 +1 512 mova,#s_track1_side1
01D6 3105 +1 513 call send
01D8 22 +1 514 ret
+1 515
VisualizeGate Control andTrack Switching
47
A51 MACRO ASSEMBLER MAIN
+1 516
01D9 +1 517 track1_side2:
01D9 30010B +1 518 jnbtrack1_side1_f,r1_track1_side2
01DC 512A +1 519 call track1_open
01DE 510F +1 520 call track_delay
01E0 5123 +1 521 call track1_stop
01E2 7438 +1 522 mova,#s_track1_side2
01E4 3105 +1 523 call send
01E6 22 +1 524 ret
+1 525
01E7 +1 526 r1_track1_side2:
01E7 7438 +1 527 mova,#s_track1_side2
01E9 3105 +1 528 call send
01EB 22 +1 529 ret
+1 530
+1 531
+1 532
+1 533
;*********************************************************************
+1 534
;*********************************************************************
+1 535
;*********************************************************************
VisualizeGate Control andTrack Switching
48
+1 536
;*********************************************************************
+1 537
01EC +1 538 track2_side1:
01EC 309604 +1 539 jnbtracksw_fb2,r1_track2_side1
01EF 5146 +1 540 call track2_close
01F1 80F9 +1 541 jmptrack2_side1
+1 542
01F3 +1 543 r1_track2_side1:
01F3 5138 +1 544 call track2_stop
01F5 D202 +1 545 setbtrack2_side1_f
01F7 7439 +1 546 mov a,#s_track2_side1
01F9 3105 +1 547 call send
01FB 22 +1 548 ret
+1 549
+1 550
01FC +1 551 track2_side2:
01FC 30020B +1 552 jnbtrack2_side1_f,r1_track2_side2
01FF 513F +1 553 call track2_open
0201 510F +1 554 call track_delay
0203 5138 +1 555 call track2_stop
0205 7430 +1 556 mov a,#s_track2_side2
0207 3105 +1 557 call send
0209 22 +1 558 ret
+1 559
020A +1 560 r1_track2_side2:
VisualizeGate Control andTrack Switching
49
020A 7430 +1 561 mov a,#s_track2_side2
020C 3105 +1 562 call send
020E 22 +1 563 ret
+1 564
+1 565
+1 566
+1 567
+1 568
;*********************************************************************
+1 569
;*********************************************************************
+1 570
;*********************************************************************
+1 571
;*********************************************************************
020F +1 572 track_delay:
020F 7530FF +1 573 mov delay0,#0ffh
0212 +1 574 l1_track_delay:
0212 7531FF +1 575 movdelay1,#0ffh
0215 +1 576 l2_track_delay:
0215 753201 +1 577 MOV DELAY2,#1
0218 D532FD +1 578 DJNZDELAY2,$
021B 00 +1 579 NOP
021C D531F6 +1 580 djnzdelay1,l2_track_delay
VisualizeGate Control andTrack Switching
50
A51 MACRO ASSEMBLER MAIN
021F D530F0 +1 581 djnzdelay0,l1_track_delay
0222 22 +1 582 ret
+1 583
;*********************************************************************
+1 584
;*********************************************************************
+1 585
;*********************************************************************
+1 586
;*********************************************************************
+1 587
0223 +1 588 track1_stop:
0223 C280 +1 589 clr en2
0225 C281 +1 590 clr in2a
0227 C282 +1 591 clr in2b
0229 22 +1 592 ret
+1 593
+1 594
+1 595
022A +1 596 track1_open:
022A D280 +1 597 setben2
022C D281 +1 598 setbin2a
022E C282 +1 599 clr in2b
0230 22 +1 600 ret
+1 601
VisualizeGate Control andTrack Switching
51
+1 602
0231 +1 603 track1_close:
0231 D280 +1 604 setben2
0233 C281 +1 605 clr in2a
0235 D282 +1 606 setbin2b
0237 22 +1 607 ret
+1 608
+1 609
+1 610
+1 611
;*********************************************************************
+1 612
;*********************************************************************
+1 613
;*********************************************************************
+1 614
;*********************************************************************
+1 615
0238 +1 616 track2_stop:
0238 C283 +1 617 clr en1
023A C284 +1 618 clr in1a
023C C285 +1 619 clr in1b
023E 22 +1 620 ret
+1 621
+1 622
+1 623
023F +1 624 track2_open:
VisualizeGate Control andTrack Switching
52
023F D283 +1 625 setben1
0241 D284 +1 626 setbin1a
0243 C285 +1 627 clr in1b
0245 22 +1 628 ret
+1 629
+1 630
0246 +1 631 track2_close:
0246 D283 +1 632 setben1
0248 C284 +1 633 clr in1a
024A D285 +1 634 setbin1b
024C 22 +1 635 ret
636
637 end
VisualizeGate Control andTrack Switching
53
A51 MACRO ASSEMBLER MAIN
SYMBOL TABLE LISTING
------ ----- -------
N A ME T Y P E V A L U E ATTRIBUTES
BAUDRATE. . . . . . . . . C ADDR 00F9H A
BUZZER. . . . . . . . . . B ADDR 00A0H.6 A
C1_CHECK_SAMETRACKSENSOR1 C ADDR 0183H A
C1_CHECK_SAMETRACKSENSOR2 C ADDR 01B9H A
C1_CHECK_SENSOR1. . . . . C ADDR 007EH A
C1_CHECK_SENSOR2. . . . . C ADDR 00AAH A
C1_CHECK_SERIAL . . . . . C ADDR 013BH A
C1_SEND_DPTR_STRING . . . C ADDR 0125H A
C2_CHECK_SAMETRACKSENSOR1 C ADDR 0194H A
C2_CHECK_SAMETRACKSENSOR2 C ADDR 01C8H A
C2_CHECK_SENSOR1. . . . . C ADDR 0087H A
C2_CHECK_SENSOR2. . . . . C ADDR 00B3H A
C2_CHECK_SERIAL . . . . . C ADDR 0141H A
C3_CHECK_SERIAL . . . . . C ADDR 0147H A
C4_CHECK_SERIAL . . . . . C ADDR 014DH A
C5_CHECK_SERIAL . . . . . C ADDR 0153H A
C6_CHECK_SERIAL . . . . . C ADDR 0159H A
VisualizeGate Control andTrack Switching
54
CHECK_GATE. . . . . . . . C ADDR 005AH A
CHECK_SAMETRACKSENSOR1.. C ADDR 0161H A
CHECK_SAMETRACKSENSOR2.. C ADDR 0197H A
CHECK_SAME_TRACK.. . . . C ADDR 015AH A
CHECK_SENSOR1. . . . . . C ADDR 0061H A
CHECK_SENSOR2. . . . . . C ADDR 008AH A
CHECK_SERIAL.. . . . . . C ADDR 012EH A
CMD_GATE_CLOSE. . . . . . D ADDR 0046H A
CMD_GATE_OPEN . . . . . . D ADDR 0045H A
CMD_TRACK1_SIDE1. . . . . D ADDR 0041H A
CMD_TRACK1_SIDE2. . . . . D ADDR 0042H A
CMD_TRACK2_SIDE1. . . . . D ADDR 0043H A
CMD_TRACK2_SIDE2. . . . . D ADDR 0044H A
DEB1_LOOP . . . . . . . . C ADDR 0066H A
DEB1_LOOPA. . . . . . . . C ADDR 0166H A
DEB1_LOOPB. . . . . . . . C ADDR 019CH A
DEB2_LOOP . . . . . . . . C ADDR 008FH A
DELAY . . . . . . . . . . C ADDR 0044H A
DELAY0. . . . . . . . . . N NUMB 0030H A
DELAY1. . . . . . . . . . N NUMB 0031H A
DELAY2. . . . . . . . . . N NUMB 0032H A
EN1 . . . . . . . . . . . B ADDR 0080H.3 A
EN2 . . . . . . . . . . . B ADDR 0080H.0 A
EN3 . . . . . . . . . . . B ADDR 00A0H.5 A
EN4 . . . . . . . . . . . B ADDR 00A0H.2 A
VisualizeGate Control andTrack Switching
55
FORWARD. . . . . . . . . C ADDR 00EBH A
GATE_CLOSE. . . . . . . . C ADDR 00B4H A
GATE_CLOSE_F. . . . . . . B ADDR 0020H.0 A
GATE_CLOSE_SENSOR. . . . B ADDR 0090H.1 A
GATE_OPEN . . . . . . . . C ADDR 00CEH A
IN1A.. . . . . . . . . . B ADDR 0080H.4 A
IN1B. . . . . . . . . . . B ADDR 0080H.5 A
IN2A.. . . . . . . . . . B ADDR 0080H.1 A
IN2B. . . . . . . . . . . B ADDR 0080H.2 A
IN3A.. . . . . . . . . . B ADDR 00A0H.3 A
IN3B. . . . . . . . . . . B ADDR 00A0H.4 A
IN4A.. . . . . . . . . . B ADDR 00A0H.1 A
IN4B. . . . . . . . . . . B ADDR 00A0H.0 A
L1_DELAY. . . . . . . . . C ADDR 0047H A
L1_LDELAY . . . . . . . . C ADDR 003AH A
L1_TRACK_DELAY. . . . . . C ADDR 0212H A
L2_DELAY. . . . . . . . . C ADDR 004AH A
L2_LDELAY . . . . . . . . C ADDR 003DH A
VisualizeGate Control andTrack Switching
56
A51 MACRO ASSEMBLER MAIN
L2_TRACK_DELAY. . . . . . C ADDR 0215H A
LDELAY. . . . . . . . . . C ADDR 0037H A
LED_GREEN . . . . . . . . B ADDR 00B0H.5 A
LED_GREEN1. . . . . . . . B ADDR 00B0H.4 A
LED_RED . . . . . . . . . B ADDR 00B0H.7 A
LED_RED1. . . . . . . . . B ADDR 00B0H.6 A
LOOP.. . . . . . . . . . C ADDR 002FH A
LSEND1. . . . . . . . . . C ADDR 0107H A
NEWLINE . . . . . . . . . C ADDR 0115H A
P0. . . . . . . . . . . . D ADDR 0080H A
P1. . . . . . . . . . . . D ADDR 0090H A
P2. . . . . . . . . . . . D ADDR 00A0H A
P3. . . . . . . . . . . . D ADDR 00B0H A
R1_CHECK_SAMETRACKSENSOR1 C ADDR 015FH A
R1_CHECK_SAMETRACKSENSOR2 C ADDR 0195H A
R1_CHECK_SENSOR1. . . . . C ADDR 005FH A
R1_CHECK_SENSOR2. . . . . C ADDR 0088H A
R1_CHECK_SERIAL . . . . . C ADDR 012CH A
R1_GATE_CLOSE . . . . . . C ADDR 00BDH A
R1_GATE_OPEN. . . . . . . C ADDR 00C8H A
R1_SEND_DPTR_STRING . . . C ADDR 012BH A
R1_TRACK1_SIDE1 . . . . . C ADDR 01D0H A
R1_TRACK1_SIDE2 . . . . . C ADDR 01E7H A
VisualizeGate Control andTrack Switching
57
R1_TRACK2_SIDE1 . . . . . C ADDR 01F3H A
R1_TRACK2_SIDE2 . . . . . C ADDR 020AH A
RECEIVE . . . . . . . . . C ADDR 010DH A
REVERSE . . . . . . . . . C ADDR 00F2H A
SAMETRACK_RAM. . . . . . N NUMB 0034H A
SBUF. . . . . . . . . . . D ADDR 0099H A
SCON.. . . . . . . . . . D ADDR 0098H A
SDELAY. . . . . . . . . . C ADDR 0051H A
SEND.. . . . . . . . . . C ADDR 0105H A
SEND_DPTR_STRING.. . . . C ADDR 011EH A
SENSOR1 . . . . . . . . . B ADDR 0090H.3 A
SENSOR2 . . . . . . . . . B ADDR 0090H.2 A
SENSOR3 . . . . . . . . . B ADDR 0090H.4 A
SENSOR4 . . . . . . . . . B ADDR 0090H.5 A
SENSOR_RAM.. . . . . . . N NUMB 0033H A
SL1_DELAY . . . . . . . . C ADDR 0053H A
SP.. . . . . . . . . . . D ADDR 0081H A
STOP.. . . . . . . . . . C ADDR 00E4H A
S_GATE_CLOSE. . . . . . . D ADDR 0036H A
S_GATE_OPEN . . . . . . . D ADDR 0035H A
S_LOCATION1. . . . . . . D ADDR 0031H A
S_LOCATION2. . . . . . . D ADDR 0032H A
S_LOCATION3. . . . . . . D ADDR 0033H A
S_LOCATION4. . . . . . . D ADDR 0034H A
S_TRACK1_SIDE1. . . . . . D ADDR 0037H A
VisualizeGate Control andTrack Switching
58
S_TRACK1_SIDE2. . . . . . D ADDR 0038H A
S_TRACK2_SIDE1. . . . . . D ADDR 0039H A
S_TRACK2_SIDE2. . . . . . D ADDR 0030H A
TCON.. . . . . . . . . . D ADDR 0088H A
TH1 . . . . . . . . . . . D ADDR 008DH A
TMOD. . . . . . . . . . . D ADDR 0089H A
TRACK1_CLOSE.. . . . . . C ADDR 0231H A
TRACK1_OPEN . . . . . . . C ADDR 022AH A
TRACK1_SIDE1. . . . . . . C ADDR 01C9H A
TRACK1_SIDE1_F. . . . . . B ADDR 0020H.1 A
TRACK1_SIDE2. . . . . . . C ADDR 01D9H A
TRACK1_STOP. . . . . . . C ADDR 0223H A
TRACK2_CLOSE.. . . . . . C ADDR 0246H A
TRACK2_OPEN . . . . . . . C ADDR 023FH A
TRACK2_SIDE1. . . . . . . C ADDR 01ECH A
TRACK2_SIDE1_F. . . . . . B ADDR 0020H.2 A
TRACK2_SIDE2. . . . . . . C ADDR 01FCH A
TRACK2_STOP. . . . . . . C ADDR 0238H A
VisualizeGate Control andTrack Switching
59
A51 MACRO ASSEMBLER MAIN
TRACKSW_FB1 . . . . . . . B ADDR 0090H.0 A
TRACKSW_FB2 . . . . . . . B ADDR 0090H.6 A
TRACK_DELAY . . . . . . . C ADDR 020FH A
REGISTER BANK(S) USED: 0
ASSEMBLY COMPLETE. 0 WARNING(S),0ERROR(S)
VisualizeGate Control andTrack Switching
60
B] Visual Basic programming
OptionExplicit
DimInputStringBufferAsString
DimWriteStringBufferAsString
DimTagno As String
'Dim countAs Integer
Private Subcmdconnect_Click()
If cmdconnect.Caption="CONNECT"Then
MSComm1.CommPort= txtcommport.Text
MSComm1.PortOpen=True
cmdconnect.Caption="DISCONNECT"
MSComm1.RThreshold=1
ElseIf cmdconnect.Caption="DISCONNECT"Then
MSComm1.PortOpen=False
cmdconnect.Caption="CONNECT"
End If
End Sub
Private SubCommand1_Click()
MSComm1.Output= "E"
End Sub
Private SubCommand2_Click()
MSComm1.Output= "A"
VisualizeGate Control andTrack Switching
61
End Sub
Private SubCommand3_Click()
MSComm1.Output= "F"
End Sub
Private SubCommand4_Click()
MSComm1.Output= "B"
End Sub
Private Sub Command5_Click()
MSComm1.Output= "C"
End Sub
Private SubCommand6_Click()
MSComm1.Output= "D"
End Sub
Private SubForm_Load()
Open"d:attendance_logs.txt"ForAppendAs#1
Close #1
End Sub
VisualizeGate Control andTrack Switching
62
Private SubMSComm1_OnComm()
'Dim countAs Integer
If MSComm1.CommEvent= comEvReceiveThen
Text1.Text= ""
Text1.Text=MSComm1.Input
If Text1.Text=1 ThenLabel3.Caption=" C.S.T.Crossing"
If Text1.Text=2 ThenLabel3.Caption=" C.S.T.Crossing"
If Text1.Text=3 ThenLabel3.Caption=" KALYAN JUNCTION"
If Text1.Text=4 ThenLabel3.Caption=" KALYAN JUNCTION"
If Text1.Text=5 ThenLabel5.Caption=" OPEN "
If Text1.Text=6 ThenLabel5.Caption=" CLOSE "
If Text1.Text=7 ThenLabel1.Caption=" SIDE 1 "
If Text1.Text=8 ThenLabel1.Caption=" SIDE 2 "
If Text1.Text=9 ThenLabel2.Caption=" SIDE 1 "
If Text1.Text=0 ThenLabel2.Caption=" SIDE 2 "
If Text1.Text=1 Then
If Timer2.Enabled=True Then
Timer2.Enabled=False
Text2.Text=(100000 / Val(Text4.Text)) /20
Label7.Caption=Mid((100000 / Val(Text4.Text)) /20, 1, 4)
Timer2.Enabled=False
Else
Text4.Text=1
Timer2.Enabled=True
VisualizeGate Control andTrack Switching
63
End If
End If
If Text1.Text= 2 Then
If Timer2.Enabled=True Then
Timer2.Enabled=False
Text2.Text=(100000 / Val(Text4.Text)) /20
Label7.Caption=Mid((100000 / Val(Text4.Text)) /20, 1, 4)
Timer2.Enabled=False
Else
Text4.Text=1
Timer2.Enabled=True
End If
End If
If Text1.Text=3 Then
If Timer1.Enabled=True Then
Timer1.Enabled=False
Text2.Text=(100000 / Val(Text3.Text)) /20
Label6.Caption=Mid((100000 / Val(Text3.Text)) /20, 1, 4)
Timer1.Enabled=False
Else
Text3.Text=1
Timer1.Enabled=True
End If
VisualizeGate Control andTrack Switching
64
End If
If Text1.Text= 4 Then
If Timer1.Enabled=True Then
Timer1.Enabled=False
Text2.Text=(100000 / Val(Text3.Text)) /20
Label6.Caption=Mid((100000 / Val(Text3.Text)) /20, 1, 4)
Timer1.Enabled=False
Else
Text3.Text=1
Timer1.Enabled=True
EndIf
End If
End If
End Sub
Private SubTimer1_Timer()
'Dim countAs Integer
Timer1.Enabled=True
'count = count + 1
Text3.Text= Text3.Text+1
End Sub
Private SubTimer2_Timer()
Timer2.Enabled=True
Text4.Text= Text4.Text+1
End Sub
VisualizeGate Control andTrack Switching
65
Software Display Screen
VisualizeGate Control andTrack Switching
66
CIRCUIT
PREPARATION
VisualizeGate Control andTrack Switching
67
CIRCUIT PREPARATION
PCB Designing and manufacturing
Printed Circuit Board Layout:
The PCB layout for circuit is an attach in annexure D.Board consist of insulating material
mostly copper-clad boards are used instead of copper, silver and gold can also be used but, as
copper is chipper mostly it is preferable. The material conducting pattern serves as conducting
medium for electronic component that are assembled on board components are mounted by lead
passing through holes that are drilled or punched on the based material and foil. These leads are
solder to the conducting pattern to form complete PCB in glass, glass epoxy, and epoxy paper
phenolic etc.The copper foil on the base material is developed by the process of electrode
position ion etching process.
Some of the elements are used are as follows:
 Fecl3
 Chromic acid, etc.
But fecl3 is most commonly used in etching process .PCB acts as a heat sink.
ARTWORK OF PCB:
Perfect artwork is mostly important process in production of PCB.The circuit is initially
tested and location of components is fixed. Artwork is the drawing showing conduction pattern
on PC.After testing the circuit rough layout is prepared on paper then that layout is transferred on
PCB by using PCB side. The artwork can also be prepared on transparent paper with sticking
tapes and self adhesive in various ranges.
VisualizeGate Control andTrack Switching
68
FILMING OF PCB:
To prepare a PCB at home following procedure is adopted
Measure the dimensions of all components e.g.resister, capacitor, inductor; etc. are prepared a
layout using component mounting rules:
 Using the trace paper or carbon paper draw the mirror image of the figure.
 Draw this image on cu cladding of PCB by using PCB pen, pencil, tapes and pads then
drill the holes by using drilling machine.
 After drilling points the conductor tracks by using oil paints of good quality and live it
for drying.
 After drying the points put the PCB in fecl3 solution for etching. If you want fast etching
add some drop of HCL during etching unwanted cu dissolved in fecl3.
 After etching washes it with water and if you remove the point then used acetone.
 Then mount the component opposite side of tracks.
 Cut the leads of proper length and solder all the terminal of the components.
 In this PCB is fabricated manually.
For PCB designing you should have following things:
 Detail circuit diagram.
 Physically each component with you.
 To determine the size of PCB.
 Layout and filming.
 PCB manufacturing
VisualizeGate Control andTrack Switching
69
Tracing of the layout from paper to copper clad:
First of all circuit layout is taken on tracing paper with exact dimension of all component.
Now placing this paper on copper clad under carbon paper, trace the layout the copper clad. It
should be notice that the tracing on the clad should be accurate.
Applying non etching material on the layout:
Applying non etching material on layout is done manually.The non etching material are
drafting aids, oil paints, etc.on the PCB drafting aids are used, because more linearity conducting
are obtained .the drafting’s aids are different shapes and z-size for every component are should
be no crack on the drafting aids, because due to at this after etching their will be no conduction
between two lines.
Etching procedure:
After applying the non etching on the copper clad then this copper clad is kept in fecl3
solution for etching procedure. The etching procedure longs for the about 5 or 6 hours. During
the etching procedure the copper under the drafting aids does not get etches while all other
copper on the clad get etched and only the layout remains.
Cleaning the PCB and remaining non etch materials:
VisualizeGate Control andTrack Switching
70
After the etching and cleaning of PCB is done. It is done with the help of soap solution
and brush. To remove the transfer pattern with the cotton swab-dipped in the pattern remover
solution. Again wash with the soap and water then dry it.
• Drilling:-
After the PCB is ready, drilling is necessary. Drilling is done with the help of hand drill
or machine. For mounting of component proper drilling (holes) are necessary. The holes are of
dimension so that the terminals of each component and pin of the IC can easily pass through it to
make contact with conducting line on the PCB.
Small drills for PCB use usually come with either a set of collets of various sizes or a 3-jaw
chuck. For accuracy, however, 3-jaw chucks aren't brilliant, and small drill sizes below 1mm
quickly form grooves in the jaws, preventing good grip. Need of good strong light on the board
when drilling to ensure accuracy. Typical hole sizes is 0.8mm.
Component Placement & Design:-
The basic steps required for Component Placement & Design.
 Set snap grid, visible grid, and default track/pad sizes.
 Throw down all the components onto the board.
 Divide and place components into functional “building blocks” where possible.
 Identify layout critical tracks on circuit and route them first.
VisualizeGate Control andTrack Switching
71
 Place and route each building block separately, off the board.
 Move completed building blocks into position on main board.
 Route the remaining signal and power connections between blocks.
This is by no means a be-all and end-all check list; it’s highly variable depending on many
factors. The best way to start layout is to get all components onto the screen first and place them
down manually.
• Soldering:-
It is process of joining two metals together by the use of solder alloy to form a reliable
electrical path.
Soldering considerations need to taken into account when laying out board. There are
three basic soldering techniques - hand, wave, and reflow. Hand soldering is the traditional
method typically used for prototypes and small production runs. Major impacts when laying out
board include suitable access for the iron, and thermal relief for pads.
Procedure of soldering:
1) clean all components, terminals and substrates
2) Apply flux
3) Place the soldering iron with right tip size, touching both the lid and pad.
4) From initially a heat bridge between the soldering iron and the lead pad junction with a
little solder to increase the thermal linkage area.
5) Feed the solder wire starting from the heat bridge all around the lead.
6) Remove the solder and soldering iron simultaneously.
7) There should not be any relative movement between the components under solidification
and the working table.
8) Check the joint
VisualizeGate Control andTrack Switching
72
Solder Mask:-
A solder mask is a thin polymer coating on your board which surrounds pads to help
prevent solder from bridging between pins. This is essential for surface mount and fine pitch
devices. The solder mask typically covers everything except pads and vias.
• Electrical Testing:-
We have finished PCB checked for electrical continuity and shorts at the time of
manufacture. This is done with an automated “flying probe” or “DMM”. It checks that the
continuity of the tracks matches your PCB file.
Trouble Shooting:
 The different protocols that we tested were Sony, Fujitsu, NEC, Fairchild etc. But this
was unable to detect IR sensor, so we had used RC5 by Phillips.
 The intensity of RC5 protocol was very high. Hence it was try to reduce by using an
insulation tape.
 The only problem was with the line of sight .the solution to this is that the transmitter and
receiver should match with line of sight to detect.
VisualizeGate Control andTrack Switching
73
ADVANTAGES,
LIMITATIONS&
VisualizeGate Control andTrack Switching
74
APPLICATIONS
ADVANTAGES, DISADVANTAGES,
FUTURE SCOPE
ADVANTAGES:-
1. Large amount of accidents can be avoided.
2. Continuous updates of train position at master control.
3. Large amount of man power is saved and thereby reduction in the cost of wages for
railway is possible.
4. Controlling of various features by the master controller.
5. Well management can be possible due to sufficient data.
6. Possibility of human error is avoided.
7. Flawless track switching is possible due to the master controller.
DISADVANTAGES:-
1. Due to use of IR sensors, the major drawback is the line of sight and cause fake
detection.
2. Accidents due to absence of track cannot be overcome.
3. Implementation cost is high.
4. We cannot identify the name of train running on the track.
FUTURE SCOPE:-
1. “SHIELD” technology or the anti collision devices can be used to avoid train collision.
2. GPS system can be used to get the updated information about the train.
3. Weight sensors can be used for the automatic railway control.
VisualizeGate Control andTrack Switching
75
4. Track vacancy detection can be possible due to ATP code transmission.
COSTSHEET
VisualizeGate Control andTrack Switching
76
Cost Sheet
VisualizeGate Control andTrack Switching
77
Sr.no. Components Quantity Cost Total
1 Microcontroller IC 89S52 1 70/- 70/-
2 Crystal 11.0592Mhz. 1 8/- 8/-
3 Diode 1N4007 4 1/- 4/-
4 Resistor 10kΩ 10 1/- 10/-
5 Resistor 2.2kΩ 10 1/- 10/-
6 Resistor 220Ω 3 1/- 3/-
7 Capacitor 1000uf 2 10/- 20/-
8 Capacitor 100uf 5 2/- 10/-
9 Capacitor 10uf 4 1/- 4/-
10 Capacitor 33pf 4 3/- 12/-
11 8 pin Connector 2 10/- 20/-
12 2 pin Connector 6 5/- 30/-
13 Transistor BC 547 2 1/- 2/-
14 Heat Sink 1 25/- 25/-
15 DC Motor 2 125/- 250/-
16 IC L293D 1 50/- 50/-
17 IR Sensor 4 125/- 500/-
18 LED 5 2/- 10/-
19 MAX 232 1 50/- 50/-
20 LCD 16x2 1 130/- 130/-
21 Resistor Package 2 10/- 20/-
22 IC BASE 4 10/- 40/-
23 Transformer 0-12V/500ma 1 150/- 150/-
24 IC 7805 1 10/- 10/-
25 IC 7812 1 10/- 10/-
26 Train Set 1 900/- 900/-
Total 2398/-
VisualizeGate Control andTrack Switching
78
CONCLUSION
VisualizeGate Control andTrack Switching
79
CONCLUSION
CONCLUSION:
In today’s industrial scenario, to survive in the global competition, every Agro-
based industry is forced to use automated process. Today’s industrial scenario demands use of
automated process because of global competition.
Automation system is more advantageous than manual system related parameters
are speed, time saving, accuracy, man power etc Knowing working principle, configuration
procedure & trouble shooting techniques along with designing of logic is a key factor in
industrial automation. It can be considered as the first serious attempt to fulfill the requirements
for a universal industry system. The automation standard provides a common set of compatible
services and capabilities to all industrial users.
Hence it is suggested that we put in more resources to research on new horizons
as early as possible for a better life for us!!
VisualizeGate Control andTrack Switching
80
REFERENCE
REFERENCES
VisualizeGate Control andTrack Switching
81
Books:-
 Microcontroller and embedded system. :- Mazidi
 Principle of electronics:-V.K. Mehta
 Applied Electronics:-R.S. Seddha
 Digital principle & application:-Malvino & Leach
 Real time operating system:- Dr. K.K.V. Prasad
Websites:-
 www.houstuff.com
 www.DNAtechindia.com
 www.wikipedia.com
 www.altavista.com
Search Engine:-
 www.google.com
 www.yahoo.com
 www.altavista.com
Magazines:-
 Electronics for you
 Electronics express
VisualizeGate Control andTrack Switching
82
DATASHEET
&
PHOTOGRAPH
VisualizeGate Control andTrack Switching
83
VisualizeGate Control andTrack Switching
84
VisualizeGate Control andTrack Switching
85
VisualizeGate Control andTrack Switching
86
VisualizeGate Control andTrack Switching
87
VisualizeGate Control andTrack Switching
88
VisualizeGate Control andTrack Switching
89
VisualizeGate Control andTrack Switching
90
VisualizeGate Control andTrack Switching
91
VisualizeGate Control andTrack Switching
92
VisualizeGate Control andTrack Switching
93
VisualizeGate Control andTrack Switching
94
VisualizeGate Control andTrack Switching
95
VisualizeGate Control andTrack Switching
96
VisualizeGate Control andTrack Switching
97
RS232
Pin Signal Pin Signal
1 Data carrier detect 6 Data set ready
2 Receiveddata 7 Requesttosend
3 Transmitteddata 8 Clearto send
4 Data terminal ready 9 Ringindicator
5 Signal ground
VisualizeGate Control andTrack Switching
98
VisualizeGate Control andTrack Switching
99
VisualizeGate Control andTrack Switching
100
VisualizeGate Control andTrack Switching
101
VisualizeGate Control andTrack Switching
102
VisualizeGate Control andTrack Switching
103
VisualizeGate Control andTrack Switching
104
PHOTOGRAPH
VisualizeGate Control andTrack Switching
105
VisualizeGate Control andTrack Switching
106

More Related Content

What's hot

Pwm technique for dc motor Using Arduino
Pwm technique for dc motor Using ArduinoPwm technique for dc motor Using Arduino
Pwm technique for dc motor Using Arduino
KATHANSANJAYSHAH
 
DIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLERDIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLER
Chirag Lakhani
 
Automatic railway gate control using microcontroller
Automatic railway gate control using microcontrollerAutomatic railway gate control using microcontroller
Automatic railway gate control using microcontroller
pukeshwar harmukh
 
line following robot
line following robotline following robot
line following robotRehnaz Razvi
 
water level controller using 8051 microcontroller
water level controller using 8051 microcontrollerwater level controller using 8051 microcontroller
water level controller using 8051 microcontroller
Prachi Pandey
 
Module 4
Module 4Module 4
Module 4
Dr.Sudha L K
 
Hand Gesture Controlled Wireless Robot
Hand Gesture Controlled Wireless RobotHand Gesture Controlled Wireless Robot
Hand Gesture Controlled Wireless Robotsiddhartha muduli
 
Gesture control robot using accelerometer ppt
Gesture control robot using accelerometer pptGesture control robot using accelerometer ppt
Gesture control robot using accelerometer ppt
Rajendra Prasad
 
How to make a Line Follower Robot
How to make a Line Follower RobotHow to make a Line Follower Robot
How to make a Line Follower Robot
roboVITics club
 
Railway gate controlling using ir & laser
Railway gate controlling using ir & laserRailway gate controlling using ir & laser
Railway gate controlling using ir & laser
Tushara Chand
 
AUTOMATIC RAILWAY GATE AND SIGNALLING SYSTEM
AUTOMATIC RAILWAY GATE AND SIGNALLING SYSTEMAUTOMATIC RAILWAY GATE AND SIGNALLING SYSTEM
AUTOMATIC RAILWAY GATE AND SIGNALLING SYSTEM
BiprajitSarkar
 
7380969 Line Follower Using At89c51
7380969 Line Follower Using At89c517380969 Line Follower Using At89c51
7380969 Line Follower Using At89c51biharimukund
 
Robotic arm control through internet/Lan for patient operation
Robotic arm control through internet/Lan for patient operationRobotic arm control through internet/Lan for patient operation
Robotic arm control through internet/Lan for patient operation
Suchit Moon
 
light follower robot
light follower robotlight follower robot
light follower robotanuragyadav94
 
Navigation of Robot Vehicle using RF with Landmine Detection
Navigation of Robot Vehicle using RF with Landmine DetectionNavigation of Robot Vehicle using RF with Landmine Detection
Navigation of Robot Vehicle using RF with Landmine DetectionVeena Rani
 
Obstacle Avoidance Robotic Vehicle
Obstacle Avoidance Robotic VehicleObstacle Avoidance Robotic Vehicle
Obstacle Avoidance Robotic Vehicle
Edgefxkits & Solutions
 

What's hot (20)

Pwm technique for dc motor Using Arduino
Pwm technique for dc motor Using ArduinoPwm technique for dc motor Using Arduino
Pwm technique for dc motor Using Arduino
 
DIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLERDIGITAL VOLTMETER USING 8051 MICROCONTROLLER
DIGITAL VOLTMETER USING 8051 MICROCONTROLLER
 
Rf robot
Rf robotRf robot
Rf robot
 
Automatic railway gate control using microcontroller
Automatic railway gate control using microcontrollerAutomatic railway gate control using microcontroller
Automatic railway gate control using microcontroller
 
line following robot
line following robotline following robot
line following robot
 
water level controller using 8051 microcontroller
water level controller using 8051 microcontrollerwater level controller using 8051 microcontroller
water level controller using 8051 microcontroller
 
Module 4
Module 4Module 4
Module 4
 
Hand Gesture Controlled Wireless Robot
Hand Gesture Controlled Wireless RobotHand Gesture Controlled Wireless Robot
Hand Gesture Controlled Wireless Robot
 
Automatic mall elevator
Automatic mall elevatorAutomatic mall elevator
Automatic mall elevator
 
Gesture control robot using accelerometer ppt
Gesture control robot using accelerometer pptGesture control robot using accelerometer ppt
Gesture control robot using accelerometer ppt
 
How to make a Line Follower Robot
How to make a Line Follower RobotHow to make a Line Follower Robot
How to make a Line Follower Robot
 
JamesEndl
JamesEndlJamesEndl
JamesEndl
 
Railway gate controlling using ir & laser
Railway gate controlling using ir & laserRailway gate controlling using ir & laser
Railway gate controlling using ir & laser
 
AUTOMATIC RAILWAY GATE AND SIGNALLING SYSTEM
AUTOMATIC RAILWAY GATE AND SIGNALLING SYSTEMAUTOMATIC RAILWAY GATE AND SIGNALLING SYSTEM
AUTOMATIC RAILWAY GATE AND SIGNALLING SYSTEM
 
7380969 Line Follower Using At89c51
7380969 Line Follower Using At89c517380969 Line Follower Using At89c51
7380969 Line Follower Using At89c51
 
Robotic arm control through internet/Lan for patient operation
Robotic arm control through internet/Lan for patient operationRobotic arm control through internet/Lan for patient operation
Robotic arm control through internet/Lan for patient operation
 
light follower robot
light follower robotlight follower robot
light follower robot
 
Navigation of Robot Vehicle using RF with Landmine Detection
Navigation of Robot Vehicle using RF with Landmine DetectionNavigation of Robot Vehicle using RF with Landmine Detection
Navigation of Robot Vehicle using RF with Landmine Detection
 
Obstacle Avoidance Robotic Vehicle
Obstacle Avoidance Robotic VehicleObstacle Avoidance Robotic Vehicle
Obstacle Avoidance Robotic Vehicle
 
Follower
FollowerFollower
Follower
 

Viewers also liked

Railway engineering
Railway engineeringRailway engineering
Railway engineering
Shanmugaraj M
 
RAIN TECHNOLOGY
RAIN TECHNOLOGYRAIN TECHNOLOGY
RAIN TECHNOLOGY127r1a05h9
 
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...SlideShare
 
How to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & TricksHow to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & Tricks
SlideShare
 
Getting Started With SlideShare
Getting Started With SlideShareGetting Started With SlideShare
Getting Started With SlideShare
SlideShare
 

Viewers also liked (6)

Railway engineering
Railway engineeringRailway engineering
Railway engineering
 
RAIN TECHNOLOGY
RAIN TECHNOLOGYRAIN TECHNOLOGY
RAIN TECHNOLOGY
 
Rain technology
Rain technologyRain technology
Rain technology
 
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
A Guide to SlideShare Analytics - Excerpts from Hubspot's Step by Step Guide ...
 
How to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & TricksHow to Make Awesome SlideShares: Tips & Tricks
How to Make Awesome SlideShares: Tips & Tricks
 
Getting Started With SlideShare
Getting Started With SlideShareGetting Started With SlideShare
Getting Started With SlideShare
 

Similar to INTELIGENT RAILWAY SYSTEM

ELECTRONICS PROJECT REPORT OF HOME AUTOMATION CUM BUILDING SECUIRITY
ELECTRONICS PROJECT REPORT OF HOME AUTOMATION CUM BUILDING SECUIRITYELECTRONICS PROJECT REPORT OF HOME AUTOMATION CUM BUILDING SECUIRITY
ELECTRONICS PROJECT REPORT OF HOME AUTOMATION CUM BUILDING SECUIRITY
Eldhose George
 
Metro Train Automation & display System
Metro Train Automation & display SystemMetro Train Automation & display System
Metro Train Automation & display System
SudakshinaMeenu
 
Metrofile111111111 150706071159-lva1-app6892
Metrofile111111111 150706071159-lva1-app6892Metrofile111111111 150706071159-lva1-app6892
Metrofile111111111 150706071159-lva1-app6892
yogeshingle4
 
Traffic density dependent taffic light controller pdf
Traffic density dependent taffic light controller pdf Traffic density dependent taffic light controller pdf
Traffic density dependent taffic light controller pdf
NAVODITA KUMARI
 
FINAL REPORT_B.tech
FINAL REPORT_B.techFINAL REPORT_B.tech
FINAL REPORT_B.techafzal usmani
 
Micro controller based Traffic control system
Micro controller based Traffic control systemMicro controller based Traffic control system
Micro controller based Traffic control system
Rohit Kumar
 
ACCELEROMETER BASED GESTURE ROBO CAR
ACCELEROMETER BASED GESTURE ROBO CARACCELEROMETER BASED GESTURE ROBO CAR
ACCELEROMETER BASED GESTURE ROBO CAR
Harshit Jain
 
Rail gate controller ppt
Rail gate controller pptRail gate controller ppt
Rail gate controller pptSajal Das
 
Visiter counter doc
Visiter counter docVisiter counter doc
Visiter counter doc
Prem Kumar
 
Speed control of motor
Speed control of motorSpeed control of motor
Speed control of motor
Pankaj Kumar Nayak
 
Share 'speed control_of_dc_motor_using_microcontroller.pptx'[1][1]
Share 'speed control_of_dc_motor_using_microcontroller.pptx'[1][1]Share 'speed control_of_dc_motor_using_microcontroller.pptx'[1][1]
Share 'speed control_of_dc_motor_using_microcontroller.pptx'[1][1]
akmalKhan55
 
Automatic car parking system by Himanshu
Automatic car parking system by HimanshuAutomatic car parking system by Himanshu
Automatic car parking system by Himanshuhimanshu3070
 
AUTOMATIC WIRELESS POWER GRID CONTROL
AUTOMATIC WIRELESS POWER GRID CONTROLAUTOMATIC WIRELESS POWER GRID CONTROL
AUTOMATIC WIRELESS POWER GRID CONTROL
shiv kapil
 
ADVANCED RAILWAY SECURITY SYSTEM (ARSS) BASED ON ZIGBEE COMMUNICATION FOR TRA...
ADVANCED RAILWAY SECURITY SYSTEM (ARSS) BASED ON ZIGBEE COMMUNICATION FOR TRA...ADVANCED RAILWAY SECURITY SYSTEM (ARSS) BASED ON ZIGBEE COMMUNICATION FOR TRA...
ADVANCED RAILWAY SECURITY SYSTEM (ARSS) BASED ON ZIGBEE COMMUNICATION FOR TRA...
rashmimabattin28
 
Atomatic light controller
Atomatic light controllerAtomatic light controller
Atomatic light controller
MandadiDeekshitha
 
Pir based lighting control
Pir based lighting controlPir based lighting control
Pir based lighting control
Slidescope
 
Tunnel robot ppt
Tunnel robot pptTunnel robot ppt
Tunnel robot ppt
shakshi58
 
Obstacle avoiding robot(Lab report)
Obstacle  avoiding  robot(Lab report)Obstacle  avoiding  robot(Lab report)
Obstacle avoiding robot(Lab report)
Захір Райхан
 
Arduino Based Collision Prevention Warning System
Arduino Based Collision Prevention Warning SystemArduino Based Collision Prevention Warning System
Arduino Based Collision Prevention Warning System
Madhav Reddy Chintapalli
 

Similar to INTELIGENT RAILWAY SYSTEM (20)

Project
ProjectProject
Project
 
ELECTRONICS PROJECT REPORT OF HOME AUTOMATION CUM BUILDING SECUIRITY
ELECTRONICS PROJECT REPORT OF HOME AUTOMATION CUM BUILDING SECUIRITYELECTRONICS PROJECT REPORT OF HOME AUTOMATION CUM BUILDING SECUIRITY
ELECTRONICS PROJECT REPORT OF HOME AUTOMATION CUM BUILDING SECUIRITY
 
Metro Train Automation & display System
Metro Train Automation & display SystemMetro Train Automation & display System
Metro Train Automation & display System
 
Metrofile111111111 150706071159-lva1-app6892
Metrofile111111111 150706071159-lva1-app6892Metrofile111111111 150706071159-lva1-app6892
Metrofile111111111 150706071159-lva1-app6892
 
Traffic density dependent taffic light controller pdf
Traffic density dependent taffic light controller pdf Traffic density dependent taffic light controller pdf
Traffic density dependent taffic light controller pdf
 
FINAL REPORT_B.tech
FINAL REPORT_B.techFINAL REPORT_B.tech
FINAL REPORT_B.tech
 
Micro controller based Traffic control system
Micro controller based Traffic control systemMicro controller based Traffic control system
Micro controller based Traffic control system
 
ACCELEROMETER BASED GESTURE ROBO CAR
ACCELEROMETER BASED GESTURE ROBO CARACCELEROMETER BASED GESTURE ROBO CAR
ACCELEROMETER BASED GESTURE ROBO CAR
 
Rail gate controller ppt
Rail gate controller pptRail gate controller ppt
Rail gate controller ppt
 
Visiter counter doc
Visiter counter docVisiter counter doc
Visiter counter doc
 
Speed control of motor
Speed control of motorSpeed control of motor
Speed control of motor
 
Share 'speed control_of_dc_motor_using_microcontroller.pptx'[1][1]
Share 'speed control_of_dc_motor_using_microcontroller.pptx'[1][1]Share 'speed control_of_dc_motor_using_microcontroller.pptx'[1][1]
Share 'speed control_of_dc_motor_using_microcontroller.pptx'[1][1]
 
Automatic car parking system by Himanshu
Automatic car parking system by HimanshuAutomatic car parking system by Himanshu
Automatic car parking system by Himanshu
 
AUTOMATIC WIRELESS POWER GRID CONTROL
AUTOMATIC WIRELESS POWER GRID CONTROLAUTOMATIC WIRELESS POWER GRID CONTROL
AUTOMATIC WIRELESS POWER GRID CONTROL
 
ADVANCED RAILWAY SECURITY SYSTEM (ARSS) BASED ON ZIGBEE COMMUNICATION FOR TRA...
ADVANCED RAILWAY SECURITY SYSTEM (ARSS) BASED ON ZIGBEE COMMUNICATION FOR TRA...ADVANCED RAILWAY SECURITY SYSTEM (ARSS) BASED ON ZIGBEE COMMUNICATION FOR TRA...
ADVANCED RAILWAY SECURITY SYSTEM (ARSS) BASED ON ZIGBEE COMMUNICATION FOR TRA...
 
Atomatic light controller
Atomatic light controllerAtomatic light controller
Atomatic light controller
 
Pir based lighting control
Pir based lighting controlPir based lighting control
Pir based lighting control
 
Tunnel robot ppt
Tunnel robot pptTunnel robot ppt
Tunnel robot ppt
 
Obstacle avoiding robot(Lab report)
Obstacle  avoiding  robot(Lab report)Obstacle  avoiding  robot(Lab report)
Obstacle avoiding robot(Lab report)
 
Arduino Based Collision Prevention Warning System
Arduino Based Collision Prevention Warning SystemArduino Based Collision Prevention Warning System
Arduino Based Collision Prevention Warning System
 

More from Ghanshyam Dusane

Ghanshyam_Sopan_Dusane_RHCSA
Ghanshyam_Sopan_Dusane_RHCSAGhanshyam_Sopan_Dusane_RHCSA
Ghanshyam_Sopan_Dusane_RHCSAGhanshyam Dusane
 
Visualize gate control and track switching (GHanshyam Dusane)
Visualize gate control and track switching (GHanshyam Dusane)Visualize gate control and track switching (GHanshyam Dusane)
Visualize gate control and track switching (GHanshyam Dusane)
Ghanshyam Dusane
 
Gsm VS cdma
Gsm VS cdma Gsm VS cdma
Gsm VS cdma
Ghanshyam Dusane
 
Matlab based vehicle number plate identification system using ocr
Matlab based vehicle number plate identification system using ocrMatlab based vehicle number plate identification system using ocr
Matlab based vehicle number plate identification system using ocr
Ghanshyam Dusane
 
MATLAB Based Vehicle Number Plate Identification System using OCR
MATLAB Based Vehicle Number Plate Identification System using OCRMATLAB Based Vehicle Number Plate Identification System using OCR
MATLAB Based Vehicle Number Plate Identification System using OCR
Ghanshyam Dusane
 
Zig bee
Zig beeZig bee
Amoled by m indkiller
Amoled by m indkillerAmoled by m indkiller
Amoled by m indkiller
Ghanshyam Dusane
 

More from Ghanshyam Dusane (8)

Ghanshyam_Sopan_Dusane_RHCSA
Ghanshyam_Sopan_Dusane_RHCSAGhanshyam_Sopan_Dusane_RHCSA
Ghanshyam_Sopan_Dusane_RHCSA
 
Visualize gate control and track switching (GHanshyam Dusane)
Visualize gate control and track switching (GHanshyam Dusane)Visualize gate control and track switching (GHanshyam Dusane)
Visualize gate control and track switching (GHanshyam Dusane)
 
Gsm VS cdma
Gsm VS cdma Gsm VS cdma
Gsm VS cdma
 
Matlab based vehicle number plate identification system using ocr
Matlab based vehicle number plate identification system using ocrMatlab based vehicle number plate identification system using ocr
Matlab based vehicle number plate identification system using ocr
 
MATLAB Based Vehicle Number Plate Identification System using OCR
MATLAB Based Vehicle Number Plate Identification System using OCRMATLAB Based Vehicle Number Plate Identification System using OCR
MATLAB Based Vehicle Number Plate Identification System using OCR
 
LI-FI
LI-FILI-FI
LI-FI
 
Zig bee
Zig beeZig bee
Zig bee
 
Amoled by m indkiller
Amoled by m indkillerAmoled by m indkiller
Amoled by m indkiller
 

Recently uploaded

Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
abh.arya
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
Kamal Acharya
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
Kamal Acharya
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
MuhammadTufail242431
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
Kamal Acharya
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 

Recently uploaded (20)

Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Democratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek AryaDemocratizing Fuzzing at Scale by Abhishek Arya
Democratizing Fuzzing at Scale by Abhishek Arya
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
Vaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdfVaccine management system project report documentation..pdf
Vaccine management system project report documentation..pdf
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 

INTELIGENT RAILWAY SYSTEM

  • 1. VisualizeGate Control andTrack Switching 1 INDEX Ch.No. Chapter Name Page No. 1 Introduction 01 2 Specification 03 3 Design Procedure 08 4 Hardware  Principle of Operation 09  Hardware Details 10  Block Diagram 13  Circuit Diagram 14 5 Software  Algorithm 17  Flowchart 19  Software Listing 23 6 Circuit Preparation(PCB making & Trouble Shooting) 66 7 Advantages, Disadvantages & Application 73 8 Future Scope 74 9 Cost Sheet 75 10 Conclusion 77 11 References 80 12 Datasheet 82 13 Photograph 102
  • 2. VisualizeGate Control andTrack Switching 2 INTRODUCTION
  • 3. VisualizeGate Control andTrack Switching 3 INTRODUCTION Indian railway has the 2nd largest railway network in the world. As the 21st century is moving ahead, the Indian railway system is also moving ahead in terms of technology. But then also, till today our system have not been developed to such a level that it can able to avoid the train accidents in India. In the last 2 years, total 46 major accidents occurred in which more than 9000 Indians and over 859 foreigners lost their lives. Most of the train accidents in India occurs due to the miscommunication, bad weather conditions (fog), human errors, non-update information about the train. Due to these reasons many Indian people lost their life’s and also the foreigners. Today railway is one of the main source for the transportation of people as well as goods in India. In train accidents almost 19% of the total goods get wasted, it may be coal, steel, iron, petroleum, oil etc. In today’s competitive world lot of things works on automation, this reduces use of human resources to a great extent and because of this time and money are also saved. Which is economically profitable in today’s life. In this system more work is done with less investment, proper management and discipline is maintained. As we want to solve the problems of accidental damage of railway system, to maximize the people security, and to get the more information about railway position. We found the best solution for that are “VISUALIZE GATE CONTROL AND TRACK SWITCHING” in Railway system. For this project we design a circuit which gives whole information about the Railway system. In this project we use the IR sensors and it is placed before and after the Railway Crossing so when any Train enters the area of Railway Crossing at that time gate is automatically closed. If two trains arrived on same track and cuts IR sensors in opposite directions the red signals is given to both train to avoid the accident. If we want to switch the train on different tracks then we can switch it using master control.
  • 4. VisualizeGate Control andTrack Switching 4 SPECIFICATION
  • 5. VisualizeGate Control andTrack Switching 5 Specification IR Sensor This is a simple yet effective IR proximity sensor built around the TSOP 1738 module. The TSOP module is commonly found at the receiving end of an IR remote control system; e.g., in TVs, CD players etc. These modules require the incoming data to be modulated at a particular frequency and would ignore any other IR signals. It is also immune to ambient IR light, so one can easily use these sensors outdoors or under heavily lit conditions. Such modules are available for different carrier frequencies from 32 kHz to 42 kHz. In this particular proximity sensor, we will be generating a constant stream of square wave signal using IC555 centered at 38 kHz and would use it to drive an IR led. So whenever this signal bounces off the obstacles, the receiver would detect it and change its output. Since the TSOP
  • 6. VisualizeGate Control andTrack Switching 6 1738 module works in the active-low configuration, its output would normally remain high and would go low when it detects the signal (the obstacle). Microcontroller 89S52  Compatible with MCS-51® Products  8K Bytes of In-System Programmable (ISP) Flash Memory  4.0V to 5.5V Operating Range  Fully Static Operation: 0 Hz to 33 MHz  Three-level Program Memory Lock  256 x 8-bit Internal RAM  32 Programmable I/O Lines  Three 16-bit Timer/Counters  Eight Interrupt Sources  Full Duplex UART Serial Channel  Low-power Idle and Power-down Modes  Interrupt Recovery from Power-down Mode  Watchdog Timer  Dual Data Pointer  Power-off Flag Push –Pull Four Channel Driver with Diodes (L293D)  600mA output current capability per channel  1.2A peak output current per channel (non repetitive)  Enable Facility  Over Temperature Protection  Logical ”0” input voltage up to 1.5 V to 5V  High Noise Immunity  Internal Clamp Diodes
  • 7. VisualizeGate Control andTrack Switching 7 MAX232  Operate from Single +5V Power Supply  +5V and +12V (MAX231/MAX239)  Low-Power Receive Mode in Shutdown (MAX223/MAX242)  Meet All EIA/TIA-232E and V.28 Specifications  Multiple Drivers and Receivers  3-State Driver and Receiver Outputs  Open-Line Detection (MAX243) Voltage Regulator IC 7805  Output current in excess of 1A  Internal thermal overload protection  No external components required  Output transistor safe area protection  Internal short circuit current limit  Available in the aluminum TO-3 package
  • 8. VisualizeGate Control andTrack Switching 8 DESIGN PROCEDURE
  • 9. VisualizeGate Control andTrack Switching 9 DESIGN PROCEDURE a) HARDWARE: • Principle of Operation: 1. We are using the Infrared sensor (IR) pairs for detecting the train. As the train obstructs IR signals, IR will send the received signals to the controller indicating that the train is arrived. When the train obstructs the 1st IR sensor, it will turn ON buzzer for particular period of time and then the gate will automatically get closed. 2. The buzzer is basically used as a warning alert for people near the railway gate. 3. We can calculate the speed of train using distance between two IR sensors (fixed) and the time difference required by train to obstruct the 2 IR sensors. 4. When the train is arriving from 1 side, the signal on the same track will indicate red signal to opposite direction. 5. If we want to route the train on different tracks then we can switch the tracks using master controller (PC). 6. These all are represented on computer (master controller) and provide master control to operator. [I.e. gate status, signal status, tracks switching, speed measurement, position of train.] 7. IR sensors are also used for the automatic railway gate control which is performed by using the outputs of the IR sensors which are given to the DC motor used for the gate. 8. The status of the railway gate is represented on the PC and it is also controlled by the master controller (PC).
  • 10. VisualizeGate Control andTrack Switching 10 • HARDWARE DETAILS 1. MICROCONTROLLER 89S52 We are using ATMELS AT89c/s51 microcontroller. The controller executes instructions as per the clock cycles; this clock is generated using a crystal which is connected to the XTAL1 & XTAL2 pin of the microcontroller, the two capacitors C1 & C2 are connected between the two XTAL pins & the ground. They are required for the crystal to oscillate. A Power ON reset circuit is connected to the RESET pin of the microcontroller, the controller must be reset properly whenever is power is turned on, which is done by applying a Vcc to the reset pin & for normal operation of the controller the pin should be pulled low. So an RC (R1, C3) circuit is connected to the RST (9) pin of the microcontroller. Whenever the power is turned ON the Capacitor is fully charged & the RST pin gets 5 v. Then the capacitor slowly discharges through the resistor & is then pulled to ground. Microcontrollers Port 0 does not have an Internal Pull Up resistor so we need external Pull Up resistors on port 0. For which we use 9-Pin SIP resistor which are basically eight resistors with one end common. Components: XTAL=11.0592 MHz, C1=C2= 33pf, R1=10kΩ, C=10uf 2. TSOP 1738basedproximity sensor This is a simple yet effective IR proximity sensor built around the TSOP 1738 module. The TSOP module is commonly found at the receiving end of an IR remote control system; e.g., in TVs, CD players etc. These modules require the incoming data to be modulated at a particular frequency and would ignore any other IR signals. It is also immune to ambient IR light, so one can easily use these sensors outdoors or under heavily lit conditions. Such modules are available for different carrier frequencies from 32 kHz to 42 kHz. In this particular proximity sensor, we will be generating a constant stream of square wave signal
  • 11. VisualizeGate Control andTrack Switching 11 using IC555 centered at 38 kHz and would use it to drive an IR led. So whenever this signal bounces off the obstacles, the receiver would detect it and change its output. 1. POWER SUPPLY SECTION We require 5 volts for microcontroller, LCD, EEPROM & approximately 12 volts for the Relay. These voltages are generated from 230v line voltage. Initially A step down Transformer is used to step down 230volts to 9olts, so a 0-9; 500ma step down transformer is used. The output of the step down transformer is also AC, we convert this AC voltage into DC by using a Full wave bridge rectifier consisting of Diodes D1, D2, D3 & D4. During the positive half cycle diodes D1 & D4 conduct whereas in the negative half cycle diodes D2 & D3 conduct thus the diodes keep switching the transformer connections so we get positive half cycles in the output. Even though half wave & full wave rectifier give DC output, none of them provides a constant output voltage. For this we require to smoothen the waveform received from the rectifier. This can be done by using a capacitor at the output of the rectifier this capacitor is also called as “FILTER CAPACITOR “or “SMOOTHING CAPACITOR” or “RESERVOIR CAPACITOR”. Even after using this capacitor a small amount of ripple will remain. We place the capacitor at the output of the rectifier the capacitor will charge to the peak voltage during each half cycle & then will discharge its stored energy slowly through the load while the rectified voltage drops to zero, thus trying to keep the voltage as constant as possible. If we go on increasing the value of the filter capacitor then the Ripple will decrease. But then the costing will increase. The value of the
  • 12. VisualizeGate Control andTrack Switching 12 Filter capacitor depends on the current consumed by the circuit, the frequency of the waveform & the accepted ripple. C=VrF/I Where, Vr= accepted ripple voltage.( should not be more than 10% of the voltage) I= current consumed by the circuit in Amperes. F= frequency of the waveform. After filtering the rectifier output the signal is given to a voltage regulator. The maximum input voltage that can be applied at the input is 35V.Normally there is a 2-3 Volts drop across the regulator so the input voltage should be at least 2-3 Volts higher than the output voltage. If the input voltage gets below the Vmin of the regulator due to the ripple voltage or due to any other reason the voltage regulator will not be able to produce the correct regulated voltage. We require 5v output so we use IC 7805 where 78 indicates that it’s a positive series & the 05 indicates the output voltage. Another capacitor C4 is used after the voltage regulator, this is used to remove any ripples or noise generated in the Vcc. D7 is an LED used to indicate the Power Status Components: Transformer: Step Down 0-9; 500ma, Diodes: 1n4007 (D1, D2, D3 and D4), Capacitor (c11) = 1000uf, Voltage Regulator= 7805, Capacitor C4 = 100uf, Resistor R10 =2.2KΩ. LED1 = 3mm Transparent white LED.
  • 13. VisualizeGate Control andTrack Switching 13 BLOCK DIAGRAM:- Micro controller 8 9 S 5 2 MAX 232 DC MOTOR DRIVER (L293D) PC LED DC motor
  • 14. VisualizeGate Control andTrack Switching 14 CIRCUIT DIAGRAM:- IR SENSORS
  • 15. VisualizeGate Control andTrack Switching 15 LAYOUT:-
  • 16. VisualizeGate Control andTrack Switching 16 COMPONENT PLACEMENT & DESIGN :-
  • 17. VisualizeGate Control andTrack Switching 17 b) SOFTWARE  ALGORITHM Gate Controlling 1) start 2) initialize all i/o pins. 3) Open the gate 4) wait for sensor to be cut 5) send the sensor cut location to PC 5) Close the gate 6) wait for other sensor to be cut 7) send sensor cut location to PC 8) Open the gate 9) go to 4 10) Stop Track Switching 1) Start 2) Initialize all I/O pins. 3) Wait for data from PC 4) If data received = cmd_track1_side1 then move track1 to side 1 and go to 3 5) If data received = cmd_track1_side2 then move track1 to side 2 and go to 3 6) If data received = cmd_track2_side1 then move track2 to side 1 and go to 3 7) If data received = cmd_track2_side2 then move track2 to side 2 and go to 3
  • 18. VisualizeGate Control andTrack Switching 18 8) go to 3 9) stop Anti-Collision System 1) Start 2) Initialize all i/o pins 3) show green led on both sides 4) wait for sensor to be cut 5) Show red led on other side 6) wait for second sensor to be cut 7) go to 3 8) stop
  • 19. VisualizeGate Control andTrack Switching 19 FLOWCHART
  • 20. VisualizeGate Control andTrack Switching 20 Gate Controlling START Initialize all I/O pins. GATE OPEN Send the Signal to the PC GATE CLOSE Check the First IR Sensor Cut or Not Check the Second IR Sensor Cut or Not
  • 21. VisualizeGate Control andTrack Switching 21 Track Switching START Initialize all I/O pins. Wait For Data from PC If Data Received Cmd_track1_side1 move to track1 to side 1 Cmd_track1_side2 move to track1 to side 2 Cmd_track2_side1 move to track2 to side 1 Cmd_track2_side2 move to track2 to side 2 STOP
  • 22. VisualizeGate Control andTrack Switching 22 Anti-Collision System START Initialize all I/O pins. Turn ON Green LED on both Sides Check the First IR Sensor Cut or Not Turn ON RED LED Check the Second IR Sensor Cut or Not Turn OFF RED LED & Turn ON Green LED
  • 23. VisualizeGate Control andTrack Switching 23 Software Listing A] Assembly language programming A51 MACRO ASSEMBLER MAIN MACRO ASSEMBLER A51 V8.01 OBJECT MODULE PLACED IN main.OBJ ASSEMBLER INVOKEDBY: C:KeilC51BINA51.EXEmain.asmSET(SMALL) DEBUG EP LOC OBJ LINE SOURCE 1 ;$include (ini.inc) 0093 +1 2 SENSOR1 BIT p1.3 ;for gate 0092 +1 3 SENSOR2 BIT p1.2 ;for gate 0091 +1 4 gate_close_sensor bit P1.1 0090 +1 5 tracksw_fb1 bit P1.0 0096 +1 6 tracksw_fb2 bit P1.6 0094 +1 7 SENSOR3 BIT p1.4 ;forspeedsame tra ck 0095 +1 8 SENSOR4 BIT p1.5 ;forsame track
  • 24. VisualizeGate Control andTrack Switching 24 +1 9 00B7 +1 10 led_red bit P3.7 00B6 +1 11 led_red1 bit P3.6 00B5 +1 12 led_green bit P3.5 00B4 +1 13 led_green1 bit P3.4 +1 14 +1 15 +1 16 +1 17 0083 +1 18 en1 bit P0.3 ;track swit ch 2 0084 +1 19 in1a bit P0.4 0085 +1 20 in1b bit P0.5 +1 21 0080 +1 22 en2 bit P0.0 ;track swit ch 1 0081 +1 23 in2a bit P0.1 0082 +1 24 in2b bit P0.2 +1 25 00A5 +1 26 en3 bit P2.5 ;gate contr ol 00A3 +1 27 in3a bit P2.3 00A4 +1 28 in3b bit P2.4 +1 29 00A2 +1 30 en4 bit P2.2
  • 25. VisualizeGate Control andTrack Switching 25 00A1 +1 31 in4a bit P2.1 00A0 +1 32 in4b bit P2.0 +1 33 +1 34 +1 35 00A6 +1 36 buzzer bit P2.6 +1 37 +1 38 +1 39 +1 40 +1 41 +1 42 +1 43 +1 44 +1 45 +1 46 +1 47 +1 48 0000 +1 49 GATE_CLOSE_F BIT 00H 0001 +1 50 track1_side1_f bit 01h 0002 +1 51 track2_side1_f bit 02h +1 52 +1 53 +1 54
  • 26. VisualizeGate Control andTrack Switching 26 A51 MACRO ASSEMBLER MAIN 0030 +1 55 delay0 equ 30h 0031 +1 56 delay1 equ 31h 0032 +1 57 DELAY2 EQU 32H 0033 +1 58 sensor_ram equ 33h 0034 +1 59 sametrack_ram equ 34h +1 60 +1 61 0031 +1 62 s_location1 data '1' 0032 +1 63 s_location2 data '2' 0033 +1 64 s_location3 data '3' 0034 +1 65 s_location4 data '4' 0035 +1 66 s_gate_open data '5' 0036 +1 67 s_gate_close data '6' 0037 +1 68 s_track1_side1 data '7' 0038 +1 69 s_track1_side2 data '8' 0039 +1 70 s_track2_side1 data '9' 0030 +1 71 s_track2_side2 data '0' +1 72 +1 73 0041 +1 74 cmd_track1_side1 data 'A' 0042 +1 75 cmd_track1_side2 data 'B' 0043 +1 76 cmd_track2_side1 data 'C' 0044 +1 77 cmd_track2_side2 data 'D'
  • 27. VisualizeGate Control andTrack Switching 27 0045 +1 78 cmd_gate_open data 'E' 0046 +1 79 cmd_gate_close data 'F' 80 0000 81 org 0000h 0000 758160 82 MOV SP,#60H 0003 11E4 83 call stop 0005 C2A6 84 clr buzzer 0007 C2B4 85 clr led_green1 0009 C2B5 86 clr led_green 000B 1144 87 call delay 000D 1144 88 call delay 000F 1144 89 call delay 0011 11F9 90 call baudrate 0013 7448 91 mova,#'H' 0015 3105 92 call send 0017 7469 93 mova,#'i' 0019 3105 94 call send 001B D2A6 95 setbbuzzer 96 001D 11B4 97 call GATE_close 001F 11CE 98 call gate_open 0021 753300 99 mov sensor_ram,#00h 0024 753400 100 mov sametrack_ram,#00h 0027 1144 101 call delay 0029 31C9 102 call track1_side1
  • 28. VisualizeGate Control andTrack Switching 28 002B 1144 103 call delay 002D 31EC 104 call track2_side1 105 ; call receive 106 ;call send 107 002F 108 loop: 002F 115A 109 call check_gate 0031 315A 110 call check_same_track 0033 312E 111 CALL check_serial 0035 80F8 112 JMP LOOP 113 0037 114 Ldelay: 0037 7530FF 115 movdelay0,#0ffh 003A 116 l1_Ldelay: 003A 7531FF 117 movdelay1,#0ffh 003D 118 l2_Ldelay: 119 ; MOV DELAY2,#1 120 ; DJNZDELAY2,$
  • 29. VisualizeGate Control andTrack Switching 29 A51 MACRO ASSEMBLER MAIN 003D D531FD 121 djnzdelay1,l2_Ldelay 0040 D530F7 122 djnzdelay0,l1_Ldelay 0043 22 123 ret 124 125 0044 126 delay: 0044 7530FF 127 movdelay0,#0ffh 0047 128 l1_delay: 0047 7531FF 129 movdelay1,#0ffh 004A 130 l2_delay: 004A D531FD 131 djnzdelay1,l2_delay 004D D530F7 132 djnzdelay0,l1_delay 0050 22 133 ret 134 0051 135 sdelay: 0051 7F00 136 mov r7,#00h 0053 137 sl1_delay: 0053 7E01 138 movr6,#01h 0055 DEFE 139 djnzr6,$ 0057 DFFA 140 djnzr7,sl1_delay 0059 22 141 ret 142 ;$include (gate_control.inc) 005A +1 143 check_gate:
  • 30. VisualizeGate Control andTrack Switching 30 005A 1161 +1 144 call check_sensor1 005C 118A +1 145 call check_sensor2 005E 22 +1 146 ret +1 147 +1 148 +1 149 005F +1 150 R1_check_sensor1: +1 151 ;NOOBSTACLE 005F D3 +1 152 SETB C 0060 22 +1 153 RET +1 154 0061 +1 155 check_sensor1: 0061 3093FB +1 156 jnb SENSOR1,R1_check_sensor1 0064 7F30 +1 157 mov r7,#30h 0066 +1 158 deb1_loop: 0066 3093F8 +1 159 jnbSENSOR1,check_sensor1 0069 DFFB +1 160 djnzr7,deb1_loop +1 161 006B 7431 +1 162 mova,#s_location1 006D 3105 +1 163 call send +1 164 006F 2093FD +1 165 jbsensor1,$ +1 166 0072 E533 +1 167 mova,sensor_ram 0074 B40007 +1 168 cjne a,#00h,c1_check_sensor1
  • 31. VisualizeGate Control andTrack Switching 31 0077 753301 +1 169 mov sensor_ram,#01h 007A C3 +1 170 CLR C 007B 11B4 +1 171 CALL GATE_CLOSE +1 172 ; mova,#'2' +1 173 ; call send 007D 22 +1 174 RET +1 175 +1 176 007E +1 177 c1_check_sensor1: 007E B40206 +1 178 cjne a,#02h,c2_check_sensor1 0081 11CE +1 179 call gate_open 0083 753300 +1 180 mov sensor_ram,#00h 0086 22 +1 181 ret +1 182 0087 +1 183 c2_check_sensor1: 0087 22 +1 184 ret +1 185 +1 186
  • 32. VisualizeGate Control andTrack Switching 32 A51 MACRO ASSEMBLER MAIN +1 187 ;************************************** +1 188 ;************************************** +1 189 ;************************************** 0088 +1 190 R1_check_sensor2: 0088 D3 +1 191 SETB C 0089 22 +1 192 RET +1 193 +1 194 008A +1 195 check_sensor2: 008A 3092FB +1 196 jnb SENSOR2,R1_check_sensor2 008D 7F30 +1 197 movr7,#30h 008F +1 198 deb2_loop: 008F 3092F8 +1 199 jnbSENSOR2,check_sensor2 0092 DFFB +1 200 djnzr7,deb2_loop 0094 2092FD +1 201 jb sensor2,$ +1 202 0097 7432 +1 203 mov a,#s_location2 0099 3105 +1 204 call send 009B 2092FD +1 205 jb sensor2,$ +1 206 009E E533 +1 207 mova,sensor_ram 00A0 B40007 +1 208 cjne a,#00h,c1_check_sensor2 00A3 753302 +1 209 mov sensor_ram,#02h
  • 33. VisualizeGate Control andTrack Switching 33 00A6 C3 +1 210 CLR C 00A7 11B4 +1 211 CALL GATE_CLOSE +1 212 ; mova,#'3' +1 213 ; call send 00A9 22 +1 214 RET +1 215 +1 216 00AA +1 217 c1_check_sensor2: 00AA B40106 +1 218 cjne a,#01h,c2_check_sensor2 00AD 11CE +1 219 call gate_open +1 220 ; mova,#'4' +1 221 ; call send 00AF 753300 +1 222 movsensor_ram,#00h 00B2 22 +1 223 ret +1 224 00B3 +1 225 c2_check_sensor2: 00B3 22 +1 226 ret +1 227 +1 228 +1 229 ;*********************************************************************** +1 230 ;*********************************************************************** +1 231 ;*********************************************************************** +1 232 ;***********************************************************************
  • 34. VisualizeGate Control andTrack Switching 34 +1 233 ;*********************************************************************** +1 234 ;*********************************************************************** +1 235 ;*********************************************************************** +1 236 ;*********************************************************************** +1 237 +1 238 00B4 +1 239 GATE_CLOSE: 00B4 C2A6 +1 240 CLR buzzer 00B6 309104 +1 241 jnbgate_close_sensor,r1_GATE_CLOSE +1 242 ; jbgate_close_f,r1_GATE_CLOSE 00B9 11EB +1 243 call forward +1 244 ; call Ldelay 00BB 80F7 +1 245 jmpGATE_CLOSE +1 246 00BD +1 247 r1_GATE_CLOSE: 00BD 11E4 +1 248 call stop 00BF D200 +1 249 setb gate_close_f 00C1 7436 +1 250 mova,#s_gate_close 00C3 3105 +1 251 call send 00C5 D2A6 +1 252 SETB bUZZER
  • 35. VisualizeGate Control andTrack Switching 35 A51 MACRO ASSEMBLER MAIN 00C7 22 +1 253 ret +1 254 +1 255 00C8 +1 256 r1_GATE_open: 00C8 7436 +1 257 mova,#s_gate_close 00CA 3105 +1 258 call send 00CC C3 +1 259 clr c 00CD 22 +1 260 ret +1 261 +1 262 00CE +1 263 GATE_open: 00CE 3000F7 +1 264 jnb gate_close_f,r1_GATE_open 00D1 11F2 +1 265 call reverse 00D3 1137 +1 266 call Ldelay 00D5 1137 +1 267 call Ldelay 00D7 1137 +1 268 call Ldelay 00D9 1137 +1 269 call Ldelay 00DB 11E4 +1 270 call stop 00DD C200 +1 271 clr gate_close_f 00DF 7435 +1 272 mova,#s_gate_open 00E1 3105 +1 273 call send 00E3 22 +1 274 ret +1 275
  • 36. VisualizeGate Control andTrack Switching 36 +1 276 +1 277 +1 278 00E4 +1 279 stop: 00E4 C2A5 +1 280 clr en3 00E6 C2A3 +1 281 clr in3a 00E8 C2A4 +1 282 clr in3b 00EA 22 +1 283 ret +1 284 00EB +1 285 forward: 00EB D2A5 +1 286 setben3 00ED D2A3 +1 287 setbin3a 00EF C2A4 +1 288 clr in3b 00F1 22 +1 289 ret +1 290 +1 291 00F2 +1 292 reverse: 00F2 D2A5 +1 293 setben3 00F4 C2A3 +1 294 clr in3a 00F6 D2A4 +1 295 setbin3b 00F8 22 +1 296 ret +1 297 +1 298 ;*********************************************************************** +1 299 ;***********************************************************************
  • 37. VisualizeGate Control andTrack Switching 37 +1 300 ;*********************************************************************** +1 301 ;*********************************************************************** 302 303 ;$include (serial.inc) +1 304 ;********************************************************************************** +1 305 ;********************************************************************************** +1 306 ;********************************************************************************** 00F9 +1 307 baudrate: 00F9 759850 +1 308 movscon,#50h 00FC 758921 +1 309 mov tmod,#21h ;Timer1 in Auto-reloadmode , TIMER 0 FOR GETTING COUNT FROM SUB PLC 00FF 758DFD +1 310 movth1,#0fDh ;Reloadvalue for4800 baud@ 11.059 Mhz 0102 D28E +1 311 setbtcon.6 ;Turn on timer1 0104 22 +1 312 ret +1 313 ;********************************************************************************** +1 314 ;********************************************************************************** +1 315 ;********************************************************************************** +1 316 ;********************************************************************************** 0105 +1 317 send:
  • 38. VisualizeGate Control andTrack Switching 38 A51 MACRO ASSEMBLER MAIN 0105 F599 +1 318 mov sbuf,a 0107 +1 319 lsend1: 0107 3099FD +1 320 jnb scon.1,lsend1 010A C299 +1 321 clr scon.1 010C 22 +1 322 ret +1 323 ;********************************************************************************** +1 324 ;********************************************************************************** +1 325 +1 326 ;********************************************************************************** +1 327 ;********************************************************************************** 010D +1 328 receive: 010D 3098FD +1 329 jnbscon.0,receive 0110 C298 +1 330 clr scon.0 0112 E599 +1 331 mova,sbuf 0114 22 +1 332 ret +1 333 ;********************************************************************************** +1 334 ;********************************************************************************** +1 335 +1 336 ;**********************************************************************************
  • 39. VisualizeGate Control andTrack Switching 39 +1 337 ;********************************************************************************** 0115 +1 338 newline: 0115 740A +1 339 mov a,#10 0117 3105 +1 340 call send 0119 740D +1 341 mova,#13 011B 3105 +1 342 call send 011D 22 +1 343 ret +1 344 ;********************************************************************************** +1 345 ;********************************************************************************** 011E +1 346 send_dptr_string: 011E E4 +1 347 clr a 011F 93 +1 348 movc a,@a+dptr 0120 7003 +1 349 jnz c1_send_dptr_string 0122 02012B +1 350 ljmpr1_send_dptr_string +1 351 0125 +1 352 c1_send_dptr_string: 0125 3105 +1 353 call send 0127 A3 +1 354 inc dptr 0128 02011E +1 355 ljmpsend_dptr_string 012B +1 356 r1_send_dptr_string: 012B 22 +1 357 ret +1 358 ;********************************************************************************** +1 359 ;**********************************************************************************
  • 40. VisualizeGate Control andTrack Switching 40 +1 360 ;********************************************************************************** +1 361 ;********************************************************************************** 012C +1 362 r1_check_serial: 012C C3 +1 363 clr c 012D 22 +1 364 ret +1 365 012E +1 366 check_serial: 012E 3098FB +1 367 jnbscon.0,r1_check_serial 0131 C298 +1 368 clr scon.0 0133 E599 +1 369 MOV A,SBUF 0135 B44103 +1 370 cjne a,#cmd_track1_side1,c1_check_serial 0138 31C9 +1 371 call track1_side1 013A 22 +1 372 ret +1 373 +1 374 013B +1 375 c1_check_serial: 013B B44203 +1 376 cjne a,#cmd_track1_side2,c2_check_serial 013E 31D9 +1 377 call track1_side2 0140 22 +1 378 ret +1 379 +1 380 0141 +1 381 c2_check_serial: 0141 B44303 +1 382 cjne a,#cmd_track2_side1,c3_check_serial 0144 31EC +1 383 call track2_side1
  • 41. VisualizeGate Control andTrack Switching 41 A51 MACRO ASSEMBLER MAIN 0146 22 +1 384 ret +1 385 +1 386 0147 +1 387 c3_check_serial: 0147 B44403 +1 388 cjne a,#cmd_track2_side2,c4_check_serial 014A 31FC +1 389 call track2_side2 014C 22 +1 390 ret +1 391 +1 392 014D +1 393 c4_check_serial: 014D B44503 +1 394 cjne a,#cmd_gate_open,c5_check_serial 0150 11CE +1 395 call gate_open 0152 22 +1 396 ret +1 397 +1 398 0153 +1 399 c5_check_serial: 0153 B44603 +1 400 cjne a,#cmd_gate_close,c6_check_serial 0156 11B4 +1 401 call gate_close 0158 22 +1 402 ret +1 403 +1 404 0159 +1 405 c6_check_serial: 0159 22 +1 406 ret
  • 42. VisualizeGate Control andTrack Switching 42 407 408 ;$include(display.inc) 409 ;$include (sametrack.inc) 015A +1 410 check_same_track: 015A 3161 +1 411 call check_sametracksensor1 015C 3197 +1 412 call check_sametracksensor2 015E 22 +1 413 ret +1 414 +1 415 +1 416 +1 417 +1 418 015F +1 419 R1_check_sametracksensor1: +1 420 ;NOOBSTACLE 015F D3 +1 421 SETB C 0160 22 +1 422 RET +1 423 0161 +1 424 check_sametracksensor1: 0161 3094FB +1 425 jnb SENSOR3,R1_check_sametracksensor1 0164 7F30 +1 426 mov r7,#30h 0166 +1 427 deb1_loopa: 0166 3094F8 +1 428 jnbSENSOR3,check_sametracksensor1 0169 DFFB +1 429 djnzr7,deb1_loopa 016B 7433 +1 430 mova,#s_location3 016D 3105 +1 431 call send
  • 43. VisualizeGate Control andTrack Switching 43 016F 2094FD +1 432 jbsensor3,$ +1 433 0172 E534 +1 434 mova,sametrack_ram 0174 B4000C +1 435 cjne a,#00h,c1_check_sametracksensor1 0177 C2B6 +1 436 clr led_red1 0179 D2B4 +1 437 setbled_green1 017B D2B5 +1 438 setbled_green 017D D2B7 +1 439 setbled_red 017F 753401 +1 440 movsametrack_ram,#01h 0182 22 +1 441 ret +1 442 +1 443 0183 +1 444 c1_check_sametracksensor1: 0183 B4020E +1 445 cjne a,#02h,c2_check_sametracksensor1 0186 C2B5 +1 446 clr led_green 0188 C2B4 +1 447 clr led_green1 018A D2B7 +1 448 setbled_red 018C D2B6 +1 449 setbled_red1
  • 44. VisualizeGate Control andTrack Switching 44 A51 MACRO ASSEMBLER MAIN 018E 753400 +1 450 mov sametrack_ram,#00h 0191 1137 +1 451 CALL LDELAY 0193 22 +1 452 ret +1 453 +1 454 +1 455 0194 +1 456 c2_check_sametracksensor1: 0194 22 +1 457 ret +1 458 +1 459 +1 460 ;***************************************************************** +1 461 ;***************************************************************** +1 462 ;***************************************************************** +1 463 ;***************************************************************** +1 464 0195 +1 465 R1_check_sametracksensor2: +1 466 ;NOOBSTACLE 0195 D3 +1 467 SETB C 0196 22 +1 468 RET +1 469 0197 +1 470 check_sametracksensor2: 0197 3095FB +1 471 jnb SENSOR4,R1_check_sametracksensor2 019A 7F30 +1 472 movr7,#30h
  • 45. VisualizeGate Control andTrack Switching 45 019C +1 473 deb1_loopb: 019C 3095F8 +1 474 jnbSENSOR4,check_sametracksensor2 019F DFFB +1 475 djnzr7,deb1_loopb 01A1 7434 +1 476 mov a,#s_location4 01A3 3105 +1 477 call send 01A5 2095FD +1 478 jb sensor4,$ +1 479 +1 480 01A8 E534 +1 481 mova,sametrack_ram 01AA B4000C +1 482 cjne a,#00h,c1_check_sametracksensor2 01AD C2B7 +1 483 clr led_red 01AF D2B5 +1 484 setbled_green 01B1 D2B4 +1 485 setbled_green1 01B3 D2B6 +1 486 setbled_red1 01B5 753402 +1 487 movsametrack_ram,#02h 01B8 22 +1 488 ret +1 489 +1 490 01B9 +1 491 c1_check_sametracksensor2: 01B9 B4010C +1 492 cjne a,#01h,c2_check_sametracksensor2 01BC C2B5 +1 493 clr led_green 01BE C2B4 +1 494 clr led_green1 01C0 D2B7 +1 495 setbled_red 01C2 D2B6 +1 496 setbled_red1 01C4 753400 +1 497 movsametrack_ram,#00h
  • 46. VisualizeGate Control andTrack Switching 46 01C7 22 +1 498 ret +1 499 01C8 +1 500 c2_check_sametracksensor2: 01C8 22 +1 501 ret 502 503 ;$include (trackswitching.inc) 01C9 +1 504 track1_side1: 01C9 309004 +1 505 jnbtracksw_fb1,r1_track1_side1 01CC 5131 +1 506 call track1_close 01CE 80F9 +1 507 jmptrack1_side1 +1 508 01D0 +1 509 r1_track1_side1: 01D0 5123 +1 510 call track1_stop 01D2 D201 +1 511 setbtrack1_side1_f 01D4 7437 +1 512 mova,#s_track1_side1 01D6 3105 +1 513 call send 01D8 22 +1 514 ret +1 515
  • 47. VisualizeGate Control andTrack Switching 47 A51 MACRO ASSEMBLER MAIN +1 516 01D9 +1 517 track1_side2: 01D9 30010B +1 518 jnbtrack1_side1_f,r1_track1_side2 01DC 512A +1 519 call track1_open 01DE 510F +1 520 call track_delay 01E0 5123 +1 521 call track1_stop 01E2 7438 +1 522 mova,#s_track1_side2 01E4 3105 +1 523 call send 01E6 22 +1 524 ret +1 525 01E7 +1 526 r1_track1_side2: 01E7 7438 +1 527 mova,#s_track1_side2 01E9 3105 +1 528 call send 01EB 22 +1 529 ret +1 530 +1 531 +1 532 +1 533 ;********************************************************************* +1 534 ;********************************************************************* +1 535 ;*********************************************************************
  • 48. VisualizeGate Control andTrack Switching 48 +1 536 ;********************************************************************* +1 537 01EC +1 538 track2_side1: 01EC 309604 +1 539 jnbtracksw_fb2,r1_track2_side1 01EF 5146 +1 540 call track2_close 01F1 80F9 +1 541 jmptrack2_side1 +1 542 01F3 +1 543 r1_track2_side1: 01F3 5138 +1 544 call track2_stop 01F5 D202 +1 545 setbtrack2_side1_f 01F7 7439 +1 546 mov a,#s_track2_side1 01F9 3105 +1 547 call send 01FB 22 +1 548 ret +1 549 +1 550 01FC +1 551 track2_side2: 01FC 30020B +1 552 jnbtrack2_side1_f,r1_track2_side2 01FF 513F +1 553 call track2_open 0201 510F +1 554 call track_delay 0203 5138 +1 555 call track2_stop 0205 7430 +1 556 mov a,#s_track2_side2 0207 3105 +1 557 call send 0209 22 +1 558 ret +1 559 020A +1 560 r1_track2_side2:
  • 49. VisualizeGate Control andTrack Switching 49 020A 7430 +1 561 mov a,#s_track2_side2 020C 3105 +1 562 call send 020E 22 +1 563 ret +1 564 +1 565 +1 566 +1 567 +1 568 ;********************************************************************* +1 569 ;********************************************************************* +1 570 ;********************************************************************* +1 571 ;********************************************************************* 020F +1 572 track_delay: 020F 7530FF +1 573 mov delay0,#0ffh 0212 +1 574 l1_track_delay: 0212 7531FF +1 575 movdelay1,#0ffh 0215 +1 576 l2_track_delay: 0215 753201 +1 577 MOV DELAY2,#1 0218 D532FD +1 578 DJNZDELAY2,$ 021B 00 +1 579 NOP 021C D531F6 +1 580 djnzdelay1,l2_track_delay
  • 50. VisualizeGate Control andTrack Switching 50 A51 MACRO ASSEMBLER MAIN 021F D530F0 +1 581 djnzdelay0,l1_track_delay 0222 22 +1 582 ret +1 583 ;********************************************************************* +1 584 ;********************************************************************* +1 585 ;********************************************************************* +1 586 ;********************************************************************* +1 587 0223 +1 588 track1_stop: 0223 C280 +1 589 clr en2 0225 C281 +1 590 clr in2a 0227 C282 +1 591 clr in2b 0229 22 +1 592 ret +1 593 +1 594 +1 595 022A +1 596 track1_open: 022A D280 +1 597 setben2 022C D281 +1 598 setbin2a 022E C282 +1 599 clr in2b 0230 22 +1 600 ret +1 601
  • 51. VisualizeGate Control andTrack Switching 51 +1 602 0231 +1 603 track1_close: 0231 D280 +1 604 setben2 0233 C281 +1 605 clr in2a 0235 D282 +1 606 setbin2b 0237 22 +1 607 ret +1 608 +1 609 +1 610 +1 611 ;********************************************************************* +1 612 ;********************************************************************* +1 613 ;********************************************************************* +1 614 ;********************************************************************* +1 615 0238 +1 616 track2_stop: 0238 C283 +1 617 clr en1 023A C284 +1 618 clr in1a 023C C285 +1 619 clr in1b 023E 22 +1 620 ret +1 621 +1 622 +1 623 023F +1 624 track2_open:
  • 52. VisualizeGate Control andTrack Switching 52 023F D283 +1 625 setben1 0241 D284 +1 626 setbin1a 0243 C285 +1 627 clr in1b 0245 22 +1 628 ret +1 629 +1 630 0246 +1 631 track2_close: 0246 D283 +1 632 setben1 0248 C284 +1 633 clr in1a 024A D285 +1 634 setbin1b 024C 22 +1 635 ret 636 637 end
  • 53. VisualizeGate Control andTrack Switching 53 A51 MACRO ASSEMBLER MAIN SYMBOL TABLE LISTING ------ ----- ------- N A ME T Y P E V A L U E ATTRIBUTES BAUDRATE. . . . . . . . . C ADDR 00F9H A BUZZER. . . . . . . . . . B ADDR 00A0H.6 A C1_CHECK_SAMETRACKSENSOR1 C ADDR 0183H A C1_CHECK_SAMETRACKSENSOR2 C ADDR 01B9H A C1_CHECK_SENSOR1. . . . . C ADDR 007EH A C1_CHECK_SENSOR2. . . . . C ADDR 00AAH A C1_CHECK_SERIAL . . . . . C ADDR 013BH A C1_SEND_DPTR_STRING . . . C ADDR 0125H A C2_CHECK_SAMETRACKSENSOR1 C ADDR 0194H A C2_CHECK_SAMETRACKSENSOR2 C ADDR 01C8H A C2_CHECK_SENSOR1. . . . . C ADDR 0087H A C2_CHECK_SENSOR2. . . . . C ADDR 00B3H A C2_CHECK_SERIAL . . . . . C ADDR 0141H A C3_CHECK_SERIAL . . . . . C ADDR 0147H A C4_CHECK_SERIAL . . . . . C ADDR 014DH A C5_CHECK_SERIAL . . . . . C ADDR 0153H A C6_CHECK_SERIAL . . . . . C ADDR 0159H A
  • 54. VisualizeGate Control andTrack Switching 54 CHECK_GATE. . . . . . . . C ADDR 005AH A CHECK_SAMETRACKSENSOR1.. C ADDR 0161H A CHECK_SAMETRACKSENSOR2.. C ADDR 0197H A CHECK_SAME_TRACK.. . . . C ADDR 015AH A CHECK_SENSOR1. . . . . . C ADDR 0061H A CHECK_SENSOR2. . . . . . C ADDR 008AH A CHECK_SERIAL.. . . . . . C ADDR 012EH A CMD_GATE_CLOSE. . . . . . D ADDR 0046H A CMD_GATE_OPEN . . . . . . D ADDR 0045H A CMD_TRACK1_SIDE1. . . . . D ADDR 0041H A CMD_TRACK1_SIDE2. . . . . D ADDR 0042H A CMD_TRACK2_SIDE1. . . . . D ADDR 0043H A CMD_TRACK2_SIDE2. . . . . D ADDR 0044H A DEB1_LOOP . . . . . . . . C ADDR 0066H A DEB1_LOOPA. . . . . . . . C ADDR 0166H A DEB1_LOOPB. . . . . . . . C ADDR 019CH A DEB2_LOOP . . . . . . . . C ADDR 008FH A DELAY . . . . . . . . . . C ADDR 0044H A DELAY0. . . . . . . . . . N NUMB 0030H A DELAY1. . . . . . . . . . N NUMB 0031H A DELAY2. . . . . . . . . . N NUMB 0032H A EN1 . . . . . . . . . . . B ADDR 0080H.3 A EN2 . . . . . . . . . . . B ADDR 0080H.0 A EN3 . . . . . . . . . . . B ADDR 00A0H.5 A EN4 . . . . . . . . . . . B ADDR 00A0H.2 A
  • 55. VisualizeGate Control andTrack Switching 55 FORWARD. . . . . . . . . C ADDR 00EBH A GATE_CLOSE. . . . . . . . C ADDR 00B4H A GATE_CLOSE_F. . . . . . . B ADDR 0020H.0 A GATE_CLOSE_SENSOR. . . . B ADDR 0090H.1 A GATE_OPEN . . . . . . . . C ADDR 00CEH A IN1A.. . . . . . . . . . B ADDR 0080H.4 A IN1B. . . . . . . . . . . B ADDR 0080H.5 A IN2A.. . . . . . . . . . B ADDR 0080H.1 A IN2B. . . . . . . . . . . B ADDR 0080H.2 A IN3A.. . . . . . . . . . B ADDR 00A0H.3 A IN3B. . . . . . . . . . . B ADDR 00A0H.4 A IN4A.. . . . . . . . . . B ADDR 00A0H.1 A IN4B. . . . . . . . . . . B ADDR 00A0H.0 A L1_DELAY. . . . . . . . . C ADDR 0047H A L1_LDELAY . . . . . . . . C ADDR 003AH A L1_TRACK_DELAY. . . . . . C ADDR 0212H A L2_DELAY. . . . . . . . . C ADDR 004AH A L2_LDELAY . . . . . . . . C ADDR 003DH A
  • 56. VisualizeGate Control andTrack Switching 56 A51 MACRO ASSEMBLER MAIN L2_TRACK_DELAY. . . . . . C ADDR 0215H A LDELAY. . . . . . . . . . C ADDR 0037H A LED_GREEN . . . . . . . . B ADDR 00B0H.5 A LED_GREEN1. . . . . . . . B ADDR 00B0H.4 A LED_RED . . . . . . . . . B ADDR 00B0H.7 A LED_RED1. . . . . . . . . B ADDR 00B0H.6 A LOOP.. . . . . . . . . . C ADDR 002FH A LSEND1. . . . . . . . . . C ADDR 0107H A NEWLINE . . . . . . . . . C ADDR 0115H A P0. . . . . . . . . . . . D ADDR 0080H A P1. . . . . . . . . . . . D ADDR 0090H A P2. . . . . . . . . . . . D ADDR 00A0H A P3. . . . . . . . . . . . D ADDR 00B0H A R1_CHECK_SAMETRACKSENSOR1 C ADDR 015FH A R1_CHECK_SAMETRACKSENSOR2 C ADDR 0195H A R1_CHECK_SENSOR1. . . . . C ADDR 005FH A R1_CHECK_SENSOR2. . . . . C ADDR 0088H A R1_CHECK_SERIAL . . . . . C ADDR 012CH A R1_GATE_CLOSE . . . . . . C ADDR 00BDH A R1_GATE_OPEN. . . . . . . C ADDR 00C8H A R1_SEND_DPTR_STRING . . . C ADDR 012BH A R1_TRACK1_SIDE1 . . . . . C ADDR 01D0H A R1_TRACK1_SIDE2 . . . . . C ADDR 01E7H A
  • 57. VisualizeGate Control andTrack Switching 57 R1_TRACK2_SIDE1 . . . . . C ADDR 01F3H A R1_TRACK2_SIDE2 . . . . . C ADDR 020AH A RECEIVE . . . . . . . . . C ADDR 010DH A REVERSE . . . . . . . . . C ADDR 00F2H A SAMETRACK_RAM. . . . . . N NUMB 0034H A SBUF. . . . . . . . . . . D ADDR 0099H A SCON.. . . . . . . . . . D ADDR 0098H A SDELAY. . . . . . . . . . C ADDR 0051H A SEND.. . . . . . . . . . C ADDR 0105H A SEND_DPTR_STRING.. . . . C ADDR 011EH A SENSOR1 . . . . . . . . . B ADDR 0090H.3 A SENSOR2 . . . . . . . . . B ADDR 0090H.2 A SENSOR3 . . . . . . . . . B ADDR 0090H.4 A SENSOR4 . . . . . . . . . B ADDR 0090H.5 A SENSOR_RAM.. . . . . . . N NUMB 0033H A SL1_DELAY . . . . . . . . C ADDR 0053H A SP.. . . . . . . . . . . D ADDR 0081H A STOP.. . . . . . . . . . C ADDR 00E4H A S_GATE_CLOSE. . . . . . . D ADDR 0036H A S_GATE_OPEN . . . . . . . D ADDR 0035H A S_LOCATION1. . . . . . . D ADDR 0031H A S_LOCATION2. . . . . . . D ADDR 0032H A S_LOCATION3. . . . . . . D ADDR 0033H A S_LOCATION4. . . . . . . D ADDR 0034H A S_TRACK1_SIDE1. . . . . . D ADDR 0037H A
  • 58. VisualizeGate Control andTrack Switching 58 S_TRACK1_SIDE2. . . . . . D ADDR 0038H A S_TRACK2_SIDE1. . . . . . D ADDR 0039H A S_TRACK2_SIDE2. . . . . . D ADDR 0030H A TCON.. . . . . . . . . . D ADDR 0088H A TH1 . . . . . . . . . . . D ADDR 008DH A TMOD. . . . . . . . . . . D ADDR 0089H A TRACK1_CLOSE.. . . . . . C ADDR 0231H A TRACK1_OPEN . . . . . . . C ADDR 022AH A TRACK1_SIDE1. . . . . . . C ADDR 01C9H A TRACK1_SIDE1_F. . . . . . B ADDR 0020H.1 A TRACK1_SIDE2. . . . . . . C ADDR 01D9H A TRACK1_STOP. . . . . . . C ADDR 0223H A TRACK2_CLOSE.. . . . . . C ADDR 0246H A TRACK2_OPEN . . . . . . . C ADDR 023FH A TRACK2_SIDE1. . . . . . . C ADDR 01ECH A TRACK2_SIDE1_F. . . . . . B ADDR 0020H.2 A TRACK2_SIDE2. . . . . . . C ADDR 01FCH A TRACK2_STOP. . . . . . . C ADDR 0238H A
  • 59. VisualizeGate Control andTrack Switching 59 A51 MACRO ASSEMBLER MAIN TRACKSW_FB1 . . . . . . . B ADDR 0090H.0 A TRACKSW_FB2 . . . . . . . B ADDR 0090H.6 A TRACK_DELAY . . . . . . . C ADDR 020FH A REGISTER BANK(S) USED: 0 ASSEMBLY COMPLETE. 0 WARNING(S),0ERROR(S)
  • 60. VisualizeGate Control andTrack Switching 60 B] Visual Basic programming OptionExplicit DimInputStringBufferAsString DimWriteStringBufferAsString DimTagno As String 'Dim countAs Integer Private Subcmdconnect_Click() If cmdconnect.Caption="CONNECT"Then MSComm1.CommPort= txtcommport.Text MSComm1.PortOpen=True cmdconnect.Caption="DISCONNECT" MSComm1.RThreshold=1 ElseIf cmdconnect.Caption="DISCONNECT"Then MSComm1.PortOpen=False cmdconnect.Caption="CONNECT" End If End Sub Private SubCommand1_Click() MSComm1.Output= "E" End Sub Private SubCommand2_Click() MSComm1.Output= "A"
  • 61. VisualizeGate Control andTrack Switching 61 End Sub Private SubCommand3_Click() MSComm1.Output= "F" End Sub Private SubCommand4_Click() MSComm1.Output= "B" End Sub Private Sub Command5_Click() MSComm1.Output= "C" End Sub Private SubCommand6_Click() MSComm1.Output= "D" End Sub Private SubForm_Load() Open"d:attendance_logs.txt"ForAppendAs#1 Close #1 End Sub
  • 62. VisualizeGate Control andTrack Switching 62 Private SubMSComm1_OnComm() 'Dim countAs Integer If MSComm1.CommEvent= comEvReceiveThen Text1.Text= "" Text1.Text=MSComm1.Input If Text1.Text=1 ThenLabel3.Caption=" C.S.T.Crossing" If Text1.Text=2 ThenLabel3.Caption=" C.S.T.Crossing" If Text1.Text=3 ThenLabel3.Caption=" KALYAN JUNCTION" If Text1.Text=4 ThenLabel3.Caption=" KALYAN JUNCTION" If Text1.Text=5 ThenLabel5.Caption=" OPEN " If Text1.Text=6 ThenLabel5.Caption=" CLOSE " If Text1.Text=7 ThenLabel1.Caption=" SIDE 1 " If Text1.Text=8 ThenLabel1.Caption=" SIDE 2 " If Text1.Text=9 ThenLabel2.Caption=" SIDE 1 " If Text1.Text=0 ThenLabel2.Caption=" SIDE 2 " If Text1.Text=1 Then If Timer2.Enabled=True Then Timer2.Enabled=False Text2.Text=(100000 / Val(Text4.Text)) /20 Label7.Caption=Mid((100000 / Val(Text4.Text)) /20, 1, 4) Timer2.Enabled=False Else Text4.Text=1 Timer2.Enabled=True
  • 63. VisualizeGate Control andTrack Switching 63 End If End If If Text1.Text= 2 Then If Timer2.Enabled=True Then Timer2.Enabled=False Text2.Text=(100000 / Val(Text4.Text)) /20 Label7.Caption=Mid((100000 / Val(Text4.Text)) /20, 1, 4) Timer2.Enabled=False Else Text4.Text=1 Timer2.Enabled=True End If End If If Text1.Text=3 Then If Timer1.Enabled=True Then Timer1.Enabled=False Text2.Text=(100000 / Val(Text3.Text)) /20 Label6.Caption=Mid((100000 / Val(Text3.Text)) /20, 1, 4) Timer1.Enabled=False Else Text3.Text=1 Timer1.Enabled=True End If
  • 64. VisualizeGate Control andTrack Switching 64 End If If Text1.Text= 4 Then If Timer1.Enabled=True Then Timer1.Enabled=False Text2.Text=(100000 / Val(Text3.Text)) /20 Label6.Caption=Mid((100000 / Val(Text3.Text)) /20, 1, 4) Timer1.Enabled=False Else Text3.Text=1 Timer1.Enabled=True EndIf End If End If End Sub Private SubTimer1_Timer() 'Dim countAs Integer Timer1.Enabled=True 'count = count + 1 Text3.Text= Text3.Text+1 End Sub Private SubTimer2_Timer() Timer2.Enabled=True Text4.Text= Text4.Text+1 End Sub
  • 65. VisualizeGate Control andTrack Switching 65 Software Display Screen
  • 66. VisualizeGate Control andTrack Switching 66 CIRCUIT PREPARATION
  • 67. VisualizeGate Control andTrack Switching 67 CIRCUIT PREPARATION PCB Designing and manufacturing Printed Circuit Board Layout: The PCB layout for circuit is an attach in annexure D.Board consist of insulating material mostly copper-clad boards are used instead of copper, silver and gold can also be used but, as copper is chipper mostly it is preferable. The material conducting pattern serves as conducting medium for electronic component that are assembled on board components are mounted by lead passing through holes that are drilled or punched on the based material and foil. These leads are solder to the conducting pattern to form complete PCB in glass, glass epoxy, and epoxy paper phenolic etc.The copper foil on the base material is developed by the process of electrode position ion etching process. Some of the elements are used are as follows:  Fecl3  Chromic acid, etc. But fecl3 is most commonly used in etching process .PCB acts as a heat sink. ARTWORK OF PCB: Perfect artwork is mostly important process in production of PCB.The circuit is initially tested and location of components is fixed. Artwork is the drawing showing conduction pattern on PC.After testing the circuit rough layout is prepared on paper then that layout is transferred on PCB by using PCB side. The artwork can also be prepared on transparent paper with sticking tapes and self adhesive in various ranges.
  • 68. VisualizeGate Control andTrack Switching 68 FILMING OF PCB: To prepare a PCB at home following procedure is adopted Measure the dimensions of all components e.g.resister, capacitor, inductor; etc. are prepared a layout using component mounting rules:  Using the trace paper or carbon paper draw the mirror image of the figure.  Draw this image on cu cladding of PCB by using PCB pen, pencil, tapes and pads then drill the holes by using drilling machine.  After drilling points the conductor tracks by using oil paints of good quality and live it for drying.  After drying the points put the PCB in fecl3 solution for etching. If you want fast etching add some drop of HCL during etching unwanted cu dissolved in fecl3.  After etching washes it with water and if you remove the point then used acetone.  Then mount the component opposite side of tracks.  Cut the leads of proper length and solder all the terminal of the components.  In this PCB is fabricated manually. For PCB designing you should have following things:  Detail circuit diagram.  Physically each component with you.  To determine the size of PCB.  Layout and filming.  PCB manufacturing
  • 69. VisualizeGate Control andTrack Switching 69 Tracing of the layout from paper to copper clad: First of all circuit layout is taken on tracing paper with exact dimension of all component. Now placing this paper on copper clad under carbon paper, trace the layout the copper clad. It should be notice that the tracing on the clad should be accurate. Applying non etching material on the layout: Applying non etching material on layout is done manually.The non etching material are drafting aids, oil paints, etc.on the PCB drafting aids are used, because more linearity conducting are obtained .the drafting’s aids are different shapes and z-size for every component are should be no crack on the drafting aids, because due to at this after etching their will be no conduction between two lines. Etching procedure: After applying the non etching on the copper clad then this copper clad is kept in fecl3 solution for etching procedure. The etching procedure longs for the about 5 or 6 hours. During the etching procedure the copper under the drafting aids does not get etches while all other copper on the clad get etched and only the layout remains. Cleaning the PCB and remaining non etch materials:
  • 70. VisualizeGate Control andTrack Switching 70 After the etching and cleaning of PCB is done. It is done with the help of soap solution and brush. To remove the transfer pattern with the cotton swab-dipped in the pattern remover solution. Again wash with the soap and water then dry it. • Drilling:- After the PCB is ready, drilling is necessary. Drilling is done with the help of hand drill or machine. For mounting of component proper drilling (holes) are necessary. The holes are of dimension so that the terminals of each component and pin of the IC can easily pass through it to make contact with conducting line on the PCB. Small drills for PCB use usually come with either a set of collets of various sizes or a 3-jaw chuck. For accuracy, however, 3-jaw chucks aren't brilliant, and small drill sizes below 1mm quickly form grooves in the jaws, preventing good grip. Need of good strong light on the board when drilling to ensure accuracy. Typical hole sizes is 0.8mm. Component Placement & Design:- The basic steps required for Component Placement & Design.  Set snap grid, visible grid, and default track/pad sizes.  Throw down all the components onto the board.  Divide and place components into functional “building blocks” where possible.  Identify layout critical tracks on circuit and route them first.
  • 71. VisualizeGate Control andTrack Switching 71  Place and route each building block separately, off the board.  Move completed building blocks into position on main board.  Route the remaining signal and power connections between blocks. This is by no means a be-all and end-all check list; it’s highly variable depending on many factors. The best way to start layout is to get all components onto the screen first and place them down manually. • Soldering:- It is process of joining two metals together by the use of solder alloy to form a reliable electrical path. Soldering considerations need to taken into account when laying out board. There are three basic soldering techniques - hand, wave, and reflow. Hand soldering is the traditional method typically used for prototypes and small production runs. Major impacts when laying out board include suitable access for the iron, and thermal relief for pads. Procedure of soldering: 1) clean all components, terminals and substrates 2) Apply flux 3) Place the soldering iron with right tip size, touching both the lid and pad. 4) From initially a heat bridge between the soldering iron and the lead pad junction with a little solder to increase the thermal linkage area. 5) Feed the solder wire starting from the heat bridge all around the lead. 6) Remove the solder and soldering iron simultaneously. 7) There should not be any relative movement between the components under solidification and the working table. 8) Check the joint
  • 72. VisualizeGate Control andTrack Switching 72 Solder Mask:- A solder mask is a thin polymer coating on your board which surrounds pads to help prevent solder from bridging between pins. This is essential for surface mount and fine pitch devices. The solder mask typically covers everything except pads and vias. • Electrical Testing:- We have finished PCB checked for electrical continuity and shorts at the time of manufacture. This is done with an automated “flying probe” or “DMM”. It checks that the continuity of the tracks matches your PCB file. Trouble Shooting:  The different protocols that we tested were Sony, Fujitsu, NEC, Fairchild etc. But this was unable to detect IR sensor, so we had used RC5 by Phillips.  The intensity of RC5 protocol was very high. Hence it was try to reduce by using an insulation tape.  The only problem was with the line of sight .the solution to this is that the transmitter and receiver should match with line of sight to detect.
  • 73. VisualizeGate Control andTrack Switching 73 ADVANTAGES, LIMITATIONS&
  • 74. VisualizeGate Control andTrack Switching 74 APPLICATIONS ADVANTAGES, DISADVANTAGES, FUTURE SCOPE ADVANTAGES:- 1. Large amount of accidents can be avoided. 2. Continuous updates of train position at master control. 3. Large amount of man power is saved and thereby reduction in the cost of wages for railway is possible. 4. Controlling of various features by the master controller. 5. Well management can be possible due to sufficient data. 6. Possibility of human error is avoided. 7. Flawless track switching is possible due to the master controller. DISADVANTAGES:- 1. Due to use of IR sensors, the major drawback is the line of sight and cause fake detection. 2. Accidents due to absence of track cannot be overcome. 3. Implementation cost is high. 4. We cannot identify the name of train running on the track. FUTURE SCOPE:- 1. “SHIELD” technology or the anti collision devices can be used to avoid train collision. 2. GPS system can be used to get the updated information about the train. 3. Weight sensors can be used for the automatic railway control.
  • 75. VisualizeGate Control andTrack Switching 75 4. Track vacancy detection can be possible due to ATP code transmission. COSTSHEET
  • 76. VisualizeGate Control andTrack Switching 76 Cost Sheet
  • 77. VisualizeGate Control andTrack Switching 77 Sr.no. Components Quantity Cost Total 1 Microcontroller IC 89S52 1 70/- 70/- 2 Crystal 11.0592Mhz. 1 8/- 8/- 3 Diode 1N4007 4 1/- 4/- 4 Resistor 10kΩ 10 1/- 10/- 5 Resistor 2.2kΩ 10 1/- 10/- 6 Resistor 220Ω 3 1/- 3/- 7 Capacitor 1000uf 2 10/- 20/- 8 Capacitor 100uf 5 2/- 10/- 9 Capacitor 10uf 4 1/- 4/- 10 Capacitor 33pf 4 3/- 12/- 11 8 pin Connector 2 10/- 20/- 12 2 pin Connector 6 5/- 30/- 13 Transistor BC 547 2 1/- 2/- 14 Heat Sink 1 25/- 25/- 15 DC Motor 2 125/- 250/- 16 IC L293D 1 50/- 50/- 17 IR Sensor 4 125/- 500/- 18 LED 5 2/- 10/- 19 MAX 232 1 50/- 50/- 20 LCD 16x2 1 130/- 130/- 21 Resistor Package 2 10/- 20/- 22 IC BASE 4 10/- 40/- 23 Transformer 0-12V/500ma 1 150/- 150/- 24 IC 7805 1 10/- 10/- 25 IC 7812 1 10/- 10/- 26 Train Set 1 900/- 900/- Total 2398/-
  • 78. VisualizeGate Control andTrack Switching 78 CONCLUSION
  • 79. VisualizeGate Control andTrack Switching 79 CONCLUSION CONCLUSION: In today’s industrial scenario, to survive in the global competition, every Agro- based industry is forced to use automated process. Today’s industrial scenario demands use of automated process because of global competition. Automation system is more advantageous than manual system related parameters are speed, time saving, accuracy, man power etc Knowing working principle, configuration procedure & trouble shooting techniques along with designing of logic is a key factor in industrial automation. It can be considered as the first serious attempt to fulfill the requirements for a universal industry system. The automation standard provides a common set of compatible services and capabilities to all industrial users. Hence it is suggested that we put in more resources to research on new horizons as early as possible for a better life for us!!
  • 80. VisualizeGate Control andTrack Switching 80 REFERENCE REFERENCES
  • 81. VisualizeGate Control andTrack Switching 81 Books:-  Microcontroller and embedded system. :- Mazidi  Principle of electronics:-V.K. Mehta  Applied Electronics:-R.S. Seddha  Digital principle & application:-Malvino & Leach  Real time operating system:- Dr. K.K.V. Prasad Websites:-  www.houstuff.com  www.DNAtechindia.com  www.wikipedia.com  www.altavista.com Search Engine:-  www.google.com  www.yahoo.com  www.altavista.com Magazines:-  Electronics for you  Electronics express
  • 82. VisualizeGate Control andTrack Switching 82 DATASHEET & PHOTOGRAPH
  • 97. VisualizeGate Control andTrack Switching 97 RS232 Pin Signal Pin Signal 1 Data carrier detect 6 Data set ready 2 Receiveddata 7 Requesttosend 3 Transmitteddata 8 Clearto send 4 Data terminal ready 9 Ringindicator 5 Signal ground
  • 104. VisualizeGate Control andTrack Switching 104 PHOTOGRAPH