Arduino Geo Fencing with SIM800L and GPS Module

Поделиться
HTML-код
  • Опубликовано: 10 мар 2022
  • 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/
    RUclips:
    ruclips.net/user/ahmadlogs?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

Комментарии • 164

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

  • @saadelm2955
    @saadelm2955 2 года назад

    Thanks for all your efforts..

  • @dedisuratsminsuratsmin3970
    @dedisuratsminsuratsmin3970 8 месяцев назад

    I like your project,

  • @shakerileiwat4341
    @shakerileiwat4341 2 года назад

    Very useful video, thank you

    • @AhmadLogs
      @AhmadLogs  2 года назад +1

      Glad it was helpful!

  • @s.husain6125
    @s.husain6125 2 года назад

    Great project sir thank you

  • @mokh3257
    @mokh3257 2 года назад

    Thank you

  • @mohammadkarimi6115
    @mohammadkarimi6115 Год назад

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

  • @emmanuelgrailjnr4742
    @emmanuelgrailjnr4742 9 месяцев назад +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.

  • @alishasyed1118
    @alishasyed1118 11 месяцев назад

    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?

  • @shakerileiwat4341
    @shakerileiwat4341 2 года назад +1

    ♥♥♥

  • @user-so9kb8gm9z
    @user-so9kb8gm9z 2 года назад

    AMAZINGGGGGGGGGGGGGGGGGGGG

  • @prernagokhale8719
    @prernagokhale8719 Год назад

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

  • @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 года назад +1

      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 🙏

  • @anandaaliefpratama7124
    @anandaaliefpratama7124 5 месяцев назад

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

  • @Engineerofeverything
    @Engineerofeverything 2 года назад

    Great

  • @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 تا حدودی

  • @techasthra4421
    @techasthra4421 5 месяцев назад +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 4 месяца назад

      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

  • @ipelengfloydbela5221
    @ipelengfloydbela5221 9 месяцев назад

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

  • @TIH_techinfohelp
    @TIH_techinfohelp Год назад +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  Год назад

      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

  • @m.shayanshamim6351
    @m.shayanshamim6351 Год назад

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

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

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

  • @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 года назад +1

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

  • @markneiltanap
    @markneiltanap 18 дней назад

    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

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

  • @john_3313
    @john_3313 4 месяца назад +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

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

  • @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 года назад +1

      Thanks. I have seen and replied

    • @user-lb8bv4tf5x
      @user-lb8bv4tf5x 2 года назад

      @@AhmadLogs i have replied to

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

  • @shakerileiwat4341
    @shakerileiwat4341 2 года назад

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

  • @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. ruclips.net/video/F4fzvlPWFWo/видео.html

  • @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 года назад +1

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

  • @khollinfukuda1669
    @khollinfukuda1669 2 года назад

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

  • @CentenoMario
    @CentenoMario 2 года назад +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 года назад +1

      but I need to buy it first

    • @CentenoMario
      @CentenoMario 2 года назад

      @@AhmadLogs Thank You! 🙂

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

  • @glaizabantilan7682
    @glaizabantilan7682 2 года назад

    what algorithm have you used for this?

  • @yuanmiguelgarcia5891
    @yuanmiguelgarcia5891 2 месяца назад

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

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

  • @mohammadkarimi6115
    @mohammadkarimi6115 Год назад +1

    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.

  • @buse2419
    @buse2419 2 года назад

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

  • @Mangethe6950
    @Mangethe6950 Год назад

    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  11 месяцев назад

      it is just animation made by myself

  • @arunkumar-vd1dw
    @arunkumar-vd1dw 7 месяцев назад

    the code is showing stray error /302

  • @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 года назад +1

      @@Ari-uj2sy ok I will try

  • @asrarhaq
    @asrarhaq Год назад

    Have you made PCB for this project?

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

  • @mokh3257
    @mokh3257 2 года назад

    You can be alerted by sending a text message SMS

  • @parshvtathed1643
    @parshvtathed1643 Год назад

    Excellent project can I get the complete code of this project

    • @AhmadLogs
      @AhmadLogs  Год назад

      check description for code

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

  • @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 года назад +1

      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

  • @EasyOne
    @EasyOne Год назад

    hi plz suggest the best gps module

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

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

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

  • @CarlsuuuDesuu0723
    @CarlsuuuDesuu0723 Год назад

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

    • @AhmadLogs
      @AhmadLogs  Год назад +1

      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

  • @djzatka
    @djzatka 10 месяцев назад

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

  • @TechnicalidEas07
    @TechnicalidEas07 2 года назад

    Push button and gps

  • @polatcetiner7332
    @polatcetiner7332 2 года назад

    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  2 года назад

      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 2 года назад

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

    • @polatcetiner7332
      @polatcetiner7332 2 года назад

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

    • @AhmadLogs
      @AhmadLogs  2 года назад

      @@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  2 года назад

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

  • @emrepolat5665
    @emrepolat5665 2 года назад

    .

  • @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 года назад +1

      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

  • @itsownaccord5096
    @itsownaccord5096 9 дней назад

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