Vous êtes sur la page 1sur 64

1.

INTRODUCTION

In recent years , with the high speed of trains it’s more difficult
for the railway departments to control the train. So a system for the safety of
train become more essential as hijacking and terrorist attack on the train
became a common issue that needed a final solution. It created a strong
pressure in every part of the world where railway is an important and cheaper
mode of transport. A wireless protocol with automatic control is developed
using our system. This system automatically stops the train when the train is
violating the signal rule indicated in the signal post. Thus hijacking or
unnecessary accidents can be avoided by the system. PIC microcontroller is
the brain of the system. It supports all the functioning of the system. It is quite
common that train met with accidents due to obstacles placed in the track. With
the help of ultrasonic sensors, obstacles are sensed over a large distance, then
train will take a separate track to avoid train to train collisions. Temperature
sensors are used to sense the temperature inside the engine cabin where heat is
generated at a large rate. Once the temperature rate exceeds the certain limit
,automatically the fan is switched ON. IR sensors are used for transmitting the
signal to control the speed of the train. Once train is stopped through Remote
Infrastucture Management (RIM),information is passed to control room, and
other stations. This proposed system is based on Automatic Train
Protection(ATP) protocol. Train Protection System is installed in some trains
inorder to help prevent collisions through a driver’s failure to observe a signal
or speed restriction. It mainly concerns with target speed indication and audible
warnings. This system takes in to account the speed and position of the train.

1
This system was introduced in Britain due to clapham junction rail crash and
fatal accidents caused by SPADs.

2. LITERATURE SURVEY

2.1 Bo Yan, Wan Yu (2009) ‘Application of RFID technology in railway


track inspection’, university of technology, China, IEEE.

This method is used for railway track inspection and to monitor


inspections scientifically and accurately. Information button is mounted in
milestones or electric poles, portable data acquisition instruments and a
terminal system used to manage data. It consists of a reader that sends out the
carrier signal through transmitting antenna. The electric tag obtains energy
from the electromagnetic field after it gets into the working range of
transmitter antenna and sent information to pc.

2.2 K.Liu, W.H.Siew, R.W.Stewart, Y.Wang ‘Smart wireless railway


monitoring system ʼ, University of strathclyde,UK.

This is a method to monitor railway signaling or control or


infrastructure condition. It consists of remote controller and many monitor
units. Remote controller is a computer associated with a transceiver. The
remote controller communicates with the nearest monitor unit and it is
through this communication that an operator able
to get data from all monitor units. Monitor units are used to collect all kinds
of information on track condition and signaling. There are two kinds of

2
monitor units: one is static and each is disturbed along the railway to
determine locations .the other is dynamic and the unit is installed on the train
locomotive. It changes their locations continuously.

2.3 Li Zhu, F.Richard Yu and Bing Ning (2010) ‘Availability


Improvement for WLAN based train communication systems in
communication based train control’, Carleton University, Canada, IEEE

It is an automated train control system for railways that ensures


safe operation of rail vehicle using data communication. Continuous
bidirectional wireless communication between each station adapter and
wayside adapter. The railway line is divided into an area which is under the
control of zone controller. Communication always takes place between ZC
and SA.The ZC transmits to each train the location of the train in front of it.
Two trains can travel together as close as a few meters in between them, as
long as they are traveling at the same speed and have the same braking
capability.

2.4 Juliette Marais, Bruno Meunier, Dr.Marion Berbineau ‘Evaluation of


GPS availability for train positioning along a railway lineʼ, IEEE,
INRETS-LEOST, France.

Satellite system is used in most of the localization systems. This present


tool based on image processing and software which predicts satellite paths. It
determines whether satellites can be received or not with regard to the nearby
environment. Satellite prediction path is found by satellite tool kit. It simulate

3
satellite path, video recording of the antenna environment and reconstruction
of the masking obstacles by simple image analysis using two cameras.

2.5 ‘IEEE recommended practice for communication based train control


system design and functional allocationsʼ, IEEE vehicular society (2009).

This method establishes the system design and functional


allocations for a communication based TC system. It is used for automatic
train control in the event of data/equipment communication failure. The
CBTC wayside equipment consist of a network of processor based wayside
controller installed at central or wayside location. Through communication
equipment, it is connected to the CBTC ATS equipment through data
communication equipment.

3. AUTOMATIC TRAIN PROTECTION


PROTOCOL

Automatic Train Protection (ATP) in Great Britain refers to either of two


implementations of a train protection system installed in some trains in order to
help prevent collisions through a driver's failure to observe a signal or speed
restriction.

3.1 Overview

This system uses a target speed indication and audible warnings to warn the train
driver if they are likely to exceed a speed profile that will cause the train to pass
a red (danger) signal or exceed a speed restriction. The system will apply the
brakes if the driver fails to respond to these warnings. The system takes into

4
account the speed and position of the train relative to the end of its 'movement
authority' in issuing the warnings and applying the brakes.

By the 1980s, microprocessors had developed sufficiently for British Rail to carry
out pilot trials on existing European 'off the shelf' ATP – fitting part of the Great
Western Main Line with the TBL1 system from ACEC and the Chiltern Main
Line route with SELCAB a derivative of the German LZB system from Alcatel
and GEC.

In the early 1990s, following the Clapham Junction rail crash in December 1988,
and two other fatal accidents in early 1989 caused by SPADs, British Rail was
keen to implement the ATP system across the entire British railway system.
However, the cost (estimated at over £1bn) was balked at by the Conservative
government, whose priority was the privatization of the railways.

All of First Great Western's High Speed Trains (HSTs) are now fitted with ATP
and are not allowed to carry passengers unless the system is functioning. This
requirement is in response to the Ladbroke Grove rail crash. All Chiltern
Railways Class 165 and Class 168 trains are also fitted with ATP. Also, all of
Heathrow Express Class 332 trains and Heathrow Connect's Class 360/2 trains
are fitted with this system.

ATP is given permitted speed and location information from the track via
encoded balise(s), encoded track circuit or more recently via radio.

In TfL's plans to modernise the London Underground network, all lines would be
equipped with ATP, replacing the current train stop system, a mechanical system
which currently prevents SPADs and collisions. The Central Line is already
equipped with ATP, installed with the modernisation of the line in 1996.

5
3.2Continuous and intermittent ATP

ATP systems may be broadly grouped as continuous and intermittent. With


continuous ATP, a cable is laid between the rails for the full length of the block
section. The rails themselves may also be used as the cable whereby the track
talks to the train. With intermittent ATP, beacons called balises are mounted
between the rails on the approach to signals, and perhaps a few other locations.

ERTMS is an attempt to set a standard for Mainline ATP across Europe where
balises, GSM-R Radio and on train equipment made by any manufacturer (who
are part of the working group) work together with each other. This is achieved by
carefully agreeing the functional specification of the system and the format and
transmission methods of data across the air gap, both transponder and radio
(GSM-R is the most common system in use).

3.3 Accidents and ATP


Accidents preventable by ATP

 Hines Hill train collision - 1996 - driver misjudges end of crossing loop
during simultaneous cross with opposing train. Two killed.
 Watford rail crash - 1996 - Signal passed at danger resulting in collision
with coaching stock. One killed.
 Southall rail crash - 1997 - Signal passed at danger, resulting in a
collision between a passenger train and a freight train crossing the track in
front of it.
 Ladbroke Grove rail crash - 1999 - inexperienced driver misread
complicated signals, passes red signal and causes head-on collision.

6
 Glenbrook train disaster - 1999 - too fast after Stop and Proceed.
 Waterfall train disaster - 2003 - too fast around very sharp curve.
 Seven Hills, Black town and Concord West - drivers take turnout at too
high a speed, causing minor injuries to passengers.
 17 September 2005 Too fast through turnouts between Joliet and
Chicago.
 Amagasaki rail crash - 2005 – Over speed through sharp curve. 107
killed, 555 injured.
 Chatsworth train collision - 2008 - driver of commuter train passes red
signal and collides head-on with freight train - 25 killed

Accidents not preventable by ATP

 Clapham Junction rail crash - 1988 - wrong-side failure - both signal


and balise would have shown false green lights. 35 killed, 100 plus injured.
 Cowan rail crash - 1990 - wrong-side failure - caused by sand on the
rails.
 Clementi train collision - 1993 - oil spillage on track, may have
interfered with normal ATP operation on the 12 trains that arrived at
Clementi MRT Station in the early morning since the oil have came into
contact with the ATP power system fixed into the rails. The ATP system
in question is continuous ATP, which is still used on the North South MRT
Line and the East West MRT Line. 156 injuries, no deaths.
 Bruehl train disaster - 2000 - too fast through turnout during single-line
working and degraded operations.
 Accidents reducible by ATP

 In the Gare de Lyon train accident in Paris in 1988, a brake failure was
the prime cause of the accident. However a more modern ATP system, if
fitted, might have reduced the intensity of the collision in two ways:

7
o Firstly, the on board ATP equipment may have detected the
excessive speed of the train sooner than the driver did.
o Secondly, the ATP system presumably would have applied a
secondary backup brake system, even though this might have
"risked" flat wheels. Apparently, the driver failed to apply or forgot
the existence of this secondary brake.

3.4 TRAIN PROTECTION SYSTEM

3.4.1Train stops

The earliest systems were train stops, as still used by the New York Subway, the
Toronto Subway, the London Underground, the Moscow Subway (oldest lines
only) and the Berlin S-Bahn. Beside every signal is a moveable clamp, which
touches a valve on a passing train if the signal is red and opens the brake line,
applying the emergency brake. If the signal shows green, the clamp is turned
away.

Fig (3.1) Trackside magnets

Trackside magnets for very simple data communication. Outside and middle of
track: Integra-Signum, other two (yellow) magnets: ZUB

8
3.4.2Inductive systems

In this system data is transmitted magnetically between the track and locomotive
by magnets mounted beside the rails and on the locomotive.

In the Integra-Signum system the trains are influenced only at given locations,
for instance whenever a train ignores a red signal, the emergency brakes are
applied and the locomotive's motors are shut down. Additionally, they often
require the driver to confirm distant signals (e.g. CAWS) that show stop or
caution – failure to do so results in the train stopping. This gives sufficient braking
distance for trains following each other; however it cannot always prevent
accidents in stations where trains cross paths, because the distance from the red
signal to the next obstacle may be too short for the train to brake to a halt.

More advanced systems (e.g. PZB, and ZUB) calculate a braking curve that
determines if the train can stop before the next red signal, and if not they brake
the train. They require that the train driver enter the weight and the type of brakes
into the onboard computer. One disadvantage of this kind of system is that the
train cannot speed up before the signal if the signal has switched to green, because
the onboard computer's information can only be updated at the next magnet. To
overcome that problem, some systems allow additional magnets to be placed
between distant and home signals, or data transfer from the signalling system to
the onboard computer is continuous (e.g. LZB).

3.4.3Cab signalling

The newest systems use cab signalling, where the trains constantly receive
information regarding their relative positions to other trains. The computer shows
the driver how fast he may drive, instead of him relying on exterior signals.
Systems of this kind are in common use in France, Germany and Japan, where
the high speeds of the trains made it impossible for the train driver to read exterior

9
signals, and distances between distant and home signals are too short for the train
to brake.

These systems are usually far more than automatic train protection systems, not
only do they prevent accidents, but also actively support the train driver. This
goes as far as some systems being nearly able to drive the train automatically.

Siemens has reached a major milestone in the trial of European Train Control
System (ETCS) Automatic Train Protection (ATP) technology, part of a wider
trial being undertaken by RailCorp in the Blue Mountains.

Automatic Train Protection (ATP) technology overrides a train’s controls to


apply the brakes in the event a train is about to pass a danger point or exceed
speed limits. Under the trial RailCorp awarded contracts worth $13 million to
Siemens and two other ETCS manufacturer consortiums in May 2007 to conduct
trials of their ATP systems to prove that each supplier’s train system is
interoperable with each other’s trackside system.Siemens was scheduled as the
first supplier to conduct the trial, reaching a major milestone, with the installation
of ETCS technology in a train and also on track site. This enabled the first ETCS
equipped train to travel over ETCS track site in Australia. As a system supplier
with more than 200 train control system customers in 45 countries, Siemens has
been heavily involved in the technical standardisation of ETCS from the very
beginning. Train guard is the Siemens solution for the standardised ETCS
automatic train control system and, as such, has a reputation for unique planning
and implementation competence as related to ETCS in the international rail
market.

Martin Green, Siemens ATP Project Manager, said: “An ATP system offers
many innovative benefits. By use of an ATP system an onboard computer will

10
analyse the speed and braking pattern of a train and intervene if it anticipates a
train is in danger. For example, if a driver fails to slow down sufficiently when
approaching a red signal, a lower speed limit zone or a worksite, the train’s brakes
will automatically be applied. ETCS further enhances the benefits of ATP by
providing standardisation that ensures all suppliers of ETCS track and train
systems are interoperable with each other”. Siemens has worked with Railcorp to
trial this new technology over a section of rail infrastructure in the Blue
Mountains, New South Wales. The remaining trial runs are now taking place on
three separate sections of the Blue Mountains Line between Penrith and Mt
Victoria.

Paul Bennett, Executive General Manager, Siemens Transportation Systems,


said: “The Siemens team is excited to be involved in the trial of this technology,
which will ultimately lead to improvements in passenger and staff safety”.“Our
continuing customer focus allows us to develop even more comprehensive
mobility solutions covering the entire range of transportation and logistic
solutions. The supply and involvement of this pilot testing of an ETCS ATP
system is a strong and innovative leap forward to achieving a complete mobility
vision in Australia,” said Mr Bennett. The Transportation Systems Group of
Siemens Limited in Australia is a dedicated supplier and partner to the railways
industry in Australia & NZ. Siemens Transportation Systems’ business areas
comprise Automation & Power, Rolling Stock, Turnkey Systems and Integrated
Services, all the expertise neces¬sary to cover the spectrum from signalling and
control systems to traction power supplies as well as rolling stock, locomotives,
maintenance and next generation rail communications systems. With access to
the world's best rail expertise and proven global and local experiences, Siemens
Transportation Systems is committed to reinvigorating Australia's rail systems
through delivery of modern, safe and sustainable solutions for the future.
11
Until a year ago, my professional railroading career as Class I management and
an independent consultant had been almost totally dedicated to the freight
industry of North America. There have been some interesting consulting
engagements outside of that sphere, including a most peculiar investigation (I
never knew who the true client was) into the traffic control and communication
systems for railroads in the Middle East and Southeast Asia 25 years ago. Having
been nurtured for 36 years in the U.S. railroads, I had come to understand that
operating a railroad safely requires disciplined allegiance to 1) safety systems, 2)
maintenance practices, and 3) personal accountability. And, slack in any one of
these three areas could readily result in the safety of a railroad’s operations being
severely compromised. Hence, it was with the greatest dismay that I soon realized
upon starting the study for the troubled railroad (hereon referred to as TRR), that
it was suffering in all three areas as well as a fourth issue – the theft of critical
wayside infrastructure. Given these significant problems, there have been a
number of deadly train accidents across TRR, and there will continue to be unless
all four areas are addressed properly. Thus, the focus of the TRR study was clearly
directed to be that of safety first, and then efficiency.

The slap-across-the-face revelation for me was that TRR is NOT unique.


Its dangerous railroading practices and problems are common in many parts of
the world. Given the importance of railroads to emerging economies as providers
of labour mobility and accelerators of industrialization – these safety and
operating issues have far-reaching impacts. These are solutions that are not being
provided by traditional suppliers that focus on the high speed passenger and/or
high density freight networks across the globe. The solutions have to be non-
standard / non-traditional since traditional suppliers produce and price for high
speed/high density lines and these solutions can in fact result in a financial
disaster for small and emerging railroads while increasing the likelihood of
additional risk in their operations.

12
3.5 SAFETY SYSTEMS

Fig (3.2) Railway system

There are two primary levels of safety systems to consider in the movement of
trains, i.e., traffic control and enforcement. TRR’s traffic control is a mixture of
traditional signalling (i.e., a railroad’s traffic lights) and an antiquated token block
operation. While the condition of the signalled operation across TRR is
understood to be below par, it is TRR’s token block operation that requires the
greatest attention.

Token block originates back in the middle of the 19th Century in Britain, and its
deployment across the globe was in step with the expansion of the British Empire.
Simply explained, token block’s safety, as used across TRR, is based upon an
operator for each section of track (block) handing a token, e.g., metal rod, to the
train crew as an authority to proceed into the block. Upon exiting the block, the
train crew hands back the token to the next operator and at some point receives a
new token unique to the next block. In concept, token block is a safe system. But,
in practice the manual processes involving the block operator and the crew can
be, and have been, violated resulting in fatal accidents. For this and perhaps other
reasons, various types of Radio Electronic Token Block (RETB) have replaced
manual token block in Britain and elsewhere, including a relatively short corridor

13
in TRR. But for the majority of TRR’s operation that is still manual token block,
the integrity of that operation is subject to being compromised by human error.
Fortunately, as to be addressed in a forthcoming posting, there are non-signalling
traffic control systems that can replace token block. These are solutions that don’t
require the extensive capital investment of traditional CTC operations or the
overwhelming capital investment of ETCS as used for Europe’s high speed rail
networks.

Traffic control safety is not the only issue associated with safe train movements.
There is also the issue of train crew errors regardless of whether the operation is
in signalled territory or token block, and it is the purpose of enforcement systems
to prevent such errors. In TRR’s case, an antiquated enforcement approach,
Automatic Train Protection (ATP), is deployed across much of the railroad.
However, based upon my visits to date, it appears that the maintenance and theft
of ATP components embedded in the track as well as the train drivers turning off
the on-board controller so as to not be enforced for over-speeding, has rendered
the system highly ineffective. To be addressed in a latter posting, ATP is quite
similar in functionality to another enforcement system referred to as Positive
Train Control (PTC) that is now mandated for implementation before 2016 across
most of the track age in the U.S. PTC doesn’t have the theft, maintenance, and
driver abandonment problems of TRR’s ATP system.

Positive train control (PTC) is a system of monitoring and controlling train


movements to provide increased safety. The main concept in PTC (as defined for
North American Class I freight railroads) is that the train receives information
about its location and where it is allowed to safely travel, also known as
movement authorities. Equipment on board the train then enforces this,
preventing unsafe movement. PTC systems will work in either dark territory or
signalled territory and often use GPS navigation to track train movements. The
Federal Railroad Administration has listed among its goals, "To deploy the
14
Nationwide Differential Global Positioning System (NDGPS) as a nationwide,
uniform, and continuous positioning system, suitable for train control."

The American Railway Engineering and Maintenance-of-Way Association


(AREMA) organization describes what it means by Positive Train Control by
these primary characteristics:

 Train separation or collision avoidance


 Line speed enforcement
 Temporary speed restrictions
 Rail worker wayside safety

Various other benefits are sometimes associated with PTC such as increased fuel
efficiency or locomotive diagnostics; however these are benefits that can be
achieved by having a wireless data system to transmit the information, whether it
be for PTC or other applications.

In the 1990s, Union Pacific had a partnership project with General Electric to
implement a similar system known as Precision Train Control. This system
would have involved moving block operation, which adjusts a 'safe zone' around
a train based on its speed and location.

4. BLOCK DIAGRAM

15
Fig (4.1) Block diagram of designed System

4.1 Block diagram explanation:


The signal is transmitted from RF transmitter at signal post to
Receiver block at train.

4.1.1 Transmitter:

16
When the signal post is indicating red signal, the driver need to stop the
train, if he is not responding, the IR sensors will detect the passage of train. At
the signal post, we are using HT12E encoder to encode the signal that is to be
transmitted to the receiver located on the train.The 212 encoders are a series of
CMOS LSIs for remote control system applications. They are capable of
encoding information which consists of N address bits and 12_N data bits. Each
address/data input can be set to one of the two logic states. The programmed
addresses/data are transmitted together with the header bits via an RF or an
infrared transmission medium upon receipt of a trigger signal. The capability to
select a TE trigger on the HT12E or a DATA trigger on the HT12A further
enhances the application flexibility of the 212 series of encoders. The HT12A
additionally provides a 38 kHz carrier for infrared systems.

Features
 Operating voltage
 2.4V~5V for the HT12A
 2.4V~12V for the HT12E
 Low power and high noise immunity CMOS
Technology
 Low standby current: 0.1_A (typ.) at
 VDD=5V
 HT12A with a 38kHz carrier for infrared transmission medium
 Minimum transmission word
 Four words for the HT12E
 One word for the HT12A
 Built-in oscillator needs only 5% resistor
 Data code has positive polarity
 Minimal external components

17
 HT12A/E: 18-pin DIP/20-pin SOP package

Applications
 Burglar alarm system
 Smoke and fire alarm system
 Garage door controllers
 Car door controllers
 Car alarm system
 Security system
 Cordless telephones
 Other remote control systems

Absolute Maximum Ratings


Supply Voltage (HT12A) .............._0.3V to 5.5V
Supply Voltage (HT12E) ..............._0.3V to 13V
Input Voltage....................VSS_0.3 to VDD+0.3V
Storage Temperature................._50_C to 125_C
Operating Temperature..............._20_C to 75_C

4.1.2 IR SENSORS

An infrared sensor is an electronic device that emits and/or detects infrared


radiation in order to sense some aspect of its surroundings. Infrared sensors can
measure the heat of an object, as well as detect motion. Many of these types of
sensors only measure infrared radiation, rather than emitting it, and thus are
known as passive infrared (PIR) sensors.

18
All objects emit some form of thermal radiation, usually in the infrared
spectrum. This radiation is invisible to our eyes, but can be detected by an infrared
sensor that accepts and interprets it. In a typical infrared sensor like a motion
detector, radiation enters the front and reaches the sensor itself at the center of the
device. This part may be composed of more than one individual sensor, each of
them being made from pyroelectric materials, whether natural or artificial. These
are materials that generate an electrical voltage when heated or cooled. An
infrared sensor can be thought of as a camera that briefly remembers how an
area's infrared radiation appears. A sudden change in one area of the field of view,
especially one that moves, will change the way electricity goes from the
pyroelectric materials through the rest of the circuit. This will trigger the motion
detector to activate an alarm. If the whole field of view changes temperature, this
will not trigger the device. This makes it so that sudden flashes of light and natural
changes in temperature do not activate the sensor and cause false alarm

Working of IR sensor
The basic idea is to send infra red light through IR-LEDs, which is
then reflected by any object in front of the sensor. Then all you have to do is to
pick-up the reflected IR light. For detecting the reflected IR light, we are going
to use a very original technique: we are going to use another IR-LED, to detect
the IR light that was emitted from another led off the exact same type! This is
an electrical property of Light Emitting Diodes (LEDs) which is the fact that a
led produces a voltage difference across its leads when it is subjected to light.
As if it was a photo-cell, but with much lower output current. In other words,
the voltage generated by the leds can't be - in any way - used to generate
electrical power from light, it can barely be detected. That’s why Op-amps are

19
mostly used for accurately detection flow voltages.

Fig (4.2) how the receiver of the sensor measures the distance of the intruding
Object

Infra red sensors are in the form of diodes with 2 terminals

20
Fig (4.3)Diagram of IR sensors

Upon careful observation, you will notice that amongst the two ‘legs’, one has
a much wider base within the diode. That is normally the cathode (negative)
whereas the leg having a smaller base would be the anode (positive terminal).

Operation:
When the Tx is forward biased, it begins emitting infra red. Since it’s not in
visible spectrum, you will not be able to see it through naked eyes but you will
be able to view it through an ordinary cell phone camera.

21
Fig (4.4) A typical transmitter circuit.

The resistance R1 in the above circuit can vary. It should not be a very high
value (~ 1Kohm) as then the current flowing through the diode would be very
less and hence the intensity of emitted IR would be lesser. By increasing the
current flowing in the circuit, you can increase the effective distance of your IR
sensor. However, there are drawbacks of reducing the resistance. Firstly, it would
increase the current consumption of your circuit and hence drain the battery (one
of the few ‘precious’ resources for any embedded system) faster.
Secondly, increasing the current might destroy the Tx. So, the final choice should
be a calculated trade off between these various factors. You can also modulate
the IR to achieve better distance and immunity. The receiver diode has a very
high resistance, typically of the order of mega Ohms when IR is not incident upon
it. However, when IR is incident upon it, the resistance decreases sharply to the
order of a few kilo Ohms or even lesser. This feature forms the basis of using IR
as a sensor. You will need to connect a resistance of the order of a few mega Ohm
in series with the Rx. Then tap the output voltage at the point of connectivity of
these two resistors. A complete

22
Fig (4.5) A Tx-Rx pair circuitry.

Case1: when no IR is incident upon the Rx

Rx would be of the order of mega ohms and hence the output voltage would be
around 2.6v – 3v depending upon your choice of R2 and the Rx.

Case2: when IR is incident upon the Rx

The resistance of Rx will sharply fall and hence the output voltage would be
around 1.8v - 1.5v depending upon your choice of Rx and R2

4.1.3Receiver:

The 212 decoders are a series of CMOS LSIs for remote control system
applications. They are paired with Holtek_s 212 series of encoders (refer to the
encoder/decoder cross reference table). For proper operation, a pair of
encoder/decoder with the same number of addresses and data format should be
chosen. The decoders receive serial addresses and data from a programmed 212
series of encoders that are transmitted by a carrier using an RF or an IR
transmission medium. They compare the serial input data three times
continuously with their local addresses. If no error or
23
Unmatched codes are found; the input data codes are decoded and then
transferred to the output pins. The VT pin also goes high to indicate a valid
transmission. The 212 series of decoders are capable of decoding information’s
that consist of N bits of address and 12_N bits of data. Of this series, the HT12D
is arranged to provide 8 address bits and 4 data bits, and HT12F is used to decode
12 bits of address information.

Features
 Operating voltage: 2.4V~12V
 Low power and high noise immunity CMOS
Technology
 Low standby current
 Capable of decoding 12 bits of information
 Binary address setting
 Received codes are checked 3 times
 Address/Data number combination
 HT12D: 8 address bits and 4 data bits
 HT12F: 12 address bits only
 Built-in oscillator needs only 5% resistor
 Valid transmission indicator
 Easy interface with an RF or an infrared transmission
Medium
 Minimal external components
 Pair with Holtek_s 212 series of encoders
 18-pin DIP, 20-pin SOP package

24
Applications
 Burglar alarm system
 Smoke and fire alarm system
 Garage door controllers
 Car door controllers
 Car alarm system
 Security system
 Cordless telephones
 Other remote control systems
Thus the train will be stopped on violation of the signal on connecting it to PIC

4.1.4 PIC microcontroller:

PIC is a family of Harvard architecture microcontrollers made by


Microchip Technology, derived from the PIC1640 originally developed by
General Instrument's Microelectronics Division. The name PIC initially referred
to "Peripheral Interface Controller".PICs are popular with both industrial
developers and hobbyists alike due to their low cost, wide availability, large user
base, extensive collection of application notes, availability of low cost or free
development tools, and serial programming (and re-programming with flash
memory) capability.

25
Fig (4.6) Schematic diagram of the PIC micro controllers

4.1.4.1 Core architecture:

The PIC architecture is characterized by its multiple attributes:

Separate code and data spaces (Harvard architecture) for devices other than
PIC32, which has a Von Neumann architecture.A small number of fixed length
instruction. Most instructions are single cycle execution (2 clock cycles), with
one delay cycle on branches and skips. One accumulator (W0), the use of which
(as source operand) is implied (i.e. is not encoded in the opcode).All RAM
locations function as registers as both source and/or destination of math and other
functions. A hardware stack for storing return addresses. A fairly small amount
of addressable data space (typically 256 bytes), extended through banking. Data
space mapped CPU, port, and peripheral registers The program counter is also
mapped into the data space and writable (this is used to implement indirect
jumps).There is no distinction between memory space and register space because
the RAM serves the job of both memory and registers, and the RAM is usually
just referred to as the register file or simply as the registers.

26
4.1.4.2 Data space (RAM):

PICs have a set of registers that function as general purpose RAM.


Special purpose control registers for on-chip hardware resources are also mapped
into the data space. The addressability of memory varies depending on device
series, and all PIC devices have some banking mechanism to extend addressing to
additional memory. Later series of devices feature move instructions which can
cover the whole addressable space, independent of the selected bank.

In earlier devices, any register move had to be achieved via the accumulator. To
implement indirect addressing, a "file select register" (FSR) and "indirect
register" (INDF) are used. A register number is written to the FSR, after which
reads from or writes to INDF will actually be to or from the register pointed to by
FSR. Later devices extended this concept with post- and pre-
increment/decrement for greater efficiency in accessing sequentially stored data.
This also allows FSR to be treated almost like a stack pointer (SP).

External data memory is not directly addressable except in some high pin count
PIC18 devices.

4.1.4.3 Code space:

The code space is generally implemented as ROM, EPROM or flash


ROM. In general, external code memory is not directly addressable due to the
lack of an external memory interface. The exceptions are PIC17 and select high
pin count PIC18 devices.

4.1.4.4 Word size

All PICs handle (and address) data in 8-bit chunks. However, the unit
of addressability of the code space is not generally the same as the data space.

27
For example, PICs in the baseline and mid-range families have program memory
addressable in the same word size as the instruction width, i.e. 12 or 14 bits
respectively. In contrast, in the PIC18 series, the program memory is addressed
in 8-bit increments (bytes), which differ from the instruction width of 16 bits.

In order to be clear, the program memory capacity is usually stated in number


of (single word) instructions, rather than in bytes.

4.1.4.5 Stacks:
PICs have a hardware call stack, which is used to save return addresses. The
hardware stack is not software accessible on earlier devices, but this changed with
the 18 series devices.

Hardware support for a general purpose parameter stack was lacking in early
series, but this greatly improved in the 18 series, making the 18 series architecture
more friendly to high level language compilers.

4.1.4.6Instruction set:
A PIC's instructions vary from about 35 instructions for the low-end PICs to
over 80 instructions for the high-end PICs. The instruction set includes
instructions to perform a variety of operations on registers directly, the
accumulator and a literal constant or the accumulator and a register, as well as for
conditional execution, and program branching.

Some operations, such as bit setting and testing, can be performed on any
numbered register, but bi-operand arithmetic operations always involve W (the
accumulator), writing the result back to either W or the other operand register.
To load a constant, it is necessary to load it into W before it can be moved into

28
another register. On the older cores, all register moves needed to pass through
W, but this changed on the "high end" cores.

PIC cores have skip instructions which are used for conditional execution
and branching. The skip instructions are 'skip if bit set' and 'skip if bit not set'.
Because cores before PIC18 had only unconditional branch instructions,
conditional jumps are implemented by a conditional skip (with the opposite
condition) followed by an unconditional branch. Skips are also of utility for
conditional execution of any immediate single following instruction. The 18
series implemented shadow registers which save several important registers
during an interrupt, providing hardware support for automatically saving
processor state when servicing interrupts.

In general, PIC instructions fall into 5 classes:

1. Operation on working register (WREG) with 8-bit immediate ("literal")


operand. E.g. movlw (move literal to WREG), andlw (AND literal with
WREG). One instruction peculiar to the PIC is retlw, load immediate
into WREG and return, which is used with computed branches to produce
lookup tables.
2. Operation with WREG and indexed register. The result can be written to
either the Working register (e.g. addwf reg,w). Or the selected register
(e.g. addwf reg,f).
3. Bit operations. These take a register number and a bit number, and perform
one of 4 actions: set or clear a bit, and test and skip on set/clear. The latter
are used to perform conditional branches. The usual ALU status flags are
available in a numbered register so operations such as "branch on carry
clear" are possible.

29
Control transfers. Other than the skip instructions previously mentioned,
there are only two: goto and call.

4. A few miscellaneous zero-operand instructions, such as return from


subroutine, and sleep to enter low-power mode.

4.1.4.7 Performance:

The architectural decisions are directed at the maximization of speed-to-cost


ratio. The PIC architecture was among the first scalar CPU designs] and is still
among the simplest and cheapest. The Harvard architecture—in which
instructions and data come from separate sources—simplify timing and
microcircuit design greatly, and this benefits clock speed, price, and power
consumption.

The PIC instruction set is suited to implementation of fast lookup tables in the
program space. Such lookups take one instruction and two instruction cycles.
Many functions can be modelled in this way. Optimization is facilitated by the
relatively large program space of the PIC (e.g. 4096 x 14-bit words on the
16F690) and by the design of the instruction set, which allows for embedded
constants. For example, a branch instruction's target may be indexed by W, and
execute a "RETLW" which does as it is named - return with literal in
W.Execution time can be accurately estimated by multiplying the number of
instructions by two cycles; this simplifies design of real-time code. Similarly,
interrupt latency is constant at three instruction cycles. External interrupts have
to be synchronized with the four clock instruction cycle; otherwise there can be a
one instruction cycle jitter. Internal interrupts are already synchronized.

The constant interrupt latency allows PICs to achieve interrupt driven low jitter
timing sequences. An example of this is a video sync pulse generator. This is no

30
longer true in the newest PIC models, because they have a synchronous
interrupt latency of three or four cycles.

4.1.4.8 Advantages

The PIC architectures have these advantages:

 Small instruction set to learn


 RISC architecture
 Built in oscillator with selectable speeds
 Easy entry level, in circuit programming plus in circuit debugging PICK it
units available from Microchip.com for less than $50
 Inexpensive microcontrollers
 Wide range of interfaces including I2C, SPI, USB, USART, A/D,
programmable Comparators, PWM, LIN, CAN, PSP, and Ethernet.

4.1.4.9Limitations

The PIC architectures have these limitations:

 One accumulator
 Register-bank switching is required to access the entire RAM of many devices
 Operations and registers are not orthogonal; some instructions can address
RAM and/or immediate constants, while others can only use the accumulator

The following limitations have been addressed in the PIC18 series, but still
apply to earlier cores:

 Stack:

1. The hardware call stack is not addressable, so preemptive task switching


cannot be implemented

31
2. Software-implemented stacks are not efficient, so it is difficult to generate
reentrant code and support local variables

Fig (4.7) Pin diagram of PIC microcontroller.

Blue pins are ports (inputs/outputs) since there is many extra functions in
this microcontroller. Some pins can be used as inputs to an internal AD and some
pins can be connected to an internal counter etc. The two green pins should be
connected to an external clock signal. The yellow ones are power supply. The red
one is the reset input which will reset the circuit.

4.1.5 PIC WITH RS232:

The PIC Microcontrollers are supported with a full range of


Hardware and software development tools. The used PIC16F870 device comes
32
in 28 pin package. To communicate with the PIC we are using RS-232 standard
port of computer. In personal computer, data transfer takes place serially. RS-
232 standard is used for serial communication. PIC Microcontroller is linked to
PC through the RS-232 port. The PC displays the menu for selecting the
calibrating equipment and all the calibration results graphically and in tabular
form. The user can access the calibration reports, comparison graphs etc at any
time using the menu offered in the PC.

4.1.6 MICROCONTROLLER CORE FEATURES:

 High-performance RISC CPU


 Only 35 single word instructions to learn
 All single cycle instructions except for program branches which are two
cycles
Operating speed: DC-20 MHz clock input DC – 200 ns instruction cycle
 4K x 14 words of Program Memory, 256 x 8 bytes of Data Memory
(RAM)
 Interrupt capability (upto 14 Internal / External interrupt sources)
 Eight level deep hardware stack
 Direct, indirect, and relative addressing modes
 Power-on Reset (POR)
 Power-up Timer (PWRT) and Oscillator Start-up Timer (OST)
 Watchdog timer (WDT) with its own on-chip RC oscillator for reliable
operation
 Programmable code-protection
 Power saving SLEEP mode
 Selectable oscillator options
 Low-power, high-speed CMOS EPROM technology
 Fully static design

33
 In-circuit Serial Programming (ISC)
 Wide operating voltage range: 2.5V to 5.5V
 High Sink / Source current 25/25 mA
 Commercial and Industrial temperature ranges
 Low power consumption
 <2 mA at 5V, 4 MHz
 22.5 mA typical at 3V, 32 KHz
 <1 mA typical standby current

4.1.6.1 PERIPHERAL FEATURES:

 Timer 0: 8-bit timer / counter with 8-bit prescaler


 Timer 1: 16 bit timer / counter with prescaler, can be incremented during
sleep via external crystal/clock
 Timer 2: 8 bit timer / counter with 8 bit period register, prescaler and
postscaler
 Two capture, compare, PWM modules
 Capture is 16 bit, max. resolution is 12.5 ns
 Compare is 16 bit, max. resolution is 200 ns,
 PWM max. resolution is 10 bit
 12 bit multi channel Analog-to Digital converter
 On-chip absolute band gap voltage reference generator
 Synchronous Serial Port (SSP) with SPI (Master Mode) and I 2 C
 Universal Synchronous Asynchronous Receiver Transmitter, supports high
/ low speeds and 9 bit address mode (USART/SCI)

34
EPROM mask ROM RAM I/O Speed
Part Number
(words) (words) (bytes) pins (MHz)

PIC16C52 384 25 12 4, 20

PIC16C54
512 25 12 4, 20
PIC16C54A

PIC16CR54 512 25 12 4, 20

PIC16C55 512 24 20 4, 20

PIC16C56 1024 25 12 4, 20

PIC16C57 2048 72 20 4, 20

PIC16CR57A 2048 72 20 4, 20

PIC16C58A 2048 73 12 4, 20

PIC16CR58A 2048 73 12 4, 20

Table (4.1) comparison of low end core (12 bit instructions)


PIC microcontrollers

EPROM RAM I/O Speed 8*8 multiply


Part Number Supply voltage
(words) (bytes) pins (MHz) instruction

PIC17C42 2048 232 33 16, 25 4.5 to 5.5

PIC17C43 4096 454 33 16, 25 2.5 to 6.0 *

35
PIC17C44 8192 454 33 16, 25 2.5 to 6.0 *

Table (4.2) comparison of High-end core (16-bit instructions)


Microcontrollers

Multi PIC Programmer 5 Ver.2 is a PIC programmer, which can program to 8-


pin to" 40-pin devices using single ZIF socket.
There are many kinds of PIC programmers. The programmer does not need an
external power supply, and since there are only few parts, it is very cheap and can
be built easily. This PIC programmer is called "JDM programmer

"Multi PIC programmer 5 Ver.1", in order to enable it to program 40-pin devices


like PIC16F877 with a ZIF socket. The number "5" is because it is the 5th set of
the programmers which I built based on the JDM programmer. Lately I improved
this PIC programmer. The main improvements are having made it suit "VPP
before VDD" and changed wiring of a ZIF socket for accepting devices with LVP
(Low Voltage Programming) mode. Before you build this "PIC programmer", If
TxD, DTR, and RTS do not have more than +7.5V (or -7.5V), this programmer
will not work well, especially, with the latest laptop computers that using low
power RS232 interface ICs.

4.1.7 CCS C Compiler

This integrated C development environment gives developers the capability


to quickly produce very efficient code from an easily maintainable high level
language.

36
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 hardware serial transceiver is used for
applicable parts when possible. For all other cases a software serial
transceiver is generated by the compiler. The standard C operators and the
special built in functions are optimized to produce very efficient code for the
bit and I/O functions.

Functions may be implemented inline or separate, allowing to optimize for


either ROM concerns or speed concerns. Function parameters are passed in
reusable registers. Inline functions with reference parameters are
implemented efficiently with no memory overhead.

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. Calls across pages are handled automatically by the
tool transparent to the user. 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. The
output hex and debug files are select-able and compatible with popular
emulators and programmers including MPLAB IDE for source level

37
debugging. PCW includes a powerful Windows IDE. The compiler requires
Microsoft Windows 95, 98, ME, NT4, 2000 or XP.

CCS C Compiler Features:

 Built in libraries that work with all chips for RS232 serial I/O, I2C, discrete
I/O and precision delays.
 Integrates with MPLAB IDE and other simulators and editors for source
level debugging. Standard HEX file and debug files ensure compatibility with
all programmers.
 Formatted print f allows easy formatting and display in HEX or decimal.
 Efficient function implementation allows call trees deeper than the
hardware stack.

Source code drivers included for LCD modules, keypads, 24xx and 94xx
serial EEPROM's, X10, DS1302 and NJU6355 real time clocks, Dallas touch
memory devices, DS2223 and PCF8570 serial SRAM, LTC1298 and PCF8591
A/D converters, temperature sensors, digital pots, I/O expander and much
more.

 Access to hardware features from easy to use C functions, timers, A/D,


EEPROM, SSP, PSP, USB, I2C and more.
 1, 8, 16 and 32 bit integer types and 32 bit floating point.
 Assembly code may be inserted anywhere in the source and may reference
C variables.
 Automatic linking handles multiple code pages.
 Inline functions supported to save stack space; Linker will automatically
determine the best architecture or it can be manually specified.
 Compiler directives determine if tri-state registers are refreshed on every
I/O or if the I/O is as fast as possible.

38
 Constants (including strings and arrays) are saved in program memory.
 Standard one bit type (Short Int) permits the compiler to generate very
efficient Bit orientated code.
 #BIT and #BYTE will allow C variables to be placed at absolute addresses to
map registers to C variables.
 Reference parameters may be used to improve code readability and inline
function efficiency.

PCW has both an integrated editor/compiler and command line compiler


Special windows show the RAM memory map, C/Assembly listing, and the
calling tree.

 Interrupt functions supported on PCM/PCH. The compiler generates all startup


and clean up code as well as identifying the correct interrupt function to be
called.

4.1.8 Ultrasonic sensors:

These sensors are used to find any obstacles in the track. Ultrasonic
sensors (also known as transceivers when they both send and receive) work on
a principle similar to radar or sonar which evaluate attributes of a target by
interpreting the echoes from radio or sound waves respectively. Ultrasonic
sensors generate high frequency sound waves and evaluate the echo which is
received back by the sensor. Sensors calculate the time interval between sending
the signal and receiving the echo to determine the distance to an object. This
technology can be used for measuring: wind speed and direction (anemometer),
fullness of a tank and speed through air or water. For measuring speed or direction
a device uses multiple detectors and calculates the speed from the relative
distances to particulates in the air or water. To measure the amount of liquid in a
tank, the sensor measures the distance to the surface of the fluid. Further
39
applications include: humidifiers, sonar, medical ultrasonography, burglar alarms
and non-destructive testing. Systems typically use a transducer which generates
sound waves in the ultrasonic range, above 18,000 hertz, by turning electrical
energy into sound, then upon receiving the echo turn the sound waves into
electrical energy which can be measured and displayed.

An obstacle-avoidance algorithm is presented for autonomous mobile


robots equipped with a CCD camera and ultrasonic sensors. This approach uses
segmentation techniques to segregate the floor from other fixtures, and
measurement techniques to measure the distance between the mobile robot and
any obstacles. It uses a simple computation for the selection of a threshold value.
This approach also uses a cost function, which is combined with image
information, distance information, and a weight factor, to find an obstacle-free
path. This algorithm, which uses a CCD camera and ultrasonic sensors, can be
used for cases including shadow regions, and obstacles in visual navigation and
in various lighting conditions.

Fig (4.8) ultrasonic sensor

40
Fig (4.9) Schematic diagram of ultrasonic sensor

Ultrasonic sensors transmit ultrasonic waves from its sensor head and
receives the ultrasonic waves reflected from an object By measuring the
length of time from the transmission to reception of the sonic wave, it
detects the position of the object. Ultrasonic sensor is a sensor that works
on the principle of reflection of sound waves and is used to detect the
presence of a particular object in front of it, it works on the area above the
frequency of sound waves from 40 KHz to 400 KHz.

Ultrasonic Sensor working principle

41
Ultrasonic sensor consists of two units, namely the transmitter unit and
receiver unit. Transmitter and receiver unit structure is simple; a piezoelectric
crystal is connected with mechanical anchors and only connected with the
diaphragm vibrator. Alternating voltage with a frequency of 40 kHz – 400 kHz
are given on the metal plate. The atomic structure of the piezoelectric crystal will
contract (binding), expanded or shrunk to the polarity of applied voltage, and is
called the piezoelectric effect. Contractions that occur forwarded to the diaphragm
resulting in an ultrasonic vibrator emitted into the air (the surroundings), and the
reflection of ultrasonic waves will occur when there is a particular object, and the
reflection of ultrasonic waves to be received back by the receiver sensor units.
Furthermore, the sensor unit will cause the diaphragm vibrator receiver will
vibrate and the piezoelectric effect produces an alternating voltage with the same
frequency. Large amplitude signals generated electric receiver sensor units
depends on the distant object detected nearby and the quality of the sensor
transmitter and receiver sensors. Yuang sensing process performed on this sensor
using the reflection method to calculate the distance between the sensor with the
target object. The distance between the sensors is calculated by multiplying half
the time used by the ultrasonic signal in the way of a series of Tx to Rx is received
by the circuit, with the speed of propagation of ultrasonic signal propagation on
the use of media, namely air. Time in the count when pemencar active and until
there is input from the receiver circuit and when at a certain time limit circuit
receiving no input signal is considered to be no obstacle in front. An ultrasonic
through-beam sensor consists of a transmitter and a receiver that are installed so
they are facing each other. The working principle of ultrasonic through-beam
sensors is based on the transmission of a sound wave from the transmitter to the
receiver being interrupted by the object that is being detected. The transmitter
generates an ultrasonic signal that is evaluated by the receiver. When the

42
ultrasonic beam is damped or interrupted by the object being detected, the
receiver output switches states.

No electrical connections are required between transmitter and receiver and the
functionality of the ultrasonic through-beam sensors is also independent of the
installation location. To prevent dirt particles from accumulating, however, we
recommend placing the transmitter facing up when components are mounted
vertically.Long detection ranges since the ultrasonic beam only travels in one
direction ,Short response times ,Less subject to faults and thus very suitable for
applications in difficult conditions ,Additional installation expense since both
units have to be wired.

4.1.9 Temperature sensor:

The temperature sensing is done by LM335 sensors.

43
Fig (4.10) Schematic diagram of LM335 temperature sensor

FEATURES

• Directly calibrated in °Kelvin


• 1°C initial accuracy available
• Operates from 400 μA to 5 mA
• Less than 1Ω dynamic impedance
• Easily calibrated
• Wide operating temperature range
44
• 200°C over range
• Low cost

Fig (4.11) bottom view of sensor

4.1.10 power supply:

All the electronic components starting from diode to Intel IC’s only
work with a DC supply ranging from +5V to +12V. We are utilizing for the same,
the cheapest and commonly available energy source of 230V-50Hz and stepping
down, rectifying, filtering and regulating the voltage.

STEP DOWN TRANSFORMER:


When AC is applied to the primary winding of the power transformer,
it can either be stepped down or stepped up depending on the value of DC needed.

45
In our circuit the transformer of 230V/15-0-15V is used to perform the step down
operation where a 230V AC appears as 15V AC across the secondary winding.
Apart from stepping down voltages, it gives isolation between the power source
and power supply circuitries.

4.1.11 RECTIFIER UNIT:

In the power supply unit, rectification is normally achieved using a solid


state diode. Diode has the property that will let the electron flow easily in one
direction at proper biasing condition. As AC is applied to the diode, electrons
only flow when the anode and cathode is negative. Reversing the polarity of
voltage will not permit electron flow. A commonly used circuit for supplying
large amounts of DCpower is the bridge rectifier. A bridge rectifier of four diodes
(4 x IN4007) are used to achieve full wave rectification. Two diodes will conduct
during the negative cycle and the other two will conduct during the positive half
cycle, and only one diode conducts. At the same time one of the other two diodes
conducts for the negative voltage that is applied from the bottom winding due to
the forward bias for that diode.

In this circuit due to positive half cycle D1 & D2 will conduct to give 0.8V
pulsating DC. The DC output has a ripple frequency of 100Hz. Since each
alteration produces a resulting output pulse, frequency = 2 x 50 Hz. The output
obtained is not a pure DC and therefore filtration has to be done.
The DC voltage appearing across the output terminals of the bridge rectifier
will be somewhat less than 90% of the applied rms value. Normally one alteration
of the input voltage will reverse the polarities. Opposite ends of the transformer
will therefore always be 180 degree out of phase with each other. For a positive
cycle, two diodes are connected to the positive voltage at the top winding.
4.1.11.1 FILTERING CIRCUIT:

46
Filter circuits which usually capacitor is acting as a surge arrester always
follow the rectifier unit. This capacitor is also called as a decoupling capacitor
or a bypassing capacitor, is used not only to ‘short’ the ripple with frequency of
120Hz to ground but also to leave the frequency of the DC to appear at the output.
A load resistor R1 is connected so that a reference to the ground is maintained.
C1, R1 is for bypassing ripples. C2, R2 is used as a low pass filter, i.e. it passes
only low frequency signals and bypasses high frequency signals.
The load resistor should be 1% to 2.5% of the load.
1000f/25V: for the reduction of ripples from the pulsating

10f/25V : for maintaining the stability of the voltage at the load side.
0.1f : for bypassing the high frequency disturbances

4.1.11.2 VOLTAGE REGULATOR:

The voltage regulators play an important role in any power supply unit. The
primary purpose of a regulator is to aid the rectifier and filter circuit in providing
a constant DC voltage to the device. Power supplies without regulators have an
inherent problem of changing DC voltage values due to variations in the load or
due to fluctuations in the AC linear voltage. With a regulator connected to the
DC output, the voltage can be maintained within a close tolerant region of the
desired output. IC7812 and 7912 is used in this project for providing +12V and
12V DC supply.

SPECIFICATION:
Resistors R1 and R2 maintain line load regulation.
At the secondary side of the transformer, applied voltage = 15V
Conducting drop across the diodes = 2 * 0.6 = 1.2V
47
Without capacitor:
Vavg = (15-1.2)V = 13.8c pulsating DC
Frequency = 100Hz
With capacitor:
V = Vavg * 1.414 (form factor) = 19.51V
Frequency = 0 Hz
With 7812 voltage regulator:
V0 = +12V
with 7912 voltage regulator: V0 = -12V

POWER SUPPLY 5V DC AND 12V DC:


Here we have to drive the 12V DC stepper motor. The 5V signal from
the PIC 16F 870 micro controllers is fed into the input of interface circuit. TIP
120 Darlington transistors is used here for high speed switching purpose and the
Diode IN 4007 is for the safety of TIP 120 transistor during the collapsing of
magnetic field from the stepper motor coil. This interface circuit is shown in fig.

48
5V TO 12V INTERFACE
CIRCUIT

Fig (4.12) 5v to 12v interface circuit

4.1.12 L293D:

The Device is a monolithic integrated high voltage, high current four


channel driver designed to accept standard DTL or TTL logic levels and drive
inductive loads (such as relays solenoids, DC and stepping motors) and switching
power transistors. To simplify use as two bridges each pair of channels is
equipped with an enable input. A separate supply input is provided for the logic,
allowing operation at a lower voltage and internal clamp diodes are included. This
device is suitable for use in switching applications at frequencies up to 5 kHz.

49
The L293D is assembled in a16 lead plastic package which has 4 center pins
connected together rand used for heat sinking. The L293DD is assembled in a 20
lead surface mount which has 8 center pins connected together and used for heat
sinking.

 Meet or Exceed TIA/EIA-232-F and ITU


 Recommendation V.28
 Operate With Single 5-V Power Supply
 Operate Up to 120 kbit/s
 Two Drivers and Two Receivers
 ±30-V Input Levels
 Low Supply Current . . . 8 mA Typical
 Designed to be Interchangeable With
 Maxim MAX232
 ESD Protection Exceeds JESD 22
 2000-V Human-Body Model (A114-A)
 Applications
 TIA/EIA-232-F
 Battery-Powered Systems
 Terminals
 Modems
 Computers
The MAX232 is a dual driver/receiver that includes a capacitive voltage generator
to supply EIA-232 voltage levels from a single 5-V supply. Each receiver
converts EIA-232 inputs to 5-V TTL/CMOS levels. These receivers have a
typical threshold of 1.3 V and a typical hysteresis of 0.5 V, and can accept ±30-
V inputs. Each driver converts TTL/CMOS input levels into EIA-232 levels.

50
4.1.12.1 433 MHz RF Transmitter STT-433
Overview
The STT-433 is ideal for remote control applications where low cost and
longer range is required. The transmitter operates from a 1.5-12V supply, making
it ideal for battery-powered applications. The transmitter employs a SAW-
stabilized oscillator, ensuring accurate frequency control for best range
performance. Output power and harmonic emissions are easy to control, making
FCC and ETSI compliance easy. The manufacturing-friendly SIP style package
and low-cost make the STT-433 suitable for high volume applications.
Features
 433.92 MHz Frequency
 Low Cost
 1.5-12V operation
 11mA current consumption at 3V
 Small size
 4 dBm output power at 3V
Applications
 Remote Keyless Entry (RKE)
 Remote Lighting Controls
 On-Site Paging
 Asset Tracking
 Wireless Alarm and Security Systems
 Long Range RFID
 Automated Resource Management
4.1.13 BRAKE SYSTEM IN TRAIN:
Brakes are used on the cars of railway trains to enable deceleration, control
acceleration (downhill) or to keep them standing when parked. While the basic
principle is familiar from road vehicle usage, operational features are more
complex because of the need to control multiple linked carriages and to be

51
effective on vehicles left without a prime mover. Clasp brakes are one type of
brakes historically used on trains.

Fig (4.13) A traditional clasp brake: the brake shoe (brown) bears on the
surface (tyre) of the wheel (red), and is operated by the levers (grey) on the left

4.1.13.1Dynamic Braking

A train brake system where the traction motors are used to provide a braking force
by reconnecting them in such a way that they become generators. Al Krug,
referring to diesel-electric locomotive braking .Dynamic brakes are
fundamentally no different from locomotive air brakes. Both systems convert the
energy of the rolling train into heat and then throw away that heat. If you apply
the loco air brakes, the brake shoes are pushed against the wheel treads and the
resulting friction produces heat. The energy required to produce this heat power
makes the loco hard to keep moving. The heat power is thrown away into the air

52
by radiating from the hot brake shoes and hot wheel treads into the surrounding
atmosphere.

A loco with air brakes applied is hard to keep moving but it will keep going,
particularly if it has energy to move it in the form of a train pushing it from
behind. The energy (kinetic energy, it's called) comes from the rolling train that
is pushing it. The trouble with using engine brakes alone is that eventually (rather
quickly actually) the shoes and wheels get very hot. Hot enough to destroy
them. This is because heat is produced faster than it can be dissipated by
radiating it into the air. So dynamic brakes are used to move the heat dissipation
away from the brake shoes and wheel treads to the dynamic brake grids
instead. Like an electric bathroom heater, the dynamic brake grids are designed
to handle this amount of heat power (as long as the grid cooling blowers are
operating).

Train air brakes work in the same manner as loco air brakes. They convert the
rolling energy of the train into heat and throw it away. But when using train
brakes, the heat generated is dispersed throughout the entire train. It is spread
over 800 wheels instead of just the few wheels of the loco. Because of this, the
train's wheels do not normally get overheated.

They will get warm or even hot but not normally so hot as to cause
damage. On prolonged downgrades, however, the braking energy required is
sufficient to overwhelm the heat dissipating ability of even all the train's wheels
and overheating occurs. This is the main reason for using dynamic brakes, to
move the heat dissipation away from the wheels to the dynamic brake grids. In
locomotive dynamic brakes, the traction motors are acting as generators. That
means the traction motors are hard to turn. The loco's wheels are what are turning
the traction motors. They are geared to the traction motors. This means the loco's
wheels are hard to turn. They resist turning because they are geared to the traction

53
motors which are hard to turn when generating power, as they are doing when in
dynamic braking. Because the loco's wheels are hard to turn when in dynamic
braking the loco is hard to move or in other words it resists movement just as if
the airbrakes were applied making the wheels hard to turn. The energy required
to push this "hard to move" loco comes from the rolling train. This removes
energy from the rolling train slowing it.

Note that dynamic brakes are used by electric multiple unit trains as well. In these
designs, careful blending with air braking is required to maintain a smooth
braking profile. Electronic control is used to determine that the brake effort
demanded by the brake controller is matched by the brake effort achieved by the
train. Preference is given to the dynamic brake to save wear on brake blocks
(shoes) or pads and air braking is added if necessary to achieve the braking rate
required. Dynamic braking can be used on electric railways to convert the energy
of the train back into usable power by diverting the braking current into the
current rail or overhead line. This is known as regenerative braking. It is used in
the same way as rheostatic braking but the energy can be used by other trains
requiring power. The power developed by a braking train may not be accepted
by the line if no other trains are drawing power so trains equipped with
regenerative braking will usually have resistor grids as well to absorb the excess
energy. The balance between regenerated current and rheostatic current is also
controlled electronically.

4.1.13.2Early Brake Systems

Originally, the only way to stop a train was by applying a brake to the wheels of
the locomotive. A wooden block was applied to the wheel tread. A lever
operated by the driver actuated the brake. If more brake power was required, the
driver reversed the engine as well. Soon however, it became apparent the was

54
not enough to bring the train to a stand in a reasonable distance and anyway, the
reversing of the wheels damaged the wheel treads, so various vehicles in the train
had brakes added. The brake was hand operated by a lever or screw arrangement,
so a man was appointed to ride on each of these "brake vans" as they were
called. As trains became heavier and faster, more brake power was required and
more brake vans were added. The principal disadvantages of the manual braking
system were that it required additional staff along the train and there was little co-
ordination during braking. The driver used the engine to whistle for brakes and
to signal for release.

4.1.13.3 Electro-Pneumatic Brakes

The traditional air brake works well enough in the hands of a skilled driver but it
has a number of shortcomings. Its control system relies on the changes in brake
pipe pressure to control the application and release of the brakes. This means that
a command by the driver to alter the pressure is felt by the front of the train first
and then gradually by the rest of the train until it reaches the end. This can cause
trouble on a long train if it is not handled carefully, particularly during release
when leading vehicles in release mode can pull on rearmost vehicles which still
have brakes applied.

The brake pipe is also used to replenish the air reservoirs on each vehicle, a slow
process on a long train. Time has to be allowed between successive applications
for reservoirs to recharge. Finally, the automatic air brake has no partial release
capability. Once the driver has demanded a release, it will happen and brakes can
only be reapplied when the reservoir pressure has recharged to a value higher than
the brake cylinder pressure. What was recognised many years ago was that
electrical control could overcome these problems. Since the early 1900s, when

55
electrical control of brakes was tried on the New York Subway, various systems
and solutions have been tried.

Most electro-pneumatic brake systems have been designed so that they can be
added to the traditional air brake system to allow more rapid responses to the
driver's braking commands. For example, in the simple version used on the UK
High Speed trains, each end of the train has an electrically operated valve. When
an application is called for at one end, the valve opens the brake pipe at the other
end so that both ends are exhausting air at the same time. A simple version of
this, called an EOT (End of Train device) is used on US freight trains for
emergency application.

An earlier development first tried on multiple unit trains in the UK in the 1920s,
consisted of a system whereby the application and release of the brake was
achieved by electrically controlled valves on each vehicle. It was originally
designed early this century for rapid transit trains in the US to overcome the
natural delay which occurs due to the propagation of the pure air brake and
quickly adopted in Europe. Normally the electrical control is additional to and
superimposed upon the automatic air brake, although more recent systems
incorporate a failsafe electrical control which eliminates the need for a separate
brake pipe. A basic e-p brake system as applied to a multiple unit train comprises
an electrically operated "holding valve" and "application valve" on each car
together with control wires running the length of the train. The main reservoir is
also connected to each car on the train by a main reservoir pipe. Often more than
one main reservoir is provided. Usually, each car also has an "e-p brake
reservoir”. The e-p brake operates independently of the air brake. It uses main
reservoir air instead of brake pipe air and the air brake and triple valves are kept
in the release position. The e-p brake is controlled from the same driver's brake
valve as the air brake but using new positions to apply and release the e-p brake.

56
Electrical connections attached to the driver's brake valve send commands along
the train to the holding and application valves on each car.

To apply the brake the driver selects "Application", which causes all holding and
application valves to energise. The holding valve closes off the brake cylinder
exhaust and the application valve opens to admit main reservoir air into the brake
cylinder. The brakes apply. Selecting "Release" de-energises the valves, closing
the application valve and cutting off the main reservoir pipe connection and
opening the holding valve to allow brake cylinder air to exhaust. The advantage
of the e-p system is that it allows instantaneous reaction on all cars at the same
time and it allows small and graduated applications and releases. This gives
accurate and rapid stopping, which is particularly important in suburban and rapid
transit operations’-P brakes are not normally used on freight trains because of the
diversity of wagons and the cost of conversion. Also, getting an electric signal to
transmit at a low voltage down a very long train is difficult. Radio control has
been suggested, as has fitting each car with a battery. Some experimental e-p
systems are being tried in the US in an attempt to `railway companies to spend
time and money doing the conversions.

Automatic body tilting

The permissible maximum speed of a passenger train through curves is the level
beyond which a railroad considers passengers will suffer unacceptable centrifugal
force; the limit beyond which derailment becomes a risk is considerably higher.
On a line built for exclusive use of high-speed trains, curved track can be canted
or super elevated, to a degree specifically suited to those trains. The cant can be
steeper than on a mixed-traffic route, where it must be a compromise between the
ideal for fast passenger and slow, heavy freight trains, to avoid the latter bearing
too severely on the curve’s inner rail. Consequently, on a dedicated high-speed
passenger line, the extra degree of super elevation can raise quite significantly the

57
curving speed possible without discomforting passengers from the effects of
force. On existing mixed-traffic lines, however, passenger train speed through
curves can be increased by equipping cars with devices that automatically tilt car
bodies up to 9° toward the inward side of the curve, thereby adding to the degree
of cant imparted by the track’s super elevation. There are two types of automatic
body-tilting system. A passive system is more complex. It reacts to track
curvature: that is, the body-tilting mechanism responds retroactively, if only by a
fraction of a second, to its gauging of deficiency in the track’s super elevation
relative to the speed at which the vehicle is travelling. An active system employs
sensors to detect the transition to curved track and controls to measure the
progressive degree of tilt applied by the tilt-operating mechanism in response to
the sensor’s electronic signals as the curve itself is threaded. The sensors are
usually fitted to the front vehicle of a tilt-body train-set, so that the tilt-body
equipment on following vehicles operates in smooth, split-second anticipation of
a track curve’s development. An active system can apply a higher degree of body-
tilt than a passive system, but active systems impose constraints on some aspects
of car design and add to the car’s capital and maintenance costs

SOFTWARE DETAILS
(INSTRUCTION SET)
INTRODUCTION:

Each PIC16F870 instruction is a 14 bit word divided into an opcode which


specifies the instruction type and one or more operands which further specify the
operation of the instruction. The PIC16F870 instruction set summary in Table
lists byte oriented bit-oriented and literal and control operations. Table shows the
opcode field descriptions. For byte oriented instructions, ‘f’ represents a file

58
register designator and ‘d’ represents a destination designator. The file register
designator specifies which file register is to be used by the instruction. The
destination designator specifies where the result of the operation is to be placed.
If‘d’ is zero, the result is placed in the W register. If‘d’ is one, the result is placed
in the file register specified in the instruction. For bit-oriented instructions. ‘b’
represents a bit field designator which selects the number of the bit affected by
the operation, while ‘f’ represents the number of the file in which the bit is
located. For literal and control operations, ‘k’ represents an eight or eleven bit
constant or literal value.
The instruction set is highly orthogonal and is grouped into three basic
categories,
 Byte oriented operations
 Bit-oriented operations
 Literal and control operations

All instructions are executed within one single instruction cycle, unless a
test is true or the program counter is changed as a result of an instruction. In this
case, the execution takes two instruction cycles with the second cycle executed
as a NOP. One instruction cycle consists of four oscillator periods. Thus, for an
oscillator frequency of 4 MHz, the normal instruction execution time is 1 micro
second. If a conditional test is true or the program counter is changed as a result
of an instruction, the instruction execution time is 2 s. All examples use the
following format to represent a Hexadecimal number: 0xhh, where h signifies a
hexadecimal digit.

GENERAL FORMAT FOR INSTRUCTIONS:


FIELD DESCRIPTION:
f Register file address (0 x 00 to 0x7F)
59
W Working register (accumulator)
b Bit address within an 8-bit file register
k Literal field, constant data or label
x don’t care location (=0 or 1)

INSTRUCTION SET
16CXX has 35 instructions. All instructions are single cycle, except for
any program that branches. This take two cycles since the fetch instruction is
flushed from the pipe line by changing the content of PC, while the new
instruction is being fetched and then executed. The instruction set is grouped into
three basic categories.
# Byte Oriented operations
# Bit oriented operations
# Literal and control operations
For byte-oriented instructions, ‘f’ represents a file register designator
and‘d’ represents destination designator. The file register designator specifies
which file register is to be used by the instruction. For bit oriented instructions
‘b’ represents a bit field designator which selects the number of the bit affected
by the operation, while ‘f’ represents the number of the file in which the bit is
located. For literal and control operation ‘k’ represents an eight or eleven bit
constant or literal value.

BYTE ORIENTED FILE REGISTER OPERATIONS:

ADDWF f, d
ANDWF f, d
CLRF f
CLRW
60
COMPF f, d
DECF f, d
DECFSZ f, d
INCF f, d
INCFSZ f, d
IORWF f, d
MOVF f, d
NOP
RLF f, d
RRF f, d
SUBWF f, d

SWAPF f, d

XORWFf, d

BIT ORIENTED FILE REGISTER OPERATIONS:

BCF f, b
BSF f,b

BTFSC f, b

BTFSS f, b

LITERAL AND CONTROL OPERATIONS:

ADDLW k
ANDLW k

CALL k

CLRWDTR

GOTO k

IORLW k
61
MOVLW k

RETFIE

RETLW k

RETURN

SLEEP

SUBLW k

XORLW k

6. CONCLUSION

The project presented an efficient method to avoid hijacking and collision


of train.The designed system achieved better results compared to the methods
reported in literature survey.

 The designed method achieved a success rate in avoiding collision and in


controlling speed of train.
 It efficiently detects obstacles in the train over a large distance using the
dedicated sensor.
 It provides cooling facility using LM335 sensor which uses less power.
 The microcontroller has the high performance rate with power saving
sleep mode and low power consumption.
 The cooling fan is automatically switched on when temperature goes
above 41degree Celsius.

62
 High noise immunity cmos technology decoders and encoders are used
which increased the accuracy of operation.
 Even a small reason that creates accidents can be avoided by the system.

6.1 Future Work Of Our Project

 Enhancing the performance of the sensors which will significantly affect

the performance and efficiency of the proposed system.

 Examining the performance of the existing system with other sensors to

achieve comparable results.


 Train positioning system can be integrated to the existing system using

GPS.

63
64

Vous aimerez peut-être aussi