INTRODUCTION
Railway is lifeline of India and it is being the cheapest modes of
transportation are preferred over all other means of transportation. When we go
through the daily newspapers we come across many accidents in railroad
railings.
Railroad-related
accidents
are
more
dangerous
than
other
transportation accidents in terms of severity and death rate etc. Therefore more
efforts are necessary for improving safety. Collisions with train are generally
catastrophic, in that the destructive forces of a train usually no match for any
other type of vehicle. Train collisions form a major catastrophe, as they cause
severe damage to life and property. Train collisions occur frequently eluding all
the latest technology.
1.2 SCOPE: To
Review the present status of level-crossing accidents and train collisions.
Present statistics, indicators, technology and problems relating to the
systems adopted for railway protection; in practice
Analyze various alternative systems for train collision avoidance; and
Make recommendations pertaining to the selection of cost-effective
protection systems.
1.3 METHODOLOGY:
The following analyses are considered:
CHAPTER 2
LITERATURE REVIEW
system
uses
PIC
16F877A
microcontroller,
PIC
16F73
POWER
SUPPLY (+5V)
ZIGBEE
TRANSCEIVER
PIC MICRO CONTROLLER
(PIC 16F877A)
VIBRATION
SENSOR
SERVO
MOTOR
POWER
SUPPLY (+5V)
BRAKE
CONTROL
ZIGBEE
TRANSCEIVER
Servo motor
It is the modified form of DC motor
It consist DC motor, potentiometer, gearing system.
The servo motor works based on PWM switching
The main advantage of servo motor is precise control of angular position.
10
CHAPTER 3
RAILWAY SECURITY SYSTEM
11
MINISENSE 100
The Minisense 100 is a low-cost cantilever-type vibration sensor loaded
by a mass to offer high sensitivity at low frequencies. The pins are designed for
easy installation and are solderable. Horizontal and vertical mounting options
are offered as well as a reduced height version. The active sensor area is
shielded for improved RFI/EMI rejection. Rugged, flexible PVDF sensing
element withstands high shock overload. Sensor has excellent linearity and
dynamic range, and may be used for detecting either continuous vibration or
impacts. The mass may be modified to obtain alternative frequency response
and sensitivity selection. It can be classified into two 1)minisense 100
vertical,2)minisense 100 horizontal .The vibration sensor used here is minisense
100 vertical
Circuit diagram
PIEZO
10M
a)
b)
GND
in the beam, due to the inertia of the mass at the tip of the beam. Strain in the
beam creates a piezoelectric response, which may be detected as a charge or
voltage output across the electrodes of the sensor. The sensor may be used to
detect either continuous or impulsive vibration or impacts. For excitation
frequencies below the resonant frequency of the sensor, the device produces a
linear output governed by the "baseline" sensitivity. The sensitivity at resonance
is significantly higher. Impacts containing high-frequency components will
excite the resonance frequency, as shown in the plot above (response of
MiniSense 100 to a single half-sine impulse at 100 Hz, of amplitude 0.9 g). The
ability of the sensor to detect low frequency motion is strongly influenced by
the external electrical circuit.
Electrical description
The MiniSense 100 behaves electrically as an active capacitor: it may
be modeled as a perfect voltage source (voltage proportional to applied
acceleration) in series with the quoted device capacitance. Any external input or
load resistance will form a high-pass filter, with a roll-off frequency as
tabulated above, or calculated from the formula f(c) = 1/(2_RC). The
impedance of the sensor is approximately 650 M ohm at 1 Hz. The active
sensor element is electrically shielded, although care should be taken in the
PCB design to keep unshielded traces as short as possible.
External R ()
LLF (Hz)
Required R ()
10M
100M
1G
65
6.5
0.65
10
1
0.1
65M
650M
6.5G
Off-axis sensitivity
The sensitivity of the Minisense 100 follows a cosine law, when rotated
horizontally around its axis, or vertically around its mid-point. At 90 degrees
rotation in either plane, both baseline sensitivity and sensitivity at resonance are
at a minimum. In theory, sensitivity should be zero in this condition. It is likely
that some sensitivity around the resonance frequency will still be observed but
this may be unpredictable and is likely to be at least -16 dB with reference to
the on-axis response. Note that the sensitivity at 30 degrees rotation is -1.25 dB
(87% of on-axis response), at 60 degrees, it falls to -6 dB (50%).
The plots below show the change in sensitivity observed for either:
1) Rotation about major axis of sensing element, or
2) Rotation about mid-point of sensing element.
Off axis response
Rotation angle
for many applications. In particular, many engineers saw a need for selforganizing ad-hoc digital radio networks.
16
The IEEE 802.15.4-2003 standard was completed in May 2003 and has
been superseded by the publication of IEEE 802.15.4-2006. In the summer of
2003, Philips Semiconductors, a major mesh network supporter, ceased the
investment. The ZigBee specifications were ratified on 14 December 2004. The
ZigBee Alliance announced availability of Specification 1.0 on 13 June 2005,
known as ZigBee 2004 Specification. In September 2006, ZigBee 2006
Specification is announced. In 2007, ZigBee PRO, the enhanced ZigBee
specification was finalized.
The first stack release is now called ZigBee 2004. The second stack
release is called ZigBee 2006, and mainly replaces the structure used in 2004
with a "cluster library". The 2004 stack is now more or less obsolete. ZigBee
2007, now the current stack release, contains two stack profiles, stack profile 1
(simply called ZigBee), for home and light commercial use, and stack profile 2
(called ZigBee PRO). ZigBee PRO offers more features, such as multi-casting,
many-to-one routing and high security with Symmetric-Key Key Exchange
(SKKE), while ZigBee (stack profile 1) offers a smaller footprint in RAM and
flash. Both offer full mesh networking and work with all ZigBee application
profiles.
ZigBee 2007 is fully backward compatible with ZigBee 2006 devices: A
ZigBee 2007 device may join and operate on a ZigBee 2006 network and vice
versa. Due to differences in routing options, ZigBee PRO devices must become
non-routing ZigBee End-Devices (ZEDs) on a ZigBee 2006 network, the same
as for ZigBee 2006 devices on a ZigBee 2007 network must become ZEDs on a
ZigBee PRO network. The applications running on those devices work the
same, regardless of the stack profile beneath them. The ZigBee 1.0 specification
was ratified on 14 December 2004 and is available to members of the ZigBee
17
18
ZigBee
service
object
Application
Objects
Security
services
NETWORK LAYER
PHYSICAL LAYERS
layer adopts completely confirmed data transmission, that is, every data
packet sent must wait for the confirmation from the receiver
Low cost of the modules: The ZigBee protocol is patent fee free
Short time delay: Typically 30 ms for device searching, 15 ms for
standby to activation, and 15 ms for channel access of active devices
Large network capacity: One ZigBee network contains one master
device and maximum 254 slave devices. There can be as many as 100
ZigBee networks within one area
Safety: ZigBee provides a data integrity check and authentication
function. AES-128 is adopted and at the same time each application can
flexibly determine its safety property.
Long battery life: The battery life is high compared to any other
devices.
Security: The data can be protected from any external interferences.
Disadvantages
Short range
Low complexity
Low data speed.
Applications
Home automation
Wireless sensor networks
Industrial control
Embedded sensing
Medical data collection
21
22
PIC MICROCONTROLLER
Features
A PIC microcontroller is an amazingly powerful fully featured processor
with internal RAM, EEROM FLASH memory and peripherals. One of the
smallest ones occupies the space of a 555 timer but has a 10bit ADC, 1k of
memory, 2 timers; high current I/O ports a comparator a watch dog timer.
PIC 16F877A
The microcontroller unit used here is a PIC16f877A .The core controller
is a mid-range family having a built-in SPI master. 16F877A have enough I/O
lines for current need. It is capable of initiating all intersystem communications.
The master controller controls each functions of the system with a supporting
device. Also responsible for reception of commands from the host and taking
necessary
actions.
PIC16F877A
23
is
an
8-bit,
fully
static,
converter,
capture/compare/PWM
and
Enhanced
Features:
High performance RISC CPU
Only 35 single word instructions to learn
All single cycle instructions except for program branches which are two
cycle
Operating speed: DC - 20 MHz clock input DC - 200 ns instruction cycle
Up to 8K x 14 words of FLASH Program Memory, Up to 368 x 8 bytes
of Data up to Memory (RAM) 256 x 8 bytes of EEPROM Data Memory
Pin out compatible to the PIC16C73B/74B/76/77
Interrupt capability (up to 14 sources)
Eight level deep hardware stack
Programmable code protection
24
25
Synchronous
Asynchronous
Receiver
Transmitter
Hardware features
There are three memory blocks in each of the PIC16F87XA devices.
The program memory and data memory have separate buses so that concurrent
access can occur. The Special Function Registers are registers used by the CPU
and peripheral modules for controlling the desired operation of the device.
These registers are implemented as static RAM. Some pins for these I/O ports
are multiplexed with an alternate function for the peripheral features on the
device. In general, when a peripheral is enabled, that pin may not be used as a
general purpose I/O pin. The Master Synchronous Serial Port (MSSP) module
is a serial interface, useful for communicating with other peripheral or
microcontroller devices. These peripheral devices may be serial EEPROMs,
shift registers, display drivers, A/D converters, etc. The MSSP module can
operate in one of two modes. The Universal Synchronous Asynchronous
Receiver Transmitter (USART) module is one of the two serial I/O modules.
(USART is also known as a Serial Communications Interface or SCI.) The
USART can be configured as a full-duplex asynchronous system that can
communicate with peripheral devices, such as CRT terminals and personal
computers, or it can be configured as a half-duplex synchronous system that can
communicate with peripheral devices, such as A/D or D/A integrated circuits,
serial EEPROMs, etc. The Analog-to-Digital (A/D) Converter module has five
inputs for the 28-pin devices and eight for the 40/44-pin devices. The
conversion of an analog input signal results in a corresponding 10-bit digital
number. The A/D module has high and low-voltage reference input that is
software selectable to some combination of VDD, VSS, RA2 or RA3. The A/D
converter has a unique feature of being able to operate while the device is in
Sleep mode. To operate in Sleep, the A/D clock must be derived from the A/Ds
internal RC oscillator. The comparator module contains two analog
28
comparators. The inputs to the comparators are multiplexed with I/O port pins
RA0 through RA3, while the outputs are multiplexed to pins RA4 and RA5.
All PIC16F87XA devices have a host of features intended to maximize
system reliability, minimize cost through elimination of external components,
provide power saving operating modes and offer code protection.
Memory organization
There are three memory blocks in each of the PIC16F87X MCUs. The
Program Memory and Data Memory have separate buses so that concurrent
access can occur.
Registers from one bank may be mirrored in another bank for code reduction
and quicker access.
I/O ports
Some pins for these I/O ports are multiplexed with analternate function
for the peripheral features on the device. In general, when a peripheral is
enabled, that pin may not be used as a general purpose I/O pin. Additional
information on I/O ports may be found in the PICmicro Mid-Range
Reference Manual (DS33023).
PORTA is a 6-bit wide, bidirectional port. The corresponding data
direction register is TRISA. Setting a TRISA bit (= 1) will make the
corresponding PORTA pin an input (i.e., put the corresponding output driver in
a High-Impedance mode). Clearing a TRISA bit (= 0) will make the
corresponding PORTA pin an output (i.e., put the contents of the output latch
on the selected pin).
All write operations are read-modify-write operations. Therefore, a write
to a port implies that the port pins are read; the value is modified and then
written to the port data latch. Pin RA4 is multiplexed with the Timer0 module
clock input to become the RA4/T0CKI pin. The RA4/T0CKI pin is a Schmitt
Trigger input and an open-drain output.
PORTB is an 8-bit wide, bidirectional port. The corresponding data
direction register is TRISB. Setting a TRISB bit (= 1) will make the
corresponding PORTB pin an input (i.e., put the corresponding output driver in
a High-Impedance mode). Clearing a TRISB bit (= 0) will make the
corresponding PORTB pin an output (i.e., put the contents of the output latch
on the selected pin). Three pins of PORTB are multiplexed with the In-Circuit
Debugger and Low-Voltage Programming function: RB3/PGM, RB6/PGC and
30
PORTC pins have Schmitt Trigger input buffers. When the I2C module is
enabled, the PORTC<4:3> pins can be configured with normal I2C levels, or
with SMBus levels, by using the CKE bit (SSPSTAT<6>). When enabling
peripheral functions, care should be taken in defining TRIS bits for each
PORTC pin. Some peripherals override the TRIS bit to make a pin an output,
while other peripherals override the TRIS bit to make a pin an input. Since the
TRIS bit override is in effect while the peripheral is enabled, read-modify-write
instructions (BSF, BCF, XORWF) with TRISC as the destination, should be
avoided. The user should refer to the corresponding peripheral section for the
correct TRIS bit settings.
PORTD is an 8-bit port with Schmitt Trigger input buffers. Each pin is
individually configurable as an input or output. PORTD can be configured as an
8-bit wide microprocessor port (Parallel Slave Port) by setting control bit,
PSPMODE (TRISE<4>). In this mode, the input buffers are TTL.
PORTE has three pins (RE0/RD/AN5, RE1/WR/AN6 and RE2/CS/AN7)
which are individually configurable as inputs or outputs. These pins have
Schmitt Trigger input buffers. The PORTE pins become the I/O control inputs
for the microprocessor port when bit PSPMODE (TRISE<4>) is set. In this
mode, the user must make certain that the TRISE<2:0> bits are set and that the
pins are configured as digital inputs. Also, ensure that ADCON1 is configured
for digital I/O. In this mode, the input buffers are TTL. Register 4-1 shows the
TRISE register which also controls the Parallel Slave Port operation. PORTE
pins are multiplexed with analog inputs. When selected for analog input, these
pins will read as 0s. TRISE controls the direction of the RE pins, even when
they are being used as analog inputs. The user must make sure to keep the pins
32
configured as inputs when using them as analog inputs. The system has two
interconnected modules as its working elements.
PIC16F73
This powerful yet easy-to-program (only 35 single word instructions)
CMOS FLASH-based 8-bit microcontroller packs Microchip's powerful PIC
architecture into a 28 pin package. The PIC16F73 features operating frequency
of 20MHz , 8-bit Analog-to-Digital Module, 2 capture/compare/PWM module
Serial Communications using SSP, USART,11 interrupts, Synchronous Serial
Port (SSP) with SPI, Master mode) and I2C (Slave), Universal Synchronous
Asynchronous Receiver Transmitter (USART/SCI), Parallel Slave Port (PSP),
Programmable code protection , Selectable oscillator options, In-Circuit Serial
Programming (ICSP)
General Features
33
34
Synchronous
Asynchronous
Receiver
Transmitter
(USART/SCI)
Parallel Slave Port (PSP), 8-bits wide with external RD, WR and CS
controls (40/44-pin only)
Brown-out detection circuitry for Brown-out Reset (BOR)
35
CMOS Technology:
Low power, high speed CMOS FLASH technology
Fully static design
Wide operating voltage range: 2.0V to 5.5V
High Sink/Source Current: 25 mA
Low power consumption:
- < 2 mA typical @ 5V, 4 MHz
- 20 A typical @ 3V, 32 kHz
- < 1 A typical standby current
PINDETAILS
3.1.4 SERVOMOTOR
A servomotor is a rotary actuator that allows for precise control of
angular position. It consists of a motor coupled to a sensor for position
feedback, through a reduction gearbox. It also requires a relatively sophisticated
controller, often a dedicated module designed specifically for use with
servomotors. Servomotors are used in applications such as robotics, CNC
machinery or automated manufacturing. It is the modified form of DC motor.
As the name suggests, a servomotor is a servomechanism. More
specifically, it is a closed-loop servomechanism that uses position feedback to
control its motion and final position. The input to its control is some signal,
either analogue or digital, representing the position commanded for the output
shaft.
37
The motor is paired with some type of encoder to provide position and
speed feedback. In the simplest case, only the position is measured. The
measured position of the output is compared to the command position, the
external input to the controller. If the output position differs from that required,
an error signal is generated which then causes the motor to rotate in either
direction, as needed to bring the output shaft to the appropriate position. As the
positions approach, the error signal reduces to zero and the motor stops.
The very simplest servomotors use position-only sensing via a
potentiometer and bang-bang control of their motor; the motor always rotates at
full speed (or is stopped). This type of servomotor is not widely used in
industrial motion control, but they form the basis of the simple and cheap
servos used for radio-controlled models.
Radio Control (RC) hobby servos are small actuators designed for
remotely operating model vehicles such as cars, airplanes, and boats.
Nowadays, RC servos are become more popular in robotics. This is because its
ability to rotate and maintain and certain location, position or angle according to
control pulses from a single wire. Inside a typical RC servo contains a small
motor and gearbox to do the work, a potentiometer to measure the position of
the output gear, and an electronic circuit that controls the motor to make the
output gear move to the desired position. Because all of these components are
packaged into a compact, low-cost unit, RC servos are great actuators for
robots.
More sophisticated servomotors measure both the position and also the
speed of the output shaft. They may also control the speed of their motor, rather
than always running at full speed. Both of these enhancements, usually in
38
servo motor. The motor, through a series of gears, turns the output shaft and the
potentiometer simultaneously. The potentiometer is fed into the servo control
circuit and when the control circuit detects that the position is correct, it stops
the motor. If the control circuit detects that the angle is not correct, it will turn
the motor the correct direction until the angle is correct. Normally a servo is
used to control an angular motion of between 0 and 180 degrees. It is not
mechanically capable (unless modified) of turning any farther due to the
mechanical stop build on to the main output gear.
The amount of power applied to the motor is proportional to the distance
it needs to travel. So, if the shaft needs to turn a large distance, the motor will
run at full speed. If it needs to turn only a small amount, the motor will run at a
slower speed. This is called proportional control.
SERVOMOTOR VS STEPPERMOTOR
Servomotors are generally used as a high performance alternative to the
stepper motor. Stepper motors have some inherent ability to control position, as
they have inbuilt output steps. This often allows them to be used as an openloop position control, without any feedback encoder, as their drive signal
specifies the number of steps of movement to rotate. This lack of feedback
though limits their performance, as the stepper motor can only drive a load that
is well within its capacity, otherwise missed steps under load may lead to
positioning errors.
The encoder and controller of a servomotor are an additional cost, but
they optimize the performance of the overall system (for all of speed, power
and accuracy) relative to the capacity of the basic motor. With larger systems,
40
Control signal
Gnd
the pulse will determine how far the motor turns. For example, a 1.5 ms pulse
will make the motor turn to the 90 degree position (neutral position).
When these servos are commanded to move they will move to the
position and hold that position. If an external force pushes against the servo
while the servo is holding a position, the servo will resist from moving out of
that position. The maximum amount of force the servo can exert is the torque
rating of the servo. Servos will not hold their position forever though; the
position pulse must be repeated to instruct the servo to stay in position.
Minimum pulse:
Pulse width 0.6 msec
Maximum pulse:
Pulse width 2 msec
When a pulse is sent to a servo that is less than about 0.6 ms the servo does not
rotates to any position and holds its output shaft at zero degree. If the pulse is
wider than 0.6 ms the servo rotates. For example, if pulse width is equal to 1,5
ms servo will rotate 90 degrees and for pulse width is equal or greater than 2
ms, servo will make rotation of 180 degrees. The minimal width and the
maximum width of pulse that will command the servo to turn to a valid position
are functions of each servo. Different brands, and even different servos of the
42
same brand, will have different maximum and minimums. Generally the
minimum pulse will be about 1 ms wide and the maximum pulse will be 2 ms
wide.This is PWM switching.
Description: This Light Weight Servo (1.5 Kg) can be used for our project
development. This comes with a standard 3 pin power, control cable. Can be
used in Electric aircraft, glider etc.
3.2 TRAIN COLLISION AVOIDANCE
Now a days people prefer to travel in Train instead of Bus, according a
lot of changes the way of using our transport systems. More and more trains are
aiding for the transportation systems. At the same time the probable of train to
train collision increasing day by day. Train Collisions are of different types
depending upon the circumstance. There so many technology updates in this
connection to avoid collisions and save the people. In the present railway
signalling system, train location is detected by the track circuit, and according
to train location, train control signals are indicated to prevent collisions between
trains. But these present technologies cannot avoid collision completely.
This paper introduces a new approach addressing the problem of
colliding trains.
to identify the train vibration. The PIC microcontroller 16f877a and 16f73 is
used as hardware platform to monitor and control the train operation like,
communication between train and station.
When we are standing at the railway crossing, we can easily know the
arrival of the train only by sensing the intensity of the vibrations created on the
metal tracks on which train runs. Thus, the intensity of the vibrations created
during passage of a train at the railroads or railways tracks can be identified by
vibration sensor. Vibration Sensor that works according to the high and low
intensity of the vibrations created on railway tracks whenever trains run on it.
The vibration sensors are attached on the railway track. It is an intelligent
system that can sense the increasing and decreasing amount of vibrations being
created on railway tracks and it converts mechanical vibration into electrical
signal. Then it sends the relevant signal to the attached PIC microcontroller
through the analog pin and work accordingly without any other intervention. If
the train comes in both the direction more than one sensor shows higher value.
So the microcontroller identifies the trains come in opposite direction. Output
of the microcontroller goes to the other PIC microcontroller 16f73 in the train
side through the transmitter and receiver section of the zigbee. The engines of
trains are equipped with microcontroller containing all the data and information
about all the trains. Then the power supply of the train will cutoff and the train
will be stopped within few seconds.
Based on immediate response against the vibrations created, the proposed
mechanism will be cost-effective, flawless and quite secure for the general
public. It avoiding frequently occurring collisions. If this technology is
implemented in all rail road railings, the overall collision rate can be reduced
significantly and travel will become safe for everyone.
44
RAIL
EXPANSION
SPACE
NUT
SPIKE
TIE
PLATE
TIE
45
If there is any crack in the railway track, the vibration of train will not get
continuously by the vibration sensor. This means that the crack is present. So
we have to stop the train before passing the crack. The vibration sensor values
are given to the analog channels of microcontroller. The microcontroller
PIC16F877A is used at the base station .The vibration sensor and ZigBee is
interfaced with the microcontroller. The ZigBee transceiver transfers the
information to the transceiver present at the train side.
The train side a brake control system is present. When the false signal
(presence of crack) reaches the train will automatically stops by releasing the
brake of train. Thus the train can be stopped before the crack. There by we can
avoid the derailment of trains in bends and curves.
Today often we see news papers very often about the railway accidents
happening at un- attended railway gates. This project is developed in order to
help the INDIAN RAILWAYS in making its present working system a better
one, by eliminating some of the loopholes existing in it. The program for this
project is embedded in this Micro controller Integrated Chip and interfaced to
all the peripherals.
Early level crossings had a flagman in a nearby booth that would, on the
approach of a train, wave a red flag or lantern to stop all traffic and clear the
tracks. Manual or electrical closable gates that barricaded the roadway were
later introduced. The gates were intended to be a complete barrier against
intrusion of any road traffic onto the railway. In the early days of the railways
much road traffic was horse drawn or included livestock. It was thus necessary
to provide a real barrier. Thus, crossing gates, when closed to road traffic,
crossed the entire width of the road. When opened to allow road users to cross
the line, the gates were swung across the width of the railway, preventing any
pedestrians or animals getting onto the line. With the appearance of motor
vehicles, this barrier became less effective and the need for a barrier to
livestock diminished dramatically. Many countries therefore substituted the
gated crossings with weaker but more highly visible barriers and relied upon
road users following the associated warning signals to stop. In many countries,
level crossings on less important roads and railway lines are often "open" or
"uncontrolled", sometimes with warning lights or bells to warn of approaching
trains. Ungated crossings represent a safety concern; many accidents have
occurred due to failure to notice or obey the warning. Level crossings in India,
China, Thailand, and Malaysia are still largely manually-operated, where the
barriers are lowered using a manual switch when trains approach.
47
Programming in the design of the Automatic Railway Gate Control and Track
Switching. 3. To show the application of automation in the miniature prototype
of the Automatic Railway Gate Control and Track Switching.
Using simple electronic components we have tried to automate the
control of railway gates. For that it uses PIC micro controller PIC16F877A and
PIC16F73, vibration sensor, Zig-Bee module, servo motor etc. As a train
approaches the railway crossing the vibration sensor placed near the crossing
will sense the vibrations and give the measured values to the base station which
is controlled by the micro controller. The Zig-Bee Transceiver connected to the
micro controller (PIC16F877A) will send a signal to the Zig-Bee Transceiver
which is placed over the train. The train is also controlled by the micro
controller PIC16F73.Then the train side PIC will send a signal to the gate which
is controlled by the servo motor.
49
START
CHECH ANY
DATA PRESENT
NO
IF DATA
RXEDFROM
TRAIN
YES
GATE CLOSED
50
START
START
NO
IS
RC6=1
YES
RB0=0
SET RB0=0
TO STOP TRAIN
Train
51
ZIGBEE TRANSCEIVER
VCC
GND
TX
RX
52
TIP122
Vcc
Gnd
RX
TX
Zigbee transceiver
53
LM 7805
VIN
V+
VOUT
1
+
C2
5V
C1
54
The LM7805 is simple to use. We can simply connect the positive lead to
the unregulated DC power supply (anything from 9VDC to 24VDC) to the
Input pin, connect the negative lead to the Common pin and then when you turn
on the power, you get a 5 volt supply from the Output pin.
Circuit features:
Brief description of operation: Gives out well regulated +5V output,
output current capability of 100mA.
Circuit protection: Built-in overheating protection shuts down output
when regulator IC gets too hot.
Circuit complexity: Very simple and easy to build.
Circuit performance: Very stable +5V output voltage, reliable operation
Availability of components: Easy to get, uses only very common basic
components.
55
56
Transistor polarity
NPN
5A
Power dissipation
2w
DC collector current
5v
1000
No of pins
25C
Hfe min
1000
Table 3.2: Features of TIP 122 transistor
Features
Very Small in size and weight compared to Ni-Cd, Ni-MH and Lead
Acid Batteries
Long life with full capacity for upto 1000 charge cycles
Can be used in inline application where battery is for backup, use while
you are charging
Cc
59
60
Caution
When you enable the on-chip 16 MHz oscillator, make sure CLKO_SEL is not
set to output CLK16M. Experiments have shown that this setting can load down
the on-chip oscillator during crystal start up. After the 16 MHz oscillator starts
to oscillate, however, it is all right to output CLK16M. If you are not using the
CLKO signal, it is advisable to disable the CLKO pin by setting CLKO_SEL to
110 or 111.
C2
C1
EXTAL
61
Applications Information
Crystal Selection
The DS1080L requires a parallel resonating crystal operating in the
fundamental mode, with an ESR of less than 90. The crystal should be placed
very close to the device to minimize excessive loading due to parasitic
capacitances.
Oscillator Input
When driving the DS1080L using an external oscillator clock, consider the
input (X1) to be high impedance.
Crystal Capacitor Selection
The load capacitors CL1 and CL2 are selected based on the crystal
specifications (from the data sheet of the crystal used). The crystal parallel load
capacitance is calculated as follows:
CL=[(CL1*CL2)/ (CL1+CL2)]CIN
For the DS1080L use CL1 = CL2 = CLX. In this case, the equation then
reduces to:
CL= (CLX/2) +CIN
Where CL1 = CL2 = CLX.
Equation 2 is used to calculate the values of CL1 and CL2 based on values on
CL and CIN noted in the data sheet electrical specifications.
Power-Supply Decoupling
To achieve best results, it is highly recommended that a decoupling capacitor is
used on the IC power-supply pins. Typical values of decoupling capacitors are
0.001F and 0.1F. Use a high-quality, ceramic, surface- mount capacitor, and
62
mount it as close as possible to the VCC and GND pins of the IC to minimize
lead inductance.
Layout Considerations
As noted earlier, the crystal should be placed very close to the device to
minimize excessive loading due to parasitic capacitances. Care should also be
taken to minimize loading on pins that could be floated as a programming
option (SMSEL and CMSEL). Coupling on inputs due to clocks should be
minimized.
63
memory locations source code, program memory and absolute listing windows
allowing you to view the source code and its assembly-level equivalent
separately and together.
3.8.2 CCS C COMPILER
The compiler contains Standard C operators and built in libraries that are
specific to the PIC registers. Access to hardware features from C. The compiler
includes built-in functions to access the PIC microcontroller hardware such as
READ_ADC to read a value from the A/D converter. Discrete I/O is handled by
describing the port characteristics in a PRAGMA. Functions such as INPUT
and OUTPUT_HIGH will properly maintain the tri-state registers. Variables
including structures may be directly mapped to memory such as I/O ports to
best represent the hardware structure in C. The microcontroller clock speed may
be specified in a PRAGMA to permit built in functions to delay for a given
number of microseconds or milliseconds. Serial I/O functions allow standard
functions such as GETC and PRINTF to be used for RS-232 like I/O. The
compiler runs under Windows 95, 98, ME, NT4, 2000, XP, Vista or Linux. It
outputs hex and debug files that are selectable and compatible with popular
emulators and programmers including the MPLAB IDE for source level
debugging. During the linking process the program structure, including the call
tree, is analyzed. Functions that call one another frequently are grouped
together in the same page segment. Functions may be implemented inline or
separate. RAM is allocated efficiently by using the call tree to determine how
locations can be re-used. Constant strings and tables are saved in the device
ROM.
67
CHAPTER 4
RESULTS AND DISCUSSION
4.1 TEST RESULTS
1) Testing values of vibration sensors
69
70
4.3 CONCLUSION
Collision avoidance systems are especially useful in bad weather
conditions. In this paper, a design for automatically averting train collisions and
accidents at level crossing gate have been designed, simulated and tested.
It uses the advanced features of pic micro controller with vibration sensor
and zigbee communication technique, proves to be effective in achieving
the objects
It is applicable at every aspect of the railways for uninterruptible service
Saving human life, protection against accidents and the communicable
electronic systems are the salient features and the added advantage of this
project.
From the above discussion and information of this system we, up to now
surely comes to know that it is highly reliable effective and economical at dense
traffic area, sub urban area and the route where frequency of trains is more. As
it saves some auxiliary structure as well as the expenditure on attendant it is
more economical at above mentioned places than traditional railway crossing
gate system. We know that though it is very beneficial but it is also impossible
to install such system at each and every place, but it gives certainly a
considerable benefit to us, thereby to our nation.
71
4.4 APPENDICES
PCB LAYOUT
1) BASE STATION
72
2) TRAIN SIDE
73
COMPONENT LAYOUT
1) BASE STATION SIDE
74
2) TRAIN SIDE
75
4.5 REFERENCES
76