Accident Detection System By Using Raspberry Pi | Send Live Location

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello friends in today's video we will learn the second part of accident detection project buying raspberry pi hardware so in the first part we will cover the suitable detection then alcohol detection and the vibrate sensor also we will cover the dc motor working so in the in the first part we haven't covered the gsm and gps model interface with raspberry pi so i will give you a short description about what we will cover what we have covered in the first part so we have covered in the first one like it if the seed belt is where or not by the driver a barcode detector from the driver was not if the accident is detected then the dc motor stopped working so that part we will we already cover in the first video so if you if you haven't watched the first video yet please watch my first video the video link is given in the description this is the second part of that video so in this part what what we will cover so i will try to cover if the action is detected by the vibrance sensor then the then the gps model capture the gps location of the current place that is latitude and longitude that lag and longitude is sent to the raspberry pi then raspberry pi correct that latitude and longitude then send raspberry pi that lattice to longitude to the gsm model so once the gsm will receive that ladder to longitude then gsm will send the particular message like action detected in the below location to the respective user mobile number so user can easily identify where the accident plays so that part we will cover in this video so i request you please watch this complete video so that you will get idea about each and everything about this project now in this video we will cover the hardware connection of gsm jps model because the hardware connection of other module is already covered in the first part so first part is very very important to watch now also in this video we will cover the complete idea behind the program we haven't covered the programming expression the first part in this part we will cover the complete idea behind the programming also we will see how to run the project so i request you please order this completed so that you will get idea about each and everything about this [Music] now you can see on the screen i have connected gps and gsm model to to my raspberry pi and gps is getting the range so that it starts fetching the location and gsm also getting the range you can see gsm led also getting turned on and turn off so you can see here so you can see our gps model also getting the range and gsm also gsm model also getting the range so once i press the bell then this dc motor start working and once i give the vibration to this vibration sensor then gps location track by the gps model and sent through and that gps location sent by the gsm model on this mobile number so we will wait for some minute to receive this location on this mobile number [Music] so you can see notification getting on and i receive the location i will show you the location so you can see currently i am getting the location so you can see currently i am getting contingency location on my mobile number it's now its message is received now only you can see here so before start the next part i request you please subscribe my channel currently you can see i have 1356 subscriber and my watch hour is 388 so my uh to verify my channel on youtube i require 4 000 watch hour 1000 subscribers already completed thanks for your support but please watch my complete video so that this watch hour gets completed easily within one year so once you click on the subscribe button it is not only beneficial for me it is also beneficial for you because i have uploaded the more than 40 to 50 video on raspberry pi on arduino and all projects are very unique and and you will definitely learn from me so please subscribe my channel please watch my complete video so we will see importance of each and each and every line from the code so first line is import time so basically if you want to add some delay in your code then you require this time library next is import raspberry pi dot gp or gpio so basically if you want to access the gpu pin in raspberry pi like for the mq2 uh higher sensor the led then lcd all the required the gpr pins all the hardware requires the gpio pin so if you want to access the gpu pin then you require this library now the next line is import zero so basic so basically if you want to access the serial communication of raspberry pi then you require this input serial library one very important note that though to install the serial library i already explained my raspberry pi plus gpa or gps video so that video is another video respect to first part and second part of this project so if you want to enable the serial communication in your raspberry pi then you should watch the uh then you should watch my raspberry pi plus g or raspberry pi plus gps video okay you can see on the screen you should watch this uh input interface gps module with raspberry pi video and in this video i have already explained how to enable the serial communication raspberry pi if you don't watch that video if you haven't watched that video or if you forgot to watch that video then your raspberry pi select communication will not work your gsm model will not work your gps model will not work and uh so that you should watch that video first then import string so basically we require some string to send the data then uh for that we require this package then pi num2 basically if you want to access the gps location from the gps module to raspberry pi then we require this library now next is gpr.jpegboard we use rbp as a complete board so that we declare here as a board then uh gpr what's it worrying to the pulse already explained my many video like whenever you want to access the gpr pins in raspberry pi whenever you run the code then raspberry pi gives you a warning that whatever the gpu pin you have used is already used before so to avoid that only you should use this line now the next line is serial serial dot serial then dev so basically we define your quadrat we define here serial communication of serial commission port of raspberry pi to enable this port i will repeat again you have to watch interface gps module with raspberry pi video then and then only your c recommendation will work and this serial port will work now next line is some delay then uh the connection the lcd rs pin will be defined as 7 because in hardware part uh if you if you watch that first part of the same project then we connected the rs pin of of l3 then we connected the rs pin of lcd to 7 number in enable to 11 then d4 to 12 d5 to 13 this is 15 d7 to 16 so whatever the pin of different types of sensor we connected to raspberry pi that pin number we define here the next part is we have to define all the pin as input or output so in this case all the lcd pin as the output then uh wi-fi sensor as input then ct built as input then green led readability as output pin and switch should be input then brother should be output so whatever the pin input or output we define here with the function gpa dot setup then pin name we have to pass and gpa dot out or gpa dot in so a particular input pin we define as the input and particular output pin we define as output lcd bit 16. so basically uh from this line let's do it 16 to line number this one till 1 146 welcome message all the code whatever the function in between that code already defined in my this video simulation of lcd and template sensor with raspberry pi i will add this video link in the description if you want to learn that function because it will take 30 minutes again to explain that function if you really want to learn please watch that video you will get idea about that function so first we have to print accident detection system message on lcd so that we will use this line then uh after some delay and then delay there are some gpa output function so basically what we are i am doing i am setting the whatever the output pins of raspberry pi that is buzzer pin led pin relay pin to the fault so it is the default logic that is initial logic so that all the pin should be uh non active at the starting then car start is equal to uh is equal to zero i will explain this where use of variable later then gpa dot input alcohol sensor so basically when you watch the first part of video which we check that alcohol sensor and silver sensor status so to detect the alcohol sensor status and suitable sensors data we require this function gpr.input then we have to pass to sensor name here then after that whatever the sensor status is stored into this alcohol data and serial data so let's say if first we check the suitability is where or not so how to check if seed by data is equal equal to false in that case uh if the ir sensor detect the obstacle in that case uh the ir sensor send the zero signal to raspberry pi and if the raspberry pi get zero signal that means it varies where if the raspberry pi get high signal that is seatbelt data is high from these functions uh gpr.input this function then in that case the suitability is not detected so let's give let's see what happened its rebuild is not detected so if else part of this if part will be executed an else part is here at the end so basically it will print please wear the seed belt then buzzer will be turned on so how to turn on the buzzer just send the high signal on that buzzer so how to send high signal gpu dot output then buzzer pin to the true then we have to turn on the red red led so how to turn on the red led just send the high signal or synthology jpeg or output then rate led true then next line is gpa dot output green led to the false because return we have to turn off the green led so let's say if the seed belt is not detected then this logic will be work now if the suitable status is false that means is suitable detected by the ir sensor so in that case we have to print seed belt detected on the lcd then some delay then check the alcohol if the alcohol is true that means is alcohol detected by the higher up by mq2 sensor so alcohol data is nothing but the variable this variable and this variable get value from the gpa dot input function and alpha sensor is the input that is input pin we given here so let's say if the input means send the true value that means alkali detected let's say the alcohol is uh sorry if the input been given the true value that means alcohol is not detected and if the input will give the false value that means the alcohol detected so let's let's see what happen if the alkali detected so we will see the else part of this if part this one so this l else part will execute and in that part we print alcohol detected then we have to turn on the buzzer turn on the rear led and green led should be obvious in the gpr.output function so uh if the alcohol is not detected that means alcohol sensor send the true value to the raspberry pi so if the raspberry pi gets the true value then alcohol not detected message present on the lcd then buzzer should be off green led should be turned on and red led should be false via gpr.output function now once the alcohol is not detected ir sensor suitability detected by our sensor then our precondition is considered is true then while one the while one here we are checking continuously the switch is pressed or not so let's say at the starting the switch is not pressed so only one time we have to print the message press the switch so for that case i have taken one variable card start is equal to zero so whenever switch is pressed then i set this variable card start is equal to one uh you can see at the starting whenever car is not start so only one time we have to print the uh press the switch spray the switch line on this three that's why this car start variable set as true so once the switch is pressed then you can see how to detect the switches play that is first part gpa dot input function then switch the switch is nothing but the gpio pin name of the switch so g power input switch so once the switch is spread then this switch data gets the one value and in the else part you can see here we have compare switch data is equal equal to true so once the switch data is equal to then we have to print vehicle start message on the lcd then relay should be turned on once the relay turn on then the dc motor start rotating and then car start is equal to 1. so once the car start is equal to 1 then later it will not execute inside this loop so it will not print press the switch so that's why this car start is equal to zero define here uh now next part is vibrating sensor so once the car is start then we have to check the vibrate sensor input so how to check dot input vibration sensor so once the vibration sensor detect the high pulse then the accident detected so we have to print the action detected on the lcd then we have to turn off the dc motor so how to turn off the dc motor gpu dot output relay to the false so when we send the full signal on the relay pin then it will turn off then once the vibration detected then we have to continuously send the uh whatever the location current location on the user mobile number that's why here is while one so in while one pineam to nm stream reader so basically it is one package and from that package we are going to read the gps latitude and longitude value and that value accessed by this that out variable then we have to define one serial uh serial variable here then as i already told my in gps interface with raspberry pi video latitude and longitude value come in this string gprm is string so if you uh for detailed explanation you should watch that video so once the gp gprmc string is found in our corrected data in the new data that means whatever the data received by the gps model then we have to extract the latitude and longitude how to extract new message dot latitude numbers dot longitude so this is the variable from the pioneer uh library so once we get the latitude longitude then we have to send that latitude longitude on the respective user mobile number so how to send there are 80 commands so it command basically used to access the gsm model what are the t commands serial dot right first a t plus e m j equal to one then serial dot i t plus m j is equal to your mobile number so you can edit your mobile number here so that you will receive that message then action detected please find the location this is the message then latitude whatever latitude receive longitude whatever language will lose you and the close the ascii common so in this is the complete idea behind this code i hope you understand if you don't understand please watch it again you will definitely understand so in the first part we see the mq 2 buzzer then led the name then switch then ir sensor the wire press sensor then really how to connect with raspberry pi now in this video we will see how to connect the gsm gps model with raspberry pi so basically you can see here the gsm uh the gps module having the four pins vcc rx tx and ground same uh the gsm model having the same pin tx rx ground so what i have did here uh basically we have to receive the data from the gps module so jps tx pin because the gps module sent the signal to the raspberry pi so gps tx pin i have connected to raspberry pi 8 number pin because eight number pin oh sorry gps tx pin is connected to the raspberry pi 10 number pin because raspberry pi 10 number pin act as a rx pin then vcc pin of this model should be connected to common vcc and ground pin of this model should be connected to ground same the gsm model so gsm model basically raspberry pi send the signal to the gsm model so that gsm model rx pin you can see i have connected the rx pin so raspberry pi 10 number eight number pin so raspberry pi 8 number pin act as a tx pin so raspberry pi 8 number pin i have connected to the rx pin of this model and the ground of this of this three model should be connected to common ground and then uh and basically this c900a model require the 12 volt to 12 volt one ampere adapter you can see you have to buy this adapter also 12 volt one ampere and this should be connected to here that that only your sim 900 a will works so how to connect i will show you just plug this pin to here to here and your gsm model will work so this is the basic connection idea about this second part it is very easy and please watch the first part so that you will get idea about each and everything about about this sensor [Music] so now we will see how to run this code so if you want to run this code first you have to download this code uh car or code detection system code from my google drive link so double click on this code so google drive link given in the description also download this code from the overdrive link so once you double click on this code you have to click on this run button so as soon as as soon as you you can click on this run button if there is no error if you watch my all the video like gps with raspberry pi video and all the video very carefully then you will not find any error here and that means your project starts working also on the lcd you can see also on the lcd you can see different message will be display so in this way you can run the code and run the project
Info
Channel: Rahul Jadhav
Views: 1,574
Rating: undefined out of 5
Keywords: alcohol detection with vehicle controlling, accident detection and messaging system using gsm and gps, accident prevention project, accident prevention project using arduino, accident detection system project, alcohol detection system in vehicle using arduino, accident detection and alert system using arduino, accident detection and alert android app, accident detection and alert system, accident detection using arduino, accident detection system using mobile phones, raspberry pi
Id: ud5L7plWF5k
Channel Id: undefined
Length: 18min 48sec (1128 seconds)
Published: Fri Apr 22 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.