SlideShare a Scribd company logo
1 of 34
AUTOMATIC RAILWAY GATE CONTROL
USING MICROCONTROLLER
PRESENTED BY
PUKESHWAR HARMUKH
VARSHA SAHU
M.Sc. 4th SEM.
6/12/2016 1
CONTENTS
 Introduction
 Aim of project
 Block diagram
 Working
 IR sensor
 DC motor
 Microcontroller
 Tools
 Embedded C
 Advantages
 Disadvantages
 Conclusion
 Reference6/12/2016 2
INTRODUCTION
 In the rapidly flourishing country like ours, accidents at
rail road crossing are increasing day by day.
 The train accidents cause severe damage to life and
property.
 This project deals with one of the efficient method to
avoid train accidents.
6/12/2016 3
 The main aim of this project is to automize the unmanned railway
gate.
 The gate is closed automatically whenever the train comes and is
opened after the train leaves the railway-road crossing
AIM OF THIS PROJECT:-
6/12/2016 4
1. VOLTAGE REGULATOR(7805)
2. RESISTORS ( 100 KΩ, 300KΩ,470Ω )
3. CAPACITOR (22PF,104PF )
4. CRYSTAL OSCILLATOR(12MHZ)
5. MICROCONTROLLER ( AVR ATMEGA8 )
6. DC MOTOR
7. 0BSTACLE DETECTOR
8. TRANSISTOR
COMPONENTS USED:-
6/12/2016 5
AUTOMATIC RAILWAY GATE CONTROL USING MICROCONTROLLER:-
6/12/2016 6
BLOCK DIAGRAM:-
6/12/2016 7
We used 2 sensors in our project sensor 1and sensor 2. The sensor
consists at IR LED and photodiode. In our project we also used 2 DC
motor (DC motor 1 and DC motor 2). The DC motor rotates forward
and reverse direction.
The IR LED emitted IR range light when this light incidence to coming
train the obstacle occurs its reflected back then photodiode detects
the light signal then according to detectors the light signal converts to
electrical signal i.e. the voltage becomes high its high voltage fed to
the microcontroller specified pin. Then the system executed and DC
motor 1 rotates in forward and the DC motor 2 rotates reverse
direction. Then the railway gate closes.
 When the train passed out from our project place the photodiode
doesn’t receive any signal then the voltage becomes low and DC
motor 1 rotate reverse and DC motor 2 rotates forward and the railway
gate open.
WORKING:-
6/12/2016 8
CIRCUIT DIAGRAM
Fig. circuit diagram
6/12/2016 9
IR SENSOR
This circuit has two stages: a transmitter unit and a receiver
unit.
(1) IR TRANSMITTER:The IR LED emitting infrared
light is placed in the transmitting unit generate
IR signal.
(2) IR RECEIVER:The receiver unit consists of a
sensor, which detects IR pulses transmitted by IR-
LED.
OBSTACLE DETECTOR
Obstacle detector build is a combination of IR LED and PHOTODIODE
with interfacing of OPM
6/12/2016 10
6/12/2016 11
CIRCUIT DIAGRAM OF IR SENSOR:-
Fig. circuit of IR sensor6/12/2016 12
A direct current (DC) motor is a fairly simple electric
motor that uses electricity and a magnetic field to
produce torque, which causes it to turn.
 This DC or direct current motor works on the principal,
when a current carrying conductor is placed in a
magnetic field, it experiences a torque and has a
tendency to move.
DC MOTER
6/12/2016 13
H-BRIDGE MOTER DRIVER CIRCUIT:-
6/12/2016 14
AVR ATMEGA8 MICRO-CONTROLLER
ATmega8 is a 8-bit microcontroller based on the
AVR RISC architecture
MEMORY SEGMENTS
8K Bytes of Flash program memory.
 512 Bytes non volatile EEPROM (Electrically Erasable
Programmable Read Only Memory).
 1K Byte Internal RAM (Random Access Memory).
6/12/2016 15
PIN DIAGRAM OF AVR ATMEGA8 MICROCONTROLLER
6/12/2016 16
Three ports i.e. Port B, Port C, Port D
Three registers associated with every port
 DDRx – Data Direction Register
 PINx – Port input
 PORTx- Port output
‘x’ is subscript and could be either of PORT B, C, D
PORTS
6/12/2016 17
 Port B is an 8-bit bi-directional I/O port.
 Can be used either as a input port or as output
port (direction must be specified in programming).
Port B (PB7..PB0)
Port C (PC6..PC0)
Port C is an 7-bit bi-directional I/O port
Can be used either as a input port or as output
port (direction must be specified in programming).
6/12/2016 18
 Port D is an 8-bit bi-directional I/O port
 Can be used either as a input port or as output port
( direction must be specified in coding).
Port D (PD7..PD0)
6/12/2016 19
REGISTER DESCRIPTION OF I/O PORTS
6/12/2016 20
6/12/2016 21
6/12/2016 22
Examples :-
 To make all pins of port A as input pins :
DDRA = 0b00000000;
 To make all pins of port A as output pins
DDRA = 0b11111111;
 To make lower nibble of port B as output and
higher nibble as input
DDRB = 0b00001111
6/12/2016 23
6/12/2016 24
TOOLS
 Compiler : WinAVR/AVR Studio/CodeVision AVR
.
 The programmer hardware.
 Bread board, wires, power supply, crystal, etc.
 Embedded C is a nothing but a subset of c language is
compatible with certain microcontrollers.
 some features are added some header files like
 <avr/io.h>,<until/delay.h>
 scanf() and printf() are removed as the inputs are
scanned from the sensors and output are given to the ports.
 control structure remain the same like
if statement ,for loop, do while etc.
EMBEDED C
6/12/2016 25
*//headers
#include<avr/io.h
//header file for AVR i/o
#include<until/delay.h>
//header file for delay
*// main program
* int main()
{
* while(1)
{code………..]
*return(0);
}
Structure of a c program for an
embedded system :-
6/12/2016 26
PROGRAMMING FOR AUTOMATIC RAILWAY
GATE CONTROL PROJECT:-
#include<avr/io.h>
void main()
{
DDRC=0b0000000; //set PORTC as input port
DDRB=0b00011110; //PB1, PB2, PB3, PB4 as output port
int ls=1, rs=1; // define & initialize ls, rs integer as 1 to
// acquire the left sensor status in ls an right sensor
// status in rs
while(1)
// create infinite loop
{
ls=(PINC&0b0000010); //acquire only left sensor status connected at PC1
rs=(PINC&0b0000100); // acquire only right sensor status connected at PC2
6/12/2016 27
if((ls==0b0000010)&(rs==0b0000100)) //check sensor status for both sensor ON
{
PORTB=0b00010010; //close gate
}
if((ls==0b0000000)&(rs==0b0000000)) //check sensor status for both sensor OFF
{
PORTB=0b00001100; //open gate
}
if((ls==0b0000000)&(rs==0b0000100))
{
PORTB=0b00010010; //close gate
}
if((ls==0b0000010)&(rs==0b0000000))
{
PORTB=0b00010010; //close gate
}
}
}
6/12/2016 28
ADVANTAGES
Prevention of accidents inside the gate.
Reliable machine, which operates the railway gate even
without gatekeeper which makes it useful for operation at
unmanned crossings.
Power supply for the motor operation and signal lights is
required.
Battery which is charged by means of a solar cell can be
used in remote areas where the power supply can’t be
expected.
6/12/2016 29
DISADVANTAGES
To establish the entire network it is quite a costly task. Since
these are the issues of the government cost doesn’t matter a
lot.
The Arduino board is a delicate device so it has to be
handled carefully.
6/12/2016 30
6/12/2016 31
 Avoids manual errors and provides ultimate
safety to
road users.
 Gatekeeper not necessary and automatic
operation of the gate through the motor.
 The mechanism works on a simple principle.
CONCLUSION
1. VOLTAGE REGULATOR(7805)
2. RESISTORS ( 100 KΩ, 300KΩ,470Ω ) =5rs
3. CAPACITOR (22PF,104PF ) =5rs
4. CRYSTAL OSCILLATOR(12MHZ) =6rs
5. MICROCONTROLLER ( AVR ATMEGA8 ) =75rs
6. DC MOTOR =40rs
7. 0BSTACLE DETECTOR =40rs
8. TRANSISTOR =8rs
PROJECT COST :- COST OF USED COMPONENT
=10rs
=189rs
6/12/2016 32
INCLUDE OTHER COMPONENTS TOTAL COST IS 900rs
REFERENCES:-
www.kanda.com › Atmel AVR 89S and PLD › AVR Microcontrollers
 www.dnatechindia.com/IRSENSOR.com
www.discovercircuits.com/DCmotor/.htm
www.atmel.com/devices/ATMEGA8.aspx
 www.roboedutechindia.com
6/12/2016 33
6/12/2016 34

More Related Content

What's hot

Automatic railway gate control
Automatic railway gate controlAutomatic railway gate control
Automatic railway gate controlParth Akbari
 
automatic railway gate control system using arduino
automatic railway gate control system using arduinoautomatic railway gate control system using arduino
automatic railway gate control system using arduinoantivirusspam
 
Automatic Railway Gate Control System with Arduino
Automatic Railway Gate Control System with ArduinoAutomatic Railway Gate Control System with Arduino
Automatic Railway Gate Control System with ArduinoMisbah Ahmad Chowdhury Fahim
 
Automatic railway gate control system
Automatic railway gate control systemAutomatic railway gate control system
Automatic railway gate control systemsahithipechetti
 
Simple Railway gate automation
Simple Railway gate automationSimple Railway gate automation
Simple Railway gate automationUJJWAL SHEKHAR
 
ACCIDENT DETECTION AND VEHICLE TRACKING USING GPS,GSM AND MEMS
ACCIDENT DETECTION AND VEHICLE TRACKING USING GPS,GSM AND MEMSACCIDENT DETECTION AND VEHICLE TRACKING USING GPS,GSM AND MEMS
ACCIDENT DETECTION AND VEHICLE TRACKING USING GPS,GSM AND MEMSKrishna Moparthi
 
Automatic railway gate using pic 16f877a
Automatic railway gate using pic 16f877aAutomatic railway gate using pic 16f877a
Automatic railway gate using pic 16f877avijay kumar yadav
 
Automatic railway gate control using arduino uno
Automatic railway gate control using arduino unoAutomatic railway gate control using arduino uno
Automatic railway gate control using arduino unoselvalakshmi24
 
Alcohol sensing alert with engine locking project
Alcohol sensing alert with engine locking projectAlcohol sensing alert with engine locking project
Alcohol sensing alert with engine locking projecthemanth prudhvi jidugu
 
Alcohol detection system with gsm and gps (fiem , ece)
Alcohol detection system with gsm and gps (fiem , ece)Alcohol detection system with gsm and gps (fiem , ece)
Alcohol detection system with gsm and gps (fiem , ece)ANUBHAVGHOSHDASTIDAR
 
Density based Traffic Light Controller
Density based Traffic Light ControllerDensity based Traffic Light Controller
Density based Traffic Light ControllerSophia
 
Accident messaging system using GPS,GSM and MEMS
Accident messaging system using GPS,GSM and MEMSAccident messaging system using GPS,GSM and MEMS
Accident messaging system using GPS,GSM and MEMSJithin Prasad
 
Design and Construction of Speed Detection System for Vehicles
Design and Construction of Speed Detection System for VehiclesDesign and Construction of Speed Detection System for Vehicles
Design and Construction of Speed Detection System for Vehiclesijtsrd
 
Smart Traffic Light Controller
Smart Traffic Light ControllerSmart Traffic Light Controller
Smart Traffic Light ControllerHimanshi_Sharma
 
Vehicle accident detection and messaging system using GSM and arduino
Vehicle accident detection and messaging system using GSM and arduinoVehicle accident detection and messaging system using GSM and arduino
Vehicle accident detection and messaging system using GSM and arduinoRamesh Reddy
 
arduino based radar system
arduino based radar system arduino based radar system
arduino based radar system akshay1234kumar
 
Obstacle detection using ultra sonic sensor
Obstacle detection using ultra sonic sensorObstacle detection using ultra sonic sensor
Obstacle detection using ultra sonic sensorsatyashanker
 
Line follower robot
Line follower robotLine follower robot
Line follower robotPriya Hada
 
Voice and touchscreen operated wheelchair ppt
Voice and touchscreen operated wheelchair pptVoice and touchscreen operated wheelchair ppt
Voice and touchscreen operated wheelchair pptSyed Saleem Ahmed
 

What's hot (20)

Automatic railway gate control
Automatic railway gate controlAutomatic railway gate control
Automatic railway gate control
 
automatic railway gate control system using arduino
automatic railway gate control system using arduinoautomatic railway gate control system using arduino
automatic railway gate control system using arduino
 
Automatic Railway Gate Control System with Arduino
Automatic Railway Gate Control System with ArduinoAutomatic Railway Gate Control System with Arduino
Automatic Railway Gate Control System with Arduino
 
Automatic railway gate control system
Automatic railway gate control systemAutomatic railway gate control system
Automatic railway gate control system
 
Simple Railway gate automation
Simple Railway gate automationSimple Railway gate automation
Simple Railway gate automation
 
ACCIDENT DETECTION AND VEHICLE TRACKING USING GPS,GSM AND MEMS
ACCIDENT DETECTION AND VEHICLE TRACKING USING GPS,GSM AND MEMSACCIDENT DETECTION AND VEHICLE TRACKING USING GPS,GSM AND MEMS
ACCIDENT DETECTION AND VEHICLE TRACKING USING GPS,GSM AND MEMS
 
Automatic railway gate using pic 16f877a
Automatic railway gate using pic 16f877aAutomatic railway gate using pic 16f877a
Automatic railway gate using pic 16f877a
 
Automatic railway gate control using arduino uno
Automatic railway gate control using arduino unoAutomatic railway gate control using arduino uno
Automatic railway gate control using arduino uno
 
Alcohol sensing alert with engine locking project
Alcohol sensing alert with engine locking projectAlcohol sensing alert with engine locking project
Alcohol sensing alert with engine locking project
 
Alcohol detection system with gsm and gps (fiem , ece)
Alcohol detection system with gsm and gps (fiem , ece)Alcohol detection system with gsm and gps (fiem , ece)
Alcohol detection system with gsm and gps (fiem , ece)
 
Density based Traffic Light Controller
Density based Traffic Light ControllerDensity based Traffic Light Controller
Density based Traffic Light Controller
 
Accident messaging system using GPS,GSM and MEMS
Accident messaging system using GPS,GSM and MEMSAccident messaging system using GPS,GSM and MEMS
Accident messaging system using GPS,GSM and MEMS
 
Design and Construction of Speed Detection System for Vehicles
Design and Construction of Speed Detection System for VehiclesDesign and Construction of Speed Detection System for Vehicles
Design and Construction of Speed Detection System for Vehicles
 
Smart Traffic Light Controller
Smart Traffic Light ControllerSmart Traffic Light Controller
Smart Traffic Light Controller
 
Vehicle accident detection and messaging system using GSM and arduino
Vehicle accident detection and messaging system using GSM and arduinoVehicle accident detection and messaging system using GSM and arduino
Vehicle accident detection and messaging system using GSM and arduino
 
Traffic light controller
Traffic light controllerTraffic light controller
Traffic light controller
 
arduino based radar system
arduino based radar system arduino based radar system
arduino based radar system
 
Obstacle detection using ultra sonic sensor
Obstacle detection using ultra sonic sensorObstacle detection using ultra sonic sensor
Obstacle detection using ultra sonic sensor
 
Line follower robot
Line follower robotLine follower robot
Line follower robot
 
Voice and touchscreen operated wheelchair ppt
Voice and touchscreen operated wheelchair pptVoice and touchscreen operated wheelchair ppt
Voice and touchscreen operated wheelchair ppt
 

Similar to Automatic railway gate control using microcontroller

Share 'speed control_of_dc_motor_using_microcontroller.pptx'[1][1]
Share 'speed control_of_dc_motor_using_microcontroller.pptx'[1][1]Share 'speed control_of_dc_motor_using_microcontroller.pptx'[1][1]
Share 'speed control_of_dc_motor_using_microcontroller.pptx'[1][1]akmalKhan55
 
Design and Development of a prototype of AGV
Design and Development of a prototype of AGVDesign and Development of a prototype of AGV
Design and Development of a prototype of AGVKUNJBIHARISINGH5
 
Arduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIYArduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIYVishnu
 
Speed Control of DC Motor
Speed Control of DC MotorSpeed Control of DC Motor
Speed Control of DC MotorMafaz Ahmed
 
HOME AUTOMATION USING MOBILE PHONES GIRISH HARMUKH AND NEERAJ YADAV
HOME AUTOMATION USING MOBILE PHONES GIRISH HARMUKH AND NEERAJ YADAVHOME AUTOMATION USING MOBILE PHONES GIRISH HARMUKH AND NEERAJ YADAV
HOME AUTOMATION USING MOBILE PHONES GIRISH HARMUKH AND NEERAJ YADAVGIRISH HARMUKH
 
Implementation of I2C Master Bus Protocol on FPGA
Implementation of I2C Master Bus Protocol on FPGAImplementation of I2C Master Bus Protocol on FPGA
Implementation of I2C Master Bus Protocol on FPGAIJERA Editor
 
MICROPROCESSOR BASED SUN TRACKING SOLAR PANEL SYSTEM TO MAXIMIZE ENERGY GENER...
MICROPROCESSOR BASED SUN TRACKING SOLAR PANEL SYSTEM TO MAXIMIZE ENERGY GENER...MICROPROCESSOR BASED SUN TRACKING SOLAR PANEL SYSTEM TO MAXIMIZE ENERGY GENER...
MICROPROCESSOR BASED SUN TRACKING SOLAR PANEL SYSTEM TO MAXIMIZE ENERGY GENER...moiz89
 
Automatic main gate controller
Automatic main gate controllerAutomatic main gate controller
Automatic main gate controllerPROJECTRONICS
 
Multi-Function Automatic Move Smart Car for Arduino
Multi-Function Automatic Move Smart Car for ArduinoMulti-Function Automatic Move Smart Car for Arduino
Multi-Function Automatic Move Smart Car for ArduinoWanita Long
 
smart street light projet
smart street light projetsmart street light projet
smart street light projetSurya Karan
 
Interfacing with Atmega 16
Interfacing with Atmega 16Interfacing with Atmega 16
Interfacing with Atmega 16Ramadan Ramadan
 
LINE FOLLOWER ROBOT
LINE FOLLOWER ROBOTLINE FOLLOWER ROBOT
LINE FOLLOWER ROBOTrehaan ukaye
 
PIC16F877A C Programming.ppt
PIC16F877A C Programming.pptPIC16F877A C Programming.ppt
PIC16F877A C Programming.pptIlaiyarajaS1
 
PowerMate15 Technical Specification
PowerMate15 Technical SpecificationPowerMate15 Technical Specification
PowerMate15 Technical SpecificationRimsky Cheng
 
Arduino Based Collision Prevention Warning System
Arduino Based Collision Prevention Warning SystemArduino Based Collision Prevention Warning System
Arduino Based Collision Prevention Warning SystemMadhav Reddy Chintapalli
 

Similar to Automatic railway gate control using microcontroller (20)

Share 'speed control_of_dc_motor_using_microcontroller.pptx'[1][1]
Share 'speed control_of_dc_motor_using_microcontroller.pptx'[1][1]Share 'speed control_of_dc_motor_using_microcontroller.pptx'[1][1]
Share 'speed control_of_dc_motor_using_microcontroller.pptx'[1][1]
 
Design and Development of a prototype of AGV
Design and Development of a prototype of AGVDesign and Development of a prototype of AGV
Design and Development of a prototype of AGV
 
INTELIGENT RAILWAY SYSTEM
INTELIGENT RAILWAY SYSTEMINTELIGENT RAILWAY SYSTEM
INTELIGENT RAILWAY SYSTEM
 
Arduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIYArduino Workshop Day 2 - Advance Arduino & DIY
Arduino Workshop Day 2 - Advance Arduino & DIY
 
Speed Control of DC Motor
Speed Control of DC MotorSpeed Control of DC Motor
Speed Control of DC Motor
 
Obstacle avoiding robot(Lab report)
Obstacle  avoiding  robot(Lab report)Obstacle  avoiding  robot(Lab report)
Obstacle avoiding robot(Lab report)
 
HOME AUTOMATION USING MOBILE PHONES GIRISH HARMUKH AND NEERAJ YADAV
HOME AUTOMATION USING MOBILE PHONES GIRISH HARMUKH AND NEERAJ YADAVHOME AUTOMATION USING MOBILE PHONES GIRISH HARMUKH AND NEERAJ YADAV
HOME AUTOMATION USING MOBILE PHONES GIRISH HARMUKH AND NEERAJ YADAV
 
Ppt (1)
Ppt (1)Ppt (1)
Ppt (1)
 
Implementation of I2C Master Bus Protocol on FPGA
Implementation of I2C Master Bus Protocol on FPGAImplementation of I2C Master Bus Protocol on FPGA
Implementation of I2C Master Bus Protocol on FPGA
 
MICROPROCESSOR BASED SUN TRACKING SOLAR PANEL SYSTEM TO MAXIMIZE ENERGY GENER...
MICROPROCESSOR BASED SUN TRACKING SOLAR PANEL SYSTEM TO MAXIMIZE ENERGY GENER...MICROPROCESSOR BASED SUN TRACKING SOLAR PANEL SYSTEM TO MAXIMIZE ENERGY GENER...
MICROPROCESSOR BASED SUN TRACKING SOLAR PANEL SYSTEM TO MAXIMIZE ENERGY GENER...
 
Automatic main gate controller
Automatic main gate controllerAutomatic main gate controller
Automatic main gate controller
 
Multi-Function Automatic Move Smart Car for Arduino
Multi-Function Automatic Move Smart Car for ArduinoMulti-Function Automatic Move Smart Car for Arduino
Multi-Function Automatic Move Smart Car for Arduino
 
smart street light projet
smart street light projetsmart street light projet
smart street light projet
 
Interfacing with Atmega 16
Interfacing with Atmega 16Interfacing with Atmega 16
Interfacing with Atmega 16
 
LINE FOLLOWER ROBOT
LINE FOLLOWER ROBOTLINE FOLLOWER ROBOT
LINE FOLLOWER ROBOT
 
PIC16F877A C Programming.ppt
PIC16F877A C Programming.pptPIC16F877A C Programming.ppt
PIC16F877A C Programming.ppt
 
PowerMate15 Technical Specification
PowerMate15 Technical SpecificationPowerMate15 Technical Specification
PowerMate15 Technical Specification
 
Metro train prototype
Metro train prototypeMetro train prototype
Metro train prototype
 
Arduino Based Collision Prevention Warning System
Arduino Based Collision Prevention Warning SystemArduino Based Collision Prevention Warning System
Arduino Based Collision Prevention Warning System
 
Traffic signal
Traffic signalTraffic signal
Traffic signal
 

Recently uploaded

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 

Recently uploaded (20)

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 

Automatic railway gate control using microcontroller

  • 1. AUTOMATIC RAILWAY GATE CONTROL USING MICROCONTROLLER PRESENTED BY PUKESHWAR HARMUKH VARSHA SAHU M.Sc. 4th SEM. 6/12/2016 1
  • 2. CONTENTS  Introduction  Aim of project  Block diagram  Working  IR sensor  DC motor  Microcontroller  Tools  Embedded C  Advantages  Disadvantages  Conclusion  Reference6/12/2016 2
  • 3. INTRODUCTION  In the rapidly flourishing country like ours, accidents at rail road crossing are increasing day by day.  The train accidents cause severe damage to life and property.  This project deals with one of the efficient method to avoid train accidents. 6/12/2016 3
  • 4.  The main aim of this project is to automize the unmanned railway gate.  The gate is closed automatically whenever the train comes and is opened after the train leaves the railway-road crossing AIM OF THIS PROJECT:- 6/12/2016 4
  • 5. 1. VOLTAGE REGULATOR(7805) 2. RESISTORS ( 100 KΩ, 300KΩ,470Ω ) 3. CAPACITOR (22PF,104PF ) 4. CRYSTAL OSCILLATOR(12MHZ) 5. MICROCONTROLLER ( AVR ATMEGA8 ) 6. DC MOTOR 7. 0BSTACLE DETECTOR 8. TRANSISTOR COMPONENTS USED:- 6/12/2016 5
  • 6. AUTOMATIC RAILWAY GATE CONTROL USING MICROCONTROLLER:- 6/12/2016 6
  • 8. We used 2 sensors in our project sensor 1and sensor 2. The sensor consists at IR LED and photodiode. In our project we also used 2 DC motor (DC motor 1 and DC motor 2). The DC motor rotates forward and reverse direction. The IR LED emitted IR range light when this light incidence to coming train the obstacle occurs its reflected back then photodiode detects the light signal then according to detectors the light signal converts to electrical signal i.e. the voltage becomes high its high voltage fed to the microcontroller specified pin. Then the system executed and DC motor 1 rotates in forward and the DC motor 2 rotates reverse direction. Then the railway gate closes.  When the train passed out from our project place the photodiode doesn’t receive any signal then the voltage becomes low and DC motor 1 rotate reverse and DC motor 2 rotates forward and the railway gate open. WORKING:- 6/12/2016 8
  • 9. CIRCUIT DIAGRAM Fig. circuit diagram 6/12/2016 9
  • 10. IR SENSOR This circuit has two stages: a transmitter unit and a receiver unit. (1) IR TRANSMITTER:The IR LED emitting infrared light is placed in the transmitting unit generate IR signal. (2) IR RECEIVER:The receiver unit consists of a sensor, which detects IR pulses transmitted by IR- LED. OBSTACLE DETECTOR Obstacle detector build is a combination of IR LED and PHOTODIODE with interfacing of OPM 6/12/2016 10
  • 12. CIRCUIT DIAGRAM OF IR SENSOR:- Fig. circuit of IR sensor6/12/2016 12
  • 13. A direct current (DC) motor is a fairly simple electric motor that uses electricity and a magnetic field to produce torque, which causes it to turn.  This DC or direct current motor works on the principal, when a current carrying conductor is placed in a magnetic field, it experiences a torque and has a tendency to move. DC MOTER 6/12/2016 13
  • 14. H-BRIDGE MOTER DRIVER CIRCUIT:- 6/12/2016 14
  • 15. AVR ATMEGA8 MICRO-CONTROLLER ATmega8 is a 8-bit microcontroller based on the AVR RISC architecture MEMORY SEGMENTS 8K Bytes of Flash program memory.  512 Bytes non volatile EEPROM (Electrically Erasable Programmable Read Only Memory).  1K Byte Internal RAM (Random Access Memory). 6/12/2016 15
  • 16. PIN DIAGRAM OF AVR ATMEGA8 MICROCONTROLLER 6/12/2016 16
  • 17. Three ports i.e. Port B, Port C, Port D Three registers associated with every port  DDRx – Data Direction Register  PINx – Port input  PORTx- Port output ‘x’ is subscript and could be either of PORT B, C, D PORTS 6/12/2016 17
  • 18.  Port B is an 8-bit bi-directional I/O port.  Can be used either as a input port or as output port (direction must be specified in programming). Port B (PB7..PB0) Port C (PC6..PC0) Port C is an 7-bit bi-directional I/O port Can be used either as a input port or as output port (direction must be specified in programming). 6/12/2016 18
  • 19.  Port D is an 8-bit bi-directional I/O port  Can be used either as a input port or as output port ( direction must be specified in coding). Port D (PD7..PD0) 6/12/2016 19
  • 20. REGISTER DESCRIPTION OF I/O PORTS 6/12/2016 20
  • 23. Examples :-  To make all pins of port A as input pins : DDRA = 0b00000000;  To make all pins of port A as output pins DDRA = 0b11111111;  To make lower nibble of port B as output and higher nibble as input DDRB = 0b00001111 6/12/2016 23
  • 24. 6/12/2016 24 TOOLS  Compiler : WinAVR/AVR Studio/CodeVision AVR .  The programmer hardware.  Bread board, wires, power supply, crystal, etc.
  • 25.  Embedded C is a nothing but a subset of c language is compatible with certain microcontrollers.  some features are added some header files like  <avr/io.h>,<until/delay.h>  scanf() and printf() are removed as the inputs are scanned from the sensors and output are given to the ports.  control structure remain the same like if statement ,for loop, do while etc. EMBEDED C 6/12/2016 25
  • 26. *//headers #include<avr/io.h //header file for AVR i/o #include<until/delay.h> //header file for delay *// main program * int main() { * while(1) {code………..] *return(0); } Structure of a c program for an embedded system :- 6/12/2016 26
  • 27. PROGRAMMING FOR AUTOMATIC RAILWAY GATE CONTROL PROJECT:- #include<avr/io.h> void main() { DDRC=0b0000000; //set PORTC as input port DDRB=0b00011110; //PB1, PB2, PB3, PB4 as output port int ls=1, rs=1; // define & initialize ls, rs integer as 1 to // acquire the left sensor status in ls an right sensor // status in rs while(1) // create infinite loop { ls=(PINC&0b0000010); //acquire only left sensor status connected at PC1 rs=(PINC&0b0000100); // acquire only right sensor status connected at PC2 6/12/2016 27
  • 28. if((ls==0b0000010)&(rs==0b0000100)) //check sensor status for both sensor ON { PORTB=0b00010010; //close gate } if((ls==0b0000000)&(rs==0b0000000)) //check sensor status for both sensor OFF { PORTB=0b00001100; //open gate } if((ls==0b0000000)&(rs==0b0000100)) { PORTB=0b00010010; //close gate } if((ls==0b0000010)&(rs==0b0000000)) { PORTB=0b00010010; //close gate } } } 6/12/2016 28
  • 29. ADVANTAGES Prevention of accidents inside the gate. Reliable machine, which operates the railway gate even without gatekeeper which makes it useful for operation at unmanned crossings. Power supply for the motor operation and signal lights is required. Battery which is charged by means of a solar cell can be used in remote areas where the power supply can’t be expected. 6/12/2016 29
  • 30. DISADVANTAGES To establish the entire network it is quite a costly task. Since these are the issues of the government cost doesn’t matter a lot. The Arduino board is a delicate device so it has to be handled carefully. 6/12/2016 30
  • 31. 6/12/2016 31  Avoids manual errors and provides ultimate safety to road users.  Gatekeeper not necessary and automatic operation of the gate through the motor.  The mechanism works on a simple principle. CONCLUSION
  • 32. 1. VOLTAGE REGULATOR(7805) 2. RESISTORS ( 100 KΩ, 300KΩ,470Ω ) =5rs 3. CAPACITOR (22PF,104PF ) =5rs 4. CRYSTAL OSCILLATOR(12MHZ) =6rs 5. MICROCONTROLLER ( AVR ATMEGA8 ) =75rs 6. DC MOTOR =40rs 7. 0BSTACLE DETECTOR =40rs 8. TRANSISTOR =8rs PROJECT COST :- COST OF USED COMPONENT =10rs =189rs 6/12/2016 32 INCLUDE OTHER COMPONENTS TOTAL COST IS 900rs
  • 33. REFERENCES:- www.kanda.com › Atmel AVR 89S and PLD › AVR Microcontrollers  www.dnatechindia.com/IRSENSOR.com www.discovercircuits.com/DCmotor/.htm www.atmel.com/devices/ATMEGA8.aspx  www.roboedutechindia.com 6/12/2016 33