You are on page 1of 40

A

SEMINAR REPORT
ON

IMAGE PROCESSING BASED ON SAFETY OF


RAILWAY TRACKS
SUBMITTED TO THE SAVITRIBAI PHULE PUNE UNIVERSITY,
IN THE PARTIAL FULFILLMENT OF PROJECT PART-I OF THE
REQUIREMENTS
FOR THE AWARD OF THE DEGREE
OF

BACHELOR OF E&TC ENGINEERING


BY

BARVALIYA KHUSHAL B.
BARWALIYA HARESH H.
JOSHI MAHARSHI J.
UNDER THE GUIDANCE OF

PROF M.S.BIRADAR
CAYMETs
SIDDHANT COLLEGE OF ENGINEERING

Sudumbare, Talegaon-Chakan Road


Tal - Maval, Dist - Pune - 412109.
ACADEMIC YEAR : 2014-2015

CAYMETs
SIDDHANT COLLEGE OF ENGINEERING

Sudumbare, Talegaon-Chakan Road


Tal - Maval, Dist - Pune - 412109.
ACADEMIC YEAR : 2014-2015

CERTIFICATE
This is to certify that the project report entitled IMAGE PROCESSING BASED
ON SAFETY OF RAILWAY TRACKS, submitted by Barvaliya khushal Exam Seat No:
_____ is a bonafide work carried out by him under the supervision of Prof.M.S.Birdar and
it is approved for the partial fulfillment of the project part I of the requirement of Savitribai
Phule Pune University, for the award of the degree of Bachelor of Engineering (Electronics
& Telecommunication).
The Seminar work has not been earlier submitted to any other institute or university
for the award of degree.

Prof.M.S.Biradar
Project Guide
Place: Sudumbare,Pune
Date: / /

Prof.M.S.Biradar
Head of Department

Dr. S. S. Khot
Principal

CONTENTS
Chapter No.

Title

Acknowledgment
Abstract
List of Figures
Introduction

Literature Survey

Block diagram Description and Operation


3.1

Block diagram

3.2

Description

3.3

Operation

Hardware diagram & specification


4.1

Circuit Diagram

4.2

Reset Design

4.3

Crystal design

4.4

Transformer

4.5

Rectifier

4.6

LCD

4.7

RS232

4.8

SD card

4.9

Filter circuit

4.10

Voltage Regulator

Software Design
5.1

Express PCB
Advantages & Application

6.1

Advantages

6.2

Application
Reference

Page No.
1
2
3

ACKNOWLEDGEMENT
Ability and ambition are not enough for success. Many able people fail to achieve
anything worthwhile because he or she has not been properly guided and directed. Success
of any project depends solely on support, guidance, encouragement received from the
guided, our parents and well wishers that includes all our staff members and friends. We
have been fortunate to have more than one pillar strength in our humble effort to make this
project successful.
Gratitude is often hardest emotion to express and often one does not find adequate
words to convey that entire one feels. We are pleased to express our deep sense of gratitude

to our project guide Prof.M.S.Biradar who has opened floodgates of knowledge for us and
his extended continuous cooperation, encouragement and his great insistence on research
work to undertake.
We would also like to thank honorable Prof. M. S. Biradar, H.O.D. Electronics
and Telecommunication department for her constructive suggestions and giving us the
opportunity to work on this project and present it.
Finally to the people who made it possible, our families and friends who directly or
indirectly made this project a success.
Yours Sincerely,
Barvaliya khushal
Barwaliya haresh
Joshi maharshi

ABSTRACT
Human safety is a primary concern of railway system but, it has been urgent issue
that dozens of people are killed every year due to the track crack. We propose an image
processing based monitoring system for railway track. The system immediately perceives
dangerous factors of crack in the track by using image processing technology. To monitor
almost entire length of the track line in the platform, we use video camera. Camera conducts
surveillance its own present monitoring area whether crack is found in the crack. Moreover,
to deal with the accident immediately, the system provides local station, central control
room employees and train driver with information about the accident situation including
alarm message. The system overview and detection process with experimental results,

according to the results, we expect the proposed system will play a key role for establishing
highly intelligent monitoring system in railway.

LIST OF FIGURES
Fig No.

Name of the Figure

1.

Block Diagram.

2.

Circuit Diagram...

3.

Solar Panel...

4.

Stepper Motor..

5.

Relay

6.

Design of Power Supply..

Page No.

7.

Express PCB Layout Design...

CHAPTER 1

INTRODUCTION

1.1 INTRODUCTION:Railway is an Eco-Friendly and Popular mode of Transport in most major cities of the
World. Train accidents occur normally due to safety violations resulting from human errors
or limitations and equipment failures loosing precious lives.
This work is concentrated on predicting the major cause of railway accidents that is
collision on the same track. The primary goal of this anti-collision system is to identify
collision points and to report these error cases to main control room, nearby station as well
as grid control stations. So that if any collision likely to occurs then this system will help to
avoid such conditions by giving an alarm to concern units. Implementation of an efficient
RF based Train Anti-Collision for railways are being proposed in this system. The current

rail security rules require, more and more, the automatic detection of possible obstacles on
tracks.
Human safety is a primary concern of railway system but, it has been urgent issue that
dozens of people are killed every year due to the track crack. We propose an image
processing based monitoring system for railway track. The system immediately perceives
dangerous factors of crack in the track by using image processing technology. To monitor
almost entire length of the track line in the platform, we use video camera. Camera conducts
surveillance its own present monitoring area whether crack is found in the crack. Moreover,
to deal with the accident immediately, the system provides local station, central control
room employees and train driver with information about the accident situation including
alarm message.
In these days train accidents are most common and the damage due to these accidents
are more severe and takes many lives of passengers hence to reduce the accident rate due to
collision and breakage of rails can be reduced. Thus, we are designing such system which
will prevent from these accidents.
Here we are developing a system which will monitor the crack detection. The web cam
will be used to monitor the crack of the track. Using image processing we will detect the
crack of the railway track. And an emergency message is given to the railway motorman.
Here we are using the ultrasonic sensor which is used to detect the obstacles nearby train.

CHAPTER 2
LITERATURE SURVEY

2.1 LITERATURE SURVEY:Transport is very important to carry the passengers and goods from one place to
another. The better transport leads to more trade. Economic level is mainly depends on
increasing the capacity and level of transport. This paper presents an implementation of an
efficient and cost effective solution suitable for railway application. In this paper we are
going to use ultrasonic to detect the crack in rail road, when the crack is detected its latitude
and longitude values are send as a message to nearby station by using GPS and GSM
service.
Then Ultrasonic is used for the surveying process. Then other important
component is PIR sensor it is used to detect the presence of humans in track.

CHAPTER 3
BLOCK DIAGRAM DESCRIPTION AND OPERATION

3.1. Block Diagram:


ARM 7

WEBCAM

PC

MICRO
-CONTROLLER

LCD DISPLAY

GPS
ULTRASONIC
GSM
MODEM
DC
MOTOR

DRIVER
SPEAKER
SDCARD

POWER
SUPPLY

DC-1
DC-2

3.2 DESCRIPTION:-

3.2.1 ARM 7:
This generation introduced the Thumb 16-bit instruction set providing improved
code density compared to previous designs. The most widely used ARM7 designs
implement the ARMv4T architecture, but some implement ARMv3 or ARMv5TEJ. All
these designs use a Von Neumann architecture, thus the few versions comprising a cache do
not separate data and instruction caches.
Some ARM7 cores are obsolete. One historically significant model, the ARM7DI is
notable for having introduced JTAGbased on-chip debugging; the preceding ARM6 cores

did not support it. The "D" represented a JTAG TAP for debugging; the "I" denoted an
ICEBreaker debug module supporting hardware breakpoints and watch points, and letting
the system be stalled for debugging. Subsequent cores included and enhanced this support.
It is a versatile processor designed for mobile devices and other low power
electronics. This processor architecture is capable of up to 130 MIPS on a typical 0.13 m
process. The ARM7TDMI processor core implements ARM architecture v4T. The processor
supports both 32-bit and 16-bit instructions via the ARM and Thumb instruction sets.
The ARM7TDMI (ARM7+16 bit Thumb+j tag Debug+fast Multiplier+enhanced
ICE) processor is a 32-bit RISC CPU designed by ARM, and licensed for manufacture by
an array of semiconductor companies. In 2009 it remains one of the most widely used ARM
cores, and is found in numerous deeply embedded system designs. The ARM7TDMIS variant is the synthesizable core.

3.2.2 LIQUID CRYSTAL DISPLAY:


LCD is used in a project to visualize the output of the application. We have used
16x2 LCD which indicates 16 columns and 2 rows. So, we can write 16 characters in each
line. So, total 32 characters we can display on 16x2 LCD.
LCD can also used in a project to check the output of different modules interfaced
with the microcontroller. Thus LCD plays a vital role in a project to see the output and to
debug the system module wise in case of system failure in order to rectify the problem.

3.2.3 ANNOUNCEMENT SYSTEM:


Announcement system is nothing but a speaker system which is connected at the
output of the system for announcement purpose. As per the system application, according to
the visual based guide, the respective saved audio file is played using a speaker system.

3.2.4 SD CARD:
SD card is basically is used as an storage device which will required to store the
required data. The system database can be used to store in sd card in the form of .wav file

and can be accessed from that whenever it is required. Sd card is interfaced with the system
using a protocol called SPI protocol.

3.2.5 CAMERA:
The Rs232 standard is used to interface the computer with the microcontroller. The
computer is connected by the web camera for recognition. The matlab software window is
used.

3.2.6 PC:
We already know about the facility of the mobile, so after receiving data from the
webcam we can copy or use the same data in our PC. The PC and RF receiver can be
interfaced with the help of the data cable DKU-50.
We are using the MATLAB software in our PC for the user interface with the
system. With the help of this MATLAB software any user can easily make the use of the
system.
This MATLAB software provides the notice typing and editing facility. Also we can
copy the same content as received through mobile in the editing window and call it as a
notice.
Hence the PC/MATLAB software provides the typing, editing and formatting
options to the user.

3.2.7 RS 232:
RS 232 is a serial communication cable used in the system. Here, the RS 232
provides the serial communication between the microcontroller and the outside world such
as display, PC or Mobile etc. So it is a media used to communicate between microcontroller
and the PC.
In our project the RS232 serves the function to transfer the edited notice (or data)
from PC (MATLAB software) to the microcontroller, for the further operation of the system.

3.2.8 DC MOTOR:

DC motors are used to physically drive the application as per the requirement
provided in software. The dc motor works on 12v.
To drive a dc motor, we need a dc motor driver called L293D. This dc motor driver
is capable of driving 2 dc motors at a time. In order to protect the dc motor from a back
EMF generated by the dc motor while changing the direction of rotation, the dc motor driver
have an internal protection suit. We can also provide the back EMF protection suit by
connecting 4 diode configuration across each dc motor.

3.2.9 DC MOTOR DRIVER (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 solenoides, 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. The L293D is assembled in a 16 lead plastic package which has 4 center pins
connected together and 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.

3.2.10 GSM MODEM:


GSM (Global System for Mobile communication) is a digital mobile telephony
system.
With the help of GSM module interfaced, we can send short text messages to the
required authorities as per the application. GSM module is provided by sim uses the mobile
service provider and send sms to the respective authorities as per programmed. This
technology enable the system a wireless system with no specified range limits.
GSM uses a variation of time division multiple access (TDMA) and is the most
widely used of the three digital wireless telephony technologies (TDMA, GSM,
and CDMA). GSM digitizes and compresses data, then sends it down a channel with two

other streams of user data, each in its own time slot. It operates at either the 900 MHz or
1800 MHz frequency band.

3.2.11 GPS MODEM:


The GPS smart receiver features the 16 channels .Ultra low power GPS architecture.
This complete enabled GPS receiver provides high position, velocity and time accuracy
performances as well as high sensitivity and tracking capabilities.
The ultra low power CMOS technology, the GPS receiver is ideal for many portable
applications such as PDA, Tablet PC, smart phone etc.

3.2.12 Ultrasonic Sensor:


Ultrasonic sensor are basically used to measure the distances between the obstacle /
object and the sensor. The ultrasonic sensor works on Doppler effect.
It consist of a ultrasonic transmitter and a receiver. The transmitter transmit the
signal in one direction. This transmitted signal is then reflected back by the obstacle and
received by the receiver. So the total time taken by the signal to get transmitted and to
received back will be used to calculate the distance between the ultrasonic sensor and the
obstacle
.

3.2.13 POWER SUPPLY:All digital circuits require regulated power supply. In this article we are going to
learn how to get a regulated positive supply from the mains supply.

We require different level of Power for running the system. We use 9 Volt
controllers, 5 Volt for different sensors, 12 Volt for Stepper Motor.

3.3 OPERATION:Here we are designing a system which will help to save a human life. Our system
will detect the crack in the railway tracks and also detect the obstacle on the railway
track.We will use the web camera for the continuous monitoring of the railway track. Web
camera will always capture the images of the railway track continuously. Using image
processing we will detect the crack in the track. For the image processing the software will
be used is MATLAB. As soon as the crack is being detected by the image processing it will
be indicated to micro-controller. Then the microcontroller will immediately turn OFF the
DC motor interface to it. The train will lower down its speed slowly at a particular rate. We
have interfaced an ultrasonic sensor for the detection of an obstacle on the railway track. If
any obstacle is been detected then the train is stopped by the micro controller by turning
OFF the DC motor.
As soon as emergency case has been detected such as the crack detection or the
obstacle detection the announcement will be made. For the announcement we will use the
speaker.
All the announcements to be made are already recorded and stored in the SD card. In
case of any danger happen the announcement will be announced so that the people traveling
in the train will know the danger happen and also the reason for the train stoppage.
We have interfaced the GSM and GPS MODEM wuth the microcontroller. As soon
as the danger is detected the message will be send using a GSM MODEM to the respective

stations about the danger occurred. The GPS MODEM will send the location of the train
where the danger has been occurred. The location will be send in the form of co-ordinates.

CHAPTER 4
HARDWARE DESIGN AND SPECIFICATION

4.1 CIRCUIT DIAGRAM:

4.1.1

RESET DESIGN :
3.3V

R4
10k

C7

U3

50
49

51

52

53

54

55

56

57

58

59

60

61

62

63

P1.27/TDO
VREF
XTAL1
XTAL2
P1.28/TDI
VSSA
P0.23
RST
P1.29/TCK
P0.20/MAT1.3/SSEL1/EINT3
P0.19/MAT1.2/MOSI1/CAP1.2
P0.18/CAP1.3/MISO1/MAT1.3
P1.30/TMS
V3
VSS
VBAT

64

10u

48

P1.20/TRACESYNC
RESET CIRCUIT:2 P0.21/PWM5/AD1.6/CAP1.3
47
P0.22/AD1.7/CAP0.0/MAT0.0
P0.17/CAP1.2/SCK1/MAT1.2
3
46
Reset is used for
putting
the
microcontroller
into
a
'known'
condition.
That
RTXC1
P0.16/EINT0/MAT0.2/CAP0.2
4
5

P1.19/TRACEPKT3

P0.15/RI1/EINT2/AD1.5

45

P1.21/PIPESTAT0
practically means 6thatRTXC2
microcontroller can behave rather inaccurately
under certain44
43
VSS
V3
42
V3A
VSS
undesirable conditions.
In order to continue its proper functioning
it has to be reset,41
8
P1.18/TRACEPKT2
P0.14/DCD1/EINT1/SDA1
9
40
P0.25/AD0.4/AOUT
P1.22/PIPESTAT1
10
meaning all registers
would be placed in a starting position. Reset
is not only used39
P0.26/AD0.5
P0.13/DTR1/MAT1.1/AD1.4
11
38
P0.27/AD0.0/CAP0.1/MAT0.1
P0.12/DSR1/MAT1.0/AD1.3
12
37
when microcontroller
doesn't
behave
the
way
we
want
it
to,
but
can
also
be
used
P1.17/TRACEPKT1
P0.11/CTS1/CAP1.1/SCL1
13
36
P0.28/AD0.1/CAP0.2/MAT0.2
P1.23/PIPESTAT2
14
35
P0.10/RTS1/CAP1.0/AD1.2
when trying out15 a P0.29/AD0.2/CAP0.3/MAT0.3
device as an interrupt in program execution,
or to get a34
P0.30/AD0.3/EINT3/CAP0.0
P0.9/RxD1/PWM6/EINT3
16
33
P0.8/TxD1/PWM4/AD1.1
P1.16/TRACEPKT0
7

P0.31
VSS
P0.0/TxD0/PWM1
P1.31/TRST
P0.1/RxD0/PWM3/EINT0
P0.2/SCL0/CAP0.0
V3
P1.26/RTCK
VSS
P0.3/SDA0/MAT0..0/EINT1
P0.4/SCK0/CAP0.1/AD0.6
P1.25/EXTIN0
P0.5/MISO0/MAT0.1/AD0.7
P0.6/MOSI0/CAP0.2/AD1.0
P0.7/SSEL0/PWM2/EINT2
P1.24/TRACECLK

microcontroller ready when loading a program.


In order to prevent from bringing a logical zero RESET pin accidentally, RESET has

to be connected via resistor to the positive supply pole AND a capacitor from
RESET to the ground. Resistor should be between 5 and 10K and the capacitor can
be in between 1f and 10 f. This kind of resistor capacitor combination, gives the
32

31

30

29

28

27

26

25

24

23

22

21

20

19

18

RC time delay for the c to reset properly.


LPC2138_SQUARE
As shown in the above circuit we are connecting an RC circuit to the RESET (pin
17

57) of C .The ARM C has an active low reset, therefore we connect an RC circuit.
As shown the capacitor is initially at 0v.It charges via the supply through a 10kohm

resistance in series, therefore the reset time of our circuit is:


R*C = 10kohm * 0.1 f
= 1msec

Recommended time of reset = 1 sec


Here the RC time can vary from 10 sec to 1 msec.

4.1.2CRYSTAL CIRCUIT:
Pins OSC1 & OSC2 are provided for connecting a resonant network to form
oscillator. Typically a quartz crystal and capacitors are employed. The crystal
frequency is the basic internal clock frequency of the microcontroller. The
manufacturers make available PIC designs that can run at specified maximum &
minimum frequencies, typically 1 MHz to 32 MHz.

P2

P1

P2

P1

P2

P1

P2

P1

State 1 State 2 State 3 State 4 State 5


One Machine Cycle

P2

P1 P2

P1

P2 P1

State 6

C9
33p

X1
CRYSTAL

C8

U3

FIG 2

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

50
49

51

52

53

54

55

56

57

58

59

60

61

62

63

64

33p

P1.27/TDO
VREF
XTAL1
XTAL2
P1.28/TDI
VSSA
P0.23
RST
P1.29/TCK
P0.20/MAT1.3/SSEL1/EINT3
P0.19/MAT1.2/MOSI1/CAP1.2
P0.18/CAP1.3/MISO1/MAT1.3
P1.30/TMS
V3
VSS
VBAT

P0.21/PWM5/AD1.6/CAP1.3
P0.22/AD1.7/CAP0.0/MAT0.0
RTXC1
P1.19/TRACEPKT3
RTXC2
VSS
V3A
P1.18/TRACEPKT2
P0.25/AD0.4/AOUT
P0.26/AD0.5
P0.27/AD0.0/CAP0.1/MAT0.1
P1.17/TRACEPKT1
P0.28/AD0.1/CAP0.2/MAT0.2
P0.29/AD0.2/CAP0.3/MAT0.3

P1.20/TRACESYNC
P0.17/CAP1.2/SCK1/MAT1.2
P0.16/EINT0/MAT0.2/CAP0.2
P0.15/RI1/EINT2/AD1.5
P1.21/PIPESTAT0
V3
VSS
P0.14/DCD1/EINT1/SDA1
P1.22/PIPESTAT1
P0.13/DTR1/MAT1.1/AD1.4
P0.12/DSR1/MAT1.0/AD1.3
P0.11/CTS1/CAP1.1/SCL1
P1.23/PIPESTAT2
P0.10/RTS1/CAP1.0/AD1.2

48
47
46
45
44
43
42
41
40
39
38
37
36
35
34

Here we are connecting twp ceramic capacitors which are basically used for
filtering. In other words to give a pure square wave to the C we are connecting the
two capacitors. The basic rule for placing the crystal on the board is that it should
be as close to the C as possible to avoid any interference in the clock.

Power Supply and Description

The basic step in the designing of any system is to design the power supply required for
that system. The steps involved in the designing of the power supply are as follows,
1) Determine the total current that the system sinks from the supply.
2) Determine the voltage rating required for the different components.

4.1.3 TRANSFORMER:
Transformer selection we required 12V for Relay, DC Motor, GSM Modem, GPS etc...
Here we are using core type transformer with N2:N1 is 12:1.
FORMULA FOR TRANSFORMER
N2/N1 = I2/I1 = V1/V2
As we know input voltages from Mains to transformer are not constant its varying from
220V to 270V. If we took 15V transformer so the input voltage of transformer is Standard
value i.e 230V, but if the Input voltages are varying the required voltages are also varying.
Therefore we assume the highest possible value of Input voltage is 270V so the output
voltage is 19V.

The average voltage at the output of a bridge rectifier capacitor filter combination is given
by
Vin(DC) = Vm Idc / 4 f C1
Where ,Vm=2 Vs and Vs = rms secondary voltage
Assuming Idc to be equal to max.load current, say 100mA
C = 1000 Gf / 65v , f=50hHz
19 = Vm 0.1 / 4*50*1000*10^(-6)
19= Vm 0.1 / 0.2
Vm=19.5 volts
Hence the RMS secondary Voltage
Vrms = vm/ 2
= 19.5 / 2
=19.5 / 1.4421
=13.5219 volts
So we can select a 15v secondary Voltage
Min Input for 7805 is
= Drop across IC 7805 + Required Output voltage
= 3 V+ 5V
=8V
So at Input of 7805 we required 8 V with margin
Consider drop across diode 0.7V so 2 diode conducts drop is 1.4 V
= 1.4 V +8 V
= 9.4 V
So at secondary we required 10 V
E0 min/E0 max = (10-0.7) / 10+0.7
= 9.3 / 10.7
1 = sin-1 [9.3/10.7]
= 60

4.1.4 RECTIFIER
For bridge
T1 = [time for 90 + time for 1]
= 5ms + 3.4ms
= 8.4ms
Il = load current supplied to various IC
Il = (O/P current of IC PIC16F877A or ARM-7 + O/P current of IC 232 + Current req. for
display)
= 71mA + 30mA + 15.2 mA = 116.2 mA
C = (Il * t1)/Vr
= (116.2 mA * 8.4 ms)/ 1 V
= 976.04 f
So we select 1000 f capacitor
For diode design
PIV = Vm
Vm = E0 max + 2 Vf
= 10.7 + 1.4 V
= 12.1 V
I(0) = I(1) /2
= 116.2 mA/ 2
= 58.1 mA
Peak repetitive current
Ifm = [I(1) (t1+t2)]/t2
T2 = time for 90 - time for 1
= 5ms - 3.4ms
=1.2ms
Ifm = 116.2 mA( 8.6ms+1.2ms) /1.2ms.
=833mA
From above specification diode 1N4007 is selected
PIV =100V
I = 1A
a)
The TUF is increased to 0.812 as compared the full wave rectifier.
b)
The PIV across each diode is the peak voltage across the load = Vm, not 2Vm as in
the two diode rectifier
Output of the bridge rectifier is not pure DC and contains some AC some AC ripples in it.
To remove these ripples we have used capacitive filter, which smoothens the rippled out put
that we apply to 7805 regulators IC that gives 5V DC. We preferred to choose capacitor
filters since it is cost effective, readily available and not too bulky.
The value of the capacitor filter can be found by following formula,

IL * t1
C =
Vr
C1 (1000 f / 65v) is the filter capacitor and C2 and C3 (0.1 uf) is to be connected across
the regulator to improve the transient response of the regulator.
A regulator is a circuit that supplies a constant voltage regardless of changes in load current.
The regulator used in our project is IC7805, which is a three terminal voltage regulator. A
heat sink is used, so that the heat produced by the regulator dissipating power has a larger
area from which to radiate the heat into the air by holding the case temperature to a much
lower value than would result without the heat sink.
IC 7805 has an internal thermal overload protection and the internal short circuit current
limiting device.

Fig.Shows the block diagram of a typical power supply. The AC mains are given to the
transformer primary to get the required voltage at the secondary. Then it is applied to the
bridge rectifier, which converts the sinusoidal input into full wave rectified output. The
output of the rectifier contains some ripple voltage. To remove this voltage filter circuit is
used. A ripple voltage is nothing but a small value of AC over DC signal. Then a pure DC is
given to the regulator. The function of the regulator is to give the constant or stable output
DC in spite of changes in the load current.
The reasons for choosing IC regulator is that they are versatile in operation and
relatively inexpensive with features like programmable output, current/voltage boosting,
internal short circuit current limiting, thermal shutdown.
The 78XX are popularly known for regulation has been used. The 78XX series is a 3terminal positive voltage regulator and 79XX series is a 3-terminal negative voltage
regulator.
As name suggests it transforms the voltage level from one level to another. Transformer
used is the step down transformer to step 230 V to +15 V.
It provides isolation too from the mains.
Now we design 3.3V for Microcontroller ARM-7
The formula for calculating the output voltage of ARM is (As given in the datasheet of
LM317)

Assuming R2=470 ohms and I adj =0 then,


Vout= 3.3v = 1.25v (1+R2/450)

3.3v/1.25v= (450+R2)/450
2.64* 0.45Kohm = 0.45kohm+R2
1.18 0.45kohm=R2
R2=738 ohms
Nearest value of resistance is 750 ohms
Therefore with R1=450 ohms and R2=750 ohms we get an o/p of 3.3v
4.1.5 Liquid Crystal Display (LCD)

LCD Power SourcesLCD has 2 Power Sources


1. VCC and GND are at 1 and 2 NO. Pins of LCD. Used to drive the LCD 3mA current
consumption.
2. VCC and GND are at 15 and 16 NO. Pins of LCD used to drive the backlight of LCD 100
mA current
Total current consumption = 3mA + 100mA = 103mA
So, in order to reduce the current requirement we are connecting a 330 ohm resistance in
series with the backlight pin VCC. This reduces the current consumption (100mA / 330ohm
=0.303 mA).
Therefore new total current consumption = 0.303mA+3 mA =3.303 mA.
LCD Data and Control lines-

LCD has 8 / 4 data lines and 3 control lines .The 4 data lines of LCD (pin 11 to pin 14 ) are
connected to the B port of PIC C (B4 to B7) .
The control lines of LCD are RS, R/W, E.
Register Select (RS)The LCD RS pin is for selecting the data or the code register, it connected to pin 35 i.e. B2.
If RS=0 , the instruction command code register is selected, allowing the user to send a
command such as clear display , cursor at home, etc.
If RS=1, the data register is selected, allowing the user to send data to be displayed on the
LCD.
Read/ Write (R/W)The LCD R/W is for choosing between reading or writing on LCD.
R/W=1 when reading.
R/W=0 when writing.
Here R/W is connected to ground ie R/W=0.
Enable (E)LCD pin E is for enabling or disabling the LCD which connected to pin 34 i.e. B1.
The enable pin is used by the LCD to latch information presented to its data pins. a high-tolow pulse must be applied to this pin.

4.1.6 Rs232 :

RS 232 IC is a driver IC to convert the C TTL logic(0-5) to the RS 232 logic (+9v).Many device today work on RS 232 logic such as PC, GSM modem , GPS
etc. . .so in order to communicate with such devices we have to bring the logic levels
to the 232 logic (+/-9v).
Here as we can see the RS 232 chip has 2 pairs of TTL and 232 logic viz, pair 1 :
Pin 7,8,9,10 of RS 232
Pair 2 : pin 11,12,13,14 of RS 232
We can use any one pair in our project either 7,8,9,10 pair or 11,12,13,14 pair. if we
require 2 serial ports then Depending on the requirement of the project we may have
to use both the pair in the same project .

The C works on TTL logic (0-5 v).So to convert the TTL logic to 232 logic we use
the 4 capacitors connected to the RS232 IC. These capacitors are called charge
pumps used to convert the TTL voltage to the +/- 9 v swing required by the 232 IC.
Dual Charge-Pump Voltage Converter
The MAX220MAX249 has two internal charge-pumps that convert +5V to 10V
(unloaded) for RS-232 driver operation. The first converter uses capacitor C1 to
double the +5V input to +10V on C3 at the V+ output. The
Second converter uses capacitor C2 to invert +10V to -10V on C4 at the V- output

ARM DC MOTOR INTERFACE

Here in our project we are using a 12v DC motor which is Bipolar, which means that the DC
motor can rotate both the sides .For this we are using a DC motor driver IC L293D.This
driver IC can drive 2 DC motors. In our project we are connecting only 1 DC motor so we
are connecting only the 1st pair of the DC motor.(in1 and in2 of L293D).The DC motor will
be connected at OUT1 and OUT2 of L293D respectively.
FREEWHEELING DIODES:
Here we are interfacing a 8 diodes at the o/p side of DC motor. Here whenever the DC
motor changes the polarity back EMF is generated which can damage the DC motor. So the
freewheeling diodes ground the extra energy through ground .Whenever the Back EMF is
generated which is freewheeled to ground which keeps the DC motor safe.

4.1.7 SD Card :

Pin no
1
2
3
4
5
6
7
8
9

name
Chip select (SPI SLAVE SELECT)
Data In (SPI MOSI)
GND1
3.3v/5v
Clock (SPI SCK)
GND2
Data Out (SPI MISO)
NC1
NC2

4.1.8 GPS and GSM INTERFACE:

Here as we can see the RS 232 chip has 2 pairs of TTL and 232 logic viz, pair 2: Pin
7, 8,9,10 of RS 232 Pair 1: pin 11,12,13,14 of RS 232.We can use any one pair in
our project either 7,8 9,10 pair or 11,12,13,14 pair. If we require 2 serial ports then
Depending on the requirement of the project we may have to use both the pair in the
same project.Here we are using pair2 for GPS Modem.So in pair 2 pin7, 8
connected to GPS and 9,10 output pins are connected to ControllerFor GSM
modem we are using Pair 1
4.1.9 FILTER CAPACITOR
Even though half wave & full wave rectifier give DC output, none of them provides
a constant output voltage. For this we require to smoothen the waveform received from the
rectifier. This can be done by using a capacitor at the output of the rectifier this capacitor is
also called as FILTER CAPACITOR or SMOOTHING CAPACITOR or RESERVOIR

CAPACITOR. Even after using this capacitor a small amount of ripple will
remain.
4.1.10 VOLTAGE REGULATOR
A Voltage regulator is a device which converts varying input voltage into a constant
regulated output voltage. Voltage regulator can be of two types
1) Linear Voltage Regulator
Also called as Resistive Voltage regulator because they dissipate the excessive voltage
resistively as heat.
2) Switching Regulators.
They regulate the output voltage by switching the Current ON/OFF very rapidly. Since
their output is either ON or OFF it dissipates very low power thus achieving higher
efficiency as compared to linear voltage regulators.

CHAPTER 5
SOFTWARE DESIGN

5.1 EXPRESS PCB:Placing Components


Generally, it is best to place parts only on the top side of the board.
When placing components, make sure that the snap-to-grid is turned on. Usually, a value of
0.050" for the snap grid is best for this job.
First place all the components that need to be in specific locations. This includes connectors,
switches, LEDs, mounting holes, heat sinks or any other item that mounts to an external
location.
Parts not found in the component library can be made by placing a series of individual pads
and then grouping them together. Place one pad for each lead of the component. It is very
important to measure the pin spacing and pin diameters as accurately as possible. Typically,
dial or digital calipers are used for this job.
Placing Power and Ground Traces
After the components are placed, the next step is to lay the power and ground traces. It is
essential when working with ICs to have solid power and ground lines, using wide traces
that connect to common rails for each supply. It is very important to avoid snaking or daisy
chaining the power lines from part-to-part.

CHAPTER 6
ADVANTAGES AND APPLICATIONS

6.1 ADVANTAGES:

Highly flexible
Quick response time
Fully automate system thus Reduces human efforts.
Robust system
Time saving approach

6.2 APPLICATIONS:

In trains
In buses
Anti-collision
Obstacle detection

CHAPTER 7
REFERENCE

7.1 REFERENCES:LCD:

www.engineersgarage.com/sites/default/files/LCD%2016x2.pdf

www.electro-tech-online.com/datasheets.../40487-2-16-dot-matrix-lcd-datasheet

GSM MODEM:
http://www.nskelectronics.com/sim300_modem_with_rs232.html

ARM7:LPC2138
UM10120 LPC2131/2/4/6/8 User manual
File Format: PDF/Adobe Acrobat
Numerous editorial updated throughout the user manual. 02. 20060918.
Updated edition of the User Manual covering both LPC213x and
LPC213x/01 devices. For ...
www.nxp.com/documents/user_manual/UM10120.pdf

You might also like