Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Sensor Series
      • 3D Printing
      • AI
      • ARDUINO Compatible Coding
      • Audio Electronics
      • Battery Management
      • Beginners Electronics Series
      • Brainwave
      • Digital electronics (DE)
      • Electric Vehicles
      • EMI/EMC/RFI
      • EVs
      • Hardware Filters
      • IoT tutorials
      • LoRa/LoRaWAN
      • Power Tutorials
      • Protocol
      • Python
      • RPI Python Programming
      • Sensors
      • USB
      • Thermal management
      • Verilog
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Send Sms/text message using sim900 gsm module with Arduino Uno-Mega

By EG Projects August 1, 2019

This is a simple project/tutorial on how to send sms/text message using sim900d gsm module with arduino uno. Project code is written in arduino ide. The code is compatible to all arduino boards. Post covers how to interface sim900 gsm module with arduino uno and efficiently send sms/text message to a desired cell phone number. Sim900d is a system on chip(SOC) by SimCom. Sim900 can work as gsm and gprs module. It also has Input/Output pins for controlling appliances but they are rarely used. Pre-assembled sim900 gsm boards available in market did not expose its gpio pins. Only the gsm and gprs connection pins are present on board(UART port pins Tx and Rx).  

Sim900d gsm/gprs module works on AT command set. Almost every GSM chip by simcom works on AT command set. An external microcontroller is required to talk to sim900 gsm module.  Sim900 communicates with external controller on UART protocol. In uart protocol only two pins are required to talk with external devices Tx(Transmit) and Rx(Receive). Both the devices must have one single uart port to talk with each other. Communication speed in uart protocol is termed as baud rate. We first have to set the baud rate speed of the modules who are going to communicate on uart protocol. Both the modules must be on the same speed for successful communication.

Arduino has a default uart port on its pins#0 and 1. So arduino can talk to devices which requires uart protocol for communication. Arduino Rx or pin#0 is tied to Tx of sim900 module and arduino Tx or pin#1 is tied with Rx of sim900 module for communication.

Coming to wards ‘AT’ command set. Their are numerous ‘AT’ commands if you go through the data sheet of sim900 gsm module. In this tutorial i will explain only the ones which are required to send an sms with gsm sim900 module. If you wan to learn all the commands go through the data sheet of sim900 module. AT commands which are required to send a text message/sms are listed below. .

sim900 gsm module AT command set to send sms text message

sim900 gsm module AT command set to send sms text message

The upper few AT commands are required to send an sms with arduino gsm module. We can skip the first command ‘AT’, if we are sure that our module is perfectly operational. ‘AT’ command only checks the status of the gsm module working or not.  

MY diy arduino gsm module interface circuit

GSM Module sim900d with arduino uno-mega

GSM Module sim900d with arduino uno-mega

First insert your sim in the sim900 module sim slot and be sure you have credit/balance in it for texting to other numbers. Connect Arduino uno Rx(Pin#0) to GSM module TX and TX(Pin#1) of Arduino uno to RX of sim900 GSM module.
Sim900 requires about 5 volts and 1 ampere of current while transmitting the sms/text message. We can not power the gsm module directly with the arduino 5v output. External dc adopter which can supply continuous 1 ampere of current at 5 volt is enough for the arduino and sim900 module power requirements. 

Note: If your GSM stops working and restarts it self when you send commands to it. It means your GSM needs more current. Try to power your circuit with high rating of source like on the right side i powered the diy circuit with 4.5 Ah 5v DC batter.
GSM sim900d with arduino mega and battery-circuit Diagram

GSM sim900d with arduino mega and battery-circuit Diagram

You can also use a current booster circuit for your gsm power requirements. You can purchase cheap current booster circuits online from Chinese electric stores. Important: If you are powering both the arduino and sim900 gsm module with different power supplies then you must make the grounds of both the power sources common. In Uart protocol both the modules sender and receiver must be on the same potential. So you have to make both modules ground common.
One can use any sim900 gsm module by any vendor/manufacturer to interface it with arduino. The circuit connections will be same as given on the right hand side.
Arduino Gsm module Uart interface

Arduino Gsm module Uart interface

Some keys present on sim900 gsm older modules

Pkey button on your GSM is Power button when you press the push button associated with Pkey your GSM module becomes on and starts working. Now when you press it again your GSM becomes off. ​
Now coming to the code portion of the project. Ccode is written in arduino ide. Code is universal it is compatible with other arduino boards also. You can use it with arduino uno, arduino lenardo, arduino mega and arduino due etc. For arduino mega you have to connect the Rx Tx lines of GSM to UART channel 1 of Arduino Mega. I tested it on both arduino uno and mega. I am sending my website name “www.microcontroller-project.com” as sms/text message to receiver.
In the setup function i first initialized the arduino uart port. Communication baud rate is set to 9600 bps. Sim900 gsm module default baud rate is 9600 bps. So i set the arduino uart baud rate to 9600. Arduino code statement used for this purpose is Serial.begin(9600). In the loop function i am sending one by one each ‘AT’ command discussed above to send a text message with arduino gsm module. To send data with uart of arduino using arduino ide we put our data in Serial.print(“”) command. Our data comes in double quotations.

  • Recall that sim900 accepts the cell number of the recipient enclosed in double quotations.
  • To send the recipient cell number to sim900 gsm module using arduino ide we must put the \” in the code statement. If we do not put the \. Then arduino ide compiler identifies it as the arduino ide statement and executes it rather than sending it on uart to sim900 module. \” tells the arduino ide compiler that “ is data to be send out on uart.  

At the end of the code i inserted a while(1) loop. While loop will hold the control for ever. It means our code will execute only once after power up and after than it stops. 

I made arduino home security system using arduino gsm module, pir motion detector sensor and door contact sensor. Visit the diy project by clicking the below button.

Arduino Home Security System

Watch the project video Here… Sending text SMS through Arduino uno to remote cell Phone using Sim900d GSM module.

files/codes


Filed Under: Arduino Projects, Microcontroller Projects

 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

Submit a Guest Post

submit a guest post

EE TECH TOOLBOX

“ee
Tech Toolbox: Power Efficiency
Discover proven strategies for power conversion, wide bandgap devices, and motor control — balancing performance, cost, and sustainability across industrial, automotive, and IoT systems.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions.

  • Crude Powerline FSK comms literally shorts the power bus at a certain frequency?
  • Direction and Orientation of Current in Transformer
  • Is a Digitizer Necessary for INL and DNL Measurement in DACs?
  • Spice Model for a PIN Diode
  • Why is military EMC so strict?

RSS Electro-Tech-Online.com Discussions

  • Need to solder a really delicate ribbon for an electric reel need advice
  • Need Help Troubleshooting a PCB Assembly Issue
  • Solar tracker simulation
  • need help in photodetection TIA circuit
  • Help please! BLDC driver circuit using the IR2136s and the STP80NF06 MOSFETS

Featured Tutorials

Real Time Hardware Filter Design

  • Practical implementation of bandpass and band reject filters
    Practical implementation of bandpass and band reject filters
  • Practical application of hardware filters with real-life examples
    Practical application of hardware filters with real-life examples
  • A filter design example
    A filter design example
  • Types of filter responses
    Types of filter responses
  • What are the two types of hardware filters?
    What are the two types of hardware filters?
  • What are hardware filters and their types?
    What are hardware filters and their types?
More Tutorials >

Recent Articles

  • Microchip extends single pair Ethernet lineup with software-less endpoint
  • Infineon MCU targets high-voltage BMS in electric vehicles
  • SemiQ releases expanded SiC MOSFET lineup with detailed thermal and switching data
  • TDK adds 1000 W models to dc-dc converter series
  • LEMO introduces resin-free IP68 connectors for compact equipment

EE ENGINEERING TRAINING DAYS

engineering
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Sensor Series
      • 3D Printing
      • AI
      • ARDUINO Compatible Coding
      • Audio Electronics
      • Battery Management
      • Beginners Electronics Series
      • Brainwave
      • Digital electronics (DE)
      • Electric Vehicles
      • EMI/EMC/RFI
      • EVs
      • Hardware Filters
      • IoT tutorials
      • LoRa/LoRaWAN
      • Power Tutorials
      • Protocol
      • Python
      • RPI Python Programming
      • Sensors
      • USB
      • Thermal management
      • Verilog
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
  • Guest Post Guidelines
  • Advertise
  • Subscribe