Professional Documents
Culture Documents
PROJECT
ACKNOLEDGEMENT
We are grateful to Mrs. Anamika Bhatia, our head of department for her
valuable guidance, support and co-operation extend by her. Then we would
like to thank Colonel Rakesh Sharma sir and our project coordinator and co-
coordinator for their kind cooperation, help and never ending support. We
would also like to thank Mr. Sudakar chauhan sir without whom our project
would not have been successful in all means.
In the end, we convey our sincere thanks to all those people who directly or
indirectly helped us.
Aman Pant
Amit Bharti
Kumar Govind
1
ABSTRACT
In the recent time, we have seen a lot of railway accidents and yet Indian
Railways have not implemented any effective Anti-Collision System which
can avoid such type of accidents.
2
CONTENTS
TABLE OF CONTENTS
1. Introduction
2. Block Diagram....10
2.2.1 Transmitter......10
2.2.2 Reciever.. 11
3. Simulation Diagram.13
4. PCB Layout....14
5. Components Description
5.1ATMEGA 8............................................................................16
5.2PIN DIAGRAM...19
5.3Block Diagram.20
5.4PIN Description21
6 TRANSISTOR.26
7 TRANSRECIEVER.27
8 LED..30
9 CAPACITOR...31
10 DIODE.34
11 RESISTOR...37
12 MOTOR...39
13 LCD..40
14 MAX 232.41
15 IC 7805.42
16 WORKING..43
17 Bibilography and refrence44
3
INTRODUCTION
4
The idea of antiocollision system for railways clicked to our mind,because
we have seen a lot of railway accidents recently in the past,yet railways have
not implemented any such system in their railway network.altough konkan
railway have patented a anticollison system and that is expected to come in
picture in 2014 still that is specifically meant for deccan railways and
doesnt cater the need of whole Indian railway network.
BLOCK DIAGRAM
L CD MOTOR
TRANSCEIVER
TRANSMITTER
TRANSRECEIVER LCD
MOTOR
MAX 232
MAX 232
ATMEL (8 c )
BATTERY
POTENTIOMETER SWITCHES
6
RECEIVER
COMPONENTS USED
7
SIMULATION DIAGRAM
8
PCB LAYOUT(BOTTOM VIEW)
COMPONENTS DESCRIPTION
10
ATMEGA 8
Features
11
Programming Lock for Software Security
Peripheral Features
Two 8-bit Timer/Counters with Separate Prescaler, one compare
Oscillator
On-chip Analog Comparator
Operating Voltages
2.7 - 5.5V (ATmega8L)
12
4.5 - 5.5V (ATmega8)
Pin Configurations
13
The ATmega8 is a low-power CMOS 8-bit microcontroller based on the
AVR RISC architecture.
14
BLOCK DIAGRAM
15
Pin Descriptions
16
RESET (Reset input):- A low level on this pin for longer than the minimum
pulse length will generate a reset, even if the clock is not running. The
Shorter pulses are not guaranteed to generate a reset.
AVCC:- AVCC is the supply voltage pin for the A/D Converter, Port C
(3..0), and ADC (7..6). It should be externally connected to VCC, even if the
ADC is not used. If the ADC is used, it should be connected to VCC through
a low-pass filter.
AREF:- AREF is the analog reference pin for the A/D Converter.These pins
are powered from the analog supply and serve as 10-bit ADC channels.
Basic Function:- The main function of the CPU core is to ensure correct
program execution. The CPU must therefore be able to access memories,
perform calculations, control peripherals, and handle interrupts.
17
Interfacing Of Data Bus With Different Units
18
In order to maximize performance and parallelism, the AVR uses a Harvard
architecture with separate memories and buses for program and data.
Six of the 32 registers can be used as three 16-bit indirect address register
pointers for Data Space addressing enabling efficient address calculations.
One of the these address pointers can also be used as an address pointer for
look up tables in Flash Program memory. These added function registers are
the 16-bit X, Y and Z-register.The ALU supports arithmetic and logic
operations between registers or between a constant and a register. Single
register operations can also be executed in the ALU.After an arithmetic
operation, the Status Register is updated to reflect information about the
result of the operation.The Program flow is provided by conditional and
unconditional jump and call instructions, able to directly address the whole
address space. Most AVR instructions have a single 16-bit word format.
Every Program memory address contains a 16- or 32-bit instruction.
19
Program Flash memory space is divided in two sections, the Boot program
section and the Application program section. Both sections have dedicated
Lock Bits for write and read/write protection. The SPM instruction that
writes into the Application Flash memory section must reside in the Boot
program section.During interrupts and subroutine calls, the return address
Program Counter (PC) is stored on the Stack. The Stack is effectively
allocated in the general data SRAM, and consequently the Stack size is only
limited by the total SRAM size and the usage of the SRAM. All user
programs must initialize the SP in the reset routine (before subroutines or
interrupts are executed). The Stack Pointer SP is read/write accessible in the
I/O space.The data SRAM can easily be accessed through the five different
addressing modes supported in the AVR architecture.The memory spaces in
the AVR architecture are all linear and regular memory maps.
A flexible interrupt module has its control registers in the I/O space
with an additional global interrupt enable bit in the Status Register. All
interrupts have a separate Interrupt Vector in the Interrupt Vector table. The
interrupts have priority in accordance with their Interrupt Vector position.
The lower the Interrupt Vector address, the higher the priority.The I/O
memory space contains 64 addresses for CPU peripheral functions as
Control Registers, SPI, and other I/O functions. The I/O Memory can be
accessed directly, or as the Data Space locations following those of the
Register File, 0x20 - 0x5F.
20
TRANSISTOR
PNP Type
21
NPN Type
The name (standard part number) of the transistor, as well as the type and
the way it is used is shown below.
2SAXXXX PNP type high frequency
2SBXXXX PNP type low frequency
2SCXXXX NPN type high frequency
2SDXXXX NPN type low frequency
The direction of the current flow differs between the NPN and PNP type.
When the power supply is the side of positive (plus), the NPN type is easy to
use.
TRANSRECEIVER
22
application layer, ZigBee device objects (ZDO's) and manufacturer-defined
application objects which allow for customization and favor total
integration. These are responsible for a number of tasks, which include
keeping of device roles, management of requests to join a network, device
discovery and security. Its network layer natively supports three types of
topologies: both star and tree typical networks and generic mesh networks.
Every network must have one coordinator device, tasked with its creation,
the control of its parameters and basic maintenance. Within star networks,
the coordinator must be the central node.
The main functions of the network layer are to enable the correct use of the
MAC sublayer and provide a suitable interface for use by the next upper
layer, namely the application layer. The routing protocol used by the
Network layer is AODV. In order to find the destination device, it broadcasts
out a route request to all of its neighbors. The neighbors then broadcast the
request to their neighbors, etc until the destination is reached. Once the
destination is reached, it sends its route reply via unicast transmission
following the lowest cost path back to the source.
Once the source receives the reply, it will update its routing table for the
destination address with the next hop in the path and the path cost.
23
Zigbee protocol stack
As one of its defining features, ZigBee provides facilities for carrying out
secure communications, protecting establishment and transport of
cryptographic keys, cyphering frames and controlling devices. It builds on
the basic security framework defined in IEEE 802.15.4. This part of the
architecture relies on the correct management of symmetric keys and the
correct implementation of methods and security policies.
24
LIGHT EMITTING DIODE (LED)
Light emitting diode must be chosen according to how they will be used,
because there are various kinds. The led are available in several colours. The
most common colours are red and green, but there are even blue ones.
The device on the far right in the photograph combines a red LED and green
LED in one package. The component lead in the middle is common to both
LEDs as for the remaining two leads; one side is for green, the other for the
red LED. When both are tuned ON simultaneously, it becomes orange.
When an LED is new out of package, the polarity of the device can be
determined by looking at the leads. The longer leads are the anode sides, and
the shortest one is the cathode side. The polarity of an LED can also be
determined using a resistor meter or even a 1.5 V battery.
25
When using a test meter to determine polarity, set the meter to a low
resistance measurement range. Connect the probe of the meter to the LED. If
the polarity is correct, the LED will glow. If the LED does not glow, switch
the meter probes to the opposite leads on the LED.
CAPACITORS
A capacitor can store charge and its capacity to store charge is called
capacitance. Capacitors consists of two conducting plates, separated by an
insulating material (known as dielectric). The two plates are joined with two
leads. The dielectric could be air, mica , paper ceramic, polyester,
polystyrene etc. The dielectric gives name to the capacitor. Like paper
capacitor, mica capacitor etc.
Types of capacitors :
26
Capacitor can be broadly classified in two categories, i.e., Electrolytic
capacitor and Non-Electrolytic capacitor as shown in the figure above.
Electrolytic Capacitor:
27
as paper, mica or ceramic. Therefore, depending upon the dielectric, these
capacitor are classified.
Mica Capacitor:
Ceramic Capacitor:
THE DIODE:
28
Diode are polarized, which means that they must be inserted into the PCB
the correct way round. This is because an electric current will only flow
through them in one direction (like air will only flow one way through a tyre
valve). Diode have two connections, an anode and a cathode. The cathode is
always identified by a dot, ring or some other mark.
The PCB is often marked with a +sign for the cathode end. Diodes come in
all shapes and sizes. They are often marked with a type number. Detailed
characteristics of a diode can be found by looking up the type number in a
data book. If you know how to measure resistance with a meter then test
some diodes. A good one has low resistance in one direction and high in
other. They are specialized type of diode available such as the zener and
light emitting diode (LED).
29
CHARACTERSTICS OF DIODES:
When a small voltage is applied to the diode in the forward direction, current
flows easily. Because the diode has a certain amount of resistance, the
voltage will drop slightly as current flow through the diode. A typical diode
causes a voltage drop about 0.6-1V (VF) (In the case of silicon diode almost
0.6V). This voltage drop needs to be taken into consideration in a circuit
which uses many diodes in series. Also, the amount of current passing
through the diodes must be considered.
When voltage is applied in the reverse direction through a diode, the diode
will have a great resistance to current flow. Different diodes have different
characteristics when reverse-biased. A given diode should be selected
depending on how it will be used in the circuit.
30
The current that will flow through a diode biased in the reverse direction will
vary from several mA to just A, which is very small.
This type of Diode emits light when current flows through it in the forward
direction (Forward biased).
31
The current does not flow when applying the voltage of the opposite
direction to the diode. In this condition, the diode has a capacitance like the
capacitor. It is a very small capacitance. The capacitance of the diode
changes when changing voltage. With the change of this capacitance, the
frequency of the oscillator can be changed.
RESISTORS:
The flow of charge (or current) through any material, encounter an opposing
force similar in many respect to mechanical friction. This opposing force is
called resistance of the material. It is measured in ohms. In some electric
circuits resistance is deliberetly introduced in the form of resistor.
Resistors are of following types:
Wire wound resistors are made from a long (usually Ni-Chromium) wound
on a ceramic core. Longer the length of the wire, higher is the resistance. So
depending on the value of resistor required in a circuit, the wire is cut and
wound in a ceramic core. This entire assembly is coated with a ceramic
metal. Such resistors are available in power of 2 watts to several hundred
32
watts and resistance value from 1 Ohm to 100K Ohms. Thus wire wound
resistors are used for high currents.
Carbon Resistor:
They are also called thin film resistors. They are made of thin metal coating
deposited on a cylindrical insulating support. The high resistance values are
not precise in value; however, such resistors are free of induction effect that
is common in wire wound resistors at high frequency.
33
Variable resistors:
Fusible Resistors:
These resistors are wire wound type and are used in T.V. circuits for
protection. They have resistance of less than 15 ohms. Their function is
similar to a fuse made flow off whenever current in the circuit exceeds the
limit.
MOTORS:
34
The two main characteristics of motors are synchronism and constant step
size. The brushed DC electric motor generates torque directly from DC
power supplied to the motor by using internal commutation, stationary
permanent magnets, and rotating electrical magnets. Like all electric motors
or generators, torque is produced by the principle of Lorentz force, which
states that any current-carrying conductor placed within an external
magnetic field experiences a torque or force known as Lorentz force.
Advantages of a brushed DC motor include low initial cost, high reliability,
and simple control of motor speed. Disadvantages are high maintenance and
low life-span for high intensity uses. Maintenance involves regularly
replacing the brushes and springs which carry the electric current, as well as
cleaning or replacing the commutator. These components are necessary for
transferring electrical power from outside the motor to the spinning wire
windings of the rotor inside the motor.
LCD:
A liquid crystal display (LCD) is a thin, flat electronic visual display that
uses the light modulating properties of liquid crystals(LCs). LCs do not emit
light directly.it is an electronically-modulated optical device made up of any
number of pixels filled with liquid crystals and arrayed in front of alight
source (backlight) or reflector to produce images in colour or monochrome.
35
through the first filter would be blocked by the second (crossed) polarizer. In
most of the cases the liquid crystal has double refraction.
MAX-232:
36
circuits. The MAX232 is a dual driver/receiver and typically converts the
RX, TX, CTS and RTS signals.
37
Data Transmission (Rx/Tx)
-3 V to -15 V 5V
Logic 1
Max-232(operating circuit)
38
39
IC 7805 :
40
WORKING:
41
BIBILOGRAPHY AND REFRENCE
Through Internet :
1. www.datasheet.com
2. www.electronicsforyou.com
3. www.coolcircuit.com
4. www.williamsonlabs.com
5. www.wikipedia.com
6. www.fairchildsemi.com
7. www.datasheetcatalog.com
42
43