SIM800L Programming With Arduino - GSM Module Arduino UNO

Sdílet
Vložit
  • čas přidán 12. 09. 2024
  • The goal of this video is to write an efficient code to control SIM800L using Arduino UNO. The code will be able to solve the common issues of SIM800L that you have faced while working with SIM800L. The code will ensures that the SIM800L will work all the time. If it got stuck in between a process then the code will restart the module to make it ready again.
    Buy SIM800L - amzn.to/3J48mlW
    --------------------------------------------------------------------------------------------------------------------
    Useful Video Links
    --------------------------------------------------------------------------------------------------------------------
    How to Use SIM800L With Arduino
    • How to Use SIM800L Wit...
    Home Automation Using NodeMCU ESP32 and Firebase | MIT App Inventor
    • Home Automation Using ...
    Advanced RFID Based Attendance System Using NodeMcu Version 2
    • Advanced RFID Based At...
    --------------------------------------------------------------------------------------------------------------------
    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 #SIM800L #ArduinoProgramming

Komentáře • 139

  • @allumolusrinivasu1529

    I am from India..you are a best programmer brother ..thank you.

  • @PradeepKumar-ce6qb
    @PradeepKumar-ce6qb Před 2 lety +1

    Thank you brother for the video. You are a best programmer and a best Teacher as well.

  • @masoudjafarzadeh
    @masoudjafarzadeh Před 2 lety

    In Iran, to send a text message in Persian, you must hex the mode of sending the text message and after sending it, convert it to gsm to receive it again.
    Sometimes the sim settings are converted to hex again and it does not receive distorted text messages in English
    I used a millis function to fix these bugs like you
    👍

  • @mb106429
    @mb106429 Před rokem

    This is a nice snippet of code with a superb explanation to help us repurpose it easily

  • @hnmscreentech5680
    @hnmscreentech5680 Před 8 měsíci

    Excellente pédagogie. Travail remarquable de présentation de la vidéo. MERCI (de France)

  • @bharathasrimal8641
    @bharathasrimal8641 Před rokem

    Sir your explanations are very much clear and easy to understanding !!!

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

    This was really use full project. Specially the AT respond check part. Can we do this same while when reading sensor data.

  • @hackknowledge24
    @hackknowledge24 Před rokem

    Your explanation is some sir ,do some more video and explain every concepts sir please eeeeeeeee

  • @mohammadkarimi6115
    @mohammadkarimi6115 Před 2 lety +2

    Hello, help me. I made the circuit, everything works well when connected to the computer, but when the battery or external power is used, everything is fine and it just doesn't send SMS. Look at my code in the gate.

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

      I am facing the same problem...you rectified the issue? Pls let me know how to solve

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

      @@asadeeshprabhakar There was an antenna problem, I connected it to an external antenna and the problem was solved

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

    Wow gr8 bro...

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

    Thanks for sharing with us you are the best developer thank you.

  • @AAdnaanmtl
    @AAdnaanmtl Před 2 lety

    Excellent explanation sir. Sir we are waiting for your 4 in 1 gsm project with eeprom option in future thanks for sharing great ideas

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

    Hello, the circuit I made when connected to the computer in the serial monitor receives and sends messages, but when it works alone, only SMS messages are received, and by pressing the reset button esp32 is fixed and sends messages too.??!!

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

    SIR, YOU ARE REALLY AMAZING ANG GREAT! I ALWAYA FOLLOW YOUR VIDEOS AND WATCH IT.. THE ONLY PROBLEM THAT I HAVE NOW IS TO EXTRACT THE SENDER NUMBER AND COMPARE IT TO THE MY NUMBER IN SIMPLER CODING UF POSSIBLE. CAN YOU PLEASE SHARE SOME. THANK YOU ONCE AGAIN..

  • @suyashmirajkar6784
    @suyashmirajkar6784 Před 2 lety

    thank you Ahmad !! fantastic logic and great explenation . thank you once again..

  • @warrenscorner
    @warrenscorner Před 2 lety

    Excellent video Ahmad!

  • @shakerileiwat4341
    @shakerileiwat4341 Před 2 lety

    Masha' Allah, excellent explanation ♥♥♥

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

    Hello, in the first connection, sms read and call read messages appear on the computer monitor serial and after resetting esp32, everything is fixed.

    • @AhmadLogs
      @AhmadLogs  Před 2 lety

      it required to update the code and we also need current and voltage sensor. I will try

  • @mibrahim4245
    @mibrahim4245 Před 2 lety

    crystal clear explanation !! ..
    I wanted to ask you ... what is the best and most efficient way to send the location from arduino ? ..
    if we connect a GPS and send the location in SMS by making a google maps link each time we recieve an sms.. will be okay ..
    but.. what if we want a real time tracking ? ..

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

      The best way to send the location using sim800l by send sms. sim800l has slow speed internet. so, it is not reliable for real time location, you need some stable internet connection for realtime tracking

    • @mibrahim4245
      @mibrahim4245 Před 2 lety

      @@AhmadLogs thanks 🙏

    • @mibrahim4245
      @mibrahim4245 Před 2 lety

      @@AhmadLogs what type of connection does it have? Like 3g? 4g?

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

    Great. Thank you.

  • @PradeepKumar-ce6qb
    @PradeepKumar-ce6qb Před 2 lety

    Looking for more such videos

  • @maihuutanmai334
    @maihuutanmai334 Před rokem

    i really like your video.

  • @alektronix
    @alektronix Před 9 měsíci

    In my case it is showing angstrom and reverse question mark instead of AT and OK

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

    I'm going to buy sim800L but I can't decide. There 2 version of SIm800L. Red and Blue.
    Which one should I get for Arduino UN0?
    Is sim900A newer than sim800L?

  • @joelcanada7137
    @joelcanada7137 Před 2 lety

    Thank you very much Sir Ahmad.

  • @lamlastemela5343
    @lamlastemela5343 Před rokem

    Amazing explanation and thanks for that. How can I use a stand alone ATmega328P to drive a relay without the ARDUINO board itself but using the same code. In other words , shrinking the whole setup to GSM800l , ATmegs328P , Relay and Power Supply.

    • @AhmadLogs
      @AhmadLogs  Před rokem

      the same code will be used for ATmegs328P. just connect a 16mhz crystal to ATmegs328P.

  • @vinothram
    @vinothram Před rokem

    Very understandable 👍 thankyou

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

    Can you make tutorial aboun when receive sms the sms will display in dot p10 and sms is scroling when midul sim800l receive new sms will clear the previous sms that displai in p10 display and show the new sms in p10 display... 🙏🙏🙏

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

    Thank you sir please make viedo on sleep mode and wake up the sim800l module to save battery

  • @amrzakaria5290
    @amrzakaria5290 Před 2 lety

    Very good , nice job.

  • @icconicko4737
    @icconicko4737 Před rokem

    Hi can I ask a question? How to program limited sms in sim800L.

  • @audreymirindi3186
    @audreymirindi3186 Před rokem

    Hello sir... Can the sim800l work with a 3G and 4G sim card?? If it doesn't support it please tell me I need an answer... I need an help sir

    • @AhmadLogs
      @AhmadLogs  Před rokem

      sim800l not work with 3g or 4g. you can use sim7600

  • @stefanhollrigl5803
    @stefanhollrigl5803 Před rokem

    Hello, i would send a Sms to my Smartphone with the command AT+CMGS, but i dont know, what the expected answer ist... Could you help me?

  • @mokh3257
    @mokh3257 Před 2 lety

    Thanks for the effort

  • @surajbaghel2979
    @surajbaghel2979 Před rokem

    Hi i want to send my sensor data on google spread sheet have u any idea just tell me how to write code

  • @Amryou
    @Amryou Před rokem

    thank you for the great job i understood every thing but in my project i need to get the sender number to resend a sms to him , their is any method for that??

  • @zeeshanakram8751
    @zeeshanakram8751 Před 2 lety

    sir is there any video describing how to read response of outgoing call?

    • @zeeshanakram8751
      @zeeshanakram8751 Před 2 lety

      sir please make next video on this topic, it is very important. Thanks.

  • @rampage_xdit
    @rampage_xdit Před 2 lety

    You are master.بارک الله

  • @rajapathamuthug608
    @rajapathamuthug608 Před rokem

    THANKS BRO

    • @AhmadLogs
      @AhmadLogs  Před rokem

      also watch this czcams.com/video/lYN8hqNAKbU/video.html

  • @kouameraouphbini1659
    @kouameraouphbini1659 Před 2 lety

    Hello thank you for the tutorials it helps a lot by the way i am currently working on an IOT project with an ESP32 SIM7000G card i followed your example of GPS with sim800l but i have a problem i want to send the sensor data to firebase via sim7000g but i can't connect to the apn the apn connection fails i really need your help please

    • @AhmadLogs
      @AhmadLogs  Před 2 lety

      ask for your sim card provider for the apn setting

  • @rijarazaka8272
    @rijarazaka8272 Před rokem

    thank you MASTER,I FOLLOWED YOUR TUTORIAL ABOUT SENDING DATA TO FIREBASE, IT WORKS GOOD, AFTER I USED DFROBOT LIBRARY FOR SIM808 MODULE, TO GET GPS COORDINATES, THE CODE COMPILE, BUT IT CANNOT SEND GPS COORDINATES , PLEASE HELP,,, i m a student electronics and computer sience,, ,,,,,

  • @alperkaplan5400
    @alperkaplan5400 Před 2 lety

    hello mr. Ahmad. will u be adding the new sim800l code to old codes? I mean I want to combine your old sim800l+esp32 relay controler code with the new code you wrote. Please record a video that combines old code with new works.

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

      I will definitely use the updated code in my new projects. I will try to update the code for my old project. but I have a very little times so I dont know when?

  • @benadjilabillal2866
    @benadjilabillal2866 Před 2 lety

    Good job. 👍

  • @karthik.g5154
    @karthik.g5154 Před rokem

    Awesome 👌

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

    hi i want send sms through api and get sms responce hit api whith response

  • @mehdikarimpoor9401
    @mehdikarimpoor9401 Před 2 lety

    Hello Ahmad, good morning
    great job
    I am programming for esp32 with Micropyton. And I use Thonny ide.
    How can I protect the app from being accessed after uploading?

    • @AhmadLogs
      @AhmadLogs  Před 2 lety

      you must have a look. docs.espressif.com/projects/esp-idf/en/latest/esp32/security/flash-encryption.html

  • @محمدعلیرضایی-ث9ش

    سلام ، چطور به سورس کد دسترسی داشته باشیم..؟

  • @balbirsinghheer1370
    @balbirsinghheer1370 Před 2 lety

    Sir i have a nodemcu but I'm using it with blynk iot can you please tell me which pin of nodemcu is equal to which pin like A1 A2 A3 a full chart

    • @balbirsinghheer1370
      @balbirsinghheer1370 Před 2 lety

      Loke pin2 is D4 of nodemcu

    • @AhmadLogs
      @AhmadLogs  Před 2 lety

      you must have a look on it i0.wp.com/randomnerdtutorials.com/wp-content/uploads/2019/05/ESP8266-NodeMCU-kit-12-E-pinout-gpio-pin.png?quality=100&strip=all&ssl=1

  • @tusharbhardwaj7511
    @tusharbhardwaj7511 Před rokem

    Hi, I actually wanted to ask that I'm using sim800l with Arduino uno to send SMS and make call simultaneously one after another but the problem is that after connecting to network call function is working really fine but SMS are not sent somehow,.... I've tried tons of code but SMS are not being sent please help if anyone can ! I would be really thankful

    • @AhmadLogs
      @AhmadLogs  Před rokem

      I'd be happy to help you with this issue. use the following code to test the sim800l
      #include
      SoftwareSerial sim800l(2, 3); // RX, TX pins for SIM800L module
      void setup() {
      // initialize serial communication for debugging purposes
      Serial.begin(9600);
      while (!Serial);
      // initialize SIM800L module
      sim800l.begin(9600);
      delay(1000);
      // wait for network connection
      while (!sim800l.available()) {
      Serial.println("Waiting for network connection...");
      delay(1000);
      }
      // successful network connection
      Serial.println("Network connected.");
      }
      void loop() {
      // make a call
      callNumber("1234567890");
      // wait for call to end
      delay(10000);
      // send an SMS
      sendSMS("1234567890", "Hello World!");
      // wait for SMS to send
      delay(5000);
      }
      void callNumber(String number) {
      sim800l.println("ATD" + number + ";");
      Serial.println("Calling " + number);
      }
      void sendSMS(String number, String message) {
      sim800l.println("AT+CMGF=1"); // set SMS text mode
      delay(1000);
      sim800l.println("AT+CMGS=\"" + number + "\""); // send SMS to number
      delay(1000);
      sim800l.print(message); // send SMS message
      delay(1000);
      sim800l.write(26); // send CTRL+Z to end SMS message
      Serial.println("Sending SMS to " + number + " with message: " + message);
      }

  • @masoudjafarzadeh
    @masoudjafarzadeh Před 2 lety

    bravo to you and
    excellent

  • @iantcroft
    @iantcroft Před 2 lety

    Very well explained video, thanks.
    altSoftSerial is a more reliable alternative than softwareSerial, can simultaneously transmit and receive but only available on set pins.
    Could you create the same functions using character arrays without the use of String?
    Thanks.

    • @AhmadLogs
      @AhmadLogs  Před 2 lety

      Yes, you are right. but I never used altsoftserial simultaneously. I will try it in my gps and gsm projects
      I have tried many times with I will try to write the same function using character array. but I never feel comfortable with character array with sim800l

    • @iantcroft
      @iantcroft Před 2 lety

      @@AhmadLogs
      Try using hardware port (TX RX) for gps and altSoftSerial for Sim800L.
      I’ve been told to stay away from String and instead use character arrays.
      Thanks.

    • @AhmadLogs
      @AhmadLogs  Před 2 lety

      @@iantcroft Yes you have told me before. I think there is some with software serial while reading characters. So, I will try using altsoftserial

  • @ahmedgaballa8542
    @ahmedgaballa8542 Před 2 lety

    I have a question i try send sms and call it work successfully but in case of gprs i don't why it didn't work that mean there is problem in the power of the module it is lithium-ion battery 3.7 v the current supposed to be 2A but by using a meter we read 1.2 A is that the problem

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

      sim800l required 2A current in a fraction of a second, so you cannot measure it using multi meter, you need oscilloscope for this.
      1. 3.7v battery is adequate
      2. have you entered the correct apn and password of your sim card network provider
      3. what is displaying on the serial monitor while connecting to the serial monitor

    • @ahmedgaballa8542
      @ahmedgaballa8542 Před 2 lety

      @@AhmadLogs yes i have make call and it was received and send sms the problem i don't see in serial monitor the response of module even when i make the call and sms

    • @AhmadLogs
      @AhmadLogs  Před 2 lety

      @@ahmedgaballa8542 1. It means there is some issue with your serial connection to the sim800L. please double check the connection.
      2. have you select the correct baud rate from the serial monitor

    • @ahmedgaballa8542
      @ahmedgaballa8542 Před 2 lety

      @@AhmadLogs I select 9600 baud rate

    • @ahmedgaballa8542
      @ahmedgaballa8542 Před 2 lety

      @@AhmadLogs Sir our graduation project
      Send reads of ultrasonic to firebase as percent using sim800L
      and access by application
      To firbase and read these percent
      We use mega and same code of sending dht reads
      But coonect tx 18 Rx 19
      We should convert long int reads to string ? Can find response from gsm
      Or what the problem ?🥺

  • @mibrahim4245
    @mibrahim4245 Před 2 lety

    Original .. Thanks

  • @CheloIRL
    @CheloIRL Před 2 lety

    Hi Ahmad! Thank you very much for this tutorial, it's been really helpful!
    I wanted to ask you something: The main functions work flawlessly with an Arduino UNO, but I cannot make it work with a NodeMCU (ESP32). I'm using Serial2 instead of software serial, but I get an infinite loop with the getResponse or tryATcommand funcionts. The response is OK, but there is something with the function that cannot take the value and get the correct flag. Do you know how to solve this?
    I'm using exactly the same program in both, but replacing sim800l with Serial2 and not including the softwareSerial library. Thanks again!!

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

      its OK to use hardware serial ports of the esp32 instead of using any softwareSerial library. I have built this code on the Arduino UNO. I never tested it on the esp32. So, I will test it for the esp32 myself, and will try to figure out the issue. It must work with esp32. I think there is some little logic fail for the esp32. so I will try to fix this issue and let you know as soon as the issue is resolved

    • @CheloIRL
      @CheloIRL Před 2 lety

      @@AhmadLogs Thank you very much! Please let me know, I really tried everything to my knowledge and could not debug it!

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

      @@CheloIRL you might check the code of this project czcams.com/video/OJcGY4ySs4o/video.html
      I have updated the getResponse function and also added the resetSIM800L function. this code might be helpful

    • @CheloIRL
      @CheloIRL Před 2 lety

      @@AhmadLogs Hi Ahmad! I tried with the updated function but I still get the same output. It cannot break the loop for the tryATcommand and I get something like this:
      .AT
      AT
      OK
      .AT
      AT
      OK
      Etc.

    • @CheloIRL
      @CheloIRL Před 2 lety

      @@AhmadLogs Let me add that my main goal is to use the bottom "failsafe" for this program (the part that checks if the module is working fine and is connected to the microcontroller).
      Do you believe there's another way to make this failsafe? I was looking at your video on how to control a relay with an ESP32 from April 2021 (saw that this program doesn't have a failsafe). Thanks again!

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

    Can you help me brother on my arduino code?

  • @mdtanvirshakil3941
    @mdtanvirshakil3941 Před 2 lety

    Please make a video on sim800l firmware flash or update .please

    • @AhmadLogs
      @AhmadLogs  Před 2 lety

      I have tried many times but not any success

  • @nctzen1453
    @nctzen1453 Před rokem

    can you tell me how to program sim800l with esp32?

    • @AhmadLogs
      @AhmadLogs  Před rokem

      the same concept wiil be used for esp32

    • @nctzen1453
      @nctzen1453 Před rokem

      @@AhmadLogs does the program code use the same program code?

    • @AhmadLogs
      @AhmadLogs  Před rokem

      @@nctzen1453 almost same

    • @AhmadLogs
      @AhmadLogs  Před rokem

      @@nctzen1453 check this czcams.com/video/dwbB3YGbBrY/video.html

    • @nctzen1453
      @nctzen1453 Před rokem

      my sim800l module can't send messages. I don't know why, even though the led blinks once every 3 seconds

  • @ezeoluchukwu5104
    @ezeoluchukwu5104 Před 2 lety

    NICE ONE MY ENGINEER. BUT CODE NOT YET UPLOADED.

  • @yawarsaeed6499
    @yawarsaeed6499 Před 2 lety

    Awesome 👍