0

members

Medium Basics: Project 064b Ai Thinker A7 GSM GPRS GPS module - LED control

of Acoptex.com in UNO

Basics: Project 064b

Project name: Ai Thinker A7 GSM GPRS GPS module - LED control

Tags: Arduino, Arduino Uno, A7 GSM GPRS GPS module, 3 in 1 module, A7 Ai Thinker, Ai Thinker, GPS G165 antenna, GSM/GPRS antenna, update firmware, use of GPS, LED control, LED

Attachments: ATcommandssketch; sketch1

In this project, you needed these parts :

1.Aruduino Uno R3 (you can also use the other version of Arduino)

2.A7 GSM GPRS GPS module with GSM/GPRS antenna and GPS G165 antenna 1 pc

3.Arduino IDE (you can download it from here

4.Jumper cables F-M, M-M

5.Micro SIM card 1 pc (unlocked)

6. To power module: 5V-9V DC 2A power adapter or Litium Ion battery 3.7VDC

or 

7. Resistor 1 pc (220 Ohm)
8. LED 1 pc (any color)

9.Breadboard half size or small size 1 pc

General

In this project we will learn how to connect A7 GSM GPRS GPS module to Arduino board and use it to control LED by SMS.

Understanding the A7 GSM GPRS GPS module

A7 module is a GSM/GPRS/GPS function module.
It supports GSM/GPRS Quad-Band(850/900/1800/1900) network.
Also, it supports voice calls,SMS messages,GPRS data service and GPS function .
We can use it make a simple phone.
The module is controlled by AT command via UART and supports 3.3V and 4.2V logical level.
Features
Support the GSM / GPRS four bands, including 850,900,1800,1900MHZ
Support China Mobile and China Unicom’s 2G GSM network worldwide
GPRS Class 10
Support voice calls
Support SMS text messaging
Support GPRS data traffic, the maximum data rate, download 85.6Kbps, upload 42.8Kbps
Supports standard GSM07.07,07.05 AT commands and extended commands Ai-Thinker
Support GPS and AGPS
Supports two serial ports, a serial port to download an AT command port
AT command supports the standard AT and TCP / IP command interface
Support digital audio and analog audio support for HR, FR, EFR, AMR speech coding
Support ROHS, FCC, CE, CTA certification
SMT 42PIN
Specifications
Operating temperature -30 ℃ to + 80 ℃
Operating Voltage 3.3V-4.2V
Power voltage> 3.4V
Sensitivity <-105
Standby average current 3ma less
1KG peak suction
Package list
A7 GPRS+GSM+GPS Shield x1
GSM antenna x1
GPS antenna x 1

A7 module is a GSM/GPRS/GPS function module. It supports GSM/GPRS Quad-Band(850/900/1800/1900) network. Also, it supports voice calls, SMS messages, GPRS data service and GPS function. We can use it make a simple phone. The module is controlled by AT command via UART and supports 3.3V and 4.2V logical level.

Features:

  • Support the GSM / GPRS four bands, including 850,900,1800,1900MHZ
  • Support China Mobile and China Unicom’s 2G GSM network worldwide
  • GPRS Class 10
  • Support voice calls
  • Support SMS text messaging
  • Support GPRS data traffic, the maximum data rate, download 85.6Kbps, upload 42.8Kbps
  • Supports standard GSM 07.07,07.05 AT commands and extended commands Ai-Thinker
  • Support GPS and AGPS
  • Supports two serial ports, a serial port to download an AT command port
  • AT command supports the standard AT and TCP / IP command interface
  • Support digital audio and analog audio support for HR, FR, EFR, AMR speech coding
  • Support ROHS, FCC, CE, CTA certification
  • SMT 42PIN

Specifications:

  • Operating temperature -30 ℃ to + 80 ℃
  • Operating Voltage 3.3V-4.2V
  • Power voltage> 3.4V
  • Sensitivity <-105
  • Standby average current 3ma less
  • 1KG peak suction

 A7:

  • A7 size 22.8×19.8×2.5mm;
  • Operating temperature -30 °C +80 °C; 
  • Working voltage 3.3V-4.2V;
  • Boot voltage>3.4V;
  • Standby average current 3ma below, A7 increase 2m;
  • Support GSM/GPRS four frequency bands, including 850, 900, 1800, 1900MHZ;
  • GPRS Class 10;
  • Sensitivity <-105;
  • Support voice calls;
  • Support SMS SMS;
  • GPIO level is 2.8V;
  • Support GPRS data service, maximum data rate, download 85.6Kbps, upload 42.8Kbps;
  • Support standard GSM07.07, 07.05 AT commands and Ai-Thinker extension commands;
  • Support two serial ports, one download serial port, one AT command port;
  • AT commands support standard AT and TCP/IP command ports;
  • Support digital audio and analog audio, support HR, FR, EFR, AMR speech coding;
  • Support GPS+AGPS (A7 only);
  • GPS position information supports single serial NEMA output and reading through AT port (only applicable to A7);
  • Support ROHS, FCC, CE, CTA certification;
  • SMT 42PIN package;

 

You can find A7 datasheet here and specification here.

You can find the AT commands list here. Other information about A7 is here.

Signals and connections of A7 GSM GPRS GPS module

EN - module power control enable pin (can control power switch, default high level enable)

V_BAT - lithium battery power supply pin (3.5-4.2V). this module has 2 V_BAT pins

GND - ground pin. this module has 5 ground pins

U_RXD - serial port for AT commands (receive pin)

U_TXD - serial port for AT commands (transmit pin)

H_TXD - kernal firmware update pin (transmit pin)

H_RXD - kernal firmware update pin (receive pin)

232_TXD - RS232 level control (transmit pin)

232_RXD - RS232 level control (receive pin)

GPS_TXD - GPS data  (transmit pin)

PWR_KEY - module power on control pin, V_BAT short circuit start

SLEEP - high level - enter into low consumption, low level - quits

U_CTS - serial port  for AT commands CTS pin

U_RTS - serial port  for AT commands RTS pin

RESET - module hardware reset pin

MIC- - microphone -

MIC+ - microphone +

REC- - loudspeaker -

REC+ - loudspeaker +

Wiring

The following picture shows the needed connections with the Arduino Uno 

Step by Step instruction

1. Configuring the A7 GSM GPRS GPS module with Arduino board with AT commands

  1. Do wiring.
  2. Attach GSM, GPS antennas to A7 GSM GPRS GPS module.
  3. Insert a valid unlocked SIM card to SIM card slot of A7 GSM GPRS GPS module.
  4. You can power up A7 GSM GPRS GPS module with power supply adapter (5-9DC 2A) POWER JACK interface, with V_IN pin (5-9VDC 2A) and with Lithium Ion battery V_BAT (3.5-4.2VDC). 
  5. We used the 6V DC 2A power adapter. Push the power switch to ON position (to the green arrow direction). When the module powered on, the LED power on indication (POWER) will be ON. 
  6. Press MODULE START UP KEY (PWR KEY) for 2 seconds. Status indication LEDs (D2) will be ON. 
  7. Open Arduino IDE.
  8. Plug your Adruino Uno board into your PC and select the correct board and com port
  9. By default this module respond on 115200 bps. So if you did not change the baud rate before  - modify ATcommandssketch - replace both baud rates from 9600 to 115200.
  10. Verify and upload this sketch to your Adruino Uno
  11. Open up serial monitor and set your baud to 115200 baud and select Both NL&CR.
  12. First you need to check if AT commands are working - enter “AT” and press  Send button.This would print "OK" which signifies of working connection and operation of the module.
  13. A7 GPS GPRS GSM module does not work well with Arduino on 115200. We suggest you to change that baud rate to 9600.
  14. Enter "AT+IPR=9600" and press Send button. Returns "OK". It is 9600 bps now.
  15. Modify ATcommandssketch - replace both baud rates from 115200 to 9600.
  16. Verify and upload this sketch to your Adruino Uno
  17. Open up serial monitor and set your baud to 9600 baud.
  18. Your serial communication is more stable now.
  19. Checks fixed local rate. Enter "AT+IPR?" and press Send button. Returns "+IPR: 9600 OK".
  20. Modify the sketch1 with your phone number, for example +37122222222, which will receive SMS messages.
  21. Verify and upload this sketch to your Adruino Uno.
  22. Open up serial monitor and set your baud to 9600 baud.
  23. First you will get the message - GPSmodule ready..
  24. When you send the SMS with text On from your smartphone to your SIM card phone number in  Ai Thinker A7 GSM GPRS GPS module you will get reply on your smartphone LED is ON and the LED will be switched ON.
  25. When you send the SMS with text Off from your smartphone to your SIM card phone number in  Ai Thinker A7 GSM GPRS GPS module you will get reply on your smartphone LED is OFF and the LED will be switched OFF.
  26. When you send the SMS with text State from your smartphone to your SIM card phone number in  Ai Thinker A7 GSM GPRS GPS module you will get reply on your smartphone about the ledPin state.

Code

Code is well explained. Do not forget to change the phone number or you will not get the SMS messages on your smartphone.

Summary

We have learnt how to connect A7 GSM GPRS GPS module to Arduino board and use it to control LED.

You can use this sketch to control 3.3 V-5V relay or relays too.

Libraries:

  • SoftwareSerial library included in Arduino IDE.  The library has the following known limitations:If using multiple software serial ports, only one can receive data at a time.Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69).Not all pins on the Leonardo and Micro support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI).On Arduino or Genuino 101 the current maximum RX speed is 57600bpsOn Arduino or Genuino 101 RX doesn't work on Pin 13 The library has the following known limitations: If using multiple software serial ports, only one can receive data at a time;Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 14, 15, 50, 51, 52, 53, A8 (62), A9 (63), A10 (64), A11 (65), A12 (66), A13 (67), A14 (68), A15 (69);Not all pins on the Leonardo and Micro support change interrupts, so only the following can be used for RX: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI);On Arduino or Genuino 101 the current maximum RX speed is 57600bps; On Arduino or Genuino 101 RX doesn't work on Pin 13. You can read about it here.

Sketch:

  • See attachment on the begining of this project description.


Other projects of Acoptex.com
Easy Basics: Project 086d ESP-12E module, BME280 sensor - Web server of Acoptex.com in ESP8266 ESP-12 18-07-2019

« Go back to category
Is this project fake? Report it!   
Recommend to a friend
Published at 02-05-2019
Viewed: 399 times