Arduino Geo Fencing with SIM800L and GPS Module

  Рет қаралды 26,185

Ahmad Logs

Ahmad Logs

2 жыл бұрын

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/ahmadlogs/
KZfaq:
kzfaq.info?sub...
--------------------------------------------------------------------------------------------------------------------
Download Code
--------------------------------------------------------------------------------------------------------------------
github.com/ahmadlogs/arduino-...
--------------------------------------------------------------------------------------------------------------------
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

Пікірлер: 162
@bertgroothuis2419
@bertgroothuis2419 Жыл бұрын
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.
@dedisuratsminsuratsmin3970
@dedisuratsminsuratsmin3970 8 ай бұрын
I like your project,
@saadelm2955
@saadelm2955 2 жыл бұрын
Thanks for all your efforts..
@AhmadLogs
@AhmadLogs 2 жыл бұрын
My pleasure!
@shakerileiwat4341
@shakerileiwat4341 2 жыл бұрын
Very useful video, thank you
@AhmadLogs
@AhmadLogs 2 жыл бұрын
Glad it was helpful!
@s.husain6125
@s.husain6125 2 жыл бұрын
Great project sir thank you
@AhmadLogs
@AhmadLogs 2 жыл бұрын
Glad you like it
@emmanuelgrailjnr4742
@emmanuelgrailjnr4742 8 ай бұрын
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.
@mohammadkarimi6115
@mohammadkarimi6115 11 ай бұрын
Hello Master. Can the RX GPS base be disconnected so that the GPS is not damaged? Grateful
@alishasyed1118
@alishasyed1118 10 ай бұрын
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?
@mokh3257
@mokh3257 2 жыл бұрын
Thank you
@AhmadLogs
@AhmadLogs 2 жыл бұрын
You're welcome
@shakerileiwat4341
@shakerileiwat4341 2 жыл бұрын
♥♥♥
@mibrahim4245
@mibrahim4245 2 жыл бұрын
Crystal clear !.. Can you please make a tutorial on real time tracking? or to send the location whenever requested by recieving an SMS? thanks
@AhmadLogs
@AhmadLogs 2 жыл бұрын
thanks, please explore my channel you must find some videos on this topic
@mibrahim4245
@mibrahim4245 2 жыл бұрын
@@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 🙏
@prernagokhale8719
@prernagokhale8719 Жыл бұрын
Hello Sir , I have used the same code as in video . But I'm getting error . Could u please help ?
@fredpro0975
@fredpro0975 2 жыл бұрын
Good afternoon, excellent work. Could the blynk application be used to define the distance by means of this?
@AhmadLogs
@AhmadLogs 2 жыл бұрын
not for this project. the distance is set hardcoded
@fredpro0975
@fredpro0975 2 жыл бұрын
@@AhmadLogs se puede cambiar el valor de la distancia atraves del sms?
@bobbybee6011
@bobbybee6011 2 жыл бұрын
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?
@AhmadLogs
@AhmadLogs 2 жыл бұрын
just use led with this project to do that
@masoudjafarzadeh
@masoudjafarzadeh 2 жыл бұрын
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
@AhmadLogs
@AhmadLogs 2 жыл бұрын
but why we save the location in eeprom?
@masoudjafarzadeh
@masoudjafarzadeh 2 жыл бұрын
@@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
@AhmadLogs
@AhmadLogs 2 жыл бұрын
@@masoudjafarzadeh OK, Now I understand what you have said. thanks will try soon
@rampage_xdit
@rampage_xdit 2 жыл бұрын
@@masoudjafarzadeh ای ناقلا مسعود داری احمد رو تخلیه اطلاعاتی میکنی؟اون زرنگتره
@rampage_xdit
@rampage_xdit 2 жыл бұрын
@@masoudjafarzadeh تا حدودی
@anandaaliefpratama7124
@anandaaliefpratama7124 4 ай бұрын
Hello sir, can i replace the SIM800L) with LoRa?
@techasthra4421
@techasthra4421 5 ай бұрын
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
@john_3313
@john_3313 3 ай бұрын
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
@john_3313
@john_3313 3 ай бұрын
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
@simontroyeligido3858
@simontroyeligido3858 3 ай бұрын
Same concern!!!
@simontroyeligido3858
@simontroyeligido3858 3 ай бұрын
reply asap ty
@simontroyeligido3858
@simontroyeligido3858 3 ай бұрын
@AhamadLogs please help the GPS module is not working/blinking. it says no GPS data.. hope you can help us
@TIH_techinfohelp
@TIH_techinfohelp Жыл бұрын
Sir suggest the best gps module which perform more better then neo 6m ? I need good performance and budget around 2,000
@AhmadLogs
@AhmadLogs Жыл бұрын
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
@Engineerofeverything
@Engineerofeverything 2 жыл бұрын
Great
@AhmadLogs
@AhmadLogs 2 жыл бұрын
thanks
@ipelengfloydbela5221
@ipelengfloydbela5221 8 ай бұрын
Hi can I use this code with esp32 or esp8266 thanks for great video
@user-so9kb8gm9z
@user-so9kb8gm9z 2 жыл бұрын
AMAZINGGGGGGGGGGGGGGGGGGGG
@AhmadLogs
@AhmadLogs 2 жыл бұрын
thanks
@rampage_xdit
@rampage_xdit 2 жыл бұрын
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?
@AhmadLogs
@AhmadLogs 2 жыл бұрын
I never hear about that. but the thieves have battery technology than we have
@m.shayanshamim6351
@m.shayanshamim6351 Жыл бұрын
Hello sir my gsm module is not working how to solve this problem
@kaancelik5132
@kaancelik5132 2 жыл бұрын
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.
@AhmadLogs
@AhmadLogs 2 жыл бұрын
I dont have a video on this topic. but there is a realtime tracking video using nodemcu. kzfaq.info/get/bejne/fJqWrdmdtb2qh6M.html
@aliibrahim8257
@aliibrahim8257 2 жыл бұрын
Is the 1200mah lipo battery sufficient to power the sim800l gsm module??
@AhmadLogs
@AhmadLogs 2 жыл бұрын
yes it is sufficient
@asrarhaq
@asrarhaq Жыл бұрын
@@AhmadLogs how much is the battery life after fully charged
@simoncaron6424
@simoncaron6424 Жыл бұрын
Need this for a shock collar to create an invisible fence.
@AhmadLogs
@AhmadLogs Жыл бұрын
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.
@CentenoMario
@CentenoMario 2 жыл бұрын
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
@AhmadLogs
@AhmadLogs 2 жыл бұрын
Thanks for the idea! but Lorawan is not available in my country
@buse2419
@buse2419 2 жыл бұрын
Hello, Can arduino mini or promini be used instead of arduino nano in the project?
@AhmadLogs
@AhmadLogs 2 жыл бұрын
you just give it a try
@polatcetiner7332
@polatcetiner7332 2 жыл бұрын
merhabaaaa
@emrepolat5665
@emrepolat5665 Жыл бұрын
Merhabaaaaa
@adbas6201
@adbas6201 Жыл бұрын
What should i do to have a triangle instead of a circle ?
@AhmadLogs
@AhmadLogs Жыл бұрын
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.
@user-lb8bv4tf5x
@user-lb8bv4tf5x 2 жыл бұрын
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.🙏
@AhmadLogs
@AhmadLogs 2 жыл бұрын
Thanks. I have seen and replied
@user-lb8bv4tf5x
@user-lb8bv4tf5x 2 жыл бұрын
@@AhmadLogs i have replied to
@CentenoMario
@CentenoMario 2 жыл бұрын
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!!
@AhmadLogs
@AhmadLogs 2 жыл бұрын
but I need to buy it first
@CentenoMario
@CentenoMario 2 жыл бұрын
@@AhmadLogs Thank You! 🙂
@VizionTeller
@VizionTeller 2 жыл бұрын
Does this also work on Node MCU ESP 8266?
@AhmadLogs
@AhmadLogs 2 жыл бұрын
as I know it will work. just give it a try and let me know
@glaizabantilan7682
@glaizabantilan7682 2 жыл бұрын
what algorithm have you used for this?
@AhmadLogs
@AhmadLogs 2 жыл бұрын
haversine formula
@thirugnanasambanthamk9273
@thirugnanasambanthamk9273 Жыл бұрын
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
@AhmadLogs
@AhmadLogs Жыл бұрын
hmmmm. have you tested you gps module?
@yuanmiguelgarcia5891
@yuanmiguelgarcia5891 Ай бұрын
Hello sir it says PM sent on the serial monitor but there is no sms receiving. Where do you think the error was
@yuanmiguelgarcia5891
@yuanmiguelgarcia5891 Ай бұрын
Hope you replies
@mohammadkarimi6115
@mohammadkarimi6115 Жыл бұрын
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
@AhmadLogs
@AhmadLogs Жыл бұрын
please give some more detail
@mohammadkarimi6115
@mohammadkarimi6115 Жыл бұрын
@@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.
@mohammadkarimi6115
@mohammadkarimi6115 Жыл бұрын
@@AhmadLogs Because in this project, the geographical coordinates of the point need to be programmed manually.
@gaza2322
@gaza2322 2 жыл бұрын
Works fine on my Android phone but not on my iPhone. It cant resolve the web address. Any ideas?
@AhmadLogs
@AhmadLogs 2 жыл бұрын
unfortunately, I don't have any idea. I never test it on iphone
@shakerileiwat4341
@shakerileiwat4341 2 жыл бұрын
What sim module can I use with 3G or 4G network ?
@AhmadLogs
@AhmadLogs 2 жыл бұрын
sim7600
@khollinfukuda1669
@khollinfukuda1669 2 жыл бұрын
can you do it in esp32 sir or TTGO Tcall board?
@AhmadLogs
@AhmadLogs 2 жыл бұрын
yes
@Ari-uj2sy
@Ari-uj2sy 2 жыл бұрын
Hello sir, I have an request... Could you please make a videoclip on geofencing using ESP32 Wroom and quactel L80
@AhmadLogs
@AhmadLogs 2 жыл бұрын
quactel L80 is not available in my country
@Ari-uj2sy
@Ari-uj2sy 2 жыл бұрын
Then can you please work it out with Neo 6M and ESP32 Wroom .. I request you sir ...
@AhmadLogs
@AhmadLogs 2 жыл бұрын
@@Ari-uj2sy ok I will try
@Mangethe6950
@Mangethe6950 11 ай бұрын
Hello Sir, what is the name of the software you are using to run your code, If possible, can you please share the link
@AhmadLogs
@AhmadLogs 10 ай бұрын
it is just animation made by myself
@asrarhaq
@asrarhaq Жыл бұрын
Have you made PCB for this project?
@AhmadLogs
@AhmadLogs Жыл бұрын
unfortunately not
@arunkumar-vd1dw
@arunkumar-vd1dw 6 ай бұрын
the code is showing stray error /302
@parshvtathed1643
@parshvtathed1643 Жыл бұрын
Excellent project can I get the complete code of this project
@AhmadLogs
@AhmadLogs Жыл бұрын
check description for code
@s.husain6125
@s.husain6125 2 жыл бұрын
Its verry easy to integrate real time location with google maps using firebase realtime database and google map sdk by developing custom android app
@AhmadLogs
@AhmadLogs 2 жыл бұрын
yes you are right. but It is not as simple with sim800l.
@s.husain6125
@s.husain6125 2 жыл бұрын
@@AhmadLogs yes sim800l library not support firebase data upload but through http post its possible
@AhmadLogs
@AhmadLogs 2 жыл бұрын
@@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
@EasyOne
@EasyOne Жыл бұрын
hi plz suggest the best gps module
@AhmadLogs
@AhmadLogs Жыл бұрын
sim7600
@EasyOne
@EasyOne Жыл бұрын
@@AhmadLogs thanks
@AjayKumar-qg7xk
@AjayKumar-qg7xk Жыл бұрын
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.
@AhmadLogs
@AhmadLogs Жыл бұрын
I will try
@Logesec
@Logesec 2 жыл бұрын
can i get a ready made tracker board from you, how much does it cost?
@AhmadLogs
@AhmadLogs 2 жыл бұрын
unfortunately not.
@bannyspear
@bannyspear 2 жыл бұрын
@@AhmadLogs can you share your contacts please
@lidalili37
@lidalili37 Жыл бұрын
serial port screen say sms sent but not received on the phone. please can you help me to solve this problem
@AhmadLogs
@AhmadLogs Жыл бұрын
post the complete serial monitor output here
@lidalili37
@lidalili37 Жыл бұрын
@@AhmadLogs ok
@mokh3257
@mokh3257 2 жыл бұрын
You can be alerted by sending a text message SMS
@AhmadLogs
@AhmadLogs 2 жыл бұрын
yes
@sureshgurjar2262
@sureshgurjar2262 2 жыл бұрын
Make a project with all functions of gps treckar fuel cut relay, geo fens, Ignition on off alarm, SMS to register number
@AhmadLogs
@AhmadLogs 2 жыл бұрын
a very big project. to combine all the feature in one project is very much complex. but I am trying
@sureshgurjar2262
@sureshgurjar2262 2 жыл бұрын
@@AhmadLogs thenks
@rampage_xdit
@rampage_xdit 2 жыл бұрын
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.
@AhmadLogs
@AhmadLogs 2 жыл бұрын
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
@CarlsuuuDesuu0723
@CarlsuuuDesuu0723 Жыл бұрын
bro what if i use sim808 instead of sim800l will the code still works??
@AhmadLogs
@AhmadLogs Жыл бұрын
you just give it a try and let me know. I never tested it for sim808
@CarlsuuuDesuu0723
@CarlsuuuDesuu0723 Жыл бұрын
@@AhmadLogs maybe next time thanks thou
@AhmadLogs
@AhmadLogs Жыл бұрын
@@CarlsuuuDesuu0723 sure
@CarlsuuuDesuu0723
@CarlsuuuDesuu0723 Жыл бұрын
​@@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??
@AhmadLogs
@AhmadLogs Жыл бұрын
@@CarlsuuuDesuu0723 yes
@alvinrezapratama8624
@alvinrezapratama8624 2 жыл бұрын
Can this project applied to Blynk?
@alvinrezapratama8624
@alvinrezapratama8624 2 жыл бұрын
I really need an answer to complete my thesis project, thank you.
@AhmadLogs
@AhmadLogs 2 жыл бұрын
yes. you need to buy the premium plan of blynk to use the map
@djzatka
@djzatka 9 ай бұрын
Make real time tracking and calling instead of sms so we can hear about that thief..❤
@polatcetiner7332
@polatcetiner7332 Жыл бұрын
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
@AhmadLogs
@AhmadLogs Жыл бұрын
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
@polatcetiner7332
@polatcetiner7332 Жыл бұрын
@@AhmadLogs there is no credit, we tried it, it can't be the cause of the problem
@polatcetiner7332
@polatcetiner7332 Жыл бұрын
@@AhmadLogs It says sms sent but then it gives an error. Stream continues on serial port screen
@AhmadLogs
@AhmadLogs Жыл бұрын
@@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?
@AhmadLogs
@AhmadLogs Жыл бұрын
@@polatcetiner7332 OK, post the full serial monitor output here int the comments
@benadjilabillal2866
@benadjilabillal2866 2 жыл бұрын
Where's the problem?? in serial monitor No gps data is available Latitude = 0.000000 Logitude = 0.000000 Thank you
@AhmadLogs
@AhmadLogs 2 жыл бұрын
its mean your gps module not fixing the satellites. what is the LED status of your gps module
@benadjilabillal2866
@benadjilabillal2866 2 жыл бұрын
@@AhmadLogs Light blinking
@AhmadLogs
@AhmadLogs 2 жыл бұрын
@@benadjilabillal2866 what gps module you have?
@benadjilabillal2866
@benadjilabillal2866 2 жыл бұрын
@@AhmadLogs Néo-6m-0-001 and atgm332d
@benadjilabillal2866
@benadjilabillal2866 2 жыл бұрын
The problem has been resolved. Thank you
@TechnicalidEas07
@TechnicalidEas07 2 жыл бұрын
Push button and gps
@AhmadLogs
@AhmadLogs 2 жыл бұрын
ok
@emrepolat5665
@emrepolat5665 Жыл бұрын
.
The child was abused by the clown#Short #Officer Rabbit #angel
00:55
兔子警官
Рет қаралды 20 МЛН
My little bro is funny😁  @artur-boy
00:18
Andrey Grechka
Рет қаралды 12 МЛН
Always be more smart #shorts
00:32
Jin and Hattie
Рет қаралды 41 МЛН
Getting Started with A9G Board | GSM + GPRS + GPS 🔥🔥
25:49
Geofencing with GPS Module & ESP8266 for monitoring Target or Location
7:25
GPS Module with Arduino- Ublox NEO-6M
14:03
BINARYUPDATES
Рет қаралды 384 М.
Lora Geofence Alert
1:26
Yew Pan
Рет қаралды 713
SIM-800L - Connection Problem Fixed
8:16
The Delta Neutral
Рет қаралды 73 М.
Real Time GPS Location Tracker using ESP8266 & Blynk with Google Maps
7:24
How To Electronics
Рет қаралды 59 М.