Share on facebook
Share on twitter
Share on linkedin
Share on whatsapp

Automated Railway Gate Controlled by PIC16F877A

Here I give you my project on Automated Railway Gate Controlled by PIC16F877A . It is very good project and if it is implemented by railway then they can save lots of money to paying salary for this purpose. This project is well accepted for btech Final year project also. I received lots of students request for that project. So I try to do this project simple way by PIC microcontroller. For that project I use PIC16F877A, LCD display, two pressure Sensor (situated in rail line) ,Traffic light and motor (For closing and opening the railway gate).

Automated Railway Gate Controlled by PIC16F877A

 

Project Detail:

Now lets start discussion the project details. Here I use two pressure sensor places in rail line (lets imagine 1 km way) from both side of rail gate. When train is come and touch the first pressure sensor the motor is start rotating. Now the gate which is attach with motor, it slowly down and close the door. Before close the door rail traffic light which facing towards road turn red form green. And rail traffic light which facing towards rail line become green form red. Now train cross the gate after crossing gate it will touch other pressure sensor which is situated 1 Km way from other side of crossing. Now motor start anticlockwise rotating and gate slowly opening and after complete opening of the gate road traffic light will green and railway signal will red. I used LCD to display the total status of railway gate control.

I use Proteus to simulate my project and Micro c pro for writing the embedded C . In bellow found the embedded code which I used.

 
See embedded Code

Embedded C Code
// Name : Automated Railway Gate Controlled
// Purpose : Automated Railway Gate Controlled
// Author : Subham Dutta
// Date : 01-10-13
// Website : www.nbcafe.in
sbit LCD_RS at RD2_bit;
sbit LCD_EN at RD3_bit;
sbit LCD_D4 at RD4_bit;
sbit LCD_D5 at RD5_bit;
sbit LCD_D6 at RD6_bit;
sbit LCD_D7 at RD7_bit;
sbit LCD_RS_Direction at TRISD2_bit;
sbit LCD_EN_Direction at TRISD3_bit;
sbit LCD_D4_Direction at TRISD4_bit;
sbit LCD_D5_Direction at TRISD5_bit;
sbit LCD_D6_Direction at TRISD6_bit;
sbit LCD_D7_Direction at TRISD7_bit;
void main() {TRISd=0x00;
TRISC=0b11111111;
trisb=0b00000000;
portb=0b00010100;
lcd_init();
lcd_cmd(_LCD_CURSOR_OFF);
lcd_out(1,1,”Railway Crossing”);
lcd_out(2,1,”nbcafe Gate”);
while(1)
{
if (portc==1){
Lcd_Cmd(_LCD_CLEAR);
lcd_out(1,1,”Attantion train”);
lcd_out(2,1,”Near to crossing”);
delay_ms(10);
portb=0b10101001;
delay_ms(10);
portb=0b00001001;
delay_ms(1000);
Lcd_Cmd(_LCD_CLEAR);
lcd_out(1,1,”Please Wait”);
lcd_out(2,1,”Gate is Closed”);
}
if (portc==2){
Lcd_Cmd(_LCD_CLEAR);
lcd_out(1,1,”Star yor Car”);
lcd_out(2,1,”Gate is Opening”);
delay_ms(10);
portb=0b11000010;
delay_ms(10);
portb=0b00010010;
delay_ms(1000);
portb=0b00010100;
Lcd_Cmd(_LCD_CLEAR);
lcd_out(1,1,”Thank you”);
lcd_out(2,1,”Gate is Open”);
}}}

 

Must See the simulation to understand the project.

Not Enough, Need More

E-Mail Subscription





3 thoughts on “Automated Railway Gate Controlled by PIC16F877A”

  1. sir ..can you give me the copy of simulation at protoues for gate control ..then i will be thnk full

  2. please how can i make it bidirectional?
    it work for one direction. pls give me ans. quickly

Comments are closed.

E-Mail Subscription





Table of Contents
Subham Dutta

Subham Dutta

Hi myself Subham Dutta, having 15+ years experience in filed of Engineering. I love to teach and try to build foundation of students. Try to make them imagine what they learn.

Need more this type of content in your E-Mail?



NBCAFE