GSM Sim800L

 Whether you want to listen to what happens in your house that’s miles away from you or activate sprinkler system in your garden just with a silent call; Then SIM800L GSM/GPRS module serves as a solid launching point for you to get you started with IoT!


SIM800L GSM/GPRS module is a miniature GSM modem, which can be integrated into a great number of IoT projects. You can use this module to accomplish almost anything a normal cell phone can; SMS text messages, Make or receive phone calls, connecting to internet through GPRS, TCP/IP, and more! To top it off, the module supports quad-band GSM/GPRS network, meaning it works pretty much anywhere in the world.

Hardware Overview of SIM800L GSM/GPRS module

At the heart of the module is a SIM800L GSM cellular chip from SimCom. The operating voltage of the chip is from 3.4V to 4.4V, which makes it an ideal candidate for direct LiPo battery supply. This makes it a good choice for embedding into projects without a lot of space.


All the necessary data pins of SIM800L GSM chip are broken out to a 0.1″ pitch headers. This includes pins required for communication with a microcontroller over UART. The module supports baud rate from 1200bps to 115200bps with Auto-Baud detection.

The module needs an external antenna to connect to a network. The module usually comes with a Helical Antenna and solders directly to NET pin on PCB. The board also has a U.FL connector facility in case you want to keep the antenna away from the board.


There’s a SIM socket on the back! Any activated, 2G micro SIM card would work perfectly. Correct direction for inserting SIM card is normally engraved on the surface of the SIM socket.

This module measures only 1 inch² but packs a surprising amount of features into its little frame. Some of them are listed below:

  • Supports Quad-band: GSM850, EGSM900, DCS1800 and PCS1900
  • Connect onto any global GSM network with any 2G SIM
  • Make and receive voice calls using an external 8Ω speaker & electret microphone
  • Send and receive SMS messages
  • Send and receive GPRS data (TCP/IP, HTTP, etc.)
  • Scan and receive FM radio broadcasts
  • Transmit Power:
    • Class 4 (2W) for GSM850
    • Class 1 (1W) for DCS1800
  • Serial-based AT Command Set
  • FL connectors for cell antennae
  • Accepts Micro SIM Card
CIRCUIT:
 

Now that we know everything about the module, we can begin hooking it up to our Arduino!

Start by soldering/connecting the antenna, insert fully activated Micro SIM card in the socket. Now, connect Tx pin on module to digital pin#3 on Arduino as we’ll be using software serial to talk to the module.

We cannot directly connect Rx pin on module to Arduino’s digital pin as Arduino Uno uses 5V GPIO whereas the SIM800L module uses 3.3V level logic and is NOT 5V tolerant. This means the Tx signal coming from the Arduino Uno must be stepped down to 3.3V so as not to damage the SIM800L module. There are several ways to do this but the easiest way is to use a simple resistor divider. A 10K resistor between SIM800L Rx and Arduino D2, and 20K between SIM800L Rx and GND would work fine.

Now we are remaining with the pins that are used to supply power for the module. As you have multiple choices for powering up the module, we have provided two example schematics. The one uses 1200mAh Li-Po battery and other one uses LM2596 DC-DC buck converter.


Arduino Code – Testing AT Commands

#include <SoftwareSerial.h>

//Create software serial object to communicate with SIM800L
SoftwareSerial mySerial(3, 2); //SIM800L Tx & Rx is connected to Arduino #3 & #2

void setup()
{
  //Begin serial communication with Arduino and Arduino IDE (Serial Monitor)
  Serial.begin(9600);
  
  //Begin serial communication with Arduino and SIM800L
  mySerial.begin(9600);

  Serial.println("Initializing...");
  delay(1000);

  mySerial.println("AT"); //Once the handshake test is successful, it will back to OK
  updateSerial();
  mySerial.println("AT+CSQ"); //Signal quality test, value range is 0-31 , 31 is the best
  updateSerial();
  mySerial.println("AT+CCID"); //Read SIM information to confirm whether the SIM is plugged
  updateSerial();
  mySerial.println("AT+CREG?"); //Check whether it has registered in the network
  updateSerial();
}

void loop()
{
  updateSerial();
}

void updateSerial()
{
  delay(500);
  while (Serial.available()) 
  {
    mySerial.write(Serial.read());//Forward what Serial received to Software Serial Port
  }
  while(mySerial.available()) 
  {
    Serial.write(mySerial.read());//Forward what Software Serial received to Serial Port
  }
}






Comments

Popular posts from this blog

Voice Record & Playback Module

GPS