A Brief Description
A Brief Description
How it works?
Detailed Pin Diagram
Group Members Information
The aim of the project was to prevent the sporadic train accidents happening due to the lack of consciousness of the victims. The pedestrians are subject to very tragic accidents at the rail crossing. Most of the reports of such mishap had one alarming pre-eminence - the victims were preoccupied hearing musics in their smartphones. So we thought of taking this vulnerability of smartphone usage to our advantage. What if we could alert all those pedestrians closer to the rail-crossing of the forthcoming trains! No wonder their lifes could have been saved. The idea was to design an embedded system which would -
Keep Track of the trains
Centrally Gather the geo-location of the trains
Send alert to smartphone users about nearby trains
Placing a computational unit to get the geo-location of trains
Uploading geo-data from trains to a central server
Creating an application program for mobile platform so that users can track the trains with the data received from the server
GPS/GSM Module - sim 808 and some more things to interface them:
Power bank - 20000 MAh
In this project Arduino development board is used for interfacing to various hardware peripherals. The current design has to get the geo location of a train. For doing so a Raspberry Pi3 is interfaced to a Sim 808 GSM/GPS(GLONASS)Module .
SIM808 module is a complete Quad-Band GSM/GPRS module which combines GPS technology for satellite navigation. Featuring a GPS function, it allows variable assets to be tracked seamlessly at any location and anytime with signal coverage.
Pi3 has a built-in 802.11n WiFi, which can be made active from any WiFi Router or even smartphone hotspot. It is used to send the position of the train from tracks to the server. A python scripts runs on the Pi. It uses the Serial communication mechanism of Arduino by importing the libarary "serial". It then parses the GPS sensor output and sends a 'get' request to the dedicated server by incorporationg the sensor values in its payload .
the Pi3 sends data to the server. The GPS modem gives many parameters as the output.Such as : The latitue,longitude,date,timeStamp,speed(in Km/h),bearing(in radian). All this information is sent to the server in an interval of 15 seconds.
The Client application programme, connects to the server and get the information of the trains. The location of the client is read using the location services provided by Android. Afterwards, he is notified if any train is closer than 250m from him. The phone starts vibrating and vibrates till he is out of the hazardous radius of 250m. The application runs in background once started.
fig.1 Block Diagram
fig.2 Pin Diagram(sim 808 GSM GPS)
fig.3 Pin Diagram for Arduino Mega
The most difficult problem we had to solve is to parse the data received through the GPS module. At first the latitude and longitude readings consisted of 2 decimal points. For example : the latitude of ECE building was given as 23.72 by Pi. The actual latitude is 23.725183. As we only got data upto 2 decimal places, the 4 more digits were padded by 0 to give it a location far away from actual location. The problem was solved by changing the default precision from 2 to 15 decimal places. The sensor value readings were accurate afterwards.
The Pi module was getting very warm. Because it was sensing GPS data and using WiFi module to upload that data to the server in a loop. This overheating problem was solved by placing the pi over a heat sink.
Power source management was a problem as there was a thread in Pi that would upload the data to server each 15 seconds after getting updated geo data. We needed a huge amount of power. If we had used adapter for power source, it would not be beneficial. So we used powerbank of 20000mAh.
The GPS sensor value would not give appropriate readings unless kept under the sky. It would give default 200.1 both for latitude and longitude. An extension wire of length 10 feet was used to make sure the sim808 was placed under sky.
Android client program had to get user's current location. It also had to update user's current location each 10 seconds. We used Fused Location Provider API to get updates about a device location. It gives the most accurate location.We Intially chose one of the location providers (network or GPS) and request location updates or set up proximity alert. But there were two main challenges we : 1. In case we need to define precise location, we had to switch between network and GPS location providers (as GPS doesn’t work indoors) 2. Proximity alerts were used to notify a user about proximity to a location, and this took its toll on the battery life.
We intially used ACCESS_COARSE_LOCATION permission in AndroidManifest because it gives permission for using NETWORK_PROVIDER only for determining the position. But The Coarse location provides less accurate locations. So, we switched to ACCESS_FINE_LOCATION permission. The Fine location provides better and accurate locations. It is robust as it gives permission for using both GPS_PROVIDER and NETWORK_PROVIDER or GPS_PROVIDER only for determining the position.
We faced problems with the Server. We registering domain at openshift.redhat.com. To our utter surprise the domain became idle after 7 days. By that time we already configured our databases and started developing the client programme. We then registered a new domain in cpanel.com.
Section B1: Group 6
Rafiur Rahman (1205032)
Nafi-Us Sabbir Sabith (1205036)
Shihab Mondal (1205044)
Joy Ghosh (1205054)
Md. Shariful Islam Bhuyan
Md. Iftekharul Islam Sakib
Back to top