You are on page 1of 13

Anti-Collision System for Railways

Aim:
The aim of the project is to develop & launch an up-to-date and reliable control system which can avoid collision automatically when found trains on same track using microcontroller circuitry synchronized with central control unit for railways.

Need:
It is necessary to have an intelligent system which identifies the accident before it happens and regulate the speed of the train and to stop it, if it is very close to the collision.

Working:
This project is implemented by using light sensors in mounted on engine of the train. The light sensors will sense the light and give the indication of wrong track. The light sensor is constantly monitored by a microcontroller and when it sense the wrong track, it is programmed to regulate the speed and also to stop the train if it is necessary and at the same time alerting the central control to stop the other train coming on the same track from the opposite direction.

Description:
It mainly consists of following blocks: 1. Power Supply: It is a basic need of any circuit. We are using two supply of +5V & +12V for our system. 2. Microcontroller: This is the CPU (central processing unit) of our project. We are going to use a microcontroller of 8051 family. The various functions of microcontroller are: Reading the digital input from sensors. Sending this data to LCD so that the person operating this project should get what is going on. Operates the dam gates using stepper motor. Alerts the persons nearby the dam using loudspeakers. 3. LCD: We are going to use 16x2 alphanumeric Liquid Crystal Display (LCD) which means it can display alphabets along with numbers on 2 lines each containing 16 characters. 4. Control Unit: The control unit consists of stepper motors which regulate the opening and closing of dam gates.

Datasheets:
1. LM78XX,3-Terminal 1A Positive Voltage Regulator Features Output Current up to 1A Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V Thermal Overload Protection Short Circuit Protection Output Transistor Safe Operating Area Protection. Description The 78xx (sometimes LM78xx) is a family of self-contained fixed linear voltage regulator integrated circuits. The 78xx family is commonly used in electronic circuits requiring a regulated power supply due to their ease-of-use and low cost. For ICs within the family, the xx is replaced with two digits, indicating the output voltage (for example, the 7805 has a 5 volt output, while the 7812 produces 12 volts). The 78xx lines are positive voltage regulators: they produce a voltage that is positive relative to a common ground. There is a related line of 79xx devices which are complementary negative voltage regulators. 78xx and 79xx ICs can be used in combination to provide positive and negative supply voltages in the same circuit. 78xx ICs have three terminals and are commonly found in the TO220 form factor, although smaller surface-mount and larger TO3 packages are available. These devices support an input voltage anywhere from a couple of volts over the intended output voltage, up to a maximum of 35 or 40 volts, and typically provide 1 or 1.5 amps of current.

Internal Block Diagram

Typical Application

2. Microcontroller AT89S52

Features: Compatible with MCS-51 Products 8K Bytes of In-System Programmable (ISP) Flash Memory-Endurance: 10,000 Write/Erase Cycles 4.0V to 5.5V Operating Range Fully Static Operation: 0 Hz to 33 MHz Three-level Program Memory Lock 256 x 8-bit Internal RAM 32 Programmable I/O Lines Three 16-bit Timer/Counters Eight Interrupt Sources Full Duplex UART Serial Channel Low-power Idle and Power-down Modes Interrupt Recovery from Power-down Mode Watchdog Timer Dual Data Pointer

Power-off Flag Fast Programming Time Flexible ISP Programming (Byte and Page Mode) Green (Pb/Halide-free) Packaging Option

Description: The AT89S52 is a low-power, high-performance CMOS 8-bit microcomputer with 8K bytes of in-system programmable Flash memory. The device is manufactured using Atmels high-density nonvolatile memory technology and is compatible with the industry-standard MCS-51 instruction set and pin out. The on-chip Flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with Flash on a monolithic chip, the Atmel AT89S52 is a powerful microcomputer which provides a highly-flexible and cost-effective solution to many embedded control applications. Pin Configurations

Internal Block Diagram

Pin Description VCC- Supply voltage GND- Ground RST- Reset input. A high on this pin for two machine cycles while the oscillator is running resets the device. Port 0- Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each pin can sink eight TTL inputs. When 1s are written to port 0 pins, the pins can be used as high impedance inputs. Port 0 may also be configured to be the multiplexed low order address/data bus during accesses to external program and data memory. In this mode P0 has internal pull ups. Port 0 also receives the code bytes during Flash programming, and outputs the code bytes during program verification. External pull ups are required during program verification. Port 1- Port 1 is an 8-bit bi-directional I/O port with internal pull ups. The Port 1 output buffers can sink/source four TTL inputs. When 1s are written to Port 1 pins they are pulled high by the internal pull ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled low will source current (IIL) because of the internal pull ups. Port 1 also receives the low-order address bytes during Flash programming and verification. Port 2- Port 2 is an 8-bit bi-directional I/O port with internal pull ups. The Port 2 output buffers can sink/source four TTL inputs. When 1s are written to Port 2 pins they are pulled high by the internal pull ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled low will source current (IIL) because of the internal pull ups. Port 2 emits the high-order address byte during fetches from external program memory and during accesses to external data memory that uses 16-bit addresses (MOVX @ DPTR). In this application, it uses strong internal pull-ups when emitting 1s. During accesses to external data memory that uses 8-bit addresses (MOVX @ RI), Port 2 emits the contents of the P2 Special Function Register. Port 2 also receives the highorder address bits and some control signals during Flash programming and verification. Port 3- Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output buffers can sink/source four TTL inputs. When 1s are written to Port 3 pins they are pulled high by the internal pull ups and can be used as inputs. Port 3 also receives some control signals for Flash

programming and verification .As inputs, Port 3 pins that are externally being pulled low will source current (IIL) because of the pull ups. Port 3 also serves the functions of various special features of the AT89C51 as listed below:

ALE/PROG- Address Latch Enable output pulse for latching the low byte of the address during accesses to external memory. This pin is also the program pulse input (PROG) during Flash programming. In normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped during each access to external Data Memory. If desired, ALE operation can be disabled by setting bit 0 of SFR location 8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction. Otherwise, the pin is weakly pulled high. Setting the ALEdisable bit has no effect if the microcontroller is in external execution mode. PSEN- Program Store Enable is the read strobe to external program memory. When the AT89C51 is executing code from external program memory, PSEN is activated twice each machine cycle, except that two PSEN activations are skipped during each access to external data memory. EA/VPP- External Access Enable. EA must be strapped to GND in order to enable the device to fetch code from external program memory locations starting at 0000H up to FFFFH. Note, however, that if lock bit 1 is programmed, EA will be internally latched on reset. EA should be

strapped to VCC for internal program executions. This pin also receives the 12-volt programming enable voltage (VPP) during Flash programming, for parts that require 12-volt VPP. XTAL1- Input to the inverting oscillator amplifier and input to the internal clock operating circuit. XTAL2- Output from the inverting oscillator amplifier. Oscillator Characteristics XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can be configured for use as an on-chip oscillator. Either a quartz crystal or ceramic resonator may be used. To drive the device from an external clock source, XTAL2 should be left unconnected while XTAL1 is driven. There are no requirements on the duty cycle of the external clock signal, since the input to the internal clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high and low time specifications must be observed.

Oscillator Connection

C1, C2 = 30 pF 10 pF for Crystals or = 40 pF 10 pF for Ceramic Resonators.

RS232(Drivers/Receivers) Description The MAX220MAX249 family of line drivers/receivers is intended for all EIA/TIA-232E and V.28/V.24 communications interfaces, particularly applications where 12V is not available. These parts are especially useful in battery-powered systems, since their low-power shutdown mode reduces power dissipation to less than 5W. The MAX225, MAX233, MAX235, and MAX245/MAX246/MAX247 use no external components and are recommended for applications where printed circuit board space is critical. Pin Diagram

Applications Portable Computers Low-Power Modems

Interface Translation Battery-Powered RS-232 Systems Multi drop RS-232 Networks

Internal Diagram

16 x 2 Character 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. They are used in a wide range of applications, including computer monitors, television, instrument panels, aircraft cockpit displays, signage, etc. They are common in consumer devices such as video players, gaming devices, clocks, watches, calculators, and telephones. LCDs have displaced cathode ray tube (CRT) displays in most applications. They are usually more compact, lightweight, portable, less expensive, more reliable, and easier on the eyes.] They are available in a wider range of screen sizes than CRT and plasma displays, and since they do not use phosphors, they cannot suffer image burn-in.

Structure of LCD LCDs are more energy efficient and offer safer disposal than CRTs. Its low electrical power consumption enables it to be used in battery-powered electronic equipment. It is an electronically-modulated optical device made up of any number of pixels filled with liquid crystals and arrayed in front of a light source (backlight) or reflector to produce images in colour or monochrome. The earliest discovery leading to the development of LCD technology, the discovery of liquid crystals, dates from 1888.

FEATURES 5 x 8 dots with cursor Built-in controller (KS 0066 or Equivalent) + 5V power supply (Also available for + 3V) 1/16 duty cycle B/L to be driven by pin 1, pin 2 or pin 15, pin 16 or A.K (LED) N.V. optional for + 3V power supply Pin Description
Pin Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Symbol Vss Vdd Vo RS R/W E DB0 DB1 DB2 DB3 DB4 DB5 DB6 DB7 Function GND + 3V or + 5V Contrast Adjustment H/L Register Select Signal H/L Read/Write Signal H L Enable Signal H/L Data Bus Line H/L Data Bus Line H/L Data Bus Line H/L Data Bus Line H/L Data Bus Line H/L Data Bus Line H/L Data Bus Line H/L Data Bus Line

15

A/Vee

4.2V

for

LED/Negative

Voltage Output Power Supply for B/L (OV)

16

Cost:

Part Name Microcontroller 89S52 LCD Max 232 Relay IR Sensor Smoke Sensor PCB(Glass epoxy) GSM Modem DB9 connector DB9 cable 7812 & 7805 Push Buttons Transistors Resistor Capacitor Jumper Wires Total

Quantity 1 1 1 4 1 1 3 1 1 1 1each 3 4

Price(in Rs.) 50 120 20 120 150 150 120 2000 10 50 20 20 30 20 20 50 Rs.2950

You might also like