Monday 8 October 2018

How to Interface GSM Modem with the 8051 MIcrocontroller

       Today iam going to discuss about GSM interfacing with 8051 microcontroller which is very much essential for communication based projects.
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.
 
The microcontroller used is AT89C51 microcontroller. To communicate with GSM modem, AT commands are required.
                                                             AT commands are instructions used to control a modem. AT is the abbreviation of ATtention. Every command line starts with "AT" or "at". That's why modem commands are called AT commands. Many of the commands that are used to control wired dial-up modems, such as ATD (Dial), ATA (Answer), ATH (Hook control) and ATO (Return to online data state), are also supported by GSM/GPRS modems and mobile phones. Besides this common AT command set, GSM/GPRS modems and mobile phones support an AT command set that is specific to the GSM technology, which includes SMS-related commands like AT+CMGS (Send SMS message), AT+CMSS (Send SMS message from storage), AT+CMGL (List SMS messages) and AT+CMGR (Read SMS messages)

The following AT commands are generally 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.
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.
AT to check the modem.
AT+CMGF=1 to configure the GSM module to SMS mode.
AT+CMGS=”mobile number  to send the mobile number to the GSM module.
CTRL+Z to send the message.


No comments:

Post a Comment