A SIM808 module is a GSM/GPRS module that uses GPS technology to track items of interest. Its smaller and more compact design significantly saves time and reduces costs for potential customers to create their own GPS-enabled applications. With an industry-standard interface and a built-in GPS, it allows important items to be tracked at any location and anytime with good signal coverage.
This tutorial will explore the functions of the SIM808 module using Arduino, where the module will use its GPS function to detect your location using your SIM card.
SIM Card (w/ disabled PIN)
A SIM808 module is a complete Quad-Band GSM/GPRS module that combines GPS technology for satellite navigation.The compact design which integrated GPRS and GPS in a SMT package will significantly save both time and costs for customers to develop GPS enabled applications. Featuring an industry-standard interface and GPS function, it allows variable assets to be tracked seamlessly at any location and anytime with signal coverage.
This tutorial aims to teach you the basic functions of an SIM808 module. Using Arduino, you can find how its GPS function can find your location with a SIM card. By simply texting the SIM Card equipped, the module will text you your location and send a Google Maps link as well.
SIM808 GSM/GPRS and GPS in-1 with antenna
The range of voltage of Lithium battery input power is 3.5 - 4.2V.
2.Switch: It is used to open / close the input power supply for the module. When in use, please confirm the toggle switched to the OPEN state (near the board inside).
3.SMA antenna interface: there is a GSM antenna interface, a GPS antenna interface onboard and a BT antenna interface.
4.Start button: When the board is power on, the LED (PWR) will light up. After a long press (about 2 second) on this button, the other three LEDs will be light. And one of them starts to flash; this suggests that SIM808 is beginning to work now. When the power supply, GSM and GPS antenna and SIM card are connected to the module correctly, the LED will be flash slowly (3Second de 1second light), that indicates that the module is registered to the network, and you can make a call or do something else.
5.TTL serial interface: a TTL level interface. Notice that: The pin of VMCU is used to control the high level of TTL UART, so as to realize to match between 1.25V/3.3V /5V systems.
6.USB interface: This interface is just use to update the firmware of SIM808 module.
USB-TTL module or other tools.
2. Hardware configurations
2.1 Connect USB-TTL to UART interface
2.2 Insert valid SIM card to SIMCARD holder.
2.3 Connect the GPS antenna and GSM antenna to the board
Connect the power adapter to the DC044 Interface
2.4 Change the switch
2.6 Press the POWKEY button for 2 second, the module will work and the other 3 LEDs will light
Arduino UNO pins
PIN 10 => SIM Module TXD (YELLOW)
PIN 11 => SIM Module RXD (GREEN)
GND => SIM Module GND (BLACK)
SIM808 Module PINS
GSM Antenna => SIM Module GSM ANTE (left side)
GPS Antenna => SIM Module ACTIVE GPS ANTE (2nd pin on right side)
9V Adapter => SIM Module Adapter (front)
SIM Card (w/ disabled PIN) => SIM Module SIMCARD holder (under)
Once the card is read, simply send a message to the no. of the SIM Card. The card will reply with your current location as well as your location on Google Maps.
- Includes the DFRobot_sim808.h library in the code.
- Includes the SoftwareSerial.h library in the code.
#define MESSAGE_LENGTH 160
int messageIndex = 0;
- Defines the message contents and length to be sent.
Serial.print("Sim808 init error\r\n");
Serial.println("Open the GPS power success");
Serial.println("Open the GPS power failure");
Serial.println("Init Success, please send SMS message to me!");
- Initializes the SIM808 module.
- Checks if the module is connected or not.
float la = sim808.GPSdata.lat;
float lo = sim808.GPSdata.lon;
float ws = sim808.GPSdata.speed_kph;
dtostrf(la, 6, 2, lat);
dtostrf(lo, 6, 2, lon);
dtostrf(ws, 6, 2, wspeed);
- Puts the float value of the latitude into an array.
- Puts the float value of the longitude into an array.
- Puts the float value of the wind speed into an array.
sprintf(MESSAGE, "Latitude : %s\nLongitude : %s\nWind Speed : %s kph\nMy Module Is Working. Mewan Indula Pathirage. Try With This Link.\nhttp://www.latlong.net/Show-Latitude-Longitude.html\nhttp://maps.google.com/maps?q=%s,%s\n", lat, lon, wspeed, lat, lon);
- The final message to be sent after a response.
SIM modules are good circuits for finding out your location. Although the modules have limited range, these kinds of circuits are effective at their jobs and are very helpful for when you want to know where you are right now with the most accurate assessment possible.