Blogroll

Powered by Blogger.

Sunday 23 March 2014

AT+CMGS - Send SMS Message Using SIM900 - TTL GSM Modem

by realfinetime  |  in SIM900-TTL GSM MODEM at  11:09

Sending SMS Messsage using SIM900-TTL Modem is an interesting task. First of all connections
had to be done as shown in figure. GSM Modem I used is given in this page











Now Open your Arduino IDE. Connect Arduino board to your computer. Then paste the following code in the IDE. Now compile and upload the Code to your Arduino Board.

Some Important Facts :
1. For successfull uploading, wires connected to the RX and TX pins of Arduino board must be             disconnected before uploading the code.     
2. Don't forget to put a SIM having sufficient balance in the SIM900 TTL-MODEM.
3. External power supply should be capable of handling 1A output current.
4. Phone number written in a blue box in program must be replaced by a phone number to which you       want to send SMS message.

void setup() 
{
  Serial.begin(2400);           //Open Serial connection at baud 2400
  delay(2000);
  Serial.write("AT+CMGF=1\r");           //set GSM to text mode
  delay(1500);
  Serial.print("AT+CMGS=\"+918281342098\"\r");   //phone number to which you want to send sms
  delay(1000);
  Serial.print("Message From GSM");           //SMS body 
  delay(1000); 
  Serial.write(0x1A);           // sends ctrl+z end of message 
}

void loop() 
{
  
}

After uploading the code. Reconnect the disconnected wires to Arduino board. Then press the reset button on Arduino board.

Be patient for some time. A new message will come to your phone within 15 seconds.

2 comments:

IMPORTANT NOTICE

All the circuits, published in this blog is only after testing and getting proper results in my private lab. When you try these circuits, you should check the supply voltage, polarity of components, presence of childrens nearby and shorts in the circuits. This website will not be responsible for any harm happened to you or your components caused by your carelessness.

For More Electronic Tips



Proudly Powered by Blogger.