GSM Module Arduino - Sim800L Library Programming

Sdílet
Vložit
  • čas přidán 7. 09. 2024
  • Arduino GSM Module, The Sim800L is a popular GSM module used in various projects such as remote monitoring systems, GPS tracking devices, and home automation. In this video, we will show you how to use the Sim800L module with an Arduino board to control a relay through SMS and phone calls.
    We will start by providing an overview of the Sim800L class's key features and functions, including how to set up the Sim800L library in your Arduino project and initialize the Sim800L object with the appropriate pins. We will then demonstrate how to modify the existing sample code to control a relay instead of an LED.
    Furthermore, we will show you how to add a condition to accept SMS and phone calls only from a specific phone number, ensuring that the device remains secure. Finally, we will discuss how to move the Sim800L class inside the library folder and the required changes to add it there.
    By the end of this video, you will have a clear understanding of how to use the Sim800L module with an Arduino board to control a relay through SMS and phone calls. This project will not only enhance your understanding of the Sim800L module but also provide you with a fun and useful project to add to your portfolio.
    By using this you can build different types of project such as Build a Smart Irrigation System, GSM-Based Home Security System, Controlling Your Appliances Remotely with Sim800L, Adding Cellular Connectivity to Your Projects, Smart Home Automation with Sim800L and Arduino.
    Parts Used in This Project:
    1. Arduino UNO - - amzn.to/3ZWKAz2
    2. SIM800L GSM Module - amzn.to/3J48mlW
    3. LM2596 DC to DC Buck Converter - amzn.to/3o1RwwX
    4. Relay Module 5v - amzn.to/3l1aoem
    5. 12V 2A Power Supply Adapter - amzn.to/419Afkj
    --------------------------------------------------------------------------------------------------------------------
    Useful Video Links
    --------------------------------------------------------------------------------------------------------------------
    Connecting SIM800L to Arduino using LM2596 Buck Converter
    • GSM Based Door Lock Sy...
    --------------------------------------------------------------------------------------------------------------------
    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: I will use High Voltages which if incorrectly or improperly used could result in serious injuries or death. So be careful of what you are doing because I will take no responsibility for any of your actions.
    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 #SIM800L #ArduinoProgramming

Komentáře • 99

  • @taufiq1742
    @taufiq1742 Před rokem

    if the SMS is not readable on the serial monitor, you need to turn off (Auto-bauding) on the Sim800l and set it to fix 9600, now it works. AT command used AT+IPR=9600
    thanks for the library, it really helped me

  • @labandrick9240
    @labandrick9240 Před rokem +1

    Thank you for this tutorial because my work is going to be easy.
    Thanks in advance your videos are always informative.

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

    Hello Ahmad,
    PROBLEM : Startup problem by using your project (Arduino UNO and relays steering by SMS) with only external power source and by external power failure.
    First of all Thanks for this tutorial !
    But when I tested the Sim800L & commanding the relays with SMS I realised a Seriously problem !
    The program runs only without problems when the UNO board is coupledwith the PC via the serial usb connection.
    Running the Arduino UNO only via the power jack (12V feed), the program doesn't work !!!
    The Arduino UNO & Sim800 StartsUp !
    The Sim800L runs and connect to the network, the PowerLeds on the Arduino lights up!
    But there is NO REACTION on sending the SMS‎, despite the Rx Led on the Sim800 gives a sign of receiving the SMS !

    You have to Reset the Arduino first by the Reset button before the program start and run again without problems!
    So there is a problem on Starting Up the Arduino by only using external power. Same difficulties when you have an external Power failure.
    In bot cases you have to use the RESET Button to start the program !
    That means that you can't trust the working of those projects. Specially when the project is located several miles awayom your position !!!
    I could not find out what the reason is for this malfunction, could you try to find a solution for this rebooting problem ?
    Greetings

  • @oooo000098
    @oooo000098 Před 5 měsíci

    you are amazing Ahmed. Thanks

  • @farhadrahman1658
    @farhadrahman1658 Před rokem

    You are so good. jazakallah khairan.

  • @kitkirkyen2002
    @kitkirkyen2002 Před 7 měsíci

    SIR YOU ARE A GENIUS AND THANK YOU SO MUCH FOR SHARING. I HAVE A QUESTIN SIR, IN THE LOOP FUNCTION, DOES IT MONITORING IF THE SIM800 IS CONNECTED?

  • @nenaddjurasovic9315
    @nenaddjurasovic9315 Před 2 dny

    Hello Ahmad, how to send AT commands with this library?

  • @maheshmustapure7668
    @maheshmustapure7668 Před rokem

    Can you please make video on GPRS use of SIM800L
    I want to know how to connect internet to Arduino...or Esp.
    You make great videos

  • @dengruv-sj6el
    @dengruv-sj6el Před měsícem

    please tell me what needs to be done to make the library work with esp 32

  • @mebra_homeshop
    @mebra_homeshop Před 7 měsíci

    Salam ahmad
    Your videos are really great on sim800l topic, thanks for sharing lybrsry and videos.
    I got s problem with sending message, i can make call but canmot send message. Can you help me to find the proem

  • @mokh3257
    @mokh3257 Před rokem

    Good job thanks for the efforts

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

    There are 2 versions of this sim800l . Red and blue. Which one is better?

  • @user-ce6yv2vr8x
    @user-ce6yv2vr8x Před 10 měsíci

    Thanks for the class, that's what I needed, can you give me the code for your program? I have already managed to download the library

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

    Hello. I just want to ask what is the problem when my gsm module is connected to network but doesnt receive sms. Sms only appears when sim is placed on phone. Thank you.

  • @amitchaudhary6
    @amitchaudhary6 Před rokem

    Really very interesting project. Why external capacitor is added to SIM800L?

    • @hdelanghe2758
      @hdelanghe2758 Před 5 měsíci

      I use a polarised 2200 µF 25 V condensor

  • @loozakhdar522
    @loozakhdar522 Před rokem

    first i wanna say thank you for your effort, much appreciated.
    a question: can i use more than one specific nomber on this module? if so how can i add more than one?

    • @AhmadLogs
      @AhmadLogs  Před rokem +1

      Yes, you can. you can use the multiplel if-else-if statement to compare multiple phone numbers.

    • @loozakhdar522
      @loozakhdar522 Před rokem

      @@AhmadLogs thank you very much sir
      في ميزان حسناتك ان شاء الله

  • @kamalkamel7559
    @kamalkamel7559 Před rokem

    Thanks for this detailed explanation,
    whether it is possible an sms code and SIM module to vary the PWM of a led by messages. example: send v0 led off, v1=20% pwm, v2=40% pwm....until vn=100% pwm.
    thank you for your reply.

    • @AhmadLogs
      @AhmadLogs  Před rokem +2

      Yes, you can

    •  Před rokem

      @@AhmadLogswhat code is required for this, and how can the message be changed to require led_state:"brightness" (ranging from 0 to 100)? Thanks for any answers.

  • @user-so9kb8gm9z
    @user-so9kb8gm9z Před rokem

    Thats amazing❤❤❤❤

  • @Nvenkatesh1710
    @Nvenkatesh1710 Před rokem

    Which sim card are used in this project

  • @allumolusrinivasu1529

    Please if possible make one project for saving phone number automatically with first missed call.Thank you

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

    can i count the ring count using this i cant see any methods for that

  • @ranjithshetty7078
    @ranjithshetty7078 Před rokem

    Super bro

  • @HASSANALI-qj6tg
    @HASSANALI-qj6tg Před 7 měsíci

    i am using my new jazz sim card which i think is 4g will it work if not then where to find a 2g sim card

  • @elvisochieng3454
    @elvisochieng3454 Před rokem

    Great videos, can I use this library to update a database on a server somewhere?

    • @AhmadLogs
      @AhmadLogs  Před rokem +1

      no. this library does not support GPRS right now. but I will add it in the future

  • @opm905
    @opm905 Před rokem

    Sir, how hex file copy from esp32,and upload that program to new one

  • @Swati-tk4ji
    @Swati-tk4ji Před rokem

    How can we interface this circuit with neo 6m gps module and what is the code for that so that if we send msg get location we will get link through the message. Could you please help me.

    • @AhmadLogs
      @AhmadLogs  Před rokem

      find my video on this topic from my channel

  • @user-ud1rl8ln1k
    @user-ud1rl8ln1k Před rokem

    The sim800l can send sms to different languages except english?

    • @AhmadLogs
      @AhmadLogs  Před rokem +1

      Yes, the SIM800L module can send SMS messages in languages other than English, as it supports a variety of character sets, including Unicode, which can represent characters from many different languages.
      To send SMS messages in a language other than English, you may need to configure the character set used by the module to match the language you want to use. This can typically be done using the AT commands provided by the module. You should consult the module's documentation or datasheet for more information on how to configure the character set and send SMS messages in different languages.

  • @johnellempuerto3659
    @johnellempuerto3659 Před rokem

    Sir why sim800l v2 can send sms but Cant recieve sms..
    Failed to initialize the modile after multiple attemps

    • @AhmadLogs
      @AhmadLogs  Před rokem

      its strange, I think there is some issue with your code

  • @f.rahman3458
    @f.rahman3458 Před rokem

    Jajakallah ❤

  • @vipinv8004
    @vipinv8004 Před rokem

    sir i checked yr github link but SIM800L.h and all example files are empty ..... no code inside

  • @wassimnemri6597
    @wassimnemri6597 Před rokem

    hello Mr.Ahmed .. i heard that sim800L work only with cellular sim card 2g is it right ? if yes is any solution to make it work on 4g ?

    • @AhmadLogs
      @AhmadLogs  Před rokem +1

      no. only 2g

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

      hallo ahmad am from kenya africa and man! your work is wow! ,am working on sim800l and 4g simcard and is working perfectly on sms platform with no any problem thanks @@AhmadLogs

  • @atyxah16
    @atyxah16 Před rokem

    Hello Ahmad, I bought sim800l gsm module but ı cant run that can you help me ?
    I dont know what ı did wrong. I provide 4v 2A from adjustable power supply and ı plug sim card correctly but it says "Register in network failed"

    • @AhmadLogs
      @AhmadLogs  Před rokem

      provide 4.4v

    •  Před rokem

      Are you sure you have 2G coverage with your provider at your location? If not, try adding a piece of wire 1/2 of the wavelength of the respective 2G band (900 MHz in most of the world including India). Also check if the right pin is used.

  • @ahmedtaher4015
    @ahmedtaher4015 Před rokem

    Now I bought GSM SIM800L and when connected to the circuit it rings but the code is not executed
    And when I changed it to another one the code worked what is the problem that is in the gsm

    • @AhmadLogs
      @AhmadLogs  Před rokem

      I think the issue might with with sim800l

    • @ahmedtaher4015
      @ahmedtaher4015 Před rokem

      @@AhmadLogs But the connection responds but when placed in the circle the code does not execute with the Arduino
      While the other works well on the same circle
      So does it need to make configurations or definitions when using it for the first time

    • @AhmadLogs
      @AhmadLogs  Před rokem

      @@ahmedtaher4015 I does not require any configuration for the first time. the library configure itself. I think there is some other issue

  • @Swati-tk4ji
    @Swati-tk4ji Před rokem

    Thank you for this video.
    Please upload the code.

  • @Kentir772
    @Kentir772 Před rokem

    How to use this program with nodemcu esp8266

    • @AhmadLogs
      @AhmadLogs  Před rokem

      soon I will add this feature to the library

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

    Is sim800l work in 3gand 4g network??

    • @hdelanghe2758
      @hdelanghe2758 Před 5 měsíci

      Works only on 2G band, which will be abanded by most Europe Net Services in the near futer !

  • @rajaduraisangari
    @rajaduraisangari Před rokem

    Sir, how to check the last relay status? And deleted the sim memory?

    • @AhmadLogs
      @AhmadLogs  Před rokem

      give me some more detail

    • @rajaduraisangari
      @rajaduraisangari Před rokem

      @@AhmadLogs sir, how to check the relay last status on/ off, and delete the message from sim card

  • @varunraghuwanshi3177
    @varunraghuwanshi3177 Před rokem

    Dear my sim800l module not responding for any AT commands what may be the problem?

    • @AhmadLogs
      @AhmadLogs  Před rokem

      observe led of sim800l to see if your module is working or not.
      check your serial connections
      check baud rate etc.

    • @varunraghuwanshi3177
      @varunraghuwanshi3177 Před rokem

      ​​​@@AhmadLogs my sim800l led is properly blinking after 3sec i check all the connection. I have 4 sim800l module but all are unable to handshake with Arduino UNO, Arduino nano and esp32 and ESP 8266 pls help

    • @AhmadLogs
      @AhmadLogs  Před rokem

      @@varunraghuwanshi3177 There are several reasons why your SIM800L module may not be responding to AT commands. Here are some things you can check:
      Power supply: Make sure that your SIM800L module is getting sufficient power. The module requires a stable power supply of 3.4-4.4V and a current of at least 2A during transmission. Check your power supply and try a different power source to see if that resolves the issue.
      Connections: Check all your connections to ensure that they are properly connected and that there are no loose wires. Make sure that the RX and TX pins are connected correctly, as incorrect connection can cause the module to fail to respond to AT commands.
      Baud rate: Ensure that the baud rate of your serial communication matches the baud rate of the SIM800L module. The default baud rate of the module is 115200, so make sure that your code and serial monitor are set to this value.
      SIM card: Make sure that your SIM card is properly inserted and activated. The module requires a working SIM card with a data plan to connect to the network.
      Firmware: Ensure that your SIM800L module has the latest firmware version. You can update the firmware by downloading the firmware from the manufacturer's website and following the instructions provided.
      Reset the module: Try resetting the module by powering it off and then back on again.

    • @varunraghuwanshi3177
      @varunraghuwanshi3177 Před rokem

      Thanks for your valuable feedback

  • @dhananjayahire9457
    @dhananjayahire9457 Před rokem

    Hi sir, for my sim provider gprs username and password is blank... what should i use then

    • @AhmadLogs
      @AhmadLogs  Před rokem

      you just leave them blank. In my provider gprs username and password also blank.

  • @muhammadm1237
    @muhammadm1237 Před rokem

    What is capacitor you used?

  • @wqmproject2308
    @wqmproject2308 Před rokem

    Working with esp32?

    • @AhmadLogs
      @AhmadLogs  Před rokem

      not yet, but I will update the library soon, and will add support for esp32

  • @bossismail
    @bossismail Před rokem

    Sir i have sim900. Its working of this project?😊

  • @zeeshanakram8751
    @zeeshanakram8751 Před rokem

    Your this tutorial is missing one important feature; how to make phone call using sim800L.
    And also different ways of responding incoming calls like, answer, decline etc.

  • @varunraghuwanshi3177
    @varunraghuwanshi3177 Před rokem

    Great work pls upload the code

  • @warrenscorner
    @warrenscorner Před rokem

    You do great videos Ahmad but isn’t the 800L dead? In the USA 2G and 3G are things of the past. I was very disappointed when my SIM800L stopped working. 4G or 5G is the new standard.

    • @AhmadLogs
      @AhmadLogs  Před rokem +2

      It's true, In most Asian countries, 2G is still widely used, and it can be challenging to find a 4G module in my country. I aware of this fact and was likely trying to provide helpful information to a global audience.
      I was unable to find a 4G module in my country and purchased one from China instead. However, when I tried to use it, the device was blocked because its IMEI number was not registered in my country. This is a common issue that can occur when importing electronics from other countries, and it can result in the device being rendered unusable.

    • @nefistofelesjulio
      @nefistofelesjulio Před rokem

      @@AhmadLogs great video, i recommend you to buy the SIM7600G-H module is for global communication, I have started using with esp32

    • @AhmadLogs
      @AhmadLogs  Před rokem

      @@nefistofelesjulio I will buy it soon

    •  Před rokem

      In many countries except Switzerland, Australia, the Netherlands, US, etc., 2G still is up and running and not even yet at the sunset.
      Modem complexity and required bandwidth is a benefit of 2G (and LTE-NB). Some providers decided to keep 2G running inside the 4G guard band.

  • @AbhishekKumar-be2qn
    @AbhishekKumar-be2qn Před rokem

    Please make a video Arduino gsm with relay control mobile app by mit app inventor. Please

    • @AhmadLogs
      @AhmadLogs  Před rokem +2

      will try

    • @AbhishekKumar-be2qn
      @AbhishekKumar-be2qn Před rokem

      @@AhmadLogs thanks Bhai

    • @NextGen_automation
      @NextGen_automation Před rokem

      Sir please make a video arduino nano gsm sim800l and 2relay for water pump starter control trigger mode only 5second on by sms command and phone calls START relay and STOP relay and define a pullup funsion pin for water over flow sensor control it's very helpful for farmers 🙏🙏

    • @NextGen_automation
      @NextGen_automation Před rokem

      I'm request to you many times and waiting for your response to a long time

  • @kisanhelp1064
    @kisanhelp1064 Před rokem +1

    i want to talk to you

  • @kisanhelp1064
    @kisanhelp1064 Před rokem

    Plzz whatsapp no