In this illustration we are going to wire the SIM900A an ultra-compact and reliable wireless module. The SIM900A is a complete Dual-Band GSM/GPRS module in a SMT type device. These SIM900A delivers GSM/GPRS 900/1800MHz performance for voice, SMS, data, and Fax in a small form factor and with low power consumption and perfect for your prototyping projects, like sending an SMS or Call if there is GAS leakage, Fire, Sending GPS coordinates. Below are the example how the SIM900A works, for this example we will going to send an SMS if the microcontroller detect a GAS leakage comes from the MQ GAS detection sensor.
Required Components
- Arduino UNO/MEGA/PRO/NANO
- SIM900A GSM/GPRS Module or Shield
- MQ Sensors
- Jumper Wires / DuPont Wires
- Solder Less Bread Board
Software Required
Sending Message AT Command via serial communication.
You can use Putty or CoolTerm serial communication software to send an instruction via serial communication port. If you don’t have this tools you can download it below.
Start AT Command
AT
Select SMS Message Format
AT+CMGF = 1
Send SMS Message by placing your Phone number
AT+CMGS = \”0123456789”
> This is a test SMS from 14CORE
Another example how to send SMS via serial communication using function serial.println(); in Arduino.
Wiring Diagram
Sketch Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
/* *********************************************************************** 14CORE SIM900A GSM/GPRS Code Test SMS Notification ************************************************************************ */ void setup() { serial.print("GSM/GPRS SYSTEM MONITOR"); serial.print("-----------------------"); Serial.begin(9600); delay(5000); } void loop() { float SRate; float SValue; SValue = analogRead(A0); //MQ Sensor will be attach to Analog 0 SRAte = sensorValue/1024*5.0; Serial.print("SRate = "); Serial.print(SRate); Serial.println("V-"); if (sensor_volt <= 1.40){ serial.print(">>MONITORING"); } else if(SRate >= 1.70) { serial.print("GAS DETECTED"); serial.print("Sending Alarm"); Serial.println("AT"); delay(1000); Serial.println("AT+CMGF=1/&W"); delay(1000); Serial.println("AT+CMGS=\"+97150000001\""); //Change this to your phone number delay(1000); Serial.print("WARNING! GAS Detected"); Serial.write(26); delay(300000); } } |
Download
Download SIM900A Schematics | PDF
Download SIM900A AT Command Set | PDF
Download SIM 900A Datasheet | PDF
Download SIM 900A Block Diagram | JGP