ARDUINO SIM800L GPRS Module with PCB Antenna User Manual
- June 5, 2024
- ARDUINO
Table of Contents
Arduino GPRS Module With PCB Antenna
Model:SIM800L GPRS
User Manual
The description of pins:
The name of pins Description
5v Power interface Power the module
CONNECT TO DC5v
GND
VDD TTL UART interface The TTL UART serial interface, you can connect the MCU
like 51MCU or ARM, or MSP430 directly. The pin of VDD is used to match the
voltage of the TTL.
SIM_TXD
SIM_RXD
GND if this pin is unused, keep open
RST RST the module, if this pin is unused, keep open
The name of pins Description 5v Power interface Power the module
CONNECT TO DC5v
GND
VDD TTL UART interface The TTL UART serial interface, you can connect the MCU
like 51MCU or ARM, or MSP430 directly. The pin of VDD is used to match the
voltage of the TTL.
SIM_TXD
SIM_RXD
GND if this pin is unused, keep open
RST RST the module, if this pin is unused, keep open
Pinout:
Arduino Sample Code:
BELOW IS AN ARDUINO SKETCH FOR THIS MODULE used with a LM35 TEMPERATURE
SENSOR to send the Temperature to your Mobile.
include <SoftwareSerial.h>
include <String.h>
String lat = “52.6272690”;
String lng = “-1.1526180”;
SoftwareSerial sim800l(10, 11); // RX, TX
float sensorValue;
const int buttonPin = 7;
int buttonState = 0;
float tempC;
float tempCavg;
int avgcount = 0;
void setup()
{
pinMode(buttonPin, INPUT);
sim800l.begin(9600);
Serial.begin(9600);
delay(500);
}
void loop()
{
buttonState = digitalRead(buttonPin);
if (buttonState == 0) {
while(avgcount < 50){
sensorValue = analogRead(A0);
tempC = sensorValue 5.0;
tempC = tempC / 1024.0;
tempC = (tempC – 0.05) 100;
tempCavg = tempCavg + tempC;
avgcount++;
}
delay(300);
Serial.println(tempCavg/ 50);
tempCavg = tempCavg / 50;
SendTextMessage();
}
if (sim800l.available()){
Serial.write(sim800l.read());
}
}
void SendTextMessage()
{
Serial.println(“Sending Text…”);
sim800l.print(“AT+CMGF=1\r”); // Set the shield to SMS mode delay(100);
sim800l.print(“AT+CMGS=\”+44795***\”\r”);
delay(200);
// sim800l.print(“http://maps.google.com/?q=”);
// sim800l.print(lat);
// sim800l.print(“,”);
// sim800l.print(lng);
sim800l.print(“The temperature is: “);
sim800l.print(tempCavg);
sim800l.print(” degrees C”);
sim800l.print(“\r”); //the content of the message
delay(500);
sim800l.print((char)26);//the ASCII code of the ctrl+z is 26 (required
according to the datasheet)
delay(100);
sim800l.println();
Serial.println(“Text Sent.”);
delay(500);
tempCavg = 0;
avgcount = 0;
}
void DialVoiceCall()
{
sim800l.println(“ATD+4479****;”);//dial the number, must include country
code
delay(100);
sim800l.println();
}
References
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>