|
arduino IDEArduino
|
Smart Railway Gate Opening System Using IOT
The railway crossing accidents are increasing day by day due to human-manned railway crossings. Lives are at stake and we cannot keep doing this any- more. we need a much more reliable and accurate system to operate railway gates.
We are here to present an automatic railway gate control system using RFID and NODEMCU module. By using these we can fully automate the process and thus maybe reduce railway accidents to a greater extent. Here the process is a two-step verification process where only when the button has been pressed by the client(loco pilot), which sends a signal to the server side announcing the approach of the train followed by the scanning of the RFID tag by the reader, fixed at a particular distance from the nearby level cross, will the gates be closed/open. This is the basic essence of the project
Problem Statement
Railway transportation is the most common means of transportation for almost every individual in our country. The risks of this mode of transport cannot be overlooked either. There are many cases of railway accidents almost on a daily basis. Hence the need for a much more reliable and safer system to operate the railway gates. The railway gates are closed and opened manually by persons at labour.
But this is not effective all the time, because humans tend to make mistakes and we cannot rely on them completely Hence the introduction of an automated railway gate using iot seemed to be a good solution to this problem at hand.
GENERAL BACKGROUND
Railways being one of the safest and cheapest modes of transportation are preferred over all the other means of transport. So, it is essential to maintain and improve the current level of safety. A safe railway is more efficient and also a more attractive transport choice. Railway safety is a crucial aspect of rail operation over the world. When we go through newspapers, we come across many railway accidents occurring at different railway level crossings and many people are dying. The project proposes the design and implementation issues of an automated railway gate controlling system.Here the process is a two step verification process where only when the button has been pressed by the client(locopilot), which sends a signal to the server side announcing the approach of the train followed by the scanning ofthe RFID tag by the reader,fixed at a particular distance from the near by level cross, will the gates be closed/open..
SYSTEM DESIGN
Step 1 : DESIGN CIRCUIT ( FOLLOW THE FIGURE BELOW )
a
Components Required:
Hardware
Jumper wire, Bread Board, Arduino Uno, RFID Tag, RFID Reader, LED Green and Red, Buzzer, NodeMcu ESP-8266, Servo Motor
Step 2 : Run The Software Code:
for Client:
//Client
#include <SPI.h>
#include <ESP8266WiFi.h>
byte ledPin - 2;
const int buttonPin = 5; // the number of the pushbutton pin
int buttonState = 0;// variable for reading the pushbutton status
char ssid[] = "sri"; // SSID of your home WiFi
char pass[] = "srilakshmiii";// password of your home WiFi
unsigned long askTimer = 0;
IPAddress server (192,168,43,93);// the fix IP address of the server
WiFiClient client
;
IPAddress ip(192, 168, 43, 29); // IP address of the server
IPAddress gateway (192,168,0,1); // gateway of your network
IPAddress subnet(255,255,255,0); // subnet mask of your network
void setup() {
Serial.begin(115200);// only for debug
Wifi.config(ip, gateway, subnet);// forces to use the fixIP
WiFi.begin(ssid, pass);// connects to the WiFi router
while (WiFi.status() I = WL_CONNECTED) {
Serial.print(".");
delay(500);
}
Serial.print("Connected to wifi");
Serial.print("\n'); Serial.print("SSID: ");
Serial.println(WiFi.SSIDO);
pinMode(ledPin, OUTPUT);
pinMode(buttonPin, INPUT_PULLUP);
}
int condition = 0;
void loop() {
buttonState = digitalRead(buttonPin); if (buttonState == LOW){
condition = !condition;
}
if (condition == 1) {
Serial.println("Button Pressed");
client.connect(server, 80); // Connection to the server
client.println("button_pressed"); // sends the message to the server
} else {
Serial.println("Not Pressed");
client.connect(server, 80); // Connection to the server
client.println("no"); // sends the message to the server
}
delay(500); // client will trigger the communication after two seconds
}
for Server:
//Server
#include <SPI.h>
#include <ESP8266WiFi.h>
byte ledPin 2;
byte outPin = 5;
char ssid[] "sri"; // SSID of your home WiFi
char pass[] = "srilakshmiii"; // password of your home WiFi
WiFiServer server (80);
IPAddress ip(192, 168, 0, 80);// IP address of the server
IPAddress gateway (192,168,43,42);// gateway of your network
IPAddress subnet (255,255,255,0);// subnet mask of your network
void setup() {
Serial.begin(115200);// only for debug
WiFi.config(ip, gateway, subnet);// forces to use the fix IP
WiFi.begin(ssid, pass); // connects to the WiFi router
while (WiFi.status() != WL_CONNECTED) {
Serial.print(".");
delay(500);
}
server.begin();// starts the server
Serial.println("connected to wifi");
Serial.print("SSID: "); Serial.println(WiFi.SSID());
pinMode(ledPin, OUTPUT);
pinMode(outPin, OUTPUT);
}
String statusIn = "no";
void loop() {
WiFiClient client = server.available();
if(statusIn =="button pressed"){
Serial.println("Train is Arriving");
} else {
Serial.println("Error");
}
if (client) (
Serial.print("Server");
if (client.connected()) {
Serial.print("CLIENT CONNECTED");
String request = client.readstringuntil('\r');
statusIn request;
}
client.stop();
for RFID :
USER INTERFACE
Initially, the loco pilot has to press the button provided to them. This in turn sends a signal to the receiving station where the operator receives a message ”THE TRAIN IS ARRIVING.” Once the message is received the client and receiver modules are connected. The initial step of message verification is completed now. the RFID Reader is activated and reads the RFID Tag when the train passes by it. This being the second verification step will initiate the closing of the railway gates. Once the train has passed the gate is opened once the delay time is up.
Block Diagram:
Flowchart
Final Product
//Client
#include <SPI.h>;
#include <ESP8266WiFi.h>;
byte ledPin - 2;
const int buttonPin = 5; // the number of the pushbutton pin
int buttonState = 0;// variable for reading the pushbutton status
char ssid[] = "sri"; // SSID of your home WiFi
char pass[] = "srilakshmiii";// password of your home WiFi
unsigned long askTimer = 0;
IPAddress server (192,168,43,93);// the fix IP address of the server
WiFiClient client
;
IPAddress ip(192, 168, 43, 29); // IP address of the server
IPAddress gateway (192,168,0,1); // gateway of your network
IPAddress subnet(255,255,255,0); // subnet mask of your network
void setup() {
Serial.begin(115200);// only for debug
Wifi.config(ip, gateway, subnet);// forces to use the fixIP
WiFi.begin(ssid, pass);// connects to the WiFi router
while (WiFi.status() I = WL_CONNECTED) {
Serial.print(".");
delay(500);
}
Serial.print("Connected to wifi");
Serial.print("\n'); Serial.print("SSID: ");
Serial.println(WiFi.SSIDO);
pinMode(ledPin, OUTPUT);
pinMode(buttonPin, INPUT_PULLUP);
}
//Server
#include <SPI.h>;
#include <ESP8266WiFi.h>;
byte ledPin 2;
byte outPin = 5;
char ssid[] "sri"; // SSID of your home WiFi
char pass[] = "srilakshmiii"; // password of your home WiFi
WiFiServer server (80);
IPAddress ip(192, 168, 0, 80);// IP address of the server
IPAddress gateway (192,168,43,42);// gateway of your network
IPAddress subnet (255,255,255,0);// subnet mask of your network
void setup() {
Serial.begin(115200);// only for debug
WiFi.config(ip, gateway, subnet);// forces to use the fix IP
WiFi.begin(ssid, pass); // connects to the WiFi router
while (WiFi.status() != WL_CONNECTED) {
Serial.print(".");
delay(500);
}
server.begin();// starts the server
Serial.println("connected to wifi");
Serial.print("SSID: "); Serial.println(WiFi.SSID());
pinMode(ledPin, OUTPUT);
pinMode(outPin, OUTPUT);
}
int condition = 0;
void loop(); {
buttonState = digitalRead(buttonPin); if (buttonState == LOW){
condition = !condition;
}
if (condition == 1) {
Serial.println("Button Pressed");
client.connect(server, 80); // Connection to the server
client.println("button_pressed"); // sends the message to the server
} else {
Serial.println("Not Pressed");
client.connect(server, 80); // Connection to the server
client.println("no"); // sends the message to the server
}
delay(500); // client will trigger the communication after two seconds
}
String stausIn = "no";
void loop() {
WiFiClient client = server.available();
if(statusIn =="button pressed"){
Serial.println("Train is Arriving");
}
else {
Serial.println("Error");
}
if (client) {
Serial.print("Server");
if (client.connected()) {
Serial.print("CLIENT CONNECTED");
String request = client.readstringuntil('\r');
statusIn = request;
}
client.stop();
}
}
Smart Railway Gate Opening System Using IOT
- Comments(0)
- Likes(1)
- Engineer Oct 01,2024
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by mohdazhar
- Automatic Bus Stop Announcement System When we travel by bus ,the route of the bus is unknown to a new passenger. It mostly affects the ill...
- Earthquake Alert System Based On IOT Many countries have implemented EEW(early earthquake warning) systems to save human lives. The earth...
- Smart Street Light Smart Street Light spotlights different restrictions and difficulties identified with traditional an...
- Line Break Detector With Alert System Line Break Detector With Alert System is a mechanism which helps the consumer and KSEB officers to d...
- Smart Railway Gate Opening System Using IOT The railway crossing accidents are increasing day by day due to human-manned railway crossings. Live...
- Advanced Biometric Finger Print Scanner We took the case of our hostel mess and concluded that there is no proper way to manage the hostel m...
- Baby Monitoring System We are very well familiar with the hurdles faced by Parents to nurture their infant and especially i...
- TOKEN MACHINE AND QUEUE MANAGEMENT SYSTEM FOR HOSPITALS ABSTRACTPatient wait times have a strong influence on patient satisfaction levels. A common scenario...
- Make your own branded ESP32 development board with PCBWay! What about making your own custom PCB boards with your own branding? Doesn't that sound nice? PCB ma...
- FOODIE BOT Automation has become an integral part of today's modern life. We are increasingly noticing that mor...
- A ESP32 BASED BLUETOOTH MINI ROBOT A simple mini robot that you can control with your phone. The robot can be improvised and implemente...
- IOT smart AC plug A smart plug is a home automation device and is a hot new thing. Several types of smart plugs are av...
- "A perfectly working line follower robot using arduino" LINE FOLLOWER ROBOT - THE EASIEST!This is a simple tutorial to make a line follower robot using Ardu...
- IOT PLANT - GROW YOUR PLANTS FROM ANYWHERE AROUND THE WORLD. Watch the video The device and plant setupWhat about growing any plants from anywhere around the wor...
- HOW TO PROGRAM ESP8266 - 01 In this tutorial, I am going to show how to program ESP8266 - 01 using an Arduino board or using FTD...
- Make Your First Arduino Robot - the Best Tutorial Out There Smartphone-controlled obstacle avoiding and wall follower robot.Are you a beginner in Arduino and ha...
- THE ULTIMATE OFFROAD RC ROVER Let's make an all-terrain remote-controlled rover bot. This is a great starter project for hobbyists...
- MAKE A 3.3 VOLT REGULATOR FOR ESP8266 The 3.3-volt power supply is one of the main issues when we use ESP8266 - 01 as a standalone board. ...
-
-
-
kmMiniSchield MIDI I/O - IN/OUT/THROUGH MIDI extension for kmMidiMini
124 0 0 -
DIY Laser Power Meter with Arduino
173 0 2 -
-
-
Box & Bolt, 3D Printed Cardboard Crafting Tools
163 0 2 -