Department of Mechanical Engineering Maharishi Markandeshwar Engineering College Mullana, Ambala (HR) - 133203
Department of Mechanical Engineering Maharishi Markandeshwar Engineering College Mullana, Ambala (HR) - 133203
Project Members
Amit Singh Bhoj (11125132)
Bhanu Negi (11125169)
Chandan Singh Negi (11125178)
Shreyansh (11125359)
This is to certify that Project Associates Amit Singh Bhoj (11125132), Bhanu
Negi (11125169), Chandan Singh Negi (11125178) and Shreyansh (11125359)
of Bachelor of Technology 8thsem, Mech. Engg. have successfully completed
the project on RAILWAY GATE AUTOMATIC OPENING. In the partial
fulfillment for the award of Bachelor of Technology degree from
MAHARISHI MARKANDESHWAR UNIVERSITY, MULLANA during
academic 2015-2016.
We wish them a prosperous, happy and bright future with all the great silvery
success in his career.
Sign:______________________
1. Candidate’s Declaration 1
2. Certification 2
3. Acknowledgement 3
4. Abstract 5
5. Railway Gate Automatic Opening 6
6. Overview 6
7. Project Description 7
8. Component Used 11
9. Bill of Material 12
10. Microcontroller 13
19. Capacitor 38
20. Rectifier 40
21. Transformer 42
22. Step Down Transformer 43
23. Crystal Oscillator 44
The main aim of Major project is to expose the student to the industrial
technical problems to which he is to be exposed in the future life. In an
organization where Making Things Right in the first instance is the driving
motto, perfection and accuracy are inevitable.
We have worked for Four months on the topic entitled “Automatic Railway
Gate Opening”. We have the honor to work as a student of Maharishi
Markandeshwar Engineering College to the extent of my technical capabilities.
Doing this tenure, I have acquired a sufficient knowledge on Microcontroller
and Sensors.
We remained actively associated with one of the most demanding field of
mechanical. The time spent on the aforesaid topic has really proved to be very
useful and will remain enduring throughout my professional career. Brief
outline of the work is covered under the following heads.
We would like to thank our project guide Mr. Anu Anand who guided us in the
making of a successful project.
We would like to express our gratitude to PROF. N.K Batra (H.O.D. ME
Deptt), who motivated us and helped us in every step of our project work
We would also like to thanks all the faculty of Mechanical Department who
contributed directly or indirectly towards the completion of the project.
In conclusion, I must say that the Major project has helped me to enhance my
working skills & stamina and to further enlighten me to enter a new phase of
life after completion of the degree program.
The term also applies when a light rail line with separate right-of-way or
reserved track crosses a road in the same fashion. Other names include railway
crossing, railroad crossing, road through railroad, train crossing or grade
crossing.
6. Overview
Early level crossings had a flagman in a nearby booth who would, on the
approach of a train, wave a red flag or lantern to stop all traffic and clear the
tracks. Manual or electrical closable gates that barricaded the roadway were
later introduced. The gates were intended to be a complete barrier against
intrusion of any road traffic onto the railway. In the early days of the railways
much road traffic was horse drawn or included livestock. It was thus necessary
to provide a real barrier. Thus, crossing gates, when closed to road traffic,
crossed the entire width of the road. When opened to allow road users to cross
the line, the gates were swung across the width of the railway, preventing any
pedestrians or animals getting onto the line.
With the appearance of motor vehicles, this barrier became less effective and
the need for a barrier to livestock diminished dramatically. Many countries
therefore substituted the gated crossings with weaker but more highly visible
barriers and relied upon road users following the associated warning signals to
stop.
Level crossings present a significant risk of collisions between trains and road
vehicles. Level crossings in India, China, Thailand, and Malaysia are still
largely manually-operated, where the barriers are lowered using a manual
switch when trains approach. Block diagram of the automatic railway gate
system is represented below.
This type of gates can be employed in an unmanned level crossing where the
chances of accidents are higher and reliable operation is required. Since, the
operation is automatic; error due to manual operation is prevented. Automatic
railway gate control is highly economical microcontroller based arrangement,
designed for use in almost all the unmanned level crossings in the country.
Existing System:-
2. Time consuming.
6. The gate will be closed till the whole train passes out.
Software Used:-
2. Keil Compiler
3. Micro Flash Programmer for loading the code into the controller.
Advantages:-
1. Microcontroller
2. IC ULN2803
3. Operational amplifier
4. DC Geared Motor
5. Resistor
6. IR Sensors
7. Software
8. Capacitor
9. Rectifier
10.Transformer
11.Crystal oscillator
12.Toy train and track
1. Microcontroller 350
2. IC ULN2803 70
3. OP AMP 70
5. Resistors 5*6=30
6. IR Sensors 8*4=32
7. Cylindrical Capacitor 10
8. Rectifier 10
A microcontroller is a kind of miniature computer that you can find in all kinds
of gizmos. Some examples of common, every-day products that have
microcontroller’s built-in . If it has buttons and a digital display, chances are it
also has a programmable microcontroller brain. Every-Day Examples of
Devices that Contain Microcontrollers Try making a list and counting how
many devices with microcontrollers you use in a typical day. Here are some
examples: if your clock radio goes off, and you hit the snooze button a few
times in the morning, the first thing you do in your day is interact with a
microcontroller. Heating up some food in the microwave oven and making a
call on a cell phone also involve operating microcontrollers. That’s just the
beginning. Here are a few more examples: turning on the television with a
handheld remote, playing a handheld game, using a calculator, and checking
your digital wristwatch. All those devices have microcontrollers inside them
that interact with you.
The 8051 architecture provides many functions (central processing unit (CPU),
random access memory (RAM), read-only memory (ROM), input/output (I/O),
interrupt logic, timer, etc.) in one package:
1) 8-bit arithmetic logic unit (ALU) and accumulator, 8-bit registers (one
16-bit register with special move instructions), 8-bit data bus and 2×16-
bit address bus/program counter/data pointer and related 8/11/16-bit
operations; hence it is mainly an 8-bit microcontroller
Boolean processor with 17 instructions, 1-bit accumulator, 32 registers (4 bit-
addressable 8-bit) and up to 144 special 1 bit-addressable RAM variables (18
bit-addressable 8-bit)
Once a UART, and a timer if necessary, has been configured, the programmer
needs only write a simple interrupt routine to refill the send shift register
whenever the last bit is shifted out by the UART and/or empty the full receive
shift register (copy the data somewhere else). The main program then performs
serial reads and writes simply by reading and writing
2.)GND: Ground.
3.) Port 1: Port 1 is an 8-bit bi-directional I/O port. Port pins P1.2 to P1.7
provide internal pull-ups. P1.0 and P1.1 require external pull-ups. P1.0 and P1.1
also serve as the positive input (AIN0) and the negative input (AIN1),
respectively, of the on-chip precision analog comparator. The Port 1 output
buffers can sink 20 mA and can drive LED displays directly. When 1s are
written to Port 1 pins, they can be used as inputs. When pins P1.2 to P1.7 are
used as inputs and are externally pulled low, they will source current (IIL)
because of the internal pull-ups. Port 1 also receives code data during Flash
programming and verification.
4.) Port 3: Port 3 pins P3.0 to P3.5, P3.7 are seven bi-directional I/O pins with
internal pull-ups. P3.6 is hard-wired as an input to the output of the on-chip
comparator and is not accessible as a general-purpose I/O pin. The Port 3 output
buffers can sink 20 mA. 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
AT89S2051/S4051 as listed below:
Table no. 1.3 representing the alternate functions of its respective port pin
5.) RST:Reset input. Holding the RST pin high for two machine cycles while
the is running resets the device. Each machine cycle takes 6 or clock cycles.
6.) XTAL1:Input to the inverting amplifier and input to the internal clock
operating circuit.
The standard 8051 microcontroller contains 128 bytes of Internal RAM that are
available to the developer as working memory for variables and/or for the
operating stack. Instructions that refer to addresses in the range of 00h through
7Fh refer to the 8051's Internal RAM, while addresses in the range of 80h
through FFh refer to Special Function Registers (SFRs).
Although the 8052 has 256 bytes of Internal RAM, the above method of
referrencing them remains true. Any address between 00h and 7Fh refers to
Internal RAM whereas address in the range of 80h through FFh refer to SFRs.
Thus, to read the value contained in Internal RAM address 90h, the developer
would need to code something along the lines of the following:
It is very important to understand that the above code is not the same as the
following:
Program memory
Program memory (PMEM, though less common in usage than IRAM and
XRAM) is up to 64 KiB of read-only memory, starting at address 0 in a separate
address space. It may be on- or off-chip, depending on the particular model of
chip being used. Program memory is read-only, though some variants of the
8051 use on-chip flash memory and provide a method of re-programming the
memory in-system or in-application. In addition to code, it is possible to store
read-only data in program memory, accessed by the MOVC A,
@DPTR instruction. Data is fetched from the address specified in the 16-bit
special function register DPTR.
Special jump and call instructions make access within the same 2 KiB of
program memory slightly smaller
Features
• Output Voltage to 50 V.
Pinout
Fig. 3.2 circuit inside of IC ULN 2803 between in and out port
Q1 and Q2 both will not conduct as there is no base current provided to them.
Thus, nothing will appear at the output (OUT).
Input current will increase and both transistors Q1 and Q2 will begin to conduct.
Now, input current of Q2 is combination of input current and emitter current of
Q1, so Q2 will conduct more than Q1 resulting in higher current gain which is
very much required to meet the higher current requirements of devices like
motors, relays etc. Output current flows through Q2 providing a path (sink) to
Operational amplifiers had their origins in analog computers, where they were
used to do mathematical operations in many linear, non-linear and frequency-
dependent circuits. The popularity of the op-amp as a building block in analog
circuits is due to its versatility. Due to negative feedback, the characteristics of
an op-amp circuit, its gain, input and output impedance, bandwidth etc. are
determined by external components and have little dependence on temperature
coefficients or manufacturing variations in the op-amp itself.
Op-amps are among the most widely used electronic devices today, being used
in a vast array of consumer, industrial, and scientific devices. Many standard IC
op-amps cost only a few cents in moderate production volume; however some
integrated or hybrid operational amplifiers with special performance. Op-amps
may be packaged as components, or used as elements of more complex
integrated circuits.
As the digital pulses from the controller increase in frequency, the stepping
movement converts into a continuous rotation with the velocity of the rotation
directly proportional to the frequency of the control pulses. Stepper motors are
widely used because of their low cost, high reliability, and high torque at low
speeds. Their rugged construction enables you to use stepper motors in a wide
environmental range.
A wide range of rotational speeds can be utilized since the speed of a step
motor is proportional to the frequency of the input pulses from your controller.
Very low speed rotation is possible with a load that is coupled directly to the
shaft of the stepper motor.
There are three kinds of step motors: permanent magnet, hybrid, and variable
reluctance. Hybrid step motors offer the most versatility and combine the best
characteristics of variable reluctance and permanent magnet stepper motors.
Hybrid stepper motors are constructed with multi-toothed stator poles and a
permanent magnet rotor. A standard hybrid stepper motor has 200 rotor teeth
and rotates 1.8 degrees per step. Hybrid stepper motors provide high static and
dynamic torque and they run at very high step rates. Applications for hybrid
stepper motors include computer disk drives and cd players. Hybrid stepper
motors are also widely used in industrial and scientific applications. Hybrid step
motors are used in robotics, motion control, automated wire cutting, and even in
high-speed fluid dispensers.
Step Modes
Stepper motor "step modes" include full step, half step, and micro step. The
type of step is dependent on the stepper motor driver controlling the stepper
motor. Many stepper motor controllers are multi-step capable (usually adjusted
by switch setting).
Standard hybrid stepping motors have 200 full steps per revolution. If you
divide the 200 steps into the 360 degrees of rotation you get 200 1.8 degree
steps. Normally this is achieved by energizing both windings while alternately
reversing the current, meaning one pulse from the driver is equal to one full step
on the step motor.
Half Step
Half Step means that the stepping motor is rotating at 400 steps per revolution
(0.9 degree steps x 400 = 360 degrees). First one winding is energized and then
two windings are alternately energized. This will cause the rotor of the stepping
motor to move at half the distance (0.9 degrees). In half-step mode, a typical
stepper motor provides about 30% less torque, but it provides a smoother
motion than it would in full-step mode.
Micro step
Stepping motors are often used for linear motion control using a lead screw or
worm gear drive. The pitch of the lead screw controls the amount of linear
distance traveled in one revolution of the screw. So, if the lead is equal to one
inch per revolution and there are 200 full steps in one revolution of the stepping
motor shaft, then the resolution of the lead screw system would be 0.005 inches
per step. Finer resolutions can be attained using the step motor and stepping
motor driver combination in micro step mode.
The stepper motor is controlled by a stepper motor driver board. The stepper
motor driver receives step and direction signals from a control system, typically
a computer, and converts them into electronic signals which run the stepper
motor. One pulse is needed for every step of the stepper motor shaft. In full-step
mode, assuming you're using a standard 200 step motor, 200 steps or pulses
completes one revolution of the stepping motor shaft. The speed and rotation of
the stepper motor shaft is directly proportional to the frequency of the pulse.
Fig.6.1- Resistor
Principle of Operation
Detecting Brightness
Since the sensor works by looking for reflected light, it is possible to have a
sensor that can return the value of the reflected light. This type of sensor can
then be used to measure how "bright" the object is. This is useful for tasks like
line tracking. Now for the detection of amount of infrared rays are being
reflected from the object. We demonstrate another activity by using infrared
sensors with using lightly coloured object and dark coloured object .Fig. 7.3
represent the following activity.
Infrared waves are not visible to the human eye. In the electromagnetic
spectrum, infrared radiation can be found between the visible and microwave
regions. The infrared waves typically have wavelengths between 0.75 and
1000µm.
The wavelength region which ranges from 0.75 to 3µm is known as the near
infrared regions. The region between 3 and 6µm is known as the mid-infrared
and infrared radiation which has a wavelength greater higher than 6µm is
known as far infrared.
All objects which have a temperature greater than absolute zero (0 Kelvin)
posses thermal energy and are sources of infrared radiation as a result.
Optical components, such as optical lenses made from quartz, CaF2, Ge and Si,
polyethylene Fresnel lenses and Al or Au mirrors, are used to converge or focus
the infrared radiation. In order to limit spectral response, band-pass filters can
be used.
Next, infrared detectors are used in order to detect the radiation which has been
focused. The output from the detector is usually very small and hence pre-
amplifiers coupled with circuitry are required to further process the received
signals.
Infrared Tracking
The C51 Compiler translates C source files into relocatable object modules
which contain full symbolic information for debugging with the µVision
Debugger or an in-circuit emulator. In addition to the object file, the compiler
generates a listing file which may optionally include symbol table and cross
reference information
19. Capacitor
A capacitor (originally known as a condenser) is a passive two-
terminal electrical component used to store electrical energy temporarily in
an electric field. The forms of practical capacitors vary widely, but all contain at
least two electrical conductors (plates) separated by a dielectric (i.e.
an insulator that can store energy by becoming polarized). The conductors can
be thin films, foils or sintered beads of metal or conductive electrolyte, etc. The
non-conducting dielectric acts to increase the capacitor's charge capacity.
Materials commonly used as dielectrics include glass, ceramic, plastic
film, air, vacuum, paper, mica, and oxide layers. Capacitors are widely used as
The larger the surface area of the "plates" (conductors) and the narrower the gap
between them, the greater the capacitance is. In practice, the dielectric between
the plates passes a small amount of leakage current and also has an electric field
strength limit, known as the breakdown voltage. The conductors
and leads introduce an undesired inductance and resistance.
20. Rectifier
A rectifier is an electrical device that converts alternating current (AC), which
periodically reverses direction, to direct current (DC), which flows in only one
direction. The process is known as rectification.
Rectifiers have many uses, but are often found serving as components of
DC power supplies and high-voltage direct current power transmission systems.
Rectification may serve in roles other than to generate direct current for use as a
source of power. Detectors of radio signals serve as rectifiers. In gas heating
systems flame rectification is used to detect presence of a flame.
Halfwave Rectifier
21. Transformer
Step down transformer: is one whose secondary voltage is less than its primary
voltage. It is designed to reduce the voltage from the primary winding to the
secondary winding. This kind of transformer “steps down” the voltage applied
to it.