Arduino Geo Fencing with SIM800L and GPS Module

Sdílet
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

Komentáře • 165

  • @bertgroothuis2419
    @bertgroothuis2419 Před rokem

    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.

  • @mohammadkarimi6115
    @mohammadkarimi6115 Před rokem +2

    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  Před rokem

      please give some more detail

    • @mohammadkarimi6115
      @mohammadkarimi6115 Před rokem

      @@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 Před rokem

      @@AhmadLogs Because in this project, the geographical coordinates of the point need to be programmed manually.

  • @saadelm2955
    @saadelm2955 Před 2 lety +1

    Thanks for all your efforts..

  • @techasthra4421
    @techasthra4421 Před 7 měsíci +1

    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 Před 5 měsíci

      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

  • @emmanuelgrailjnr4742
    @emmanuelgrailjnr4742 Před 10 měsíci +1

    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.

  • @masoudjafarzadeh
    @masoudjafarzadeh Před 2 lety

    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  Před 2 lety

      but why we save the location in eeprom?

    • @masoudjafarzadeh
      @masoudjafarzadeh Před 2 lety

      @@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  Před 2 lety

      @@masoudjafarzadeh OK, Now I understand what you have said. thanks will try soon

    • @rampage_xdit
      @rampage_xdit Před 2 lety

      @@masoudjafarzadeh ای ناقلا مسعود داری احمد رو تخلیه اطلاعاتی میکنی؟اون زرنگتره

    • @rampage_xdit
      @rampage_xdit Před 2 lety

      @@masoudjafarzadeh تا حدودی

  • @dedisuratsminsuratsmin3970
    @dedisuratsminsuratsmin3970 Před 10 měsíci

    I like your project,

  • @s.husain6125
    @s.husain6125 Před 2 lety

    Great project sir thank you

  • @john_3313
    @john_3313 Před 5 měsíci +1

    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

  • @shakerileiwat4341
    @shakerileiwat4341 Před 2 lety

    Very useful video, thank you

  • @TIH_techinfohelp
    @TIH_techinfohelp Před 2 lety +1

    Sir suggest the best gps module which perform more better then neo 6m ? I need good performance and budget around 2,000

    • @AhmadLogs
      @AhmadLogs  Před 2 lety

      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

  • @mibrahim4245
    @mibrahim4245 Před 2 lety

    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  Před 2 lety +1

      thanks, please explore my channel you must find some videos on this topic

    • @mibrahim4245
      @mibrahim4245 Před 2 lety

      @@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 🙏

  • @markneiltanap
    @markneiltanap Před měsícem

    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

  • @mohammadkarimi6115
    @mohammadkarimi6115 Před rokem

    Hello Master. Can the RX GPS base be disconnected so that the GPS is not damaged? Grateful

  • @CentenoMario
    @CentenoMario Před 2 lety

    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  Před 2 lety +1

      Thanks for the idea! but Lorawan is not available in my country

  • @user-lb8bv4tf5x
    @user-lb8bv4tf5x Před 2 lety

    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.🙏

  • @fredpro0975
    @fredpro0975 Před 2 lety

    Good afternoon, excellent work. Could the blynk application be used to define the distance by means of this?

    • @AhmadLogs
      @AhmadLogs  Před 2 lety

      not for this project. the distance is set hardcoded

    • @fredpro0975
      @fredpro0975 Před 2 lety

      @@AhmadLogs se puede cambiar el valor de la distancia atraves del sms?

  • @bobbybee6011
    @bobbybee6011 Před 2 lety

    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  Před 2 lety

      just use led with this project to do that

  • @mokh3257
    @mokh3257 Před 2 lety

    Thank you

  • @user-uq8kp4yp2y
    @user-uq8kp4yp2y Před 5 hodinami

    nic

  • @anandaaliefpratama7124
    @anandaaliefpratama7124 Před 6 měsíci

    Hello sir, can i replace the SIM800L) with LoRa?

  • @alishasyed1118
    @alishasyed1118 Před rokem

    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?

  • @CentenoMario
    @CentenoMario Před 2 lety +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!!

  • @ipelengfloydbela5221
    @ipelengfloydbela5221 Před 10 měsíci

    Hi can I use this code with esp32 or esp8266 thanks for great video

  • @s.husain6125
    @s.husain6125 Před 2 lety

    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  Před 2 lety

      yes you are right. but It is not as simple with sim800l.

    • @s.husain6125
      @s.husain6125 Před 2 lety

      @@AhmadLogs yes sim800l library not support firebase data upload but through http post its possible

    • @AhmadLogs
      @AhmadLogs  Před 2 lety

      @@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

  • @kaancelik5132
    @kaancelik5132 Před 2 lety

    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  Před 2 lety

      I dont have a video on this topic. but there is a realtime tracking video using nodemcu. czcams.com/video/F4fzvlPWFWo/video.html

  • @rampage_xdit
    @rampage_xdit Před 2 lety

    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  Před 2 lety

      I never hear about that. but the thieves have battery technology than we have

  • @simoncaron6424
    @simoncaron6424 Před rokem

    Need this for a shock collar to create an invisible fence.

    • @AhmadLogs
      @AhmadLogs  Před rokem

      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.

  • @yuanmiguelgarcia5891
    @yuanmiguelgarcia5891 Před 3 měsíci

    Hello sir it says PM sent on the serial monitor but there is no sms receiving. Where do you think the error was

  • @aliibrahim8257
    @aliibrahim8257 Před 2 lety

    Is the 1200mah lipo battery sufficient to power the sim800l gsm module??

    • @AhmadLogs
      @AhmadLogs  Před 2 lety

      yes it is sufficient

    • @asrarhaq
      @asrarhaq Před rokem

      @@AhmadLogs how much is the battery life after fully charged

  • @prernagokhale8719
    @prernagokhale8719 Před rokem

    Hello Sir , I have used the same code as in video . But I'm getting error . Could u please help ?

  • @shakerileiwat4341
    @shakerileiwat4341 Před 2 lety +1

    ♥♥♥

  • @user-so9kb8gm9z
    @user-so9kb8gm9z Před 2 lety

    AMAZINGGGGGGGGGGGGGGGGGGGG

  • @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  Před rokem

      hmmmm. have you tested you gps module?

  • @ZudaBro
    @ZudaBro Před 2 lety

    Does this also work on Node MCU ESP 8266?

    • @AhmadLogs
      @AhmadLogs  Před 2 lety

      as I know it will work. just give it a try and let me know

  • @AjayKumar-qg7xk
    @AjayKumar-qg7xk Před rokem

    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.

  • @EasyOne
    @EasyOne Před rokem

    hi plz suggest the best gps module

  • @gaza2322
    @gaza2322 Před 2 lety

    Works fine on my Android phone but not on my iPhone. It cant resolve the web address. Any ideas?

    • @AhmadLogs
      @AhmadLogs  Před 2 lety +1

      unfortunately, I don't have any idea. I never test it on iphone

  • @Engineerofeverything
    @Engineerofeverything Před 2 lety

    Great

  • @adbas6201
    @adbas6201 Před rokem

    What should i do to have a triangle instead of a circle ?

    • @AhmadLogs
      @AhmadLogs  Před rokem

      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.

  • @m.shayanshamim6351
    @m.shayanshamim6351 Před 2 lety

    Hello sir my gsm module is not working how to solve this problem

  • @Ari-uj2sy
    @Ari-uj2sy Před 2 lety

    Hello sir, I have an request... Could you please make a videoclip on geofencing using ESP32 Wroom and quactel L80

    • @AhmadLogs
      @AhmadLogs  Před 2 lety

      quactel L80 is not available in my country

    • @Ari-uj2sy
      @Ari-uj2sy Před 2 lety

      Then can you please work it out with Neo 6M and ESP32 Wroom .. I request you sir ...

    • @AhmadLogs
      @AhmadLogs  Před 2 lety +1

      @@Ari-uj2sy ok I will try

  • @sureshgurjar2262
    @sureshgurjar2262 Před 2 lety

    Make a project with all functions of gps treckar fuel cut relay, geo fens,
    Ignition on off alarm, SMS to register number

    • @AhmadLogs
      @AhmadLogs  Před 2 lety +1

      a very big project. to combine all the feature in one project is very much complex. but I am trying

    • @sureshgurjar2262
      @sureshgurjar2262 Před 2 lety

      @@AhmadLogs thenks

  • @parshvtathed1643
    @parshvtathed1643 Před rokem

    Excellent project can I get the complete code of this project

  • @arunkumar-vd1dw
    @arunkumar-vd1dw Před 8 měsíci

    the code is showing stray error /302

  • @Mangethe6950
    @Mangethe6950 Před rokem

    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  Před rokem

      it is just animation made by myself

  • @khollinfukuda1669
    @khollinfukuda1669 Před 2 lety

    can you do it in esp32 sir or TTGO Tcall board?

  • @buse2419
    @buse2419 Před 2 lety

    Hello, Can arduino mini or promini be used instead of arduino nano in the project?

  • @shakerileiwat4341
    @shakerileiwat4341 Před 2 lety

    What sim module can I use with 3G or 4G network ?

  • @glaizabantilan7682
    @glaizabantilan7682 Před 2 lety

    what algorithm have you used for this?

  • @asrarhaq
    @asrarhaq Před rokem

    Have you made PCB for this project?

  • @rampage_xdit
    @rampage_xdit Před 2 lety

    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  Před 2 lety

      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

  • @lidalili37
    @lidalili37 Před 2 lety

    serial port screen say sms sent but not received on the phone.
    please can you help me to solve this problem

    • @AhmadLogs
      @AhmadLogs  Před 2 lety

      post the complete serial monitor output here

    • @lidalili37
      @lidalili37 Před 2 lety

      @@AhmadLogs ok

  • @mokh3257
    @mokh3257 Před 2 lety

    You can be alerted by sending a text message SMS

  • @CarlsuuuDesuu0723
    @CarlsuuuDesuu0723 Před rokem

    bro what if i use sim808 instead of sim800l will the code still works??

    • @AhmadLogs
      @AhmadLogs  Před rokem +1

      you just give it a try and let me know. I never tested it for sim808

    • @CarlsuuuDesuu0723
      @CarlsuuuDesuu0723 Před rokem

      @@AhmadLogs maybe next time thanks thou

    • @AhmadLogs
      @AhmadLogs  Před rokem

      @@CarlsuuuDesuu0723 sure

    • @CarlsuuuDesuu0723
      @CarlsuuuDesuu0723 Před rokem

      ​@@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  Před rokem

      @@CarlsuuuDesuu0723 yes

  • @Logesec
    @Logesec Před 2 lety

    can i get a ready made tracker board from you, how much does it cost?

    • @AhmadLogs
      @AhmadLogs  Před 2 lety

      unfortunately not.

    • @bannyspear
      @bannyspear Před 2 lety

      @@AhmadLogs can you share your contacts please

  • @djzatka
    @djzatka Před 11 měsíci

    Make real time tracking and calling instead of sms so we can hear about that thief..❤

  • @alvinrezapratama8624
    @alvinrezapratama8624 Před 2 lety

    Can this project applied to Blynk?

    • @alvinrezapratama8624
      @alvinrezapratama8624 Před 2 lety

      I really need an answer to complete my thesis project, thank you.

    • @AhmadLogs
      @AhmadLogs  Před 2 lety

      yes. you need to buy the premium plan of blynk to use the map

  • @polatcetiner7332
    @polatcetiner7332 Před 2 lety

    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  Před 2 lety

      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 Před 2 lety

      @@AhmadLogs there is no credit, we tried it, it can't be the cause of the problem

    • @polatcetiner7332
      @polatcetiner7332 Před 2 lety

      @@AhmadLogs It says sms sent but then it gives an error. Stream continues on serial port screen

    • @AhmadLogs
      @AhmadLogs  Před 2 lety

      @@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  Před 2 lety

      @@polatcetiner7332 OK, post the full serial monitor output here int the comments

  • @benadjilabillal2866
    @benadjilabillal2866 Před 2 lety

    Where's the problem?? in serial monitor
    No gps data is available
    Latitude = 0.000000
    Logitude = 0.000000
    Thank you

  • @TechnicalidEas07
    @TechnicalidEas07 Před 2 lety

    Push button and gps

  • @emrepolat5665
    @emrepolat5665 Před 2 lety

    .

  • @itsownaccord5096
    @itsownaccord5096 Před měsícem

    Very nice Ahmed please
    I want to learn from you.. please share your email ID