You are on page 1of 95

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM

USING SOLAR PANEL

CHAPTER 1

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
INTRODUCTION
We know that the railway network of India is the biggest in south Asia and perhaps the most
complicated in all over the world. There are so many different types of trains local, fast, super
fast, passenger, goods. etc. and there so many multiple routs.
In this project we try to give the same prototype for this type of trains. We are using
microcontroller 8051 as CPU. The motion of the train is controlled by the DC Motor, for
displaying message in the train we are using LCD Display of two lines. The train is designed for
two stations, named as Ujjain & Indore. The Stoppage time is of 2Sec. There is a LCD display
for showing various messages in the train for passengers. Before starting at station the train
blows the buzzer.
Whenever any engine observer an obstacle on its track it will stops automatically the
train. When the obstacle or other trains are removed from the track then train will start and go on.
Present project is designed using 8051 microcontroller to avoid railway accidents at the track
when two train are at same track, This project utilizes two powerful IR module; two pair of IR
module are fixed at one train at front and back side of the train and the two pair of IR module are
used at other train because when the two trains are at same track than the train IR module
observe the obstacle at track than the train will stop (motor will stop).
We are also including automatic gate controller. In this section we are including read
switch (this is magnetically operated) are fixed at 1km on both sides of the gate. When train
arrives at the sensing point alarm is triggered at the railway crossing point so that the people get
intimation that gate is going to be closed and at that time the LCD display the message GATE
WILL CLOSE. Then the control system activates and closes the gate on either side of the track.
Once the train crosses the other end control system automatically lifts the gate and the gate will
open and at that time the LCD display the message GATE WILL OPEN.
The power supply will provide by the solar energy in the project. We are also used the
solar panel for the power and the train will also run by the solar power. We are also used the
secondary power supply by the battery. When the train will run in night than we use the
secondary power supply.

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

WHY WE CHOOSE THIS PROJECT


Now a days public is facing many threats from the railway department by which they are
hesitating to plan a train journey. The main reason for this is due to the accidents that occur due
to negligence of train drivers. Though the railway department is trying to take actions to reduce
such informal things but couldnt see the face of success. To help out the department we have
designed our system.
We are seen in the railway the many problems are face and the many workers are
required in railway so we design a project according to requirement of railway
This project is introduced to railway gate controlling train intelligence. It means we
reduce the accident in the railway because we use the intelligence train. In the intelligence train
we include the driverless train(in this we defined the two station Ujjain and Indore and train will
automatic stop at the station and after some second the train will start and this process run
continuously) and also the IR sensor are used. (This is used to define the obstacle in front of
train).
This project also provide the time limitation and the main problem in railway is delay the train
50 its also reduced by this project.

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

FUTURE SCOPE OF THIS PROJECT

This project is used for developing countries for bright future of countries.
It helps us to control the train without drivers and stations will indicate on LCD so
passenger doesnt have any difficulty.
The major advantage of this project it avoid the accidents.
These projects reduce the power consumption.
It is increase the technological trends and in this way help the people in many ways.

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

CHAPTER 2

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

WORKING
We are design the train automation system, we are dividing the project in two section
1. Intelligence train
2. Automatic gate controller
So first we explain the working of intelligence train, in the intelligence train when the train will
start from the first station (say Ujjain) at this time the LCD shows the message WELCOME TO
INTELLIGENCE TRAIN , after some time the motor will start train travel along the track,
again LCD display the message NEXT STATION INDORE. When the read switch is contact
with magnet (the magnet is attached with train) than the signal is send to the microcontroller,
according to signal the microcontroller provide the signal to the relay and motor will stop and at
that time the LCD display the message INDORE, before the train starting the buzzer will glow
and train will goes to Ujjain. If any cases when the train has come on the same track and both
train on the same track than the IR sensor detect the obstacle or train than the both train is stop,
at that time LCD display the message SORRY FOR THE INCONVINIENCE .
The second section is automatic gate controller, in this section the two read switch is placed
along the track and the distance between the gate and read switch is 1km. when the train is
contact with read switch than the read switch send the signal to microcontroller and
microcontroller provide the signal according to signal to L293D and its connected to DC motor
and motor move, close the gate and at that time the LCD display the message GATE WILL
CLOSE. The buzzer also glows at that time. When train is contact with the other end read
switch than at that time the gate will open and the LCD also display the message GATE WILL
OPEN.
This process repeat in our project

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

BLOCK DIAGRAM

1. BLOCK DIAGRAM OF INTELLIGENCE TRAIN

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

2. BLOCK DIAGRAM OF AUTOMATIC GATE CONTROLLER

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

READ SWITCH SENSOR

BUZZER
MICRO CONTROLLER P89V51RD2

LCD
L292D
DC MOTOR
POWER SUPPLY

10

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
CIRCUIT DIAGRAM
1. CIRCUIT DIAGRAM OF INTELLEGENCE TRAIN

2. CIRCUIT DIAGRAM OF AUTOMATIC GATE CONTROLLER


11

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

PCB LAYOUT:
1. PCB LAYOUT OF INTELLEGENCE SYSTEM
A. TOP VIES OF INTELLIGENCE TRAIN
12

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

B). BOTTOM VIEW OF INTELLIGENCE TRAIN

2. PCB OF AUTOMATIC GATE CONTROLLER


A. TOP VIEW OF AGC

13

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

B. THE BOTTOM VIEW OF AGC

FLOW CHART

14

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

TESTING
A) Hardware
1. Continuity test
15

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
First of all we checked the PCB that all the tracks are as per the design of PCB and
showing continuity with the help of millimeter PCB layout.
2. Short circuit test
Then we check the PCB for any unwanted short circuit with the help of millimeter
and PCB layout.
3. Soldering
In the next step, we soldered the required components. And then checked that there
are no any unwanted short occurred due to soldering without putting ICs and keeping
power supply off.
B) Power supply test
In the next step, we put power supply on and checked whether required voltage is
appearing at the required voltage is appearing at the required points ie.+Vcc and GND
at respective points. We took care of not connecting ICs in the circuit while
performing this test.
C) Microcontroller test
For testing the microcontroller, we wrote the square wave generation program for
generating square wave on each port pin. Then we fed the program in micron roller
and checked the output with the help of CRO by connecting the microcontroller in the
circuit. We took care of not connecting any other IC in the circuit.

16

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

CHAPTER 3

RESISTOR
A resistor is a 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.
This relationship is represented by Ohm's law:

17

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

Where I is the current through the conductor in units of amperes, V is the potential difference
measured across the conductor in units of volts, and R is the resistance of the conductor in units
of ohms.
The ratio of the voltage applied across a resistor's terminals to the intensity of current in the
circuit is called its resistance, and this can be assumed to be a constant (independent of the
voltage) for ordinary resistors working within their ratings.

Electronic symbols and notation


The symbol used for a resistor in a circuit diagram varies from standard to standard and country
to country. Two typical symbols are as follows;

American-style symbols.
(c) potentiometer

(a) Resistor,

(b) rheostat

(variable

resistor),

and

IEC-style resistor symbol


The notation to state a resistor's value in a circuit diagram varies, too. The European notation
avoids using a decimal separator, and replaces the decimal separator with the SI prefix symbol
for the particular value. For example, 8k2 in a circuit diagram indicates a resistor value of
8.2 k. Additional zeros imply tighter tolerance, for example 15M0. When the value can be
expressed without the need for an SI prefix, an 'R' is used instead of the decimal separator. For
example, 1R2 indicates 1.2 , and 18R indicates 18 . The use of a SI prefix symbol or the letter
'R' circumvents the problem that decimal separators tend to 'disappear' when photocopying a
printed circuit diagram.

Theory of operation

18

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

The hydraulic analogy compares electric current flowing through circuits to water flowing through pipes.
When a pipe (left) is filled with hair (right), it takes a larger pressure to achieve the same flow of water.
Pushing electric current through a large resistance is like pushing water through a pipe clogged with hair:
It requires a larger push (voltage drop) to drive the same flow (electric current).

Lead arrangements

Through-hole components typically have leads leaving the body axially. Others have leads
coming off their body radials instead of parallel to the resistor axis. Other components may be
SMT (surface mount technology) while high power resistors may have one of their leads
designed into the heat sink.

The Standard EIA Color Code Table per EIA-RS-279 is as follows:

19

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
Color

1st
band

2nd
band

3rd
(multiplier)

band 4th
(tolerance)

Black

100

Brown 1

101

1% (F)

100 ppm

Red

102

2% (G)

50 ppm

Orang
3
e

103

15 ppm

Yellow 4

104

25 ppm

Green 5

105

0.5% (D)

Blue

106

0.25% (C)

Violet 7

107

0.1% (B)

Gray

108

0.05% (A)

White 9

109

Gold

0.1

5% (J)

Silver

0.01

10% (K)

band Temp.
Coefficient

CAPACITOR
A capacitor (originally known as condenser) is a passive two-terminal electrical component used
to store energy in an electric field. The forms of practical capacitors vary widely, but all contain
at least two electrical conductors separated by a dielectric (insulator); for example, one common
20

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
construction consists of metal foils separated by a thin layer of insulating film. Capacitors are
widely used as parts of electrical circuits in many common electrical devices.
When there is a potential difference (voltage) across the conductors, a static electric field
develops across the dielectric, causing positive charge to collect on one plate and negative charge
on the other plate. Energy is stored in the electrostatic field. An ideal capacitor is characterized
by a single constant value, capacitance, measured in farads. This is the ratio of the electric charge
on each conductor to the potential difference between them.
The capacitance is greatest when there is a narrow separation between large areas of conductor;
hence capacitor conductors are often called plates, referring to an early means of construction. In
practice, the dielectric between the plates passes a small amount of leakage current and also has
an electric field strength limit, resulting in a breakdown voltage, while the conductors and leads
introduce an undesired inductance and resistance.
Capacitors are widely used in electronic circuits for blocking direct current while allowing
alternating current to pass, in filter networks, for smoothing the output of power supplies, in the
resonant circuits that tune radios to particular frequencies, in electric power transmission systems
for stabilizing voltage and power flow, and for many other purposes.

Theory of operation

Charge separation in a parallel-plate capacitor causes an internal electric field. A dielectric


(orange) reduces the field and increases the capacitance.
A simple demonstration of a parallel-plate capacitor
21

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
A capacitor consists of two conductors separated by a non-conductive region.[10] The nonconductive region is called the dielectric. In simpler terms, the dielectric is just an electrical
insulator. Examples of dielectric media are glass, air, paper, vacuum, and even a semiconductor
depletion region chemically identical to the conductors. A capacitor is assumed to be selfcontained and isolated, with no net electric charge and no influence from any external electric
field. The conductors thus hold equal and opposite charges on their facing surfaces, [11] and the
dielectric develops an electric field. In SI units, a capacitance of one farad means that one
coulomb of charge on each conductor causes a voltage of one volt across the device.[12]
The capacitor is a reasonably general model for electric fields within electric circuits. An ideal
capacitor is wholly characterized by a constant capacitance C, defined as the ratio of charge Q
on each conductor to the voltage V between them:[10]

Sometimes charge build-up affects the capacitor mechanically, causing its capacitance to vary. In
this case, capacitance is defined in terms of incremental changes:

Applications
Energy storage:
Pulsed power and weapons
Power conditioning:

TRANSISTOR

22

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
A transistor is a semiconductor device used to amplify and switch electronic signals and
electrical power. It is composed of semiconductor material with at least three terminals for
connection to an external circuit. A voltage or current applied to one pair of the transistor's
terminals changes the current through another pair of terminals. Because the controlled (output)
power can be higher than the controlling (input) power, a transistor can amplify a signal. Today,
some transistors are packaged individually, but many more are found embedded in integrated
circuits.
The transistor is the fundamental building block of modern electronic devices, and is ubiquitous
in modern electronic systems. Following its development in the early 1950s, the transistor
revolutionized the field of electronics, and paved the way for smaller and cheaper radios,
calculators, and computers, among other things.

Operation

A simple circuit diagram to show the labels of a NPN bipolar transistor.

The essential usefulness of a transistor comes from its ability to use a small signal applied
between one pair of its terminals to control a much larger signal at another pair of terminals. This
property is called gain. A transistor can control its output in proportion to the input signal; that is,
it can act as an amplifier. Alternatively, the transistor can be used to turn current on or off in a
circuit as an electrically controlled switch, where the amount of current is determined by other
circuit elements.

23

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
There are two types of transistors, which have slight differences in how they are used in a circuit.
A bipolar transistor has terminals labeled base, collector, and emitter. A small current at the
base terminal (that is, flowing between the base and the emitter) can control or switch a much
larger current between the collector and emitter terminals. For a field-effect transistor, the
terminals are labeled gate, source, and drain, and a voltage at the gate can control a current
between source and drain. The image to the right represents a typical bipolar transistor in a
circuit. Charge will flow between emitter and collector terminals depending on the current in the
base. Since internally the base and emitter connections behave like a semiconductor diode, a
voltage drop develops between base and emitter while the base current exists. The amount of this
voltage depends on the material the transistor is made from, and is referred to as VBE.

Application
1) Transistor as a switch
2) Transistor as an amplifier:

Advantages
The key advantages that have allowed transistors to replace their vacuum tube predecessors in
most applications are

No power consumption by a cathode heater.

Small size and minimal weight, allowing the development of miniaturized electronic
devices.

Low operating voltages compatible with batteries of only a few cells.

No warm-up period for cathode heaters required after power application.

Lower power dissipation and generally greater energy efficiency.

Higher reliability and greater physical ruggedness.

Extremely long life. Some transistorized devices have been in service for more than 50
years.

Complementary devices available, facilitating the design of complementary-symmetry


circuits, something not possible with vacuum tubes.

24

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

Insensitivity to mechanical shock and vibration, thus avoiding the problem of micro
phonics in audio applications.

LIGHT EMITTING DIODE


A light-emitting diode (LED) is a semiconductor light source. LEDs are used as indicator lamps
in many devices and are increasingly used for other lighting. Appearing as practical electronic
components in 1962, early LEDs emitted low-intensity red light, but modern versions are
available across the visible, ultraviolet, and infrared wavelengths, with very high brightness.
When a light-emitting diode is switched on, electrons are able to recombine with electron holes
within the device, releasing energy in the form of photons. This effect is called
electroluminescence and the color of the light (corresponding to the energy of the photon) is
determined by the energy gap of the semiconductor. An LED is often small in area (less than
1 mm2), and integrated optical components may be used to shape its radiation pattern. LEDs
present many advantages over incandescent light sources including lower energy consumption,
longer lifetime, improved physical robustness, smaller size, and faster switching. However,
LEDs powerful enough for room lighting are relatively expensive and require more precise
current and heat management than compact fluorescent lamp sources of comparable output.
Light-emitting diodes are used in applications as diverse as aviation lighting, automotive
lighting, advertising, general lighting, and traffic signals. LEDs have allowed new text, video
displays, and sensors to be developed, while their high switching rates are also useful in
advanced communications technology. Infrared LEDs are also used in the remote control units of
many commercial products including televisions, DVD players and other domestic appliances.
LEDs are also used in seven-segment display.

Technology

25

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

Fig.1 The inner workings of an LED


Fig.2 I-V diagram for a diode. An LED will begin to emit light when the on-voltage is exceeded. Typical
on voltages are 23 volts.

Colors and materials


Conventional LEDs are made from a variety of inorganic semiconductor materials. The
following table shows the available colors with wavelength range, voltage drop and material:
Color

Wavelength Voltage
[nm]
[V]

Infrared

> 760

drop

V < 1.63

Semiconductor material
Gallium
arsenide
Aluminum gallium arsenide (AlGaAs)

(GaAs)

610 < < 760 1.63 < V < 2.03

Aluminum
gallium
arsenide
(AlGaAs)
Gallium
arsenide
phosphide
(GaAsP)
Aluminum gallium indium phosphide (AlGaInP)
Gallium(III) phosphide (GaP)

Orange

590 < < 610 2.03 < V < 2.10

Gallium
arsenide
phosphide
(GaAsP)
Aluminium gallium indium phosphide (AlGaInP)
Gallium(III) phosphide (GaP)

Yellow

570 < < 590 2.10 < V < 2.18

Gallium
arsenide
phosphide
(GaAsP)
Aluminium gallium indium phosphide (AlGaInP)
Gallium(III) phosphide (GaP)

Green

500 < < 570 1.9[59] < V < 4.0

Red

Indium gallium nitride (InGaN) / Gallium(III)


nitride
(GaN)
Gallium(III)
phosphide
(GaP)
Aluminium gallium indium phosphide (AlGaInP)

26

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
Aluminium gallium phosphide (AlGaP)

Blue

450 < < 500 2.48 < V < 3.7

Zinc
selenide
(ZnSe)
Indium
gallium
nitride
(InGaN)
Silicon
carbide
(SiC)
as
substrate
Silicon (Si) as substrateunder development

Violet

400 < < 450 2.76 < V < 4.0

Indium gallium nitride (InGaN)

multiple types 2.48 < V < 3.7

Dual
blue/red
blue
with
red
or white with purple plastic

Purple

Ultraviolet < 400

3.1 < V < 4.4

LEDs,
phosphor,

Diamond
(235 nm)[60]
Boron
nitride
(215 nm)[61][62]
Aluminium
nitride
(AlN)
(210 nm)[63]
Aluminium
gallium
nitride
(AlGaN)
Aluminium gallium indium nitride (AlGaInN)
down to 210 nm[64]

Pink

multiple types V ~ 3.3[65]

Blue with one or two phosphor layers:


yellow with red, orange or pink phosphor added
afterwards,
or white with pink pigment or dye.[66]

White

Broad
spectrum

Blue/UV diode with yellow phosphor

V = 3.5

Application
Flashing LEDs are used as attention seeking indicators without requiring external electronics. Flashing
LEDs resemble standard LEDs but they contain an integrated multivibrator circuit that causes the LED to
flash with a typical period of one second. In diffused lens LEDs this is visible as a small black dot. Most
flashing LEDs emit light of one color, but more sophisticated devices can flash between multiple colors
and even fade through a color sequence using RGB color mixing.

Bi-color LEDs are two different LED emitters in one case. There are two types of these. One
type consists of two dies connected to the same two leads ant parallel to each other. Current flow
in one direction emits one color, and current in the opposite direction emits the other color. The
other type consists of two dies with separate leads for both dies and another lead for common
anode or cathode, so that they can be controlled independently.

Tri-color LEDs are three different LED emitters in one case. Each emitter is connected to a
separate lead so they can be controlled independently. A four-lead arrangement is typical with one
common lead (anode or cathode) and an additional lead for each color.
27

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

RGB LEDs are Tri-color LEDs with red, green, and blue emitters, in general using a four-wire
connection with one common lead (anode or cathode). These LEDs can have either common
positive or common negative leads. Others however, have only two leads (positive and negative)
and have a built in tiny electronic control unit.

Alphanumeric LED displays are available in seven-segment and starburst format. Sevensegment displays handle all numbers and a limited set of letters. Starburst displays can display all
letters. Seven-segment LED displays were in widespread use in the 1970s and 1980s, but rising
use of liquid crystal display with their lower power needs and greater display flexibility, has
reduced the popularity of numeric and alphanumeric LED displays.

DIODE
In electronics, a diode is a two-terminal electronic component with an asymmetric transfer
characteristic, with low (ideally zero) resistance to current flow in one direction, and high
(ideally infinite) resistance in the other. A semiconductor diode, the most common type today, is
a crystalline piece of semiconductor material with a p-n junction connected to two electrical
terminals. A vacuum tube diode is a vacuum tube with two electrodes, a plate (anode) and heated
cathode.
The most common function of a diode is to allow an electric current to pass in one direction
(called the diode's forward direction), while blocking current in the opposite direction (the
reverse direction). Thus, the diode can be viewed as an electronic version of a check valve. This
unidirectional behavior is called rectification, and is used to convert alternating current to direct
current, including extraction of modulation from radio signals in radio receiversthese diodes
are forms of rectifiers.
However, diodes can have more complicated behavior than this simple onoff action.
Semiconductor diodes begin conducting electricity only if a certain threshold voltage or cut-in
voltage is present in the forward direction (a state in which the diode is said to be forwardbiased). The voltage drop across a forward-biased diode varies only a little with the current, and
is a function of temperature; this effect can be used as a temperature sensor or voltage reference.
Semiconductor diodes' nonlinear currentvoltage characteristic can be tailored by varying the
semiconductor materials and doping, introducing impurities into the materials. These are
exploited in special-purpose diodes that perform many different functions. For example, diodes
are used to regulate voltage (Zener diodes), to protect circuits from high voltage surges
(avalanche diodes), to electronically tune radio and TV receivers (varactor diodes), to generate
radio frequency oscillations (tunnel diodes, Gunn diodes, IMPATT diodes), and to produce light
(light emitting diodes). Tunnel diodes exhibit negative resistance, which makes them useful in
some types of circuits.
28

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
Diodes were the first semiconductor electronic devices. The discovery of crystals' rectifying
abilities was made by German physicist Ferdinand Braun in 1874. The first semiconductor
diodes, called cat's whisker diodes, developed around 1906, were made of mineral crystals such
as galena. Today most diodes are made of silicon, but other semiconductors such as germanium
are sometimes used.

BUZZER
A buzzer or beeper is an audio signaling device, which may be mechanical, electromechanical, or
piezoelectric. Typical uses of buzzers and beepers include alarm devices, timers and
confirmation of user input such as a mouse click or keystroke.
Buzzer (Electromagnetic) 5 volt - Active Buzzer : Piezo Buzzer (PCB mountable)

General Description
Good performance, general purpose piezo buzzer used commonly in alerting / alarming circuits.
This is a PCB mountable buzzer can be easily soldered to PCB board. Most commonly used in at
5v. Long life, stable performance, High Quality with SOT plastic package

Specification
29

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

Voltage : 4 - 9VDC
Maximum current : 30mA/5VDC
Decibel : > 85db/10cm
Resonant frequency : 2500Hz (+/- 300 HZ)
Operating Temperature : -20 to 70 C

Features

Piezo Buzzers - PCB Mount A 12V dc buzzer requiring no external oscillation circuit.
The buzzer has a black ABS case and PCB pins.
Diameter, external - 23mm
Frequency, resonant - 3300Hz
Sound level SPL - 87dB
Centers, fixing - 27.5mm
Current, max - 15mA
Length / Height, external - 16mm
Pitch, lead - 15mm
Termination Type - SMD
Voltage, supply DC - 12V

Precautions for use

Do not apply DC bias to the piezoelectric buzzer; otherwise insulation resistance may
become low and affect the performance.
Do not supply any voltage higher than applicable to the piezoelectric buzzer.
Do not use the piezoelectric buzzer outdoors. It is designed for indoor use.
If the piezoelectric buzzer has to be used outdoors, provide it with waterproofing
measures; it will not operate normally if subjected to moisture.
Do not wash the piezoelectric buzzer with solvent or allow gas to enter it while washing;
any solvent that enters it may stay inside a long time and damage it.
A piezoelectric ceramic material of approximately 100?m thick is used in the sound
generator of the buzzer. Do not press the sound generator through the sound release hole
otherwise the ceramic material may break. Do not stack the piezoelectric buzzers without
packing.
30

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

Do not apply any mechanical force to the piezoelectric buzzer; otherwise the case may
deform and result in improper operation.
Do not place any shielding material or the like just in front of the sound release hole of
the buzzer; otherwise the sound pressure may vary and result in unstable buzzer
operation. Make sure that the buzzer is not affected by a standing wave or the like.
Be sure to solder the buzzer terminal at 350C max.(80W max.)(soldering iron trip)
within 5 seconds using a solder containing silver.
Avoid using the piezoelectric buzzer for a long time where any corrosive gas (H2S, etc.)
exists; otherwise the parts or sound generator may corroded and result in improper
operation.
Be careful not to drop the piezoelectric buzzer.

READ SWITCH
The basic reed switch consists of two identical flattened ferromagnetic reeds, sealed in a dry
inert-gas atmosphere within a glass capsule, thereby protecting the contact from contamination.
The reeds are sealed in the capsule in cantilever form so that their free ends overlap and are
separated by a small air gap

How does a reed switch work?


When a magnetic force is generated parallel to the reed switch, the reeds become flux carriers in
the magnetic circuit. The overlapping ends of the reeds become opposite magnetic poles, which
attract each other. If the magnetic force between the poles is strong enough to overcome the
restoring force of the reeds, the reeds will be drawn together.
What magnetic force is required to close a reed switch?
31

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
Minimum force - expressed in ampere-turns, will cause the reeds to close, and is called the justoperate force. Since the force between the poles increases as the gap decreases, a force of
approximately half the just-operate force will maintain the operated state. Speed of operation of
the reed switch is determined by the excess of operating force over the just-operate force.
What are the advantages in using reed switches?
They are hermetically sealed in glass environment, free from contamination, and are safe to use
in harsh industrial and explosive environments. Reed switches are immune to electrostatic
discharge (ESD) and do not require any external ESD protection circuits. The isolation resistance
between the contacts is as high as 1015 ohms, and contact resistance is as low as 50 milli-ohms.
Reed switches can directly switch loads as low as a few micro-watts without needing external
amplification circuits, to as high as 120W. When used in combination with magnets and coils,
they can be used to form many different types of relays

RELAY
A relay is an electrically operated switch. Many relays use an electromagnet to operate a
switching mechanism mechanically, but other operating principles are also used. Relays are used
where it is necessary to control a circuit by a low-power signal (with complete electrical isolation
between control and controlled circuits), or where several circuits must be controlled by one
signal. The first relays were used in long distance telegraph circuits, repeating the signal coming
in from one circuit and re-transmitting it to another. Relays were used extensively in telephone
exchanges and early computers to perform logical operations.
A type of relay that can handle the high power required to directly control an electric motor or
other loads is called a contactor. Solid-state relays control power circuits with no moving parts,
instead using a semiconductor device to perform switching. Relays with calibrated operating
characteristics and sometimes multiple operating coils are used to protect electrical circuits from
overload or faults; in modern electric power systems these functions are performed by digital
instruments still called "protective relays".

32

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

Basic design and operation

33

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

A simple electromagnetic relay consists of a coil of wire wrapped around a soft iron core, an
iron yoke which provides a low reluctance path for magnetic flux, a movable iron armature, and
one or more sets of contacts (there are two in the relay pictured). The armature is hinged to the
yoke and mechanically linked to one or more sets of moving contacts. It is held in place by a
spring so that when the relay is de-energized there is an air gap in the magnetic circuit. In this
condition, one of the two sets of contacts in the relay pictured is closed, and the other set is open.
Other relays may have more or fewer sets of contacts depending on their function. The relay in
the picture also has a wire connecting the armature to the yoke. This ensures continuity of the
circuit between the moving contacts on the armature, and the circuit track on the printed circuit
board (PCB) via the yoke, which is soldered to the PCB.
When an electric current is passed through the coil it generates a magnetic field that activates the
armature and the consequent movement of the movable contact either makes or breaks
(depending upon construction) a connection with a fixed contact. If the set of contacts was closed
when the relay was de-energized, then the movement opens the contacts and breaks the
connection, and vice versa if the contacts were open. When the current to the coil is switched off,
the armature is returned by a force, approximately half as strong as the magnetic force, to its
relaxed position. Usually this force is provided by a spring, but gravity is also used commonly in
industrial motor starters. Most relays are manufactured to operate quickly. In a low-voltage
application this reduces noise; in a high voltage or current application it reduces arcing.
When the coil is energized with direct current, a diode is often placed across the coil to dissipate
the energy from the collapsing magnetic field at deactivation, which would otherwise generate a
voltage spike dangerous to semiconductor circuit components. Some automotive relays include a
diode inside the relay case. Alternatively, a contact protection network consisting of a capacitor
and resistor in series (snubber circuit) may absorb the surge. If the coil is designed to be
34

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
energized with alternating current (AC), a small copper "shading ring" can be crimped to the end
of the solenoid, creating a small out-of-phase current which increases the minimum pull on the
armature during the AC cycle.
A solid-state relay uses a thyristor or other solid-state switching device, activated by the control
signal, to switch the controlled load, instead of a solenoid. An optocoupler (a light-emitting diode
(LED) coupled with a photo transistor) can be used to isolate control and controlled circuits.

Types of Relay
Latching relay

A latching relay has two relaxed states (bistable). These are also called "impulse", "keep", or
"stay" relays. When the current is switched off, the relay remains in its last state. This is achieved
with a solenoid operating a ratchet and cam mechanism, or by having two opposing coils with an
over-center spring or permanent magnet to hold the armature and contacts in position while the
coil is relaxed, or with a remanent core. In the ratchet and cam example, the first pulse to the coil
turns the relay on and the second pulse turns it off. In the two coil example, a pulse to one coil
turns the relay on and a pulse to the opposite coil turns the relay off. This type of relay has the
advantage that one coil consumes power only for an instant, while it is being switched, and the
relay contacts retain this setting across a power outage. A remanent core latching relay requires a
current pulse of opposite polarity to make it change state.

Reed relay

35

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
A reed relay is a reed switch enclosed in a solenoid. The switch has a set of contacts inside an
evacuated or inert gas-filled glass tube which protects the contacts against atmospheric
corrosion; the contacts are made of magnetic material that makes them move under the influence
of the field of the enclosing solenoid. Reed relays can switch faster than larger relays, require
very little power from the control circuit. However they have relatively low switching current
and voltage ratings. Though rare, the reeds can become magnetized over time, which makes them
stick 'on' even when no current is present; changing the orientation of the reeds with respect to
the solenoid's magnetic field can resolve this problem

Mercury-wetted relay
A mercury-wetted reed relay is a form of reed relay in which the contacts are wetted with
mercury. Such relays are used to switch low-voltage signals (one volt or less) where the mercury
reduces the contact resistance and associated voltage drop, for low-current signals where surface
contamination may make for a poor contact, or for high-speed applications where the mercury
eliminates contact bounce. Mercury wetted relays are position-sensitive and must be mounted
vertically to work properly. Because of the toxicity and expense of liquid mercury, these relays
are now rarely used.

Polarized relay
A polarized relay placed the armature between the poles of a permanent magnet to increase
sensitivity. Polarized relays were used in middle 20th Century telephone exchanges to detect
faint pulses and correct telegraphic distortion. The poles were on screws, so a technician could
first adjust them for maximum sensitivity and then apply a bias spring to set the critical current
that would operate the relay.

Machine tool relay


A machine tool relay is a type standardized for industrial control of machine tools, transfer
machines, and other sequential control. They are characterized by a large number of contacts
(sometimes extendable in the field) which are easily converted from normally-open to normallyclosed status, easily replaceable coils, and a form factor that allows compactly installing many
relays in a control panel.

IR-SENSOR
A Sensor can be understood as an electrical device which tries to imitate human senses to
perform different functions in an electronic circuit. For example, light sensor helps understand
the intensity of light just like our eyes; Heat sensor helps us know the temperature and
similarly pressure sensor, sound sensor. Let us start with a Light sensor
A Light sensor is basically a transmitter receiver pair in which the transmitter transmits
electromagnetic radiation in the form of waves and these waves upon reflection or direct
transmission are received by the receiver. Based on the different types of electromagnetic
36

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
radiation used we have different types of sensors. The most widely used sensor among them is
the Infrared (IR) sensor

The basic diagram of IR sensor

The ir sensor pair typically consists of an IR transmitter and receiver pair. The IR transmitter is
an led that emits light in the infra red region of light spectrum. Hence the emitter's light cannot
be seen by naked eye. The ir receiver is a diode constructed in such a way that when the diode is
reverse biased ,their light falling on the depleted region causes creation of electron-hole pair and
thus this generated pair constitutes current. Thus the current flowing is proportional to ir light
falling on it.
The emitter is forward biased with a resistor connected in series to limit the current flowing
through it, the receiver is reverse biased with a resistor of order of 10's of kilo ohms(10 k ohms is
the best), to detect the possible voltage change.
Thus the value of voltage at the voltage divider formed on the receiver side varies with the IR
light falling on it. A white surface reflects almost all the light focused on it, and a black surface
absorbs all the light focused on it. so depending upon the surface on which the sensor pair is
facing, different voltage is obtained at the output of receiver section.
Infrared radiation is the portion of electromagnetic spectrum having wavelengths longer than
visible light wavelengths, but smaller than microwaves, i.e., the region roughly from 0.75m to
1000 m is the infrared region. Infrared waves are invisible to human eyes. The wavelength
region of 0.75m to 3 m is called near infrared, the region from 3 m to 6 m is called mid
infrared and the region higher than 6 m is called far infrared. (The demarcations are not rigid;
37

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
regions are defined differently by many). The wavelength of IR wave is 700 nm to 1 mm,
frequency is 430 THz to 300GHz and photon energy is 1.24 mev to 1.7 ev

Types of infrared sensor


Active infrared sensor
Active infrared sensors employ both infrared source and infrared detectors. They operate by
transmitting energy from either a light emitting diode (LED) or a laser diode. A LED is used for
a non-imaging active IR detector, and a laser diode is used for an imaging active IR detector.
In this types of IR sensors, the LED or laser diode illuminates the target, and the reflected
energy is focused onto a detector. Photoelectric cells, Photodiode or phototransistors are
generally used as detectors. The measured data is then processed using various signal-processing
algorithms to extract the desired information.
Active IR detectors provide count, presence, speed, and occupancy data in both night and day
operation. The laser diode type can also be used for target classification because it provides
target profile and shape data.
These sensors are used as reflective opto-sensors. Reflective opto-sensors are either intensity
based or use modulated IR. Intensity based sensors are affected by ambient light. Modulated
Infrared sensors wherein emitter is turned ON and OFF rapidly, are less susceptible to ambient
light. Reflective opto-sensors are used in two configurations.
1. Break Beam Sensors
This type of sensors consists of a pair of light emitting and light detecting elements. Infrared
source transmits a beam of light towards a remote IR receiver creating an electronic fence.
Once a beam is broken/interrupted due to some opaque object, output of detector changes and
associated electronic circuitry takes appropriate actions.
Typical applications of such sensors are intrusion detection, shaft encoder (for measurement of
rotation angle/rate of rotation)

2. Reflectance Sensors
This type of sensors house both an IR source and an IR detector in a single housing in such a
way that light from emitter LED bounces off an external object and is reflected into a detector.
Amount of light reflected into the detector depends upon the reflectivity of the surface.

38

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

This principle is used in intrusion detection, object detection (measure the presence of an object
in the sensors FOV), barcode decoding, and surface feature detection (detecting features
painted, taped, or otherwise marked onto the floor), wall tracking (detecting distance from the
wall), etc.
It can also be used to scan a defined area; the transmitter emits a beam of light into the scan
zone, the reflected light is used to detect a change in the reflected light thereby scanning the
desired zone.

Application of infrared radiation


1. Radiation thermometers
Compared to various other methods of temperature measurement, radiation thermometers have
following features
a) Measurement without direct contact with the object
b) Faster response
c) Easy pattern measurements.
Detectors used for radiation thermometers depend upon the temperature and material of the
object to be measured. For example, glass have peak wavelength near 5 m and hence, detectors
sensitive to these wavelengths are used.
2. Moisture analyzers
These analyzers use those wavelengths which are absorbed by moisture in IR region, i.e., 1.1
m, 1.4 m, 1.9 m, and 2.7 m. Objects are irradiated with light having these wavelengths and
also with reference wavelengths. Lights reflected from the objects depend upon the moisture
content and is detected by analyzer to measure moisture (ratio of reflected light at these
wavelengths to the reflected light at reference wavelength). InGaAs PIN photodiodes, PbS
photoconductive detectors are employed in moisture analyzers.
3. IR Imaging devices
This is one of the prime applications of IR waves, primarily by virtue of its property that it is not
visible. It is used for thermal imagers, night vision devices, etc.
Water, rocks, soil, vegetation, the atmosphere, and human tissue all features emit IR radiation.
Thermal infrared detectors measure these radiations in IR range and map the spatial temperature
distributions of the object/area on an image. Thermal imagers usually composed of In:Sb (indium
antimonide), Gd:Hg (mercury-doped germanium), Hg:Cd:Te (mercury-cadmium-telluride)
39

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
The detectors are cooled to low temperatures using liquid helium or liquid nitrogen. Cooling the
detectors insures that the radiant energy (photons) recorded by the detectors comes from the
terrain and not from the ambient temperature of objects within the scanner itself.
4. Remote sensing
As all objects emit light, the measurement of each wavelength of this emitted light provides lots
of specific information about the object. This is precisely what is done in remote sensing to
obtain information like temperature of land and sea water, gas concentration of atmosphere, etc.
5. Optical Power meters
For long distance optical communication systems, IR beams in the wavelength region from 1.3 to
1.5 are employed. Optical power meters are used to measure light intensity, optical fiber
transmission loss, laser power, etc. in applications like optical fiber communications, lasers, etc.
They use InGaAs PIN photodiodes, etc. for optical power measurement.
6. Sorting devices
These devices use the inherent property of absorption of some IR wavelengths to sort agricultural
crops from stones, clods, etc. Such devices use InGaAs PIN photodiodes, PbS detectors.
7. LD Monitors
The output level and emission wavelength of a Laser Diode varies with the temperature. For the
purpose of automatic stabilization of Laser Diode emission wavelength, Laser diode power is
monitored using InGaAs PIN photodiodes, InAs, InSb detectors, etc

LIQUID CRYSTAL DISPLAY


LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of
applications. A 16x2 LCD display is very basic module and is very commonly used in various devices and
circuits. These modules are preferred over seven segments and other multi segment LEDs. The reasons
being: LCDs are economical; easily programmable; have no limitation of displaying special & even
custom characters (unlike in seven segments), animations and so on.
A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this LCD each
character is displayed in 5x7 pixel matrix. This LCD has two registers, namely, Command and Data.
The command register stores the command instructions given to the LCD. A command is an instruction
given to LCD to do a predefined task like initializing it, clearing its screen, setting the cursor position,
controlling display etc. The data register stores the data to be displayed on the LCD. The data is the ASCII
value of the character to be displayed on the LCD.
40

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
Pin Diagram

Pin Description
Pin
No
1
2
3
4
5
6
7
8

Function

Name

Ground (0V)
Supply voltage; 5V (4.7V 5.3V)
Contrast adjustment; through a variable resistor
Selects command register when low; and data register when high

Ground
Vcc
VEE
Register Select

Low to write to the register; High to read from the register


Sends data to data pins when a high to low pulse is given
8-bit data pins

Read/write
Enable
DB0
DB1
41

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
9
10
11
12
13
14
15
16

Backlight VCC (5V)


Backlight Ground (0V)

DB2
DB3
DB4
DB5
DB6
DB7
Led+
Led-

Required Theory
LCD displays are connected through 14 pins: 8 data pins (D0-D7), 3 control pins (RS, E, R/W), and three
power lines (Vdd, Vss, Vee). Some LCDs have LED backlight feature that helps to read the data on the
display during low illumination conditions. So they have two additional connections (LED+ and LED-),
making altogether 16 pin.

Control pins
The control pin RS determines if the data transfer between the LCD module and an external
microcontroller are actual character data or command/status. When the microcontroller needs to send
commands to LCD or to read the LCD status, it must be pulled low. Similarly, this must be pulled high if
character data is to be sent to and from the LCD module.
The direction of data transfer is controlled by the R/W pin. If it is pulled Low, the commands or character
data is written to the LCD module. And, when it is pulled high, the character data or status information
from the LCD registers is read. Here, we will use one way data transfer, i.e., from microcontroller to LCD
module, so the R/W pin will be grounded permanently.
The enable pin (E) initiates the actual data transfer. When writing to the LCD display, the data is
transferred only on the high to low transition of the E pin

Power supply pins


Although most of the LCD module data sheets recommend +5V d.c. supply for operation, some LCDs
may work well for a wider range (3.0 to 5.5 V). The Vdd pin should be connected to the positive power
supply and Vss to ground. Pin 3 is Vee, which is used to adjust the contrast of the display. In most of the
cases, this pin is connected to a voltage between 0 and 2V by using a preset potentiometer.

Data pins
Pins 7 to 14 are data lines (D0-D7). Data transfer to and from the display can be achieved either in 8-bit
or 4-bit mode. The 8-bit mode uses all eight data lines to transfer a byte, whereas, in a 4-bit mode, a byte

42

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
is transferred as two 4-bit nibbles. In the later case, only the upper 4 data lines (D4-D7) are used. This
technique is beneficial as this saves 4 input/output pins of microcontroller. We will use the 4-bit mode.

LCD Initialization

Before you may really use the LCD, you must initialization and configure it. This is
accomplished by sending a number of initialization instructions to the LCD.
The first instruction we send must tell the LCD whether we'll be communicating with it
with an 8-bit or 4-bit data bus.
We also select a 5x8 dot character front.
These two options are selected by sending the command 38h to the LCD as a command.
For sending command to LCD you have to do the following things.
EN = 0
RS = 0/1(0=Command, 1=data)
DATA = xxx (Any command in the table, or any character to be displayed)
RW = 0(Write mode selected)
EN = 1
Some Delay
EN = 0(Observe the high to low transition on EN)
Enable pin should be made to go a transition from high to low while you are writing the
LCD. This is called as negative edge triggering.
But when you are reading the content of any pin of the LCD i.e. R/W=1, you have to
make Enable pin to go from low to high transition. This is also referred to as positive
edge triggering.

LCD Command Codes


When RS=0, we can send several commands to LCD which will be collected by the data bits (D0-D7).
There are several commands which can let perform several different function they all are listed as under:
CODE (HEX)
INSTRUNCTION REGISTER

COMMAND TO LCD

Clear Display Screen

Return Home
43

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
4

Decrement Cursor (shift Cursor to Left)

Shift Display Right

Increment Cursor (shift cursor to right)

Shift Display Left

Display Off, Cursor Off

Display Off, Cursor On

Display On, Cursor Off

Display On, Cursor Blinking

Display On, Cursor Blinking

10

Shift Cursor Position to Left

14

Shift Cursor Position to Right

18

Shift the entire Display to The Left

1C

Shift the entire Display to The Right

80

Force Cursor to Beginning to 1st line

C0

Force Cursor to Beginning to 2nd line

38

2 lines and 5X7 Matrix

OSCILLATOR
An oscillator is a mechanical or electronic device that works on the principles of oscillation a
periodic fluctuation between two things based on changes in energy. Computers, clocks, watches,
radios, and metal detectors are among the many devices that use oscillators.
The frequency at which an oscillator works is usually determined by a quartz crystal. When a
direct current is applied to such a crystal, it vibrates at a frequency that depends on its thickness,
and on the manner in which it is cut from the original mineral rock. Some oscillators employ
combinations of inductors, resistors, and/or capacitors to determine the frequency. However, the
best stability (constancy of frequency) is obtained in oscillators that use quartz crystals.

44

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

10 RPM 12V DC Motor


10RPM 12V DC geared motors for robotics applications. Very easy to use and available in
standard size. Nut and threads on shaft to easily connect and internal threaded shaft for easily
connecting it to wheel
DC Motors are widely used for motion control in manufacturing industries. Motion of DC motor
is controlled using DC Drive. DC drive changes the speed and direction of a motor. Many of the
DC drives provides programmable facilities means to program the motion of motor. So here I am
giving one such example where one can completely program the motion of motor. Using this
controller one can

Change the direction of motor


45

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

Change the speed of motor


Change the running mode of motor in continuous, reversible or jogging
Change the forward and reverse running time of motor

Features

10RPM 12V DC motors with Gearbox

3000RPM base motor

6mm shaft diameter with internal hole

125gm weight

Same size motor available in various rpm

0.5kgcm torque

LM 7805 VOLTAGE REGULATOR


Voltage Regulator is one of the most important and commonly used electrical component.
Voltage Regulators are responsible for maintaining a steady voltage across an Electronic system.
7805 is a voltage regulator integrated circuit. It is a member of 78xx series of fixed linear voltage
regulator ICs. The voltage source in a circuit may have fluctuations and would not give the fixed
voltage output. The voltage regulator IC maintains the output voltage at a constant value. The xx
46

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
in 78xx indicates the fixed output voltage it is designed to provide. 7805 provides +5V regulated
power supply. Capacitors of suitable values can be connected at input and output pins depending
upon the respective voltage levels.
Pin Diagram:

Pin Description:
Pin
No
1

Function

Name

Input voltage (5V-18V)

Input
47

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
2

Ground (0V)

Ground

Regulated output; 5V (4.8V-5.2V)

Output

How to Use an IC-7805 voltage Regulator


Voltage regulator IC's are the ICs that are used to regulate voltage. IC-7805 is a 5v Voltage
regulator that restricts the voltage output to5 v. It comes with provision to add heat sink .The
maximum value for input to the power | Voltage regulator is 35 v. it can provide a constant steady
voltage flow of 5 v for higher voltage input till the threshold limit of 35v. If the voltage is near to
7.5 v then it does not produce any heat and hence no need for heat sinque. If the voltage input is
more, then the heat produced is more. The schematic given below shows how to use an IC7805. There are 3 pins in IC-7805, pin 1 takes the input voltage and pin 3 produces the output
voltage. The GND of both input and out are given to pin 2.Save this picture for reference.
7805 Voltage Regulator Circuit

I have attached an image of 7805 IC to describe its pin configuration setting. In addition to that I
have also attached a small fully working voltage regulator circuit diagram with this tutorial. The
two capacitors used in the voltage regulator circuit are not mandatory but they are good to
maximize voltage regulation. The capacitor values I have used in this circuit are not written on
stone, you can change them slightly. 7805 IC has a thermal shutdown feature to protect the IC in
case of overheating so it should be safe to use 7805 without a heat sink plate for less than 200mA
load. However should your load cross 200mA, you should consider using a heat sink plate. Heat
sink plate should be large enough to bring 7805 heat to such a level that you can comfortably
touch it. 7805 is a linear voltage regulator, so it is not very efficient and it has drop out voltage
48

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
problem. It wastes a lot of energy in the form of heat. You can calculate the wasted energy with
following formula. This formula will also help you to estimate the size of heat sink plate you will
require to disperse amount of heat generated by 7805. (Input Voltage 5) x Output Current
Suppose the input 15 volt and output current you require is .5 Amp by using above formula (15
5)
x
0.5
=
100.5
=
5W
5W energy is being wasted as heat and you will need a decent sized heat sink plate to disperse
this heat to ease your 7805. On the other hand the energy you are actually using is only (5 x
0.5Amp) =2.5W. So you are going to waste twice energy then you are actually utilizing. On the
other hand, if give your 7805 9V as input at the same amount of load, only 2W { (9-5) x 0.5 }
energy will be wasted as heat. So the conclusion is, the higher the input voltage gets, the less
efficient your 7805 will be. You should try to stay slightly over 7.5V. However dont get bellow
7.5V as your 7805 wont give a regulated output if the input voltage get bellow 7.5V. If your
input voltage is less than 7.5 like 6V then you should consider using a low dropout voltage
regulator such as LM2940. Pin connections of LM2940 are also same like 7805.
You dont need extra components to create a 5 volt regulated power supply with 7805. However
it is a good idea to use one capacitor on input and one on output pins to make output voltage
smooth but then again, they are not necessary to be used. As per specs, 7805 input voltage should
range between 7.5V to 35V but personally I havent tried more than 15V yet. Maximum output
current of 7805 is 1A with a good sized heat sink plate. If you are planning to use more than one
7805 in parallel to get more current (above 1A), you better try to put .5Ohm (10W) resistor on
the output pin of each transistor to cover the slight voltage difference as technically no two 7805
can provide exactly same output voltage.

L293D
L293D is a dual H-bridge motor driver integrated circuit (IC). Motor drivers act as current
amplifiers since they take a low-current control signal and provide a higher-current signal. This
higher current signal is used to drive the motors.

49

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
L293D contains two inbuilt H-bridge driver circuits. In its common mode of operation, two DC
motors can be driven simultaneously, both in forward and reverse direction. The motor
operations of two motors can be controlled by input logic at pins 2 & 7 and 10 & 15. Input logic
00 or 11 will stop the corresponding motor. Logic 01 and 10 will rotate it in clockwise and
anticlockwise directions, respectively.
Enable pins 1 and 9 (corresponding to the two motors) must be high for motors to start operating.
When an enable input is high, the associated driver gets enabled. As a result, the outputs become
active and work in phase with their inputs. Similarly, when the enable input is low, that driver is
disabled, and their outputs are off and in the high-impedance state.
Features of L293D

The L293D is an integrated circuit motor driver that can be used for simultaneous, bidirectional control of two small motors.
Small means small. The L293D is limited to 600mA, but in reality can only handle much
small currents unless you have done some serious heat sinking to keep the ease
temperature down.
Unsure about whether the L293 will work with your motor?
Hook up the circuit and run your motor while keeping your finger on the chip. If it gets
too got to touch, you cant use it with your motor. (Note to students: the L293D should be
ok for your small motor but is not Ok for your gear motor).
The L293D comes in a standard 16-pin, dual in line integrated circuit package. There is
an L293D and an L293D part number. Pick the D version because it has built in fly
back diodes to minimize inductive voltage spikes.
The pin out for the L293 in the 16 pin package is shown below in top view.

Pin Diagram:

50

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

Pin Description:
51

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
Pin
No
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

Function

Name

Enable pin for Motor 1; active high


Input 1 for Motor 1
Output 1 for Motor 1
Ground (0V)
Ground (0V)
Output 2 for Motor 1
Input 2 for Motor 1
Supply voltage for Motors; 9-12V (up to 36V)
Enable pin for Motor 2; active high
Input 1 for Motor 1
Output 1 for Motor 1
Ground (0V)
Ground (0V)
Output 2 for Motor 1
Input2 for Motor 1
Supply voltage; 5V (up to

Enable 1,2
Input 1
Output 1
Ground
Ground
Output 2
Input 2
Vcc 2
Enable 3,4
Input 3
Output 3
Ground
Ground
Output 4
Input 4

LM324
52

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

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.
Pin Diagram:

53

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

Pin Description:
Pin
No
1
2
3
4
5
6
7
8
9
10
11
12
13
14

Function

Name

Output of 1st comparator


Inverting input of 1st comparator
Non-inverting input of 1st comparator
Supply voltage; 5V (up to 32V)
Non-inverting input of 2nd comparator
Inverting input of 2nd comparator
Output of 2nd comparator
Output of 3rd comparator
Inverting input of 3rd comparator
Non-inverting input of 3rd comparator
Ground (0V)
Non-inverting input of 4th comparator
Inverting input of 4th comparator
Output of 4th comparator

Output 1
Input 1Input 1+
Vcc
Input 2+
Input 2Output 2
Output 3
Input 3Input 3+
Ground
Input 4+
Input 4Output 4

Microcontroller P89V51RD2
1. General description

54

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

The P89V51RD2 is an 80C51 microcontroller with 64 KB Flash and 1024 bytes of


data RAM.
A key feature of the P89V51RD2 is its X2 mode option. The design engineer can
choose to run the application with the conventional 80C51 clock rate (12 clocks per
machine cycle) or select the X2 mode (6 clocks per machine cycle) to achieve twice
the throughput at the same clock frequency. Another way to benefit from this feature
is to keep the same performance by reducing the clock frequency by half, thus
dramatically reducing the EMI.
The Flash program memory supports both parallel programming and in serial
In-System Programming (ISP). Parallel programming mode offers gang-programming
at high speed, reducing programming costs and time to market. ISP allows a device
to be reprogrammed in the end product under software control. The capability to
field/update the application firmware makes a wide range of applications possible.
The P89V51RD2 is also In-Application Programmable (IAP), allowing the Flash
program memory to be reconfigured even while the application is running.

2. Features

80C51 Central Processing Unit


5 V Operating voltage from 0 to 40 MHz
64 kB of on-chip Flash program memory with ISP (In-System Programming) and
IAP (In-Application Programming)
Supports 12-clock (default) or 6-clock mode selection via software or ISP
SPI (Serial Peripheral Interface) and enhanced UART
PCA (Programmable Counter Array) with PWM and Capture/Compare functions
Four 8-bit I/O ports with three high-current Port 1 pins (16 mA each)
Three 16-bit timers/counters
Programmable Watchdog timer (WDT)
Eight interrupt sources with four priority levels
Second DPTR register
Low EMI mode (ALE inhibit)

3. Block diagram of P89V51RD2 microcontroller

55

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

56

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
4.pin diagram of P89V51RD2 microcontroller

Symbol

P0.0 to P0.7

Type

I/O

Description

Port 0: Port 0 is an 8-bit open drain bi-directional I/O port. Port


0 pins that have 1s written to them float, and in this state can
be used as high-impedance inputs.Port 0 is also the multiplexed
low-order address and
data bus during accesses to external code and data memory. In
this application, it uses strong internal pull-ups when
transitioning to 1s. Port 0 also receives the code bytes dur ing
the external host mode programming, and outputs the code bytes
during the external host mode verification. External pull-ups are
required during program verification or as a generalpurpose I/O
port.

57

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
P1.0 to P1.7

P1.0

P1.1

P1.2

I/O with
Port 1: Port 1 is an 8-bit bi-directional I/O port with internal
internal pull- pull-ups. The Port 1 pins are pulled high by the internal pull-ups
when 1s are written to them and can be used as inputs in this
up
state. As inputs, Port 1 pins that are externally pulled LOW will
source current (IIL) because o f the internal pull-ups. P1.5, P1.6,
P1.7 have high current drive of 16 mA. Port 1 also receives the
low-order address bytes during the external host mode
programming and verification.
I/O

T2: External count input to Timer/Counter 2 or Clock-out


from Timer/Counter 2
T2EX: Timer/Counter 2 capture/reload trigger and
direction control
ECI: External clock input. This signal is the external
clock input for the PCA.

CEX0: Capture/compare external I/O for PCA Module 0.


Each capture/compare module connects to a Port 1 pin
for external I/O. When not used by the PCA, this pin can
handle standard I/O.

P1.3

I/O

P1.4

I/O

SS: Slave port select input for SPI


CEX1: Capture/compare external I/O for PCA Module 1

P1.5

I/O

MOSI: Master Output Slave Input for SPI


CEX2: Capture/compare external I/O for PCA Module 2

P1.6

I/O

MISO: Master Input Slave Output for SPI


CEX3: Capture/compare external I/O for PCA Module 3

I/O

SCK: Master Output Slave Input for SPI


CEX4: Capture/compare external I/O for PCA Module 4

P1.7

58

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
P2.0 toP2.7

P3.0 toP3.7

I/O with Port 2: Port 2 is an 8-bit bi-directional I/O port with


internal
internal pull-ups. Port 2 pins are pulled HIGH by the
pull-up
internal pull-ups when 1s are written to them and can
be used as inputs in this state. As inputs, Port 2 pins that
are externally pulled LOW will source current (IIL)
because of the internal pull-ups. Port 2 sends the
high-order address byte during fetches from external
program memory and during accesses to external Data
Memory that use 16-bit address . In this
application, it uses strong internal pull-ups when
transitioning to 1s. Port 2 also receives some control signals
and a partial of high-order address bits during
the external host mode programming and verification.
I/O
with internal
pull-up

Port 3: Port 3 is an 8-bit bidirectional I/O port with


internal pull-ups. Port 3 pins are pulled HIGH by the
internal pull-ups when 1s are written to them and can
be used as inputs in this state. As inputs, Port 3 pins that
are externally pulled LOW will source current (IIL)
because of the internal pull-ups. Port 3 also receives
some control signals and a partial of high-order address
bits during the external host mode programming and
verification.

P3.0

RXD: serial input port

P3.1

TXD: serial output port

P3.2

INT0: external interrupt 0 input

P3.3

INT1: external interrupt 1 input

P3.4

T0: external count input to Timer/Counter 0

P3.5

T1: external count input to Timer/Counter 1

P3.6

WR: external data memory write strobe

P3.7

RD: external data memory read strobe

59

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
PSEN

I/O

Program Store Enable: PSEN is the read strobe for


external program memory. When the device is executing
from internal program memory, PSEN is inactive
(HIGH). When the device 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. A
forced HIGH-to-LOW input transition on the PSEN pin
while the RST input is continually held HIGH for more
than 10 machine cycles will cause the device to enter
external host mode programming.

RST

Reset: While the oscillator is running, a HIGH logic state


on this pin for two machine cycles will reset the device. If
the PSEN pin is driven by a HIGH-to-LOW input
transition while the RST input pin is held HIGH, the
device will enter the external host mode, otherwise the
device will enter the normal operation mode.

I
EA

External Access Enable: EA must be connected to VSS


in order to enable the device to fetch code from the
external program memory. EA must be strapped to VDD
for internal program execution. However, Security lock
level 4 will disable EA, and program execution is only
possible from internal program memory. The EA pin can
tolerate a high voltage of 12 V.

ALE/
PROG

I/O

NC

I/O

Address Latch Enable: ALE is the output signal for


latching the low byte of the address during an access to
external memory. This pin is also the programming
pulse input (PROG) for flash programming. Normally the
ALE is emitted at a constant rate of 16 the crystal
Frequency and can be used for external timing and
clocking. One ALE pulse is skipped during each access
to external data memory. However, if AO is set to 1,
ALE is disabled.

No Connect

60

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
XTAL1

Crystal 1: Input to the inverting oscillator amplifier and


input to the internal clock generator circuits.

XTAL2

Crystal 2: Output from the inverting oscillator amplifier.

VDD

Power supply

I
VSS

Ground

SOLAR PANEL
A solar panel (also solar module, photovoltaic module or photovoltaic panel) is a packaged,
connected assembly of photovoltaic cells. The solar panel can be used as a component of a larger
photovoltaic system to generate and supply electricity in commercial and residential applications.
Each panel is rated by its DC output power under standard test conditions, and typically ranges
from 100 to 320 watts. The efficiency of a panel determines the area of a panel given the same
rated output - an 8% efficient 230 watt panel will have twice the area of a 16% efficient 230 watt
panel. Because a single solar panel can produce only a limited amount of power, most
installations contain multiple panels. A photovoltaic system typically includes an array of solar
panels, an inverter, and sometimes a battery and or solar tracker and interconnection wiring.
61

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

Theory and construction


Solar panels use light energy (photons) from the sun to generate electricity through the
photovoltaic effect. The majority of modules use wafer-based crystalline silicon cells or thin-film
cells based on cadmium telluride or silicon. The structural (load carrying) member of a module
can either be the top layer or the back layer. Cells must also be protected from mechanical
damage and moisture. Most solar panels are rigid, but semi-flexible ones are available, based on
thin-film cells. These early solar panels were first used in space in 1958.
Electrical connections are made in series to achieve a desired output voltage and/or in parallel to
provide a desired current capability. The conducting wires that take the current off the panels
may contain silver, copper or other non-magnetic conductive transition metals. The cells must be
62

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
connected electrically to one another and to the rest of the system. Externally, popular terrestrial
usage photovoltaic panels use MC3 (older) or MC4 connectors to facilitate easy weatherproof
connections to the rest of the system.
Bypass diodes may be incorporated or used externally, in case of partial panel shading, to
maximize the output of panel sections still illuminated. The p-n junctions of mono-crystalline
silicon cells may have adequate reverse voltage characteristics to prevent damaging panel section
reverse current. Reverse currents could lead to overheating of shaded cells. Solar cells become
less efficient at higher temperatures and installers try to provide good ventilation behind solar
panels.[1]
Some recent solar panel designs include concentrators in which light is focused by lenses or
mirrors onto an array of smaller cells. This enables the use of cells with a high cost per unit area
(such as gallium arsenide) in a cost-effective way.
The solar cell works in three steps:
1. Photons in sunlight hit the solar panel and are absorbed by semiconducting materials,
such as silicon.
2. Electrons (negatively charged) are knocked loose from their atoms, causing an electric
potential difference. Current starts flowing through the material to cancel the potential
and this electricity is captured. Due to the special composition of solar cells, the electrons
are only allowed to move in a single direction.
3. An array of solar cells converts solar energy into a usable amount of direct current (DC)
electricity.

Efficiency
The efficiency of a solar cell may be broken down into reflectance efficiency, thermodynamic
efficiency, charge carrier separation efficiency and conductive efficiency. The overall efficiency
is the product of each of these individual efficiencies.
A solar cell usually has a voltage dependent efficiency curve, temperature coefficients, and
shadow angles.

63

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
Due to the difficulty in measuring these parameters directly, other parameters are measured
instead: thermodynamic efficiency, quantum efficiency, integrated quantum efficiency, VOC ratio,
and fill factor. Reflectance losses are a portion of the quantum efficiency under "external
quantum efficiency". Recombination losses make up a portion of the quantum efficiency, V OC
ratio, and fill factor. Resistive losses are predominantly categorized under fill factor, but also
make up minor portions of the quantum efficiency, VOC ratio.
The fill factor is defined as the ratio of the actual maximum obtainable power to the product of
the open circuit voltage and short circuit current. This is a key parameter in evaluating the
performance of solar cells. Typical commercial solar cells have a fill factor > 0.70. Grade B cells
have a fill factor usually between 0.4 to 0.7. Cells with a high fill factor have a low equivalent
series resistance and a high equivalent shunt resistance, so less of the current produced by the
cell is dissipated in internal losses.
Single p-n junction crystalline silicon devices are now approaching the theoretical limiting power
efficiency of 33.7%, noted as the ShockleyQueisser limit in 1961. In the extreme, with an
infinite number of layers, the corresponding limit is 86% using concentrated sunlight.

Cadmium telluride solar cell:


A cadmium telluride solar cell uses a cadmium telluride (CdTe) thin film, a semiconductor layer
to absorb and convert sunlight into electricity. Solarbuzz has reported that the lowest quoted thinfilm module price stands at US$0.84 per watt-peak, with the lowest crystalline silicon (c-Si)
module at $1.06 per watt-peak.
The cadmium present in the cells would be toxic if released. However, release is impossible
during normal operation of the cells and is unlikely during res in residential roofs. [34] A square
meter of CdTe contains approximately the same amount of Cd as a single C cell Nickel-cadmium
battery, in a more stable and less soluble form.

How Do Solar Panels Work?


Basically, they convert energy from the sun into electricity. On any bright, cloud-free day, the
sun projects some 1,000 watts of energy on a square meter basis onto the earths surface.
Although converting sunlight into electricity sounds like a simple concept, solar panels work in a
specific and rather complex way.

64

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
The solar cells that are installed in devices ranging from calculators to street lamps and even
your garden lights are called photovoltaic (PV) cells. They are composed of semiconductors like
silicon. Silicon plates are composed of millions of atoms. However, they cannot generate
electricity on their own, because they do not carry positive or negative charges. To initiate the
process of electricity, both positive and negative solar plates must be created. The chemical
combination of silicon and phosphorus results in a negative charge.
Similarly, with the chemical addition of boron to a silicon plate, the plate will carry a positive
charge. When light hits a PV cell, the semiconductor absorbs a certain amount of that light.
When negative solar plates are appropriately angled to the sun, the sun bombards the silicon and
phosphorus atoms on the solar panel with photons. When this happens, certain electrons are set
loose, permitting them to flow.

The negative solar plate is sandwiched with the positive plate, and the
plates are attached to wires that then lead out and connect to a battery
System or appliance.

65

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

The electrons released by the negative plate are attracted to the outer band of the positive plate.
The electrons that are not used are essentially brought back to the silicon/boron negative plate,
and the process of generating electricity restarts.
When this activity is conducted on a large scale, with plates positioned to attract maximum
sunlight throughout the day, there can be sufficient electricity to run many types of electronic
devices. Typically, smaller scale projects will store that eletricity in a battery bank until needed.
This is true for solar garden lights and even the large panels mounted on residential rooftops.
Photovoltaic
In 1839, French scientist Edmund Becquerel discovered that certain materials would give off a
spark of electricity when struck with sunlight. This photoelectric effect was used in primitive
solar cells made of selenium in the late 1800s. In the 1950s, scientists at Bell Labs revisited the
technology and, using silicon, produced solar cells that could convert four percent of the energy
in sunlight directly to electricity. Within a few years, these photovoltaic (PV) cells were
powering
spaceships
and
satellites.
The most important components of a PV cell are two layers of semiconductor material generally
composed of silicon crystals. On its own, crystallized silicon is not a very good conductor of
electricity, but when impurities are intentionally addeda process called dopingthe stage is
set for creating an electric current. The bottom layer of the PV cell is usually doped with boron,
which bonds with the silicon to facilitate a positive charge (P). The top layer is doped with
phosphorus, which bonds with the silicon to facilitate a negative charge (N).
The surface between the resulting "p-type" and "n-type" semiconductors is called the P-N
junction (see the diagram below). Electron movement at this surface produces an electric field
that only allows electrons to flow from the p-type layer to the n-type layer.
When sunlight enters the cell, its energy knocks electrons loose in both layers. Because of the
66

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
opposite charges of the layers, the electrons want to flow from the n-type layer to the p-type
layer, but the electric field at the P-N junction prevents this from happening. The presence of an
external circuit, however, provides the necessary path for electrons in the n-type layer to travel to
the p-type layer. Extremely thin wires running along the top of the n-type layer provide this
external circuit, and the electrons flowing through this circuit provide the cell's owner with
supply of electricity.

Most PV systems consist of individual square cells averaging about four inches on a side. Alone,
each cell generates very little power (less than two watts), so they are often grouped together as
modules. Modules can then be grouped into larger panels encased in glass or plastic to provide
protection from the weather, and these panels, in turn, are either used as separate units or
grouped
into
even
larger
arrays.
The three basic types of solar cells made from silicon are single-crystal, polycrystalline, and
amorphous.
Single-crystal cells are made in long cylinders and sliced into round or hexagonal wafers.
While this process is energy-intensive and wasteful of materials, it produces the highestefficiency cellsas high as 25 percent in some laboratory tests. Because these high-efficiency
cells are more expensive, they are sometimes used in combination with concentrators such as
mirrors or lenses. Concentrating systems can boost efficiency to almost 30 percent. Singlecrystal
accounts
for
29
percent
of
the
global
market
forPV.
67

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
Polycrystalline cells are made of molten silicon cast into ingots or drawn into sheets, then
sliced into squares. While production costs are lower, the efficiency of the cells is lower too
around 15 percent. Because the cells are square, they can be packed more closely together.
Polycrystalline cells make up 62 percent of the global PV market
Amorphous silicon (a-Si) is a radically different approach. Silicon is essentially sprayed onto a
glass or metal surface in thin films, making the whole module in one step. This approach is by
far the least expensive, but it results in very low efficienciesonly about five percent.
A number of exotic materials other than silicon are under development, such as gallium arsenide
(Ga-As), copper-indium-dieseline (CuInSe2), and cadmium-telluride (CdTe). These materials
offer higher efficiencies and other interesting properties, including the ability to manufacture
amorphous cells that are sensitive to different parts of the light spectrum. By stacking cells into
multiple layers, they can capture more of the available light. Although a-Si accounts for only five
percent of the global market, it appears to be the most promising for future cost reductions and
growthpotential.
In the 1970s, a serious effort began to produce PV panels that could provide cheaper solar power.
Experimenting with new materials and production techniques, solar manufacturers cut costs for
solar
cells
rapidly,
as
the
following
graph
shows.
One approach to lowering the cost of solar electric power is to increase the efficiency of cells,
producing more power per dollar. The opposite approach is to decrease production costs, using
fewer dollars to produce the same amount of power. A third approach is lowering the costs of the
rest of the system. For example, building-integrated PV (BIPV) integrates solar panels into a
building's structure and earns the developer a credit for reduced construction costs.

Photovoltaic

costs

(Source:

NREL)

Innovative processes and designs are continually reaching the market and helping drive down
costs, including string ribbon cell production, photovoltaic roof tiles, and windows with a

68

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
translucent film of a-Si. Economies of scale from a booming global PV market are also helping
to reduce costs.
Historically, most PV panels have been used for off-grid purposes, powering homes in remote
locations, cellular phone transmitters, road signs, water pumps, and millions of solar watches and
calculators. Developing nations see PV as a way to avoid building long and expensive power
lines to remote areas. And every year, experimental solar-powered cars race across Australia and
North
America
in
heated
competitions.
More recently, thanks to lower costs, strong incentives, and net metering policies, the PV
industry has placed more focus on home, business, and utility-scale systems that are attached to
the power grid. In some locations, it is less expensive for utilities to install solar panels than to
upgrade the transmission and distribution system to meet new electricity demand. In 2005, for
the first time ever, the installation of PV systems connected to the electric grid outpaced off-grid
PV systems in the United States. As the PV market continues to expand, the trend toward gridconnected
applications
will
continue.
This distributed-generation approach provides a new model for the utilities of the future. Small
generators, spread throughout a city and controlled by computers, could replace the large coal
and nuclear plants that dominate the landscape now.

Advantage

Once solar panels are installed, they produce energy without generating waste or
pollution. They operate with little maintenance or intervention.

Solar electric generation is economically competitive where grid connection or fuel


transport is difficult, costly or impossible. For example: satellites, island communities,
remote locations and ocean vessels.

Once the initial capital cost of building a solar power plant has been met, operating costs
are low when compared to existing power technologies.

69

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

They are applicable for low-power uses such as solar powered garden lights and battery
chargers.

A solar panel saves approximately 0.7 pounds of coal per kWh, or 2 pounds of carbon
dioxide per KWh.

Disadvantage

Solar energy systems do not work at night.

Solar cells are currently costly and require a large initial capital investment.

For larger applications, many photovoltaic cells are needed, corresponding to high
investment costs and large land requirements.

The cost effectiveness of a solar energy system is dependent upon the location and
climate.

70

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

CHAPTER 4

MECHANICAL DESIGN
The mechanical design is divided into three section:
1. Train set
2. Base for the project
3. Base of the motor
TRAIN SET

71

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
We are used three train set in our project. The train set is directly purchased by the market and
we are use that set in our project.
We are design intelligence train so the train set is important for our project and if we design the
train set than this project consumes more time and money so we directly purchased the train set
from the market and we use that.
In our project we use three train set because we design the two intelligence train so the two sets
are use in intelligence and the remaining one set is used for automatic gate controller.
The picture of train set is below

BASE FOR THE PROJECT


We are design the base of our project. The base is design by the iron rectangular rod and wooden
sheet. The length and the breadth of our base is 123cm and 76.2cm respectively.
The tracks of the train are placed at the wooden strip and its attached on the wooden sheet. The
rectangular iron rod is used at the four sides of the rectangular area and its provide the height of
the base.
The picture of the base is:
72

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

BASE OF THE MOTOR


The motor stand are also attach on the base and the motor stand is made by the wooden blocks
and this is attached at the wooden sheet and the motor is used in automatic gate controller.

SOFTWERE DESIGN
1. DIP TRACE
INTRODUCTION
Dip Trace is EDA software for creating schematic diagrams and printed circuit boards. The first
version of Dip Trace was released in August, 2004. The latest version as of October 2012 is Dip
Trace version 2.3. The interface and tutorials are multi-lingual (currently English, Czech,
Russian and Turkish). In January of 2011, Parallax switched from Eagle to Dip Trace for
developing its printed circuit boards. Dip trace is a popular program for designing your own
circuit boards. This document allows you to get started with ease by designing
73

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
simple Schematic and its PCB, pattern and component libraries, then trying
different package features. The tutorial includes step-by-step design guide
and many additional insets that allow you to discover program features.
MODULE
Schematic Design Editor
PCB Layout Editor
Component Editor
Pattern Editor
Shape-Based Auto router
3D PCB Preview, using Wings 3D format

DIAGRAM OF DIPTRACE LAYOUT:

74

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

75

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
KEIL
VISION
Vision3 adds many new features to the Editor like Text Templates, Quick Function
Navigation, and Syntax Coloring with brace high lighting Configuration Wizard for dialog based
startup and debugger setup. Vision3 is fully compatible to Vision2 and can be used in parallel
with Vision2.
What is Vision3?
Vision3 is an IDE (Integrated Development Environment) that helps you write, compile,
and debug embedded programs. It encapsulates the following components:

A project manager.

A make facility.

Tool configuration.

Editor.

A powerful debugger.
To help you get started, several example programs (located in the \C51\Examples,
\C251\Examples, \C166\Examples, and \ARM\...\Examples) are provided.

HELLO is a simple program that prints the string "Hello World" using the Serial Interface.
MEASURE is a data acquisition system for analog and digital systems.
TRAFFIC is a traffic light controller with the RTX Tiny operating system.
SIEVE is the SIEVE Benchmark.
DHRY is the Dhrystone Benchmark.
WHETS is the Single-Precision Whetstone Benchmark.
Additional example programs not listed here are provided for each device architecture.
To create a new project in Vision
1. Select Project - New Project.
2. Select a directory and enter the name of the project file.
3. Select Project - Select Device and select an 8051, 251, or C16x/ST10 device from the Device
Database.
76

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
4. Create source files to add to the project.
5. Select Project - Targets, Groups, Files. Add/Files, select Source Group1, and add the source files
to the project.
6. Select Project - Options and set the tool options. Note when you select the target device from the
Device Database all special options are set automatically. You typically only need to configure
the memory map of your target hardware. Default memory model settings are optimal for most
applications.
7. Select Project - Rebuild all target files or Build target.
Debugging an Application in Vision2

To debug an application created using Vision


1. Select Debug - Start/Stop Debug Session.
2. Use the Step toolbar buttons to single-step through your program. You may enter G, main in the
Output Window to execute to the main C function.
3. Open the Serial Window using the Serial #1 button on the toolbar.
Debug your program using standard options like Step, Go, Break, and so on.
Starting Vision2 and Creating a Project
Vision2 is a standard Windows application and started by clicking on the program icon. To
create a new project file select from the Vision2 menu.
If select the Disassembly Window as the active window all program step

commands work on CPU instruction level rather than program source lines. You
can select a text line and set or modify code breakpoints using toolbar buttons or
the context menu commands.
1.

Click on the Keil uVision Icon on DeskTop.

2.

The following fig will appear.

77

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

3.

Click on the Project menu from the title bar.

4.

Then Click on New Project.

5.
6.
7.

Save the Project by typing suitable project name with no extension in u r own folder
sited in either C:\ or D:\
Then Click on Save button above.
Select the component for u r project. i.e. Philips

8.

Click on the + Symbol beside of Philips.

9.

Select AT89S52 as shown below

10.

Then Click on OK

11.

The Following fig will appear

12.

Then Click either YES or NOmostly NO

13.

Now your project is ready to USE.

14.

Now double click on the Target1, you would get another option Source group 1 as
shown in next page.

15.

Click on the file option from menu bar and select new.

78

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
16.

The next screen will be as shown in next page, and just maximize it by double
clicking on its blue boarder.

17.

Now start writing program in either in C or ASM

18.

For a program written in Assembly, then save it with extension .asm and for C
based program save it with extension .C

19.

Now right click on Source group 1 and click on Add files to Group Source

20.

Now you will get another window, on which by default C files will appear.

21.

Now select as per your file extension given while saving the file

22.

Click only one time on option ADD

23.

Now Press function key F7 to compile. Any error will appear if so happen.

24.

If the file contains no error, then press Control+F5 simultaneously.

25.

The new window is as follows.

26.

Then Click OK

27.

Now Click on the Peripherals from menu bar, and check your required port as
shown in fig below

28.

Drag the port a side and click in the program file.

29.

Now keep Pressing function key F11 slowly and observe.


You are running your program successful.

FLASH MAGIC
79

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
8051 Development Board support major chips From Philips. For programming that are flash
programmable microcontrollers that supports serial programming of devices. Flash
microcontroller can be erased and re-written as many times as possible. Flexibility to reprogram
number of times and its low cost make it ideal for use in a wide areas of applications. This
product is a combination of intelligent hardware and software.
Boot-loader Inside the Chip that understands a protocol received from
computer through serial port . On computer side software called Flash Magic is started that
identifies the hardware and the chip inserted. Program for the target microcontroller can be now
either read back or sent as Intel format HEX file. Support locking of devices to prevent reading
back of programmed chip. After locking the chip can still be erased and used again for loading
new programs. Philips series can only test in Development board.

FEATURES

Support major Philips devices


Lock of programs in chip supported to prevent program copying
Auto Erase before writing and Auto Verify after writing
Informative status bar and access to latest programmed file
Simple and Easy to use

80

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

Computer side software called Flash Magic is executed that accepts the Intel HEX format file
generated from compiler Keil to be sent to target microcontroller. It detects the hardware
connected to the serial port.

81

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
PCB MANUFACTURING PROCESS
It is an important process in the fabrication of electronic equipment. The design of
PCBs (Printed Circuit Boards) depends on circuit requirements like noise immunity, working
frequency and voltage levels etc. High power PCBs requires a special design strategy.
The fabrication process to the printed circuit board will determine to a large extent the
price and reliability of the equipment. A common target aimed is the fabrication of small series of
highly reliable professional quality PCBs with low investment. The target becomes especially
important for customer tailored equipments in the area of industrial electronics.
The layout of a PCB has to incorporate all the information of the board before one can go on the
artwork preparation. This means that a concept which clearly defines all the details of the circuit
and partly defines the final equipment, is prerequisite before the actual lay out can start. The
detailed circuit diagram is very important for the layout designer but he must also be familiar
with the design concept and with the philosophy behind the equipment.

BOARD TYPES
The two most popular PCB types are:

1.

Single Sided Boards


The single sided PCBs are mostly used in entertainment electronics where manufacturing
costs have to be kept at a minimum. However in industrial electronics cost factors cannot
be neglected and single sided boards should be used wherever a particular circuit can be
accommodated on such boards.

2.

Double Sided Boards


Double-sided PCBs can be made with or without plated through holes. The production of
boards with plated through holes is fairly expensive. Therefore plated through hole
boards are only chosen where the circuit complexities and density of components does
not leave any other choice.

82

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
DESIGN SPECIFICATION
(I)

STEPS TAKEN WHILE PREPARING CIRCUIT

(A)

PCB DESIGNING
The main purpose of printed circuit is in the routing of electric currents and signal through a

thin copper layer that is bounded firmly to an insulating base material sometimes called the
substrate. This base is manufactured with an integrally bounded layer of thin copper foil which
has to be partly etched or removed to arrive at a pre-designed pattern to suit the circuit
connections or other applications as required.
The term printed circuit board is derived from the original method where a printed pattern
is used as the mask over wanted areas of copper. The PCB provides an ideal baseboard upon
which to assemble and hold firmly most of the small components.
From the constructors point of view, the main attraction of using PCB is its role as the
mechanical support for small components. There is less need for complicated and time
consuming metal work of chassis contraception except perhaps in providing the final enclosure.
Most straight forward circuit designs can be easily converted in to printed wiring layer the
thought required to carry out the inversion cab footed high light an possible error that would
otherwise be missed in conventional point to point wiring .The finished project is usually neater
and truly a work of art.
Actual size PCB layout for the circuit shown is drawn on the copper board. The board is
then immersed in FeCl3 solution for 12 hours. In this process only the exposed copper portion is
etched out by the solution.
Now the petrol washes out the paint and the copper layout on PCB is rubbed with a
smooth sand paper slowly and lightly such that only the oxide layers over the Cu are removed.
Now the holes are drilled at the respective places according to component layout as shown in
figure.

83

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
(B)

LAYOUT DESIGN
When designing the layout one should observe the minimum size (component body

length and weight). Before starting to design the layout we need all the required components in
hand so that an accurate assessment of space can be made. Other space considerations might also
be included from case to case of mounted components over the printed circuit board or to access
path of present components.
It might be necessary to turn some components around to a different angular position so
that terminals are closer to the connections of the components. The scale can be checked by
positioning the components on the squared paper. If any connection crosses, then one can reroute
to avoid such condition.
All common or earth lines should ideally be connected to a common line routed around the
perimeter of the layout. This will act as the ground plane. If possible try to route the outer supply
line to the ground plane. If possible try to route the other supply lines around the opposite edge
of the layout through the center. The first set is tearing the circuit to eliminate the crossover
without altering the circuit detail in any way.
Plan the layout looking at the topside to this board. First this should be translated
inversely, later for the etching pattern large areas are recommended to maintain good copper
adhesion. It is important to bear in mind always that copper track width must be according to the
recommended minimum dimensions and allowance must be made for increased width where
termination holes are needed. From this aspect, it can become little tricky to negotiate the route
to connect small transistors.
There are basically two ways of copper interconnection patterns underside the board. The
first is the removal of only the amount of copper necessary to isolate the junctions of the
components to one another. The second is to make the interconnection pattern looking more like
conventional point wiring by routing uniform width of copper from component to component.

84

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
(C)

ETCHING PROCESS
Etching process requires the use of chemicals. acid resistant dishes and running water

supply. Ferric chloride is mostly used solution but other etching materials such as ammonium per
sulphate can be used. Nitric acid can be used but in general it is not used due to poisonous fumes.
The pattern prepared is glued to the copper surface of the board using a latex type of
adhesive that can be cubed after use. The pattern is laid firmly on the copper using a very sharp
knife to cut round the pattern carefully to remove the paper corresponding to the required copper
pattern areas. Then apply the resistant solution, which can be a kind of ink solution for the
purpose of maintaining smooth clean outlines as far as possible. While the board is drying, test
all the components.
Before going to next stage, check the whole pattern and cross check
With the circuit diagram. Check for any free metal on the copper. The etching bath should be in a
glass or enamel disc. If using crystal of ferric- chloride these should be thoroughly dissolved in
water to the proportion suggested. There should be 0.5 lt. of water for 125 gm of crystal.
To prevent particles of copper hindering further etching, agitate the solutions carefully by
gently twisting or rocking the tray.
The board should not be left in the bath a moment longer than is needed to remove just
the right amount of copper. Inspire of there being a resistive coating there is no protection against
etching away through exposed copper edges. This leads to over etching. Have running water
ready so that etched board can be removed properly and rinsed. This will halt etching
immediately.
Drilling is one of those operations that call for great care. For most purposes a 0.5mm
drill is used. Drill all holes with this size first those that need to be larger can be easily drilled
again with the appropriate larger size.

85

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
(D) COMPONENT ASSEMBLY
From the greatest variety of electronic components available, which runs into thousands
of different types it is often a perplexing task to know which is right for a given job.
There could be damage such as hairline crack on PCB. If there are, then they can be
repaired by soldering a short link of bare copper wire over the affected part.
The most popular method of holding all the items is to bring the wires far apart after they
have been inserted in the appropriate holes. This will hold the component in position ready for
soldering.
Some components will be considerably larger .So it is best to start mounting the smallest
first and progressing through to the largest. Before starting, be certain that no further drilling is
likely to be necessary because access may be impossible later.
Next will probably be the resistor, small signal diodes or other similar size components.
Some capacitors are also very small but it would be best to fit these afterwards. When fitting
each group of components mark off each one on the circuit as it is fitted so that if we have to
leave the job we know where to recommence.
Although transistors and integrated circuits are small items there are good reasons for
leaving the soldering of these until the last step. The main point is that these components are very
sensitive to heat and if subjected to prolonged application of the soldering iron, they could be
internally damaged.
All the components before mounting are rubbed with sand paper so that oxide layer is
removed from the tips. Now they are mounted according to the component layout.

86

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

(E) SOLDERING
This is the operation of joining the components with PCB after this operation the circuit
will be ready to use to avoid any damage or fault during this operation following care must be
taken.
1. A longer duration contact between soldering iron bit & components lead can exceed
the temperature rating of device & cause partial or total damage of the device. Hence before
soldering we must carefully read the maximum soldering temperature & soldering time for
device.
2. The wattage of soldering iron should be selected as minimum as permissible for that
soldering place.
3. To protect the devices by leakage current of iron its bit should be earthed properly.
4. We should select the soldering wire with proper ratio of Pb & Tn to provide the
suitable melting temperature.
5. Proper amount of good quality flux must be applied on the soldering point to avoid dry
soldering.

87

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

CHAPTER 5

PROGRAMMING
88

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

CHAPTER 6

89

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

APPLICATION

This project is used in railway. In this project we including metro train, intelligence
Engine, and automatic gate control. All the things are used in railway.

The particular section metro train is used in industry

FUTURE ENHANCEMENT
Its also control by the pc using satellite.
Replacement of transmitter with low power transmitter & Receiver with highly sensitive
receiver to reduce the power consumption.
The range can be increased.
Track change is also including in that project.

90

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
COST ANALYSIS
S.N
o.

Component

Quantity

Cost

Name

1.

Resistor

23

10

2.

Capacitor

12

12

3.

LED

10

10

4.

IR-sensor module

280

5.

Oscillator

40

6.

Read Switch

300

450

7.

IC-P89V51RD2

8.

IC-L293D

40

9.

IC-7805

30

480

10.

LCD

11.

DC Motor

130

12.

Battery

60

13.

Relay

70

14.

Diode

20

20

15.

PCB

250

30

30

16.

Connecting
wire

17.

Transistor

18.

Header

10

5
30

91

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL
19.

Strip

20.

Buzzer

21.

Solar panel

22.

Zip socket

23.

Connector

24.
25.
26.

30

4
1(10 volt)
3
20

40
1000
120
60

Train set

480

Magnet

40

12

Battery connector

Total

4029 /-

92

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

CONCLUSION

This project is an embedded system with software embedded into related hardware developed
with a view to merge many projects into one with a reasonable cost. If enhanced, it can transform
into more facilitating and smart project.
At present the system is fully automatic, it has no human control over it but we can
enhance it and install GPS system into it. So that we can be able to locate the train and after
installing certain features, we can be able to control it too.
Concluding, this work can be treated as an initialization to a project which can serve
virtually all requirement in the future public transport network.

93

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

BIBLIOGRAPHY

WEBSITE:
http://www.electronicsforu.com
http://www.8051projects.info
http://www.instructable.com
http://www.alldatasheet.com
http://www.datasheet4u.com
http://www.datasheetcatalog.com

BOOKS:
R.S. SEDHA
ELECTRONICS
M.A. Mazidi

A TEXT BOOK OF APPLIED


THE 8051 MICROCONTROLLER
AND EMBEDDED SYSTEM

94

MICROCONTROLLER BASED TRAIN AUTOMATION SYSTEM


USING SOLAR PANEL

APPENDIX
PCB

PRINTED CIRCUIT BOARD

CCB

COPPER CLAD BOARD

IT

INTELLIGENCE TRAIN

AGC

AUTOMATIC GATE CONTROLLER

DC

DIRECT CURRENT

AC

ALTERNATING CURRENT

GND

INDICATING GROUND TERMINAL

Vcc

INDICATING 5V DC

RPM

REVOLUTION PER MINUTE

95

You might also like