Search
Close this search box.

Home

GSM Interfacing with 8051 Microcontroller

Mobile communication is an emerging technology these days. GSM is the acronym for Global System for Mobile Communication. GSM module is wireless modem that transmits data using radio waves. GSM architecture is similar to the mobile architecture. GSM modems are generally used in many electronic applications and they are required to interface with the microcontrollers. This article describes interfacing of a GSM modem to an AT89C51 microcontroller.

Also Get an Idea about How to Interface GPS with 8051 Microcontroller

GSM Interfacing with 8051 Microcontroller Circuit Principle:

The main principle of this circuit is to interface a GSM modem with the microcontroller. The microcontroller used is AT89C51 microcontroller. To communicate with GSM modem, AT commands are required. Microcontroller sends these commands to the GSM modem, which is then activated to perform the required operation.

The following AT commands are frequently used to control the operations of GSM modem.

Command –  Operation

AT+CSMS    –    Select message service.

AT+CMGF   –    Message format.

AT+CMGL   –    List messages.

AT+CMGR   –    Read message.

AT+CMGS   –    Send message.

AT+CMGD   –   Delete message.

ATA              –    Answer a call.

ATD              –   Dial a number.

ATDL            –  Dial the last outgoing number.

ATH             –   Hang up the call.

GSM Modem Interfacing with 8051 Microcontroller Circuit Diagram:

GSM Interfacing with 8051 Microcontroller Circuit Diagram
Circuit Diagram of GSM Interfacing with 8051 Microcontroller

Circuit Components:

  • MAX232 IC.
  • AT89C51 microcontroller.
  • GSM modem.
  • Capacitors C1, C2, C3, C4, C5, C6.
  • Crystal oscillator.
  • Liquid crystal display.
  • Potentiometer. 

Circuit Design of Interfacing of GSM Modem to AT89C51 Microcontroller:

The circuit of interfacing GSM to AT89C51 microcontroller mainly consists of GSM modem and 8051 family microcontroller. GSM has RS232 interface for serial communication. In between the GSM module and the microcontroller MAX232 IC is connected.

MAX232 IC is used for converting the logic levels. RS232 logic levels of GSM are converted to the TTL logic levels of the microcontroller using this MAX232 IC. MAX232 IC has 16 pins. This is a dual driver IC as it has two transmitters and receivers. Interfacing of GSM to AT89C51 microcontroller uses only one transmitter and receiver.

The transmitter pin T1IN of max232 is connected to the transmitter pin of the microcontroller. The receiver pin R1out of the max232 is connected to the receiver pin of the microcontroller. The T1out pin of the IC is connected to the transmitter pin of the GSM modem.

The R1IN pin of the IC is connected to the receiver pin of the GSM modem. Two 0.1 micro farad capacitors are connected to the pins of 1, 2 and 4 , 5. Another 1uf capacitor is grounded from pin6 and another capacitor is connected to the supply of 5v from the through the 2nd pin of the IC.

Related Post: Wireless Electronic Notice Board using GSM Circuit

GSM modem used here has sim300 module. These wireless modems communicate with the microcontrollers and other devices. This has 4 pins compatible to TTL logic. These can be directly connected to the microcontroller as it has max232 or use the DB9 connector to connect to the controller.

In this article, MAX232 pins are connected to the GSM modem. This should be connected to the power supply of 5v. It has a sim slot similar to a mobile to communicate with the network. GSM modem requires AT commands for activation. GSM modem responds to the AT command.

An LCD module is connected to the port2 of the microcontroller. This article also shows the interfacing of 4-bit LCD module to the microcontroller. Data bits D4-D7 of the LCD module are connected to the port2 of the microcontroller. A pot is connected to the LCD to adjust the intensity of the display. Here LCD is used for displaying the received message.

A button is connected to the PORTB of the microcontroller. This button is used for sending a message.

GSM Interfacing with 8051 Microcontroller Circuit Simulation Video:

DOWNLOAD PROJECT CODE

How to Operate GSM Interfacing with 8051 Microcontroller Circuit?

  • Initially, connect the circuit as shown in the circuit 8051 Microcontroller diagram.
  • Switch on the power supply.
  • Now send a message from any other phone to the SIM present in the GSM module.
  • Whenever a message is received by the GSM, it is displayed on the LCD.
  • If you want to send a message press the button B1 connected to port B.
  • This sends a message written in the code.

GSM Interfacing 8051 Microcontroller Project Output Video:

GSM Modem Interfacing with 8051 Circuit Applications:

  • This can be used in automatic accident detection and indication along with GPS.
  • This can also be used to control a robot.
  • This can also be used in GSM based telemedicine system.
  •  ATM theft precaution system uses this to indicate the theft.
  • GSM based voting system uses this application.
  • GSM based vehicle security system uses this.
  • This circuit can be used in GSM based green house parameter monitoring system
Limitations of the Circuit:

Although GSM has many advantages there are some limitations. This cannot be used in applications where immediate result is required as it may not work if there are no signals.

35 Responses

  1. Why you need this project code?
    just i want to know it ……
    Are you trying to make the same project or different one?
    No,
    Give us more details about your project.
    I plan do the project using GSM that why i need the code

  2. Why you need this project code?
    Just i know it….
    Are you trying to make the same project or different one?
    No,
    Give us more details about your project.
    I plan to do the project using GSM that why i want to know it…….

  3. hello,
    am working on gsm project and i need above project code because my project is going receive and send message to target device ..

  4. I am an engineering student from pakistan. I am making a project “gsm based home security system”. but I am having a problem interfacing gsm with at89c51. I want source code as well as proteus simulation. I will be very generous of you. I will be waiting for your answer.

  5. I need this code because it is in line with what I am working on.

    I am not trying to make something similar.

    I am trying to make an automatic railway gate control where a user will just send a message via gsm and the gates open or close using a microcontroller.

  6. I would like this project because it will help me know how to go about my project. I am developing a GSM based railway gate control and hence that knowledge is vital for me.

  7. I am engineering student from Tanzania. I need your help on my project I am developing a GSM electric energy meter which would send sms to inform the customer of the units remained in the meter.

  8. y I need the code?
    bcos I want to learn the interfacing and uses of gsm…
    also want to know the interfacing wid Arduino…

    m not trying to make a same project…

    I want to merge 2 3 applications based on gsm and make a gsm based automated project…
    it may b home automation type or general applications type…

    kindly mail me the codes..
    thank u…

    1. I am doing a project using gsm,it would be helpful if u send me the code because I want to learn the interfacing and uses of gsm with the 8051

      kindly mail me the codes..
      thank u…

  9. I owe my life to vignesh , he introduceded me 2 this website , i want makeded this project . what is source code , how to convert c to embedded c

  10. Hello sir/madam,
    i’m working on my project,this s the topic in my project so please send me the circuit diagram and microcontroller embedded c program to interface the gsm module with 8051 microcontroller to send the message.
    and also tel me the how to interface the lm35, pulse oximeter, loadcell sensors with 8051 and how to receive all the through GSM.

    THANK YOU

  11. i am an engineering student . i am doing a project on gsm based wireless home appliance control system, but i am having a problem of interfacing gsm with at89c51 . i want source code including c programming that will send a code to microcontroller as well as proteus simulation. i am waiting for your answer.

  12. please , Any one give me the pseudo code of Pic interfacing with gsm
    how do i take the gsm body of the message

    1. Hi, You cannot simulate the GSM Modem on Proteus. Alternatively, you can use the serial terminal to send and receive messages.

  13. I am working on my project, this is the topic in my project so please send me embedded can programme to send and receive message.

  14. can we make communication between two gsm modules interfacing 8051 at two different places without mobile phone just to transfer bits or data

Leave a Reply

Your email address will not be published. Required fields are marked *