Connecting To The Server To Fetch The WebPage Elements!!....
MXPlank.com MXMail Submit Research Thesis Electronics - MicroControllers Contact us QuantumDDX.com



Search The Site





gsm module interfacing with microcontroller





Table of Contents

gsm module interfacing with microcontroller

In this article I will discuss,  How to interface gsm module with any microcontroller and especially pic microcontroller. How to use gsm module for wireless communication in your projects. Compatibility issues of microcontrollers and gsm module interfacing.How to use gsm module to receive and send sms. I will also post 2-3 gsm based projects.So that you can get idea about its use in your project or application. you may also like to check:

  • GSM based project 

What is GSM ?

Gsm stands for global system of mobile communication.It is used in almost all mobiles used in whole world. According to one report over 2 billion people in whole world using gsm based mobiles.If you have a mobile, you are also using gsm module. But you don’t know what is happening inside your mobile. How your mobile is working to send and receive messages? How gsm inside your mobile is responding to different tasks you are doing with your mobile phone. Mobile phone is a embedded system which have any microcontroller and gsm module inside to perform tasks you assign to your mobile  by touch screen or keypad. There are many gsm modules available in market. I will dicuss SIM900D gsm module and its interfacing with microcontroller.

SIM900D module have following features:

  1. SMS
  2. CALL
  3. GPRS
  4. ADC
  5. PWM
  6. Serial communication
  7. SPI
  8. Audio interface
  9. Input/output pins

So every mobile have all above features to become more user friendly.I will discuss these functions in other articles. Because it is not possible to write all things in one article. SIM900D also provide TCP/IP protocol stack to use GPRS data. SIM900D use AT commands for sms , calls and gprs. For more details about gsm module SIM900D I recommend you to go through data sheet of SIM900D.

Precautions before interfacing gsm module with microcontroller

Before interfacing gsm module with microcontroller, it is necessary to check that either the transmit (TXD) and receive (RXD) pins of gsm module and microcontroller are compatible with each other or not. Maximum input voltage to receive(RXD) pins of gsm module is 3 volt and maximum output voltage of transmit(TXD) pins of gsm module is about 2 volt.But the voltage at transmit (TXD) and receive (RXD) pins of pic microcontrollers is about 4 to 5 volt. The transmit pin voltage of pic  microcontroller is about 4.5 to 5 volt which is too high for RXD pin of gsm module and voltage at receive (RXD) pin of pic microcontroller is about 4.5-5 volt but transmit(TXD) pin of gsm module have maximum output voltage is 2 volt which is logic zero for pic microcontroller. So there should be voltage converter circuit between pic microcontroller and gsm module. You should also check other microcontrollers compatibility with gsm module before interfacing them with each other. I will disucss voltage converter circuit in interfacing circuit diagram. In some microcontroller you may have no need to voltage converter circuit and they are already comaptible with each other.So you don’t need to use voltage converter circuit for interfacing.

Interfacing of GSM module with PIC16F877A microcontroller

I have used PIC16F877A microcontroller to interface it with SIM900D GSM module. To interface PIC16F877A microcontroller with SIM900D gsm module you only need to connect their transmit and receive pins inversely with each other through voltage converter circuit. By inversely, I mean RXD pin of microcontroller connect with TXD pin of gsm module and TXD pin of microcontroller connect with RXD pin gsm module. we need only these two pin to send message, to receive messgae, to make call and to receive call on gsm module through microcontroller. You may need of other pin while using other features of SIM900D gsm module.

Note : you should purchase a complete gsm module from market which have required external components attach with it . if you purchase only sim900 modem, you have to connect these components by yourself. Components like :

  • Antenna
  • Sim card jacket
  • Network status circuit
  • Reset circuit
  • power supply connection
  • output terminal for RXD and TXD pin

Interfacing diagram is shown below :

gsm module interfacing with pic microcontrolle
gsm module interfacing with pic microcontrolle

In above voltage converter circuit three diode in series are used to drop down voltage of TXD pin of microcontroller to to 2.9 volt which is in acceptable range for RXD pin of gsm module. Similarly diode and 5 volt source is used to increase voltage of TXD pin of gsm module to 5 volt which is logic high for RXD pin of pic microcontroller.

In next articles I will discuss how to use above circuit and AT commands to send and receive sms. For more information about gsm articles keep visiting gsm category in my blog.

you may also like

  • How to send SMS using GSM module and pic microcontroller
  • Wirless temperature sensor using PIC microcontroller and GSM module

If you have any issue in this article, you are welcome to comment on this post.