Arduino Geo Fencing with SIM800L and GPS Module
Vložit
- čas přidán 7. 09. 2024
- In this video, We will learn how to make a cool geofencing project uisng sim 800L, GPS module and Arduino. This project constantly checks if the object is within the fence and when the object go outside the fence it immediately send an alert message to your mobile phone. This project can be used on objects that you don't want to go after a given distance.
What is Geofencing:
Geofence is a virtual geographic boundary, or a fence, defined by GPS technology. It enables software to trigger an alert, when and object enters, or leaves a particular area. It can be used to monitor livestock and other animals. parents can used it, for child monitoring.
In this project, I am using circular geofence technique. This technique works on the initial position (starting point) and maximum distance (radius). The resulting geofence is look like a circular shape. The project continuously calculate the current distance from the initial position of the object. and then it checks if the current distance is exceeded from the maximum distance. and if that's the case, then the project will send an alert message to your mobile phone.
For calculating the current distance of the object from the initial position, I have used the Haversine formula: This is a well-known formula that is used to calculate the distance between two GPS coordinates. After calculating the current distance I am comparing it with the maximum distance. If the current distance exceeded the maximum distance. then first, I have started the buzzer for 1 second. and then send an sms alert to your mobile phone, using send alert function.
Parts Used In This Project:
1. Arduino Nano or UNO - amzn.to/3ZWKAz2
2. SIM800L GSM Module with 2G SIM Card - amzn.to/3J48mlW
3. NEO6M GPS Module - amzn.to/3YwyWd7
4. Piezo Buzzer
5. Battery 3.7v 2000mAh - amzn.to/3ZAxV51
--------------------------------------------------------------------------------------------------------------------
Useful Video Links
--------------------------------------------------------------------------------------------------------------------
Accident Alert System Project Using Arduino SIM800L and GPS Module
• Accident Alert System ...
--------------------------------------------------------------------------------------------------------------------
Social Media Links
--------------------------------------------------------------------------------------------------------------------
GitHub:
github.com/ahm...
CZcams:
www.youtube.co...
--------------------------------------------------------------------------------------------------------------------
Download Code
--------------------------------------------------------------------------------------------------------------------
github.com/ahm...
--------------------------------------------------------------------------------------------------------------------
Disclaimer
--------------------------------------------------------------------------------------------------------------------
Disclaimer: All videos are for educational purposes and use them wisely. Any video may have a slight mistake, please take decisions based on your research. This video is not forcing anything on you.
Warning: In some countries it is required to register gsm module from govt authorities before using it. So, get proper understanding of govt laws related to gsm technologies.
#Arduino #GeoFencing #SIM800L
I'm thinking of using this project to start with for my own project. I want to change the following: after startup use the current position (the last known position) as start position for the fence. In stead of a fixed position. In this way I can use it as an alarm for my car/motorcycle. The current or last known position is where I park my car/motorcycle. Maybe I add a secret button for that. In this way the system is always ON and I have already a GPS fix. Otherwise I probably don't have a GPS fix after activating the system, which is when I park and leave the vehicle out of sight. By pressing the secret button I enter 'parking mode' and from there I monitor if the vehicle moves a small geofence area around the parking position.
Hi.Hello, make this project permanent so that when we send a message, the same point is the center of the measurement, which means that there is no need to enter the center of the point. Thankful
please give some more detail
@@AhmadLogs Example . By sending an SMS to the GPS, that point will be recognized as the center and no longer need to program the coordinates of the point.
@@AhmadLogs Because in this project, the geographical coordinates of the point need to be programmed manually.
Thanks for all your efforts..
My pleasure!
Sir everything is working fine,when the prototype is out of fence there is buzzing but the problem is sms is not recieving how can I fix
Hello. I would like to ask why is there only 2 connected wires in the actual connection to the gps module and in the diagram is 4
Hello sir, am in Ghana and am trying to do the same project but am not able to receive the SMS. I don't know if it is because of the country am at that's it's not able to work.
Hello, sir
Geographic fence is an interesting design and idea that is used to control children and even cars and even Alzheimer's patients. Now that you have decided to develop this program, I wish you would add a push button to save the location of the source and save it in the eeprom memory
Thanks
but why we save the location in eeprom?
@@AhmadLogs This request was followed by my suggestion( not to enter the source coordinates through the computer) to enter the source coordinates through the push button, so in order not to delete this information by disconnecting and connecting the power supply, my suggestion was to save the source coordinates in eepram memory
sincerely
@@masoudjafarzadeh OK, Now I understand what you have said. thanks will try soon
@@masoudjafarzadeh ای ناقلا مسعود داری احمد رو تخلیه اطلاعاتی میکنی؟اون زرنگتره
@@masoudjafarzadeh تا حدودی
I like your project,
Great project sir thank you
Glad you like it
Hello. I would like to ask why is there only 2 connected wires in the actual connection to the gps module and in the diagram is 4
Same concern!!!
reply asap ty
@AhamadLogs please help the GPS module is not working/blinking. it says no GPS data.. hope you can help us
Very useful video, thank you
Glad it was helpful!
Sir suggest the best gps module which perform more better then neo 6m ? I need good performance and budget around 2,000
unfortunately only neo6m module price is within the range around 2,000. if you want to need more accuracy then you need to pay more
Crystal clear !..
Can you please make a tutorial on real time tracking? or to send the location whenever requested by recieving an SMS?
thanks
thanks, please explore my channel you must find some videos on this topic
@@AhmadLogs sure will do 🌹, and plz keep making the prolonged tutorials "like that of the sim800" it was really awesome when you explained each and every line of code 🙏
ser for our capstone project can you make a real time tracking so our capstone project is to track a small boat and i don't have any experience using arduino so help ser webased and
Hello Master. Can the RX GPS base be disconnected so that the GPS is not damaged? Grateful
Hello sir, the idea is to track the object in real time on google maps, with Lorawan Modules and the Blynk application, Thank you very much
Thanks for the idea! but Lorawan is not available in my country
Well done sir👍 i will start working on this project
Please i have some issues with esp8266 gps gsm tracker i have asked some question on that vidio please see them and help me.🙏
Thanks. I have seen and replied
@@AhmadLogs i have replied to
Good afternoon, excellent work. Could the blynk application be used to define the distance by means of this?
not for this project. the distance is set hardcoded
@@AhmadLogs se puede cambiar el valor de la distancia atraves del sms?
We have a board at work that shows if you are in office or out of office and we just slide a magnet back and forth.. is there something i could have on my person that could turn a light green or red if i am within a certain distance of this?
just use led with this project to do that
Thank you
You're welcome
nic
Hello sir, can i replace the SIM800L) with LoRa?
Hi ... I am having issue while uploading this code to arduino nano. What might be the problem is and can u plz help me to figure out this?
Hello sir, could you do the same project but for rural areas using a lorawan module such as RYLR998 from Reyax? Your projects are very good, thank you very much!!
but I need to buy it first
@@AhmadLogs Thank You! 🙂
Hi can I use this code with esp32 or esp8266 thanks for great video
Its verry easy to integrate real time location with google maps using firebase realtime database and google map sdk by developing custom android app
yes you are right. but It is not as simple with sim800l.
@@AhmadLogs yes sim800l library not support firebase data upload but through http post its possible
@@s.husain6125 yes you are right. but http post create a new node in the Firebase database for every entry. you need http patch instead of http post. that's why I have used library
Hello, great video. I want to ask something else about this project. How can i track object in real time on google maps with these same deviceses like sim800L, arduino uno, neo6m battery 3.7v 2A ? My project is all about real time object tracking. İf you help me this would be pleasant. Greetings from Turkey.
I dont have a video on this topic. but there is a realtime tracking video using nodemcu. czcams.com/video/F4fzvlPWFWo/video.html
Hi mr ahmad I hearing about gps signal jammer that use by theafs in some case take power of car smoking power socket! Is it true?
I never hear about that. but the thieves have battery technology than we have
Need this for a shock collar to create an invisible fence.
I understand that you need to create an invisible fence for a shock collar. While this project involves geo-fencing using a GPS module and SIM800L module with Arduino, it is important to note that using a shock collar on an animal can be controversial and potentially harmful. It is advisable to consult with a professional animal trainer or veterinarian before implementing such a system.
Hello sir it says PM sent on the serial monitor but there is no sms receiving. Where do you think the error was
Hope you replies
Is the 1200mah lipo battery sufficient to power the sim800l gsm module??
yes it is sufficient
@@AhmadLogs how much is the battery life after fully charged
Hello Sir , I have used the same code as in video . But I'm getting error . Could u please help ?
♥♥♥
AMAZINGGGGGGGGGGGGGGGGGGGG
thanks
But for me it doesn't gives me the exact values.. It is randomly giving the value and buzzer will turn on even though iam sitting in the same position
hmmmm. have you tested you gps module?
Does this also work on Node MCU ESP 8266?
as I know it will work. just give it a try and let me know
Hlo Sir ur Video is very informative for me.
I am student Belongs to EC branch.
I want the code "when object enters inside the Geo fence" and with Arduino Uno R3.
please help if u can it is very helpful for me because it is required in my project.
I will try
hi plz suggest the best gps module
sim7600
@@AhmadLogs thanks
Works fine on my Android phone but not on my iPhone. It cant resolve the web address. Any ideas?
unfortunately, I don't have any idea. I never test it on iphone
Great
thanks
What should i do to have a triangle instead of a circle ?
To create a triangle instead of a circle on a geofence using an Arduino Neo6m GPS module, you need to define three points of the triangle using their latitude and longitude coordinates. Then, you can calculate the distance between the GPS module's current location and each of the three points using the Haversine formula.
If the GPS module is within a certain distance of all three points, then it is inside the triangle geofence. You can set the distance threshold based on how close you want the GPS module to be to the triangle before considering it inside the geofence.
Once you have determined whether the GPS module is inside or outside of the triangle geofence, you can trigger the appropriate actions in your code.
Hello sir my gsm module is not working how to solve this problem
Hello sir, I have an request... Could you please make a videoclip on geofencing using ESP32 Wroom and quactel L80
quactel L80 is not available in my country
Then can you please work it out with Neo 6M and ESP32 Wroom .. I request you sir ...
@@Ari-uj2sy ok I will try
Make a project with all functions of gps treckar fuel cut relay, geo fens,
Ignition on off alarm, SMS to register number
a very big project. to combine all the feature in one project is very much complex. but I am trying
@@AhmadLogs thenks
Excellent project can I get the complete code of this project
check description for code
the code is showing stray error /302
Hello Sir, what is the name of the software you are using to run your code, If possible, can you please share the link
it is just animation made by myself
can you do it in esp32 sir or TTGO Tcall board?
yes
Hello, Can arduino mini or promini be used instead of arduino nano in the project?
you just give it a try
merhabaaaa
Merhabaaaaa
What sim module can I use with 3G or 4G network ?
sim7600
what algorithm have you used for this?
haversine formula
Have you made PCB for this project?
unfortunately not
Hi again mr ahmad where are you? Happy ramathan alkarim.
Refer to this may you help to designe software for that ?app inventir or anything you want?thank you very much.
Thanks, now a days I have very little time for my channel.
thanks for suggestion, I have already planned to add an App.
thanks for suggestion. I will check it out
serial port screen say sms sent but not received on the phone.
please can you help me to solve this problem
post the complete serial monitor output here
@@AhmadLogs ok
You can be alerted by sending a text message SMS
yes
bro what if i use sim808 instead of sim800l will the code still works??
you just give it a try and let me know. I never tested it for sim808
@@AhmadLogs maybe next time thanks thou
@@CarlsuuuDesuu0723 sure
@@AhmadLogs umm one last question... if i were to make a real-time gps tracking with geofence capabilities will the materials that are needed is just the same as in the video??
@@CarlsuuuDesuu0723 yes
can i get a ready made tracker board from you, how much does it cost?
unfortunately not.
@@AhmadLogs can you share your contacts please
Make real time tracking and calling instead of sms so we can hear about that thief..❤
Can this project applied to Blynk?
I really need an answer to complete my thesis project, thank you.
yes. you need to buy the premium plan of blynk to use the map
Serial port screen says sms sent, but no sms is received on the phone. After saying sms sent on serial port screen, ERROR appears and continues to give location continuously
hmmm. have you credit in the sim card you have inserted in the gsm module. I think you are out of credit, so you are getting the ERROR
@@AhmadLogs there is no credit, we tried it, it can't be the cause of the problem
@@AhmadLogs It says sms sent but then it gives an error. Stream continues on serial port screen
@@polatcetiner7332 so the problem is you have got the "SMS send successfully" in the serial monitor and then after some time you have got the ERROR in the serial monitor.
can you please send me the complete serial monitor output?
@@polatcetiner7332 OK, post the full serial monitor output here int the comments
Where's the problem?? in serial monitor
No gps data is available
Latitude = 0.000000
Logitude = 0.000000
Thank you
its mean your gps module not fixing the satellites. what is the LED status of your gps module
@@AhmadLogs Light blinking
@@benadjilabillal2866 what gps module you have?
@@AhmadLogs Néo-6m-0-001 and atgm332d
The problem has been resolved. Thank you
Push button and gps
ok
.
Very nice Ahmed please
I want to learn from you.. please share your email ID