6th Sem Report
-
Upload
darshandharajia -
Category
Documents
-
view
328 -
download
5
Transcript of 6th Sem Report
Christ Polytechnic Institute Page 1
A
Project Report
On
“Automatic railway crossing gate control ”
Guided By: Prepared By:
Mr. Raj Vyas 1. Dharaja Darshan D. (096100311047)
2.Koladiya Divyesh V. (096100311048)
Lab Teacher: 3.Mehta Kandarp H .(09610031059)
Mr.Raj Vyas
June : 2012
DEPARTMENT OF ELECTRONICS & COMMUNICATION
CHRIST POLYTECHNIC INSTITUTE
Christ Polytechnic Institute Page 2
CHRIST POLYTECHNIC INSTITUTE
RAJKOT
CERTIFICATE
This is to certify that Mr. Dharajia Darshan Dilipbhai Enrollment
no. 096100311047 of Semester VI (E.C.) has satisfactorily
prepared and presented his project report on “Automatic railway
crossing gate control ” within four walls of the EC laboratory of
this institute during January to June 2012.
Date of Submission:
Guided By: Mr. Raj Vyas HOD (EC)
PRINCIPAL
Christ Polytechnic Institute Page 3
CHRIST POLYTECHNIC INSTITUTE
RAJKOT
CERTIFICATE This is to certify that Mr. Koladiya Divyesh Vallabhbhai
Enrollment no. 096100311048 of Semester VI (E.C.) has
satisfactorily prepared and presented his project report on
“Automatic railway crossing gate control ” within four walls of
the EC laboratory of this institute during January to June 2012.
Date of Submission:
Guided By: Mr. Raj Vyas HOD (EC)
PRINCIPAL
Christ Polytechnic Institute Page 4
CHRIST POLYTECHNIC INSTITUTE
RAJKOT
CERTIFICATE
This is to certify that Mr. Kandarp Hareshkumar Mehta
Enrollment no. 096100311059 of Semester VI (E.C.) has
satisfactorily prepared and presented his project report on
“Automatic railway crossing gate control ” within four walls of
the EC laboratory of this institute during January to June 2012.
Date of Submission:
Guided By: Mr. Raj Vyas HOD (EC)
PRINCIPAL
Christ Polytechnic Institute Page 5
ABSTRACT
This project work aims at the design, development, fabrication and
testing of working model entitled Automatic Railway Gate Controller. It
is basically related to Radio communication and signaling system. An
Automatic Railway gate controller is unique in which the railway gate is
closed and opened or operated by the Train itself by eliminating the
chances of human errors.
The largest public sector in India is the Railways. The network of
Indian Railways covering the length and breath of Indian Railways
covering the length and breath of our country is divided into nine
Railway zones for operational convenience. The railway tracks criss-
cross the state Highways and of course village road along their own
length. The points or places where the Railway track crosses the road
are called level crossings. Level crossings cannot be used
simultaneously both by road traffic and trains, as this result in
accidents leading to loss of precious lives.
So to prevent this we use the concept of the automatic railway gate
controlled concept. Here we use two identical sensors on both the side
of the track. One on the right side which is forward sensor and another
on the left side which is afterward sensor. Train rolls over the path and
cuts the sensors so the gate will be automatically controlled.
By this there is less human effort and the technology will raise the level
from where it begins.
( i )
Christ Polytechnic Institute Page 6
ACKNOWLEDGEMENT
I express my cavernous sense of obligation and gratitude to my guide
Shri Raj Vyas for his genuine guidance and constant encouragement
throughout this work. I am highly obliged as my honorable guide have
devoted his valuable time and shared his expertise knowledge.
I say heartly thanks to Mr. Niraj Trivedi & Mr. Saurabh Pansora
because without them our project can’t complete. They deeply conduct the
project during lab session. They helped us lot n the project work. They gave
us the opportunity to do the project work.
I extend my sincere thanks to HOD Mr. Jaldeep Vaghela Department
of Electronics & Communication Engineering with all faculty members of the
Christ Polytechnic Institute for providing me such an opportunity to do my
project work.
I also wish to express my heartfelt appreciation to Prof.A.R.Dave and
my parents, friends, colleagues and many who have rendered their support
for the successful completion of the project, both explicitly and implicitly.
Mr.Tarun Patel has explained in detailed about functioning in their
industry. Than he has personally ask some few question related to our
semester's subjects. Than he has assign us this project. He has also
discussed lot about this project with us gave basic idea to us etc...
Dharaja Darshan D. (096100311047)
Koladiya Divyesh V. (096100311048)
Mehta Kandarp H. (096100311059)
( ii )
Christ Polytechnic Institute Page 7
CONTENT
Abstract i
Acknowledgement ii
List of Figures iii
List of Tables iv
List of Data-Sheets v
Chapter 1 Introduction 13 to 17
1.1 Introduction
1.2 Aim
1.3 Idea of choose this project
1.4 Problem Summary
1.5 Concept
1.6 Component list
1.7 Please read before using this circuit ideas
Chapter 2 Description of Problem 18 to 25
2.1 Detailed description of problem.
2.2 Gate control
2.3 Hardware description
2.4 8051 microcontroller interfacing
2.5 IR circuit
2.6 IR transmitter
2.7 IR receiver
2.8 Block diagram & its description
Christ Polytechnic Institute Page 8
Chapter 3 Various part and circuits 26 to 49
3.1 Stepper motor circuit
3.2 Resister
3.3 Lights functioning
3.4 Gate mechanisms
3.5 Flasher operation
3.6 Gate crossing circuit operation notes
3.7 Function of stepper motor
3.7.1 Stepper motor Characteristics
3.7.2 open loop v/s close loop commutation
3.7.3 Types
3.7.4 Stepper motor drive ckt
3.7.5 Phase current waveform
3.7.6 Theory
3.7.7 Stepper motor rating and specification
3.7.8 Application
3.8 BC-547
3.8.1 Pin Diagram
3.8.2 Description
3.9 74LS-04/08
3.9.1 Internal construction and pin diagram
3.10 ULN2003
3.10.1 pin diagram
3.10.2 pin description
3.10.3 internal ckt
Christ Polytechnic Institute Page 9
Chapter 4 Detailed Microcontroller 50 to 57
4.1 89c51 Introduction
4.2 89c51
4.2.1 Description
4.2.2 Features
4.2.3 Architecture block diagram
4.2.4 Pin description
Chapter 5 Concept of track 58 to 76
5.1 Overview & introduction
5.1.1 How to sense a black line ?
5.1.2 How to control DC motor ?
5.1.3 Components values
5.2 The Chasis
5.3 Motor & Power transmission
5.3.1 Introduction
5.3.2 Specification
5.4 The Wheels
5.5 Circuit Discription
5.6 Operting L293D motor driver
5.7 Operation of LM324
5.7.1 pin diagram
5.7.2 pin description
5.8 sensor
5.8.1 photo diode
5.8.2 principal of operation
5.8.3 other mode of operation
5.8.4 material
5.8.5 features
5.8.6 Application
5.8.7 photo-diode array
Christ Polytechnic Institute Page 10
5.8.8 obstacle detection using IR-led photo diode
5.8.9 circuit
Advantages & Dis-advantages 77
Chapter 6 Conclusion 78
Chapter 7 Further Extended 79
Bibliography 80
Appendix
Christ Polytechnic Institute Page 11
List of Figures
2.1 Arrangement of sensors 20
2.2 Gate control 21
2.3 Interfacing with 8051 23
2.4 block diagram of automatic gate control 25
3.1 Lights display 30
3.2 Old gate mechanism 32
3.3 Morden gate mechanism 33
3.4 Gate operation 34
3.5 Gate crossing circuit operation 36
3.6 Construction of stepper motor 37
3.7 Front view of stepper motor 38
3.8 Stepper motor with driver ckt 40
3.9 Phase current waveform 41
3.10 overview,symbols & pinconfiguration
of bc547 43
3.11 Pin diagram 44
3.12 Internal construction and configuration 46
3.13 Internal ckt of uln2003 47
3.14 pin diagram 48
3.15 pin description 48
4.1 Architecture 52
4.2 pin diagram 53
5.1 3d graphical representation of robot 58
5.2 pcb interfacing ckt of line follower robot 61
5.3 picture image of line-follower robot 62
5.4 construction and picture image of motor 63
5.5 internals of motor 64
5.6 wheels 66
5.7 l293d motor driver 69
5.8 pin configuration 70
5.9 symbol of photo-diode 71
Christ Polytechnic Institute Page 12
List of Tables
1.1 Pin functions of ULN2003 48
1.2 Parts of line follower 59
1.3 Pin description of LM324 71
(iv)
Christ Polytechnic Institute Page 13
List of Data-Sheets
1. L293D
2. Transister (BC547)
3. ULN2003
4. LM324
5. 74LS04
6. 74LS08
(v)
Christ Polytechnic Institute Page 14
Chapter: 1
1.1 Introduction:
This project work aims at the design, development, fabrication and testing
of working model entitled Automatic Railway Gate Controller. It is basically
related to Radio communication and signaling system. An Automatic
Railway gate controller is unique in which the railway gate is closed and
opened or operated by the Train itself by eliminating the chances of
human errors.
1.2 AIM :
The largest public sector in India is the Railways. The network of Indian
Railways covering the length and breath of Indian Railways covering the
length and breath of our country is divided into nine Railway zones for
operational convenience. The railway tracks crises-cross the state Highways
and of course village road along their own length. The points or places where
the Railway track crosses the road are called level crossings. Level crossings
cannot be used simultaneously both by road traffic and trains, as this result in
accidents leading to loss of precious lives.
Aim of this project is to control the unmanned rail gate automatically using
embedded platform. Today often we see news papers very often about the
railway accidents happening at un- attended railway gates. Present project is
designed to avoid such accidents if implemented in spirit. This project is
developed in order to help the INDIAN RAILWAYS in making its present
working system a better one, by eliminating some of the loopholes existing in
it. Based on the responses and reports obtained as a result of the significant
development in the working system of INDIAN RAILWAYS.
Christ Polytechnic Institute Page 15
This project can be further extended to meet the demands according to
situation. This can be further implemented to have control room to regulate
the working of the system. Thus becomes the user friendliness.
In this project AT89c51 Micro controller Integrated Chip plays the main role.
The program for this project is embedded in this Micro controller Integrated
Chip and interfaced to all the peripherals. The timer program is inside the
Micro controller IC to maintain all the functions as per the scheduled time.
Stepper motors are used for the purpose of gate control interfaced with
current drivers chip ULN2003 itâ„¢s a 16 pin IC.
1.3 Idea of choose this project :
We read in to the news papers very often about the railway accidents
happening at un-attended railway gates. In too many villages there are
still absences of the railway crossing gates. Many human-beings as
well as animals are being victim of this situation.
By this only we get the idea of the automatic railway gate which is
controlled automatically. Whenever the train is coming from the near
by distance the gate will automatically closed with the help of
SENSORS placed near by at some distance.
And whenever the train is pass through some distance from the gate
than the gate will automatically open respectively
Present project is designed to avoid such accidents if implemented in
spirit.
Christ Polytechnic Institute Page 16
1.4 Problem summary :
Automatic railway crossing gate control is the name of our IDP. The
respected project is assigned to us by the owner of the Industry NISUS
MICROTECH.
We the members of this project haspersonally visited this company on
08\08\2011. The following company is there in Ahmedabad. Basically it works
on Microcontroller. It also works on the following functions:
• PLC (Programmable Logic Controller)
• SCADA (Supervisory control & Data Acquit ion)
• HMI (Human Machine Interfaces)
• AC/DC/Servo Drive
• Process Instrument
• Switch Gear & Heavy Electric
• DCS (Distributed control system)
Our aim of problem is to Controlling Gate while crossing the railway
automatically. Which is to be done with the help sensors which spread IR
rays?
Christ Polytechnic Institute Page 17
1.5 Concept :
Concept of our project is automatic gate will be controlled. For this we use
two powerful IR sensors on both the sides before and after the gate. For open
and close of the gate steeper motor is used which is controlled by the
controller 8051. As the train will pass through the sensors on either by sides
the IR rays will be cuts-off. This message is sensed by controller and gives
command to the steeper motor and respectively it will open or close the gate.
The concept is purely designed by us only. Also how to control the steeper
motor and how to sense the signal from the sensor is to be finalized by the
controller 8051 only with the help of specific programming with it.
1.6 Railway Crossing Circuit Component List
2 - 8051 Microcontroller
2 - Steeper Motor
LED ( Red , Green )
2 - L293D ( Motor Driver )
BC-547 for sensor section
1 - 74ls04
1 - 74ls08
2 – ULN2003
Registers & capacitors
IR-led and Photodiode for sensors (x’mitter & receiver)
Christ Polytechnic Institute Page 18
1.7 Please Read Before Using These Circuit Ideas
The explanations for the circuits on these pages cannot hope to cover every
situation on every layout. For this reason be prepared to do some
experimenting to get the results you want. This is especially true of circuits
such as the "Across Track Infrared Detection" circuits and any other circuit
that relies on other than direct electronic inputs, such as switches.
If you use any of these circuit ideas, ask your parts supplier for a copy of the
manufacturer’s data sheets for any components that you have not used
before. These sheets contain a wealth of data and circuit design information
that no electronic or print article could approach and will save time and
perhaps damage to the components themselves. These data sheets can
often be found on the web site of the device manufacturers.
Although the circuits are functional the pages are not meant to be full
descriptions of each circuit but rather as guides for adapting them for use by
others. If you have any questions or comments please send those to the
email address on the Circuit Index page.
Christ Polytechnic Institute Page 19
Chapter: 2 Description of Problem
2.1 Detailed Description of Problem:
Present project is designed using 8051 microcontroller to avoid railway
accidents happening at unattended railway gates, if implemented in spirit.
This project utilizes two powerful IR transmitters and two receivers; one
pair of transmitter and receiver is fixed at up side (from where the train
comes) at a level higher than a human being in exact alignment and
similarly the other pair is fixed at down side of the train direction.
Sensor activation time is so adjusted by calculating the time taken at a
certain speed to cross at least one compartment of standard minimum
size of the Indian railway. We have considered 5 seconds for this project.
Sensors are fixed at 1km on both sides of the gate. We call the sensor
along the train direction as ‘foreside sensor’ which is on the forward side
of the gate and the other as ‘aft side sensor’ which are on the after side of
the gate.
When foreside receiver gets activated, the gate motor is turned on in one
direction and the gate is closed and stays closed until the train crosses the
gate and reaches aft side sensors. When aft side receiver gets activated
motor turns in opposite direction and gate opens and motor stops
respectively this phenomenon happens for the another train comes.
Buzzer will immediately sound at the fore side receiver activation and gate
will close after 5 seconds, so giving time to drivers to clear gate area in
order to avoid trapping between the gates and stop sound after the train
has crossed.
Christ Polytechnic Institute Page 20
Fig.1.1arrange of the sensors.
2.2 Gate Control:
Railways being the cheapest mode of transportation are preferred over all
the other means .When we go through the daily newspapers we come
across many railway accidents occurring at unmanned railway crossings.
This is mainly due to the carelessness in manual operations or lack of
workers.
We, in this project has come up with a solution for the same. Using simple
electronic components we have tried to automate the control of railway
gates. As a train approaches the railway crossing from either side, the
sensors placed at a certain distance from the gate detects the
approaching train and accordingly controls the operation of the gate.Also
an indicator light has been provided to alert the motorists about the
approaching train.
Christ Polytechnic Institute Page 21
As we know that there are two sensors place at both the sides on forward-
side and another on the after-side.
So when the train will come from the forward side it will cut the rays of the
forward-sensor and the stepper motor runs with the help of relay and the
gate will be closed.
Now as the train will pass through the gate than it will travel to the
afterword direction and the after-side sensors’ rays will cut’s off so the
steeper motor will close its function and remain off and the gate will
automatically open respectively.
Fig.1.2 Gate Control
Here as we have talked earlier two sensors are placed before and after
side of the gate. One traffic light indicator is placed for giving the warning
to the people who crosses the track.
Christ Polytechnic Institute Page 22
2.3 Hardware Description:
The project consists of four main parts:
• 8051 microcontroller
• IR Transmitter
• IR Receiver
• Stepper Motor Circuit
2.4 8051 Microcontroller Interfacing
The I/O ports of the 8051 are expanded by connecting it to an 8255 chip.
The 8255 is programmed as a simple I/O port for connection with devices
such as LEDs, stepper motors and sensors.
There is no necessity to connect 8255 chip. But here we connected it to
overcome from the loadingeffect.The following block diagram shows the
various devices connected to the different ports of an 8255 and indirectly
with the 8051.
The ports are each 8-bit. The individual ports of the 8255 can be
programmed to be input or output, and can be changed dynamically. The
control register is programmed in simple I/O mode with port A, port B and
port C (upper) as output ports and port C (lower) as an input port.
Here steeper motor for gate controlling is interface with the controller.
Indicating lights for indicating whether the way is clear or not is interface
with controller. And the IR sensors are interfaced with it to sense whether
the train has passed through it or not.
Christ Polytechnic Institute Page 23
Figure 1.3 Interfacing with 8051
2.5 IR Circuits:
This circuit has two stages: a transmitter unit and a receiver unit. The
transmitter unit consists of an infrared LED and its associated circuitry.
Christ Polytechnic Institute Page 24
2.6 IR Transmitter:
The transmitter circuit consists of the following components:
• IC 555
• Resistors
• Capacitors
• IR LED
The IR LED emitting infrared light is put on in the transmitting unit. To
generate IR signal, 555 IC based astablemultivibrator is used. Infrared
LED is driven through transistor BC 548.
IC 555 is used to construct an astablemultivibrator which has two quasi-
stable states. It generates a square wave of frequency 38 kHz and
amplitude 5Volts. It is required to switch ‘ON’ the IR LED.
2.7 IR Receiver:
The receiver circuit consists of the following components:
• TSOP1738 (sensor)
• IC 555
• Resistors
• Capacitors
The receiver unit consists of a sensor and its associated circuitry. In
receiver section, the first part is a sensor, which detects IR pulses
transmitted by IR-LED. Whenever a train crosses the sensor, the output of
IR sensor momentarily transits through a low state.
Christ Polytechnic Institute Page 25
As a result the monostable is triggered and a short pulse is applied to the
port pin of the 8051 microcontroller. On receiving a pulse from the sensor
circuit, the controller activates the circuitry required for closing and
opening of the gates and for track switching.
2.8 Block Diagram & its description:
1.4 Block diagram of automatic gate control
Above is the detailed block diagram of the Automatic gate control. It
consists of various blocks. Description of each and every block is shown
below,
• Track: The idea of using track here is of Line-follower. The line
follower is the which can considered as the train and the Black line which
is sensed by it is our track. As the robot is continous sensing the black
line and follow the track
• Gate ( 1 & 2 ): Gate is the design which allow the public to go through
the track when there is no conversation. It is simply made by plastic
material. Gate get the signaling from motor. There are two gate on by the
side of the track. It runs as per the mechanical work.
Christ Polytechnic Institute Page 26
Chapter: 3 Various parts & Circuits:
3.1 Stepper Motor Circuit:
Here a stepper motor is used for controlling the gates. A stepper motor is
a widely used device that translates electrical pulses into mechanical
movement. They function as their name suggests – they “step” a little bit
at a time.
Steppers don’t simply respond to a clock signal. They have several
windings which need to be energized in the correct sequence before the
motor’s shaft will rotate. Reversing the order of the sequence will cause
the motor to rotate the other way.
3.2 Resister:
A linear resistor is a linear, passive two-terminal electrical component that
implements electrical resistance as a circuit element. The current through a
resistor is in direct proportion to the voltage across the resistor's terminals.
Thus, the ratio of the voltage applied across a resistor's terminals to the
intensity of current through the circuit is called resistance. This relation is
represented by Ohm's law:
Resistors are common elements of electrical networks and electronic circuits
and are ubiquitous in most electronic equipment. Practical resistors can be
made of various compounds and films, as well as resistance wire (wire made
of a high-receptivity alloy, such as nickel-chrome). Resistors are also
implemented within integrated circuits, particularly analog devices, and can
also be integrated into hybrid and printed circuits.
Christ Polytechnic Institute Page 27
The electrical functionality of a resistor is specified by its resistance: common
commercial resistors are manufactured over a range of more than nine orders
of magnitude. When specifying that resistance in an electronic design, the
required precision of the resistance may require attention to the
manufacturing tolerance of the chosen resistor, according to its specific
application. The temperature coefficient of the resistance may also be of
concern in some precision applications. Practical resistors are also specified
as having a maximum power rating which must exceed the anticipated power
dissipation of that resistor in a particular circuit: this is mainly of concern in
power electronics applications. Resistors with higher power ratings are
physically larger and may require heat sinks. In a high-voltage circuit,
attention must sometimes be paid to the rated maximum working voltage of
the resistor.
Practical resistors have a series inductance and a small parallel capacitance;
these specifications can be important in high-frequency applications. In a low-
noise amplifier or pre-amp, the noise characteristics of a resistor may be an
issue. The unwanted inductance, excess noise, and temperature coefficient
are mainly dependent on the technology used in manufacturing the resistor.
They are not normally specified individually for a particular family of resistors
manufactured using a particular technology.[1] A family of discrete resistors is
also characterized according to its form factor, that is, the size of the device
and the position of its leads (or terminals) which is relevant in the practical
manufacturing of circuits using them.
The ohm (symbol: Ω) is the SI unit of electrical resistance, named after
George Simon Ohm. An ohm is equivalent to a volt per ampere. Since
resistors are specified and manufactured over a very large range of values,
the derived units of milliohm (1 mΩ = 10−3 Ω), kilo ohm (1 kΩ = 103 Ω), and
mega ohm (1 MΩ = 106 Ω) are also in common usage.
Christ Polytechnic Institute Page 28
The reciprocal of resistance R is called conductance G = 1/R and is
measured in Siemens (SI unit), sometimes referred to as a mho. Hence,
Siemens is the reciprocal of an ohm: S = Ω − 1. Although the concept of
conductance is often used in circuit analysis, practical resistors are always
specified in terms of their resistance (ohms) rather than conductance.
The behavior of an ideal resistor is dictated by the relationship specified by
Ohm's law:
Ohm's law states that the voltage (V) across a resistor is proportional to the
current (I), where the constant of proportionality is the resistance (R).
Equivalently, Ohm's law can be stated:
This formulation states that the current (I) is proportional to the voltage (V)
and inversely proportional to the resistance (R). This is directly used in
practical computations. For example, if a 300 ohm resistor is attached across
the terminals of a 12 volt battery, then a current of 12 / 300 = 0.04 amperes
(or 40 mill amperes) occurs across that resistor.
In a series configuration, the current through all of the resistors is the same,
but the voltage across each resistor will be in proportion to its resistance. The
potential difference (voltage) seen across the network is the sum of those
voltages, thus the total resistance can be found as the sum of those
resistances.
Christ Polytechnic Institute
3.3 Lights Functioning
Figure 3.1 light display.
The most formal terms for the lights on the signal mast seem to be crossing
flashers or flashing light units. The lights on the gate are simply called gate
lamps. A diagram for crossing lights in operation is shown in Figure 3 with a
total of eight lamps, as would be used in an installation like the one in
It might easily be imagined that the lights would be wired something like the
Christ Polytechnic Institute
Functioning :
The most formal terms for the lights on the signal mast seem to be crossing
flashers or flashing light units. The lights on the gate are simply called gate
lamps. A diagram for crossing lights in operation is shown in Figure 3 with a
as would be used in an installation like the one in
It might easily be imagined that the lights would be wired something like the
Page 29
The most formal terms for the lights on the signal mast seem to be crossing
flashers or flashing light units. The lights on the gate are simply called gate
lamps. A diagram for crossing lights in operation is shown in Figure 3 with a
as would be used in an installation like the one in Figure.
It might easily be imagined that the lights would be wired something like the
Christ Polytechnic Institute Page 30
left side of Figure, but that would be incorrect. Actually, they are wired as on
the right side of the diagram under "correct." The difference is that in the
correct scheme, the left and right lamps are basically connected in series to
begin with, and the flasher relay contacts merely short or bypasses half the
bulbs rather than supply them.
All the relays shown above reside in the relay cabinet or equipment housing
near the crossing with wires running out to the signals; they are not parts of
the signals themselves. In the correct wiring scheme, the three wires going
out to the lamps are here designated EN, EB, and E. (Another naming
scheme uses LL, RL, and FL, respectively.)
3.4 Gate Mechanisms:
A gate mechanism is very similar to a semaphore mechanism in that it has a
circuit controller, a motor that lifts the gate and resists its fall by the electric
retarder principle, and a normally energized hold-clear device (here
designated HC). See the article "How Semaphores Work" on this website. It is
very different, though, in two main ways: first, the gate motor actually drives
the gate down for about the first half (45°) of the descent, and retards only for
the final portion of the descent; second, the gate mechanism itself contains a
relay called the motor control relay (MCR). Although the gates are
counterweighted, they are required to be a little heavier than the
counterweights by moments. The gates would still fall the entire distance by
gravity, albeit more slowly at first, without the motor's assistance.
Christ Polytechnic Institute Page 31
Figure 3.2 Old gate mechanisms.
Figure an older style WRRS crossing gate mechanism with case open.The
purpose of the MCR is to change the connections to the motor, since it drives
both up and down; to reverse its supply polarity and select the appropriate
circuit controller segments for the up or down movement. Generally, it is
energized when the gate is supposed to rise and de-energized when the gate
is supposed to fall.
Christ Polytechnic Institute Page 32
The control of the gate, then, generally centers on the status of a normally
energized "UP" signal from which the supply for the coils of the HC and MCR
are derived. However, gate mechanism wirings may vary with the particular
design, and the individual supplies of the HC and MCR may be broken by the
circuit controller in the gate mechanism when they are not needed.
Specifically, the MCR is energized when the gate is rising to the up position,
but the circuit controller may or may not cut the MCR out after it gets there.
Conversely, the HC does not need to be energized until the gate is fully up,
and it may not be energized until it is cut in at that time by the circuit
controller.
Figure 3.3 Modern gate mechanisms.
Sometimes the term "power down" is used in connection with crossing gates.
This refers to the situation where the motor drives the gate down under
Christ Polytechnic Institute Page 33
power, as intended. The term is not used in the modern sense where a
machine conserves energy by "going to sleep." A less confusing synonym is
"motor down."
3.5 Railway Grade Crossing Flasher Operation:
Figure 3.4 Gate operation
Christ Polytechnic Institute Page 34
• When a train traveling in either direction covers one of the "START"
sensors, the crossing signals will start to flash.
• The signals will remain ON until approximately two seconds after the
last car has passed completely through the crossing, uncovering both
of the "STOP" sensors.
• As the train leaves the protected section of track, the "DISABLE"
sensors prevent the flashers from being turned ON again by
deactivating the "START" sensors.
• The "START" sensors are reactivated approximately 5 seconds after
the "DISABLE" sensors have been uncovered.
• Sensors 1 or 6 must be covered before sensors 2 or 5, depending on
the direction of travel, or the signals will not start. Sensors 2 and 5
disable sensors 1 and 6.
• Variable resistor R15 sets the flashing rate of the crossing signals.
• The next diagram show the changes in the output terminals of the
crossing circuit as a train passes through the protected section of
track.
Christ Polytechnic Institute Page 35
The next diagram show the changes in the output terminals of the crossing
circuit as a train passes through the protected section of track
Figure 3.5 Gate crossing circuit operation.
3.6 Grade Crossing Circuit Operation Notes:
The flashers will turn OFF if a train enters and then backs out of the
crossing. The circuit is ready for the next train in either direction
approximately five seconds after the "DISABLE" sensors are uncovered. If
the departing train is still covering a "START" sensor after this time the
flashers will turn on again.
Manual controls can start or stop the flashers as desired. The START
push button could be replaced by a toggle switch in order to keep the
flashers activated during switching operations. Normal room lighting is
used to detect the trains. If night operation is needed the circuit can be
controlled by other circuits or by providing infrared light for the sensors.
Christ Polytechnic Institute Page 36
The circuit is designed to use phototransistors but can also be controlled
by CdS photocells by changing the values of resistors R1, R2 and R3.The
Crossing Circuit requires a regulated 12 volt power supply. The current
draw is about 3 milliamps when the flashers are OFF and about 35
milliamps when they are ON.
Crossing gates and bells can be controlled buy using the Multitask
terminal as an output to control these devices. The MultiTrack terminal is
also used to connect the circuit boards together for crossings with two or
more tracks.
3.7 Function of stepper motor
3.6 construction of stepper motor
Frame 1: The top electromagnet (1) is turned on, attracting the nearest teeth of the gear-shaped iron rotor. With the teeth aligned to electromagnet 1, they will be slightly offset from electromagnet 2. Frame 2: The top electromagnet (1) is turned off, and the right electromagnet (2) is energized, pulling the teeth into alignment with it. This results in a rotation of 3.6° in this example. Frame 3: The bottom electromagnet (3) is energized; another 3.6° rotation occurs. Frame 4: The left electromagnet (4) is energized, rotating again by 3.6°. When the top electromagnet (1) is again enabled, the rotor will have rotated by one tooth position; since there are 25 teeth, it will take 100 steps to make a full rotation in this example.
A stepper motor (or step motor) is a brushless DC electric motor that divides a full rotation into a number of equal steps. The motor's position can then be commanded to move and hold at one of these steps without any
Christ Polytechnic Institute Page 37
feedback sensor (an open-loop controller), as long as the motor is carefully sized to the application.
Switched reluctance motors are very large stepping motors with a reduced pole count, and generally are closed-loop commutated.
3.7 Front view of stepper motor
DC brush motors rotate coninuously when voltage is applied to their terminals. Stepper motors, on the other hand, effectively have multiple "toothed" electromagnets arranged around a central gear-shaped piece of iron. The electromagnets are energized by an external control circuit, such as a microcontroller. To make the motor shaft turn, first, one electromagnet is given power, which makes the gear's teeth magnetically attracted to the electromagnet's teeth. When the gear's teeth are aligned to the first electromagnet, they are slightly offset from the next electromagnet. So when the next electromagnet is turned on and the first is turned off, the gear rotates slightly to align with the next one, and from there the process is repeated. Each of those slight rotations is called a "step", with an integer number of steps making a full rotation. In that way, the motor can be turned by a precise angle.
3.7.1 Stepper motor characteristics
• Stepper motors are constant power devices.
• As motor speed increases, torque decreases. Most motors exhibit maximum torque when stationary, however the torque of a motor when stationary (holding torque) defines the ability of the motor to maintain a desired position while under external load. The torque curve may be extended by using current limiting drivers and increasing the driving voltage (sometimes referred to as a 'chopper' circuit; there are several off the shelf driver chips capable of doing this in a simple manner).
• Steppers exhibit more vibration than other motor types, as the discrete step tends to snap the rotor from one position to another (called a detent). The vibration makes stepper motors noisier than DC motors. This vibration can become very bad at some speeds and can cause the motor to lose torque or lose direction. This is because the rotor is
Christ Polytechnic Institute Page 38
being held in a magnetic field which behaves like a spring. On each step the rotor overshoots and bounces back and forth, "ringing" at its resonant frequency. If the stepping frequency matches the resonant frequency then the ringing increases and the motor loses synchronism, resulting in positional error or a change in direction. At worst there is a total loss of control and holding torque so the motor is easily overcome by the load and spins almost freely. The effect can be mitigated by accelerating quickly through the problem speeds range, physically damping (frictional damping) the system, or using a micro-stepping driver. Motors with a greater number of phases also exhibit smoother operation than those with fewer phases (this can also be achieved through the use of a micro-stepping driver).
• Stepper motors with higher inductance coils provide greater torque at low speeds and lower torque at high speeds compared to stepper motors with lower inductance coils.
3.7.2 Open-loop versus closed-loop commutation
Steppers are generally commutated (electrically switched) using "open loop" electronics, i.e. the driver has no feedback on where the rotor actually is. Stepper motor systems must thus generally be over engineered, especially if the load inertia is high, or there is widely varying load, so that there is no possibility that the motor will lose steps. This has often caused the system designer to consider the trade-offs between a closely sized but expensive servomechanism system and an oversized but relatively cheap stepper.
A new development in stepper control is to incorporate a rotor position feedback (e.g. a rotary encoder or resolver), so that the commutation can be made optimal for torque generation according to actual rotor position. This turns the stepper motor into a high pole count brushless servo motor, with exceptional low speed torque and position resolution. An advance on this technique is to normally run the motor in open loop mode, and only enter closed loop mode if the rotor position error becomes too large — this will allow the system to avoid hunting or oscillating, a common servo problem.
3.7.3 Types:
There are four main types of stepper motors:[1]
1. Permanent magnet stepper (can be subdivided in to 'tin-can' and 'hybrid', tin-can being a cheaper product, and hybrid with higher quality bearings, smaller step angle, higher power density)
2. Hybrid synchronous stepper 3. Variable reluctance stepper
Christ Polytechnic Institute Page 39
4. Lavet type stepping motor
Permanent magnet motors use a permanent magnet (PM) in the rotor and operate on the attraction or repulsion between the rotor PM and the stator electromagnets. Variable reluctance (VR) motors have a plain iron rotor and operate based on the principle that minimum reluctance occurs with minimum gap, hence the rotor points are attracted toward the stator magnet poles. Hybrid stepper motors are named because they use a combination of PM and VR techniques to achieve maximum power in a small package size.
3.12.4 Stepper motor drive circuits
3.8 Stepper motor with drive circuit
Stepper motor performance is strongly dependent on the drive circuit. Torque curves may be extended to greater speeds if the stator poles can be reversed more quickly, the limiting factor being the winding inductance. To overcome the inductance and switch the windings quickly, one must increase the drive voltage. This leads further to the necessity of limiting the current that these high voltages may otherwise induce.
3.7.5 Phase current waveforms
A stepper motor is a polyphase AC synchronous motor (see Theory below), and it is ideally driven by sinusoidal current. A full step waveform is a gross approximation of a sinusoid, and is the reason why the motor exhibits so much vibration. Various drive techniques have been developed to better approximate a sinusoidal drive waveform: these are half stepping and microstepping.
Christ Polytechnic Institute
3.9 Different drive modes showing coil current on a 4motor
3.7.6 Theory
A step motor can be viewed as a synchronous AC motor with the number of poles (on both rotor and stator) increased, taking care that tcommon denominator. Additionally, soft magnetic material with many teeth on the rotor and stator cheaply multiplies the number of poles (reluctance motor). Modern steppers are of hybrid design, having both permanent magnets and soft iron cores.
To achieve full rated torque, the coils in a stepper motor must reach their full rated current during each step. Winding inductance and reverse EMF generated by a moving rotor tend to resist changes in drive current, so that as the motor speeds up, less and less time is spent at full current reducing motor torque. As speeds further increase,the rated value, and eventually the motor will cease to produce torque.
3.7.7 Stepper motor ratings and specifications
Stepper motors nameplates typically give only the winding current and occasionally the voltage and winding rproduce the rated winding current at DC: but this is mostly a meaningless rating, as all modern drivers are current limiting and the drive voltages greatly exceed the motor rated voltage.
Christ Polytechnic Institute
Different drive modes showing coil current on a 4-phase unipolar stepper
A step motor can be viewed as a synchronous AC motor with the number of poles (on both rotor and stator) increased, taking care that tcommon denominator. Additionally, soft magnetic material with many teeth on the rotor and stator cheaply multiplies the number of poles (reluctance motor). Modern steppers are of hybrid design, having both permanent magnets and
To achieve full rated torque, the coils in a stepper motor must reach their full during each step. Winding inductance and reverse EMF
generated by a moving rotor tend to resist changes in drive current, so that as the motor speeds up, less and less time is spent at full current reducing motor torque. As speeds further increase, the current will not reach the rated value, and eventually the motor will cease to produce torque.
Stepper motor ratings and specifications
Stepper motors nameplates typically give only the winding current and occasionally the voltage and winding resistance. The rated produce the rated winding current at DC: but this is mostly a meaningless rating, as all modern drivers are current limiting and the drive voltages greatly
ceed the motor rated voltage.
Page 40
phase unipolar stepper
A step motor can be viewed as a synchronous AC motor with the number of poles (on both rotor and stator) increased, taking care that they have no common denominator. Additionally, soft magnetic material with many teeth on the rotor and stator cheaply multiplies the number of poles (reluctance motor). Modern steppers are of hybrid design, having both permanent magnets and
To achieve full rated torque, the coils in a stepper motor must reach their full during each step. Winding inductance and reverse EMF
generated by a moving rotor tend to resist changes in drive current, so that as the motor speeds up, less and less time is spent at full current — thus
the current will not reach the rated value, and eventually the motor will cease to produce torque.
Stepper motors nameplates typically give only the winding current and esistance. The rated voltage will
produce the rated winding current at DC: but this is mostly a meaningless rating, as all modern drivers are current limiting and the drive voltages greatly
Christ Polytechnic Institute Page 41
A stepper's low speed torque will vary directly with current. How quickly the torque falls off at faster speeds depends on the winding inductance and the drive circuitry it is attached to, especially the driving voltage.
Steppers should be sized according to published torque curve, which is specified by the manufacturer at particular drive voltages or using their own drive circuitry.
3.7.8 Applications
Computer-controlled stepper motors are a type of motion-control positioning system. They are typically digitally controlled as part of an open loop system for use in holding or positioning applications.
In the field of lasers and optics they are frequently used in precision positioning equipment such as linear actuators, linear stages, rotation stages, goniometers, and mirror mounts. Other uses are in packaging machinery, and positioning of valve pilot stages for fluid control systems.
Commercially, stepper motors are used in floppy disk drives, flatbed scanners, computer printers, plotters, slot machines, image scanners, compact disc drives, intelligent lighting and many more devices.
Christ Polytechnic Institute Page 42
3.8 BC-547
3.10 overview , symbol , pin configuration of BC-547
BC547 is an NPN bi-polar junction transistor. A transistor, stands for transfer of resistance, is commonly used to amplify current. A small current at its base controls a larger current at collector & emitter terminals.
Christ Polytechnic Institute Page 43
BC547 is mainly used for amplification and switching purposes. It has a maximum current gain of 800. Its equivalent transistors are BC548 and BC549. The transistor terminals require a fixed DC voltage to operate in the desired region of its characteristic curves. This is known as the biasing. For amplification applications, the transistor is biased such that it is partly on for all input conditions. The input signal at base is amplified and taken at the emitter. BC547 is used in common emitter configuration for amplifiers. The voltage divider is the commonly used biasing mode. For switching applications, transistor is biased so that it remains fully on if there is a signal at its base. In the absence of base signal, it gets completely off. 3.8.1 Pin Diagram:
3.11 Pin diagram
Christ Polytechnic Institute Page 44
3.8.2 Description
The BC548 is a general purpose epitaxial silicon NPN bipolar junction transistor found commonly in European electronic equipment. The part number is assigned by Pro Electron, which allows many manufacturers to offer electrically and physically interchangeable parts under one identification. The BC548 is commonly available in European Union countries. It is often the first type of bipolar transistor young hobbyists encounter, and is often featured in circuit diagrams and designs published in hobby electronics magazines.
If the plastic TO-92 package is held in front of one's face with the flat side facing toward you and the leads downward, (see picture) the order of the leads, from left to right is collector, base, emitter.
3.8.3 Specifications
Devices registered to this Pro Electron number must have minimum performance characteristics.
Breakdown voltage, with base open VCBO = 30 V Rated collector current IC = 100 mA Rated total power dissipation Ptotal = 500 mW Transition frequency (gain-bandwidth product) ft = 300 MHz
Christ Polytechnic Institute Page 45
3.9 74LS-04/08
3.9.1 Internal construction and Pin configuration
3.12 internal construction and pin configuration
Christ Polytechnic Institute Page 46
3.10 ULN2003 ULN2003 is a high voltage and high current Darlington array IC. It
contains seven open collector darlington pairs with common emitters. A darlington pair is an arrangement of two bipolar transistors.
ULN2003 belongs to the family of ULN200X series of ICs. Different versions of this family interface to different logic families. ULN2003 is for 5V TTL, CMOS logic devices. These ICs are used when driving a wide range of loads and are used as relay drivers, display drivers, line drivers etc. ULN2003 is also commonly used while driving Stepper Motors. Refer Stepper Motor interfacing using ULN2003.
Each channel or darlington pair in ULN2003 is rated at 500mA and can withstand peak current of 600mA. The inputs and outputs are provided opposite to each other in the pin layout. Each driver also contains a suppression diode to dissipate voltage spikes while driving inductive loads. The schematic for each driver is given below:
3.13 Internal circuit
Christ Polytechnic Institute Page 47
3.10.1 Pin Diagram:
3.10.2 Pin Discription
Christ Polytechnic Institute Page 48
Chapter: 4
Detailed of Microcontroller
4.1 89C51:
AT89C51 is a 40 pin dip micro controller, can be divided in to four ports, it is
driven by 5v supply. In this project Atmel 89c51 Micro controller Integrated
Chip plays the main role. The program for this project is embedded in this
Micro controller Integrated Chip and interfaced to all the peripherals. The
timer program is inside the Micro controller IC to maintain all the functions as
per the scheduled time. The Light dependent resistor is interfaced to Atmel
89c51 Micro controller to display the message, stepper motors are used for
the purpose of gate control interfaced with current drivers chip ULN2003.
ULN2003 is a current driver chip used for supply control to the stepper motor;
it is a 16 pin dip.
Here a stepper motor is used for controlling the gates. A stepper motor is a
widely used device that translates electrical pulses into mechanical
movement. They function as their name suggests - they step a little bit at a
time. Steppers motors simply respond to a clock signal. They have several
windings which need to be energized in the correct sequence before the
motorâ„¢s shaft will rotate. Reversing the order of the sequence will cause the
motor to rotate the other way. This project work aims at the design,
development, fabrication and testing of working model entitled Automatic
Railway Gate Controller.
Christ Polytechnic Institute Page 49
It is basically related to Radio communication and signaling system. An
Automatic Railway gate controller is unique in which the railway gate is closed
and opened or operated by the Train itself by eliminating the chances of
human errors. The largest public sector in India is the Railways. The network
of Indian Railways covering the length and breath of Indian Railways covering
the length and breath of our country is divided into nine Railway zones for
operational convenience. The railway tracks criss-cross the state Highways
and of course village road along their own length. The points or places where
the Railway track crosses the road are called level crossings. Level crossings
cannot be used simultaneously both by road traffic and trains, as this result in
accidents leading to loss of precious lives.
4.2 89C51 MICTROCONTROLLER:
4.2.1 Description:
The AT89C51 is a low-power, high-performance CMOS 8-bit microcomputer
with 4Kbytes of Flash programmable and erasable read only memory
(PEROM). The device is manufactured using Atmel high-density nonvolatile
memory technology and is compatible with the industry-standard MCS-51
instruction set and pin out. The on-chip Flash allows the program memory to
be reprogrammed in-system or by a conventional nonvolatile memory
programmer. By combining a versatile 8-bit CPU with Flash on a monolithic
chip, the Atmel AT89C51 is a powerful microcomputer, which provides a
highly-flexible and cost-effective solution to many embedded control
applications.
Christ Polytechnic Institute Page 50
4.2.2 features:
• 4Kbytes of Flash memory, 128 bytes of RAM.
• 32 I/O lines, two 16-bit timer/counters.
• A five vector two-level interrupt architecture, a full duplex serial port,
on - chip oscillator and clock circuitry.
• In addition, the AT89C51 is designed with static logic for operation
down to zero frequency and supports two software selectable power
saving modes.
• The Idle Mode stops the CPU while allowing the RAM, timer/counters,
serial port and interrupt system to continue functioning.
• The Power-down Mode saves the RAM contents but freezes the
oscillator disabling all other chip functions until the next hardware
reset.
Christ Polytechnic Institute Page 51
4.3 Architecture Block diagram
Figure 4.1 Architecture of 8051.
Christ Polytechnic Institute Page 52
4.4 PIN DISCRIPTION
Figure4.2 pin diagram of 8051.
VCC:Supply voltage.
GND:The AT 89c51 micro controller is a 40-pin IC. The 40th pin of the
controller is Vcc pin and the 5V dc supply is given to this pin. This 20th pin is
ground pin. A 12 MHZ crystal oscillator is connected to 18th and 19th pins of
the AT 89c51 micro controller and two 22pf capacitors are connected to
ground from 18th and 19th pins. The 9th pin is Reset pin.
Christ Polytechnic Institute Page 53
Port 0: Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port,
each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the
pins can be used as high impedance inputs. Port 0 may also be configured to
be the multiplexed low order address/data bus during accesses to external
program and data memory. In this mode P0 has internal pull-ups. Port 0 also
receives the code bytes during Flash programming, and outputs the code
bytes during program verification. External pull-ups are required during
program verification.
Port 1: Port 1 is an 8-bit bi-directional I/O port with internal pull-ups. The Port
1 output buffers can sink/source four TTL inputs. When 1s are written to Port
1 pins they are pulled high by the internal pull-ups and can be used as inputs.
As inputs, Port 1 pins that are externally being pulled low will source current
(IIL) because of the internal pull-ups. Port 1 also receives the low-order
address bytes during Flash programming and verification.
Port 2: Port 2 is an 8-bit bi-directional I/O port with internal pull-ups. The Port
2 output buffers can sink/source four TTL inputs. When 1s are written to Port
2 pins they are pulled high by the internal pull-ups and can be used as inputs.
As inputs Port 2 pins that are externally being pulled low will source current
(IIL) because of the internal pull-ups. Port 2 emits the high-order address byte
during fetches from external program memory and during accesses to
external data memory that uses 16-bit addresses (MOVX [at] DPTR).
In this application, it uses strong internal pull-ups when emitting 1s. During
accesses to external data memory that uses 8-bit addresses (MOVX [at] RI),
Port 2 emits the contents of the P2 Special Function Register. Port 2 also
receives the high-order address bits and some control signals during Flash
programming and verification.
Christ Polytechnic Institute Page 54
Port 3: Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port
3 output buffers can sink/source four TTL inputs. When 1s are written to Port
3 pins they are pulled high by the internal pull-ups and can be used as inputs.
As inputs, Port 3 pins that are externally being pulled low will source current
(IIL) because of the pull-ups. Port 3 also serves the functions of various
special features of the AT89C51.
RST:Reset input. A high on this pin for two machine cycles while the
oscillator is running resets the device.
ALE/PROG: Address Latch Enable output pulse for latching the low byte of
the address during accesses to external memory. This pin is also the program
pulse input (PROG) during Flash programming. In normal operation ALE is
emitted at a constant rate of 1/6 the oscillator frequency, and may be used for
external timing or clocking purposes. Note, however, that one ALE pulse is
skipped during each access to external Data Memory. If desired, ALE
operation can be disabled by setting bit 0 of SFR location 8EH. With the bit
set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the
pin is weakly pulled high. Setting the ALE-disable bit has no effect if the micro
controller is in external execution mode.
PSEN: Program Store Enable is the read strobe to external program memory.
When the AT89C51 is executing code from external program memory, PSEN
is activated twice each machine cycle, except that two PSEN activations are
skipped during each access to external data memory.
Christ Polytechnic Institute Page 55
EA/VPP:External Access Enable. EA must be strapped to GND in order to
enable the device to fetch code from external program memory locations
starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is
programmed, EA will be internally latched on reset. EA should be strapped to
VCC for internal program executions. This pin also receives the 12-volt
programming enable voltage (VPP) during Flash programming, for parts that
require.
XTAL1: Input to the inverting oscillator amplifier and input to the internal clock
operating.
XTAL2: It is the output from the inverting oscillator amplifier.
Christ Polytechnic Institute Page 56
Chapter 5:
Concept of track
5.1 Overview & Introduction
This small line follower robot, was designed to be easily built at home without
any special equipment, and using a minimum number of mechanical parts.
You wont need more than 2 small motors, 2 free wheels and a piece of pcb
(to hold the micro-controller, the motors driver and the line sensor) and
sure..your soldering iron.
The main trick making this design simple and affordable, is that the robot's
chassis is actually the main board of the robot, where some supports for
the wheels - also made of small parts of copper boards - are soldered to it. All
themotors, and the skids are mounted on the main PCB. For an electronics
hobbyist, PCB manufacturing is a skill that will be learnt sooner or later, so
this design lets you use your experience in PCB manufacturing to design a
high precision chassis for your robot.
5.1.1 How to sense a black line ?
The sensors used for the project are Reflective Object Sensors, 0PB710F
that are already ready in the Electronic Lab. The single sensor consists of an
infrared emitting diode and a NPN Darlington phototransistor. When a light
emitted from the diode is reflected off an object and back into the
phototransistor, output current is produced, depending on the amount of
infrared light, which triggers the base current of the phototransistor. In my
case, the amount of light reflected off a black line is much less than that of a
white background, so we can detect the black line somehow by measuring
the current. (This current is converted to voltage.)
Christ Polytechnic Institute Page 57
5.1.2 How to control a DC motor ?
Instead of applying a constant voltage across a DC motor, we repeat
switching on and off the motor with a fixed voltage (Vcc) applied to the motor.
This is done by sending a train of PWM (Pulse Width Modulation) pulses to a
power MOSFET in order to turn it on and off. Then, the motor sees the
average voltage while it depends on duty cycle of PWM pulses. The speed of
rotation is proportion to this average voltage. By PWM method, it’s easier to
control the DC motor than by directly controlling the voltage across it. All we
have to do is to modulate pulse width, in order words, a duty cycle. Also, a
power MOSFET consumes only negligible power in switching.
Figure5.1 shows a 3D graphical representation of the robot, where different
parts can be clearly identified according to the following table:
Christ Polytechnic Institute Page 58
Table 1.2 Parts lists of line follower
Part Description
1 The base of the robot, also the main PCB.
2 Front skid
3 Free Wheel, shaped as a pulley
4 Plastic pulley
5 Battery holder
6 Pipe clamp use to hold the motors
7 Ni-Cd 7.2V battery pack
8 1200 rpm 6V motor
5.1.3 Component Values:
• R1=6K, R2=1K, R3=20K, R4=10, R5=82, R6=5K(variable), R7=1K.
• C1=1µF, C2=0.1µF, C3=0.1µF.
It is clear that the drive train of this robot is differential type, meaning the two
rear wheels are responsible of moving the robot forward and backward, but
are also used to turn the robot in any required direction depending the
difference of speed between the right and left wheels.
The first thing that need some explanation is the fact that there are only 2
wheels, Well, while not being the best thing to do, a caster wheel can
sometimes be replaced with a skid, when the robot weight and size are not
important, and when the robot is designed for indoor environment, where the
robot can move on relatively smooth surfaces, where friction wont be a
seriousproblem.
Christ Polytechnic Institute Page 59
It may seem strange that the battery was placed on the top of the robot, and it
is actually an important mistake, as a battery at that height totally destabilize
the robot because it raises the center of gravity, increasing the moment of
inertia. For more information about robot stability and moment of inertial
read this tutorial. For this size of robot, a smaller li-ion battery, placed beneath
the robot, would have given much better results.
5.2 The Chassis :
As you may have notices, the main board has a dual function: Electrical and
mechanical. From the mechanical point of view, this boards is the chassis of
the robot, where the motors, the wheels and the electronics are mounted. You
can see in figure 2.A that the holes to be used to fix the motors are present on
the layout, as well as the holes to mount the front and read skids. Using PCB
layout software to design the chassis, as well as PCB techniques to
manufacture it, gives a lot of accuracy which is very important for the
mechanical system to work correctly. You can see that the line sensor is
integrated in that same main board. It's important that the line sensor be as
far as possible from the drive wheels in a differential steering robot. This
principle is explained in detail in this article about line tracking sensors and
algorithms.
There are many kinds of materials from which the copper plated boards are
made. Try to choose a relatively thick one for this chassis, to be able to bear
the weight of the motors and the batteries, all concentrated in four points,
where the screws are fixed.
Christ Polytechnic Institute Page 60
5.2 PCB interfacing diagram of line-follower circuit
Christ Polytechnic Institute Page 61
5.3 picture image of the line follower robot
Christ Polytechnic Institute Page 62
5.3 Motors and power transmission
5.4 construction and picture image of stepper motor
Christ Polytechnic Institute Page 63
5.3.1 Introduction
• This is a 60 RPM low cost single shaft DC geared motor. It is most suitable for light weight robot requiring small power. This motor can be used with 69mm Diameter Wheel for Plastic Gear Motors and 87mm Diameter Multipurpose Wheel for Plastic Gear Motors. For robot with Tank Tracks use Tank Track Links with 87mm Diameter Multipurpose Wheel for Plastic Gear Motors.
• Drive shaft has clutch for non continuous protection from overload which protects gears from the sudden overload. Motor runs smoothly from 2V to 12V and gives wide range of RPM, and torque. Table below gives fairly good idea of the motor’s performance in terms of RPM, no load current as a function of voltage and stall torque, stall current as a function of voltage...
5.3.2 Specifications
• RPM: 60 at 12V • Voltage: 2V to 12V • Current: No load current and stall current are function of voltage. Fore
more data refer below tables • Clutch for non continuous protection from overload conditions • Motor weight: 30gms • Matched wheels:
o 69mm Diameter Wheel for Plastic Gear Motors o 87mm Diameter Multipurpose Wheel for Plastic Gear Motors
5.5 Internals of the Single Shaft Plastic Gear Motor
• The motors, which are DC motors originally made for cassette players, are
cylindrical and thus very difficult to mount and firmly fix to a chassis.
• So this unique technique was used, which is to use pipe clamps, originally
used to mount water pipes all along the walls of buildings (see figure 4.A).
Those pipe clamps are easily available for all the diameters you can imagine,
at least you will easily find a pipe clamp whose diameter fits the diameter of
your motor.
Christ Polytechnic Institute Page 64
• You can notice a small black plastic pulley fixed at the end of the motor's
shaft, which will be then used to transmit power to the wheels using a belt.
This small pulley can be found from the same store where you can buy those
motors, the rubber belts, as well as all kind of accessories of cassette
players.
• When the motors and the pipe clamps are assembled as shown in figure 4.A,
they can finally be easily inserted in their place in the chassis (main board),
then all you need is to add a rubber belt to obtain the transmission system
shown in figure 4B.
• This pulley / belt assembly acts exactly as as the gearbox added to a DC
motors to reduce speed and increase torque.
• Depending on the size of the belt you have, you can adjust its tension by
adjusting the height of the motor itself, which can easily be done by changing
the position of the nuts on the screws holding the motors to the PCB. The
optimum tension in the belt can be easily found by trial and error.
5.4 The wheels
The wheels in this design also have a dual function, they act as a wheel and
as a pulley, with which power is transmitter from another smaller pulley using
a rubber belt.
Those wheels were originally free wheels used in sliding doors and windows.
they are small, cheap and can bear very important loads. They have been
modified as shown in figure 3.A so that they can be fixed to the chassis using
those 4mm standard screws. Note that the wheel is still free to rotate around
Christ Polytechnic Institute Page 65
the axe of the screw, so the only way to transmit power to that wheel will be
though a belt directly mounted on it, as you shall see later.
You can also notice that the wheels are mounted on the chassis using small
rectangular piecesof copper board welded the main board using a regular
soldering iron, and where the center of the wheel is etched on it for maximum
accuracy, this way, both the right and left wheels are at the exact same
height.
You can also notice that another small piece of PCB is added to cary any
eventual shear stress on the main part holding the wheel. (see figure 3.B and
3.C)
Figure 5.6 Wheels
Christ Polytechnic Institute Page 66
5.5 Circuit description:
Being powered from a 7.2V battery, the regulator U3 provides regulated 5V
for the microcontroller and for the logic gates of the motor driver. You can add
a capacitor between the output of the regulator and the ground to absorb the
noise caused by the presence of motors in the system, but I didn't use any,
and didn't face any problems regarding this issue.When the switch SW1 is
switched OFF, the battery can be charged using the jack J2.
The line sensor is composed of 4 cells, and is based on the IR
emission/reception technique described in this tutorial. D1 to D4 are IR LEDs
used as receivers, D9 to D12 are also IR LEDs, but used as emitters this
time. The output of the line sensor is directly fed from the Op Amps to the
microcontroller. Only two outputs are connected to the LEDs D7 and D8,
giving a direct indication of the output of the sensor, making the calibration
process very easy through the
potentiometer R6. For more information about line sensors, check this tutorial
specially dedicated to line tracking sensors and algorithms
Figure 5.B shows the 4 emitter and 4 receiver LEDs at the front of the robot.
Note that this is the optimal position of the line sensor, as you can see in the
tutorial above about line sensors.It is also clear that they are mounted on the
copper side of the board, even through they are regular LEDs (not SMT type).
The Leads of the LEDs are used to adjust the height of the sensor from the
ground. 10 to 20 millimeters proved to be a fair height for the sensor to
function properly.
The connections around the microcontroller are standard in most of our 8051
based projects, they are the crystal resonator along with the two decoupling
capacitors, the debouncing circuit attached to the reset pin, and the ISP (In
system programming). Upon switching on the robot, The software loaded on
the microcontroller simply directs the robot to the line, using standard line
following algorithms described in the following article. You can download the
Christ Polytechnic Institute Page 67
C code along with the HEX file to be loaded into the microcontroller at the end
of this article.
The two motors of the robot are driven using the reliable L293D Motor driver
IC, the motors are connected to the wire connections W3, W4, W5, and W6.
Being controlled by the microcontroller, the speed of the motors can be easily
adjusted using PWM pulses fed to the motor through the Enable PINs of the
driver. Note that each channel has it's own independent Enable PIN, making it
very easy to control the speed of two different motors simultaneously.
5.6 Operating the L293D motor driver
Using the L293D motor driver, makes controlling a motor as simple as
operating a buffer gate IC. It totally isolates the TTL logic inputs from the high
current outputs.Puttinga logic 1 on the pin In1 will makeOut1 pin go to Vpower
(36 Volts MAX.), while a logic 0 will make it go to 0V
Each couple of channels can be enabled and disabled using E1 and E2 pins.
When disabled a channel provide a very high impedance (resistance) to the
motor, exactly as if the motor wasn't connected to the driver IC at all, which
makes this feature very useful for PWM speed control.
One way is to use 2 channels to builda bi-directional motor driver, another
way is to use 1 channel per motor, building a unidirectional driver. In this
project, we will be using the 4 channels to drive the 2 motors in both
directions. To get more specific information on this very useful IC
Christ Polytechnic Institute Page 68
Figure 5.7 L293D Motor driver.
Christ Polytechnic Institute Page 69
5.7 Operation of LM324
LM324 is a 14pin IC consisting of four independent operational
amplifiers (op-amps) compensated in a single package. Op-amps are high
gain electronic voltage amplifier with differential input and, usually, a single-
ended output. The output voltage is many times higher than the voltage
difference between input terminals of an op-amp.
These op-amps are operated by a single power supply LM324 and
need for a dual supply is eliminated. They can be used as amplifiers,
comparators, oscillators, rectifiers etc. The conventional op-amp applications
can be more easily implemented with LM324.
5.7.1 Pin Diagram
5.8 pin configuration
Christ Polytechnic Institute Page 70
5.7.2 Pin Discription
Pin No Function Name 1 Output of 1st comparator Output 1 2 Inverting input of 1st comparator Input 1- 3 Non-inverting input of 1st comparator Input 1+ 4 Supply voltage; 5V (up to 32V) Vcc 5 Non-inverting input of 2nd comparator Input 2+ 6 Inverting input of 2nd comparator Input 2- 7 Output of 2nd comparator Output 2 8 Output of 3rd comparator Output 3 9 Inverting input of 3rd comparator Input 3- 10 Non-inverting input of 3rd comparator Input 3+ 11 Ground (0V) Ground 12 Non-inverting input of 4th comparator Input 4+ 13 Inverting input of 4th comparator Input 4- 14 Output of 4th comparator Output 4
5.8 Sensors
There are 7 pairs of the sensors. The sensor consists of the 7 pair of
the IR led and Photodiode. It continuously sense the black line and follow the
path.
5.8.1 Photo-Diode:
• Three Si and one Ge (bottom) photodiodes
Christ Polytechnic Institute
5.9Symbol for photodiode.
A photodiode is a type of either current or voltagecommon, traditional solar cellarea photodiode.
Photodiodes are similar to regular they may be either exposed (to detect with a window or optical fiberpart of the device. Many diodes designed for use specifically as a photodiode use a PIN junction rather than a response. A photodiode is designed to operate in
5.8.2 Principle of operation
A photodiode is a sufficient energy strikes the diode, it excites an electron, thereby creating a free electron (and a positively charged electron known as the inner photoelectric effectjunction's depletion regionare swept from the junction by the builtholes move toward the photocurrent is produced. This photocurrent is the sum of both the dcurrent (without light) and the light current, so the dark current must be minimized to enhance the sensitivity of the device.
Christ Polytechnic Institute
Symbol for photodiode.
is a type of photodetector capable of converting voltage, depending upon the mode of operation.
solar cell used to generate electric solar power
Photodiodes are similar to regular semiconductor diodesthey may be either exposed (to detect vacuum UV or X-rays) or packaged
ptical fiber connection to allow light to reach the sensitive part of the device. Many diodes designed for use specifically as a photodiode
rather than a p-n junction, to increase the speed of response. A photodiode is designed to operate in reverse bias.
Principle of operation
A photodiode is a p-n junction or PIN structure. When a sufficient energy strikes the diode, it excites an electron, thereby creating a
(and a positively charged electron hole). This mechanism is also photoelectric effect. If the absorption occurs in the
depletion region, or one diffusion length away from it, these carriers are swept from the junction by the built-in field of the depletion region. Thus holes move toward the anode, and electrons toward the cathode
is produced. This photocurrent is the sum of both the dcurrent (without light) and the light current, so the dark current must be minimized to enhance the sensitivity of the device.
Page 71
capable of converting light into , depending upon the mode of operation.[1] The
solar power is a large
diodes except that ) or packaged
connection to allow light to reach the sensitive part of the device. Many diodes designed for use specifically as a photodiode
, to increase the speed of
. When a photon of sufficient energy strikes the diode, it excites an electron, thereby creating a
). This mechanism is also . If the absorption occurs in the
, or one diffusion length away from it, these carriers in field of the depletion region. Thus
cathode, and a is produced. This photocurrent is the sum of both the dark
current (without light) and the light current, so the dark current must be
Christ Polytechnic Institute Page 72
5.8.3 Other modes of operation
Avalanche photodiodes have a similar structure to regular photodiodes, but they are operated with much higher reverse bias. This allows each photo-generated carrier to be multiplied by avalanche breakdown, resulting in internal gain within the photodiode, which increases the effective responsivity of the device.
A phototransistor is in essence a bipolar transistor encased in a transparent case so that light can reach the base-collector junction. It was invented by Dr. John N. Shive (more famous for his wave machine) at Bell Labs in 1948,[5]:205 but it wasn't announced until 1950.[6] The electrons that are generated by photons in the base-collector junction are injected into the base, and this photodiode current is amplified by the transistor's current gain β (or hfe). If the emitter is left unconnected, the phototransistor becomes a photodiode. While phototransistors have a higher responsivity for light they are not able to detect low levels of light any better than photodiodes.[citation
needed] Phototransistors also have significantly longer response times.
5.8.4 Materials
The material used to make a photodiode is critical to defining its properties, because only photons with sufficient energy to excite electrons across the material's bandgap will produce significant photocurrents.
Materials commonly used to produce photodiodes include
Material Electromagnetic spectrum wavelength range (nm)
Silicon 190–1100 Germanium 400–1700 Indium gallium arsenide 800–2600 Lead(II) sulfide <1000–3500
Because of their greater bandgap, silicon-based photodiodes generate less noise than germanium-based photodiodes.
Christ Polytechnic Institute
5.8.5 Features
5.10 Response of a silicon photo diode vs wavelength of the incident light
• Critical performance parameters of a photodiode include:
Responsivity: The ratio of generated photocurrent to in
typically expressed in responsivity may also be expressed as a ratio of the number of photogenerated carriers to incident photons and thus a unitless quantity.
Dark current:
The current through the photodiode in the absence of light, when it is operated in photoconductive mode. The dark current includes photocurrent generated by background radiation and the saturation current of the semiconduaccounted for by accurate optical power measurement, and it is also a source of when a photodiode is used in an optical communication system.
Noise-equivalent power
(NEP) The minimum input optical power to generate photocurrent, equal to the rms noise current in a 1 NEP is essentially the minimum detectable power. The related characteristic "detectivity" (D) is the inverse of NEP, 1/NEP.
There is also the "divided by the sqaure root of the ar
). Although it is traditional to give (
Christ Polytechnic Institute
Response of a silicon photo diode vs wavelength of the incident
Critical performance parameters of a photodiode include:
The ratio of generated photocurrent to incident light power, typically expressed in A/W when used in photoconductive mode. The responsivity may also be expressed as a Quantum efficiencyratio of the number of photogenerated carriers to incident photons and thus a unitless quantity.
The current through the photodiode in the absence of light, when it is operated in photoconductive mode. The dark current includes photocurrent generated by background radiation and the saturation current of the semiconductor junction. Dark current must be accounted for by calibration if a photodiode is used to make an accurate optical power measurement, and it is also a source of when a photodiode is used in an optical communication system.
alent power: (NEP) The minimum input optical power to generate
photocurrent, equal to the rms noise current in a 1 hertzNEP is essentially the minimum detectable power. The related
racteristic "detectivity" (D) is the inverse of NEP, 1/NEP.
There is also the "specific detectivity" ( ) which is the detectivity divided by the sqaure root of the area (A) of the photodetector, (
). Although it is traditional to give ( ) in many catalogues as a
Page 73
Response of a silicon photo diode vs wavelength of the incident
cident light power, when used in photoconductive mode. The
Quantum efficiency, or the ratio of the number of photogenerated carriers to incident photons and
The current through the photodiode in the absence of light, when it is operated in photoconductive mode. The dark current includes photocurrent generated by background radiation and the
ctor junction. Dark current must be if a photodiode is used to make an
accurate optical power measurement, and it is also a source of noise when a photodiode is used in an optical communication system.
(NEP) The minimum input optical power to generate hertz bandwidth.
NEP is essentially the minimum detectable power. The related racteristic "detectivity" (D) is the inverse of NEP, 1/NEP.
) which is the detectivity ea (A) of the photodetector, (
) in many catalogues as a
Christ Polytechnic Institute Page 74
measure of the diode's quality, in practice, it is hardly ever the key paramater. It is not clear why it was ever used.
When a photodiode is used in an optical communication system, these parameters contribute to the sensitivity of the optical receiver, which is the minimum input power required for the receiver to achieve a specified bit error rate.
5.8.6 Applications
• P-N photodiodes are used in similar applications to other photodetectors, such as photoconductors, charge-coupled devices, and photomultiplier tubes. They may be used to generate an output which is dependent upon the illumination (analog; for measurement and the like), or to change the state of circuitry (digital; either for control and switching, or digital signal processing).
• Photodiodes are used in consumer electronics devices such as compact disc players, smoke detectors, and the receivers for infrared remote control devices used to control equipment from televisions to air conditioners. For many applications either photodiodes or photoconductors may be used. Either type of photosensor may be used for light measurement, as in camera light meters, or to respond to light levels, as in switching on street lighting after dark.
• Photosensors of all types may be used to respond to incident light, or to a source of light which is part of the same circuit or system. A photodiode is often combined into a single component with an emitter of light, usually a light-emitting diode (LED), either to detect the presence of a mechanical obstruction to the beam (slotted optical switch), or to couple two digital or analog circuits while maintaining extremely high electrical isolation between them, often for safety (optocoupler).
• Photodiodes are often used for accurate measurement of light intensity in science and industry. They generally have a more linear response than photoconductors.
• They are also widely used in various medical applications, such as detectors for computed tomography (coupled with scintillators), instruments to analyze samples (immunoassay), and pulse oximeters.
• PIN diodes are much faster and more sensitive than p-n junction diodes, and hence are often used for optical communications and in lighting regulation.
• P-N photodiodes are not used to measure extremely low light intensities. Instead, if high sensitivity is needed, avalanche photodiodes, intensified charge-coupled devices or photomultiplier tubes are used for applications such as astronomy, spectroscopy, night vision equipment and laser rangefinding.
Christ Polytechnic Institute
5.8.7 Photodiode array
A one-dimensional array of hundreds or thousands of photodiodes can be used as a position sensoradvantage of photodiode arrays (PDAs) is that they allow for high speed parallel read out since the driving electronics may not be built in like a traditional CMOS or CCD
5.8.8 Obstacle Detection Using IR
I have tested my ir-led-surfaces they are just awesome but not intelligent (unlike TSOPs) but you can make them intelligent using your programming skills and some thinking with correct technique they can detect presenccase) up to 50cm (*conditions applied ) even in the presence of very iremitting audience.
5.11 working of Ir
in words : Take a reading with IRIR-led is ON. This way you get reading because of IRassumes that the neighbouring IR conditions remains unchanged in between two readings. 5.8.9 Circuit :
• Atmega8 • IR-led-Photodiode• reflecting surface
Christ Polytechnic Institute
Photodiode array
dimensional array of hundreds or thousands of photodiodes can position sensor, for example as part of an angle sensor
advantage of photodiode arrays (PDAs) is that they allow for high speed parallel read out since the driving electronics may not be built in like a
CCD sensor.
Obstacle Detection Using IR -led-Photodiode
-photodiode pair for more than 30 different lights and surfaces they are just awesome but not intelligent (unlike TSOPs) but you can make them intelligent using your programming skills and some thinking with correct technique they can detect presence of white surface (paper in my case) up to 50cm (*conditions applied ) even in the presence of very ir
5.11 working of Ir
in words : Take a reading with IR-led OFF and subtract it from reading when s way you get reading because of IR-led only. This principle
assumes that the neighbouring IR conditions remains unchanged in between two readings.
Photodiode reflecting surface
Page 75
dimensional array of hundreds or thousands of photodiodes can angle sensor.[9] One
advantage of photodiode arrays (PDAs) is that they allow for high speed parallel read out since the driving electronics may not be built in like a
photodiode pair for more than 30 different lights and surfaces they are just awesome but not intelligent (unlike TSOPs) but you can make them intelligent using your programming skills and some thinking
e of white surface (paper in my case) up to 50cm (*conditions applied ) even in the presence of very ir-
5.11 working of Ir-photodiode
led OFF and subtract it from reading when led only. This principle
assumes that the neighbouring IR conditions remains unchanged in between two readings.
Christ Polytechnic Institute Page 76
• BC547 or any switching element • some discretes
CAUTION: As you can see, there is no resistance in series with IR-led. so if the transistor is kept ON for more than few milliseconds, IR-led will be damaged. By default, the output of atmega pins is high when unprogrammed. So first program the chip and then connect IR-led, or use a toggle switch in between. So, how far can it go??? that’s the question which came in everyone's mind while using ir-sensors. normally, people think that ir-led-photodiode works up to 12-15 cms only for longer distances we should use TSOP. So here i tested my ir-pair for a distance of 50cms the main principle is to overdrive the ir-led at higher voltage with 7V i got 50cms. (CAUTION : remember, overdriving is risky if not done properly)
Christ Polytechnic Institute Page 77
Advantages:
Reduced man efforts
Save time
Speedy
Economically cheaper
Required less space
Dis-Advantages:
Some times faulty
Affected by external wheather
Maintanence required
Not get specified Judgement
Christ Polytechnic Institute Page 78
Chapter 6: Conclusion
By performing this project we at last concluded that when the Train (line
follower) will pass in the way than the IR rays of the sensors will cuts off and
the gate will automatically controlled.
By this we get the idea how to controlled the gate automatically and how this
problem helpful for others.
Christ Polytechnic Institute Page 79
Chapter 7: Further Extended
Here we have use little different concept of our problem. Many of student
have an idea of this profect and also some what had also done it. Here in our
problem Automatic Railway Gate Crossing there is mainly relation wth the
Train and Gate (which is automatically opened).
But we have designed the retrived different concept in case of the train we
are making LINE FOLLWER ROBOT as our train and as the robot will pass
through the sensors the IR rays will cuts off and the Gate will automatically
closed.
So by this it seems little different than others.
Also our problem in future may be useful for traffic problem also useful for
Indian Railway for the auto-gate mechanisms as by this they reduced the jobs
for the gate watch man for controlling.
Christ Polytechnic Institute Page 80
Bibliography:
indianengineer.wordpress.com
www.mycollegeproject.com
www.seminarprojects.com
www.electrofriends.com
www.scribd.com
www.engineers.com
www.wikipedia.com
www.robotics .com
www.engineersgarage.com