Difference between revisions of "MakaPython A9G"

From MakerFabsWiki
Jump to: navigation, search
(Usage)
(AT command)
Line 36: Line 36:
  
 
===AT command===
 
===AT command===
 +
 +
<pre>
 +
AT+GPS=1 #1:Turn the GPS on, 0:Turn the GPS off
 +
AT+CCID
 +
AT+CREG? 
 +
AT+CSQ
 +
AT+CGATT=1
 +
AT+CGDCONT=1,”IP”,”CMNET”
 +
AT+CGACT=1,1
 +
AT+GPSRD=N
 +
AT+GPSRD=0
 +
AT+LOCATION=2
 +
</pre>
  
 
Select “Both NL & CR”, and baud rate 115200, it will show the board begin to work:<br>  
 
Select “Both NL & CR”, and baud rate 115200, it will show the board begin to work:<br>  

Revision as of 10:53, 15 May 2020

Introduction

MakePython A9G is an IOT for GPRS / GSM + GPS module, users can use MicroPython to program it, which is very easy, especially for non-programmers. There is also a user guide to learn how to use the board to create the first IOT project, which allows beginners to quickly learn hardware and programming skills.

With this board, you will easy to add text, SMS and data to your project. It is good for your smart home project or GPS tracker and so on.

Model: OAC010A9G

Error creating thumbnail: File with dimensions greater than 12.5 MP

Features

  • Micro SIM connector
  • Support AT Command
  • Quad-band: 850/900/1800/1900Mz
  • Support GPS
  • Support GPRS data traffic, the maximum data rate, download 85.6Kbps, upload 42.8Kbps
  • Support SMS text messaging
  • Support USB power charge
  • Support Micro SD Card
  • Interface: I2C/SPI/UART
  • Working Temperature: -40 – 85℃
  • Default baud rate: 115200
  • Size: 40*55mm

Interface Function

MakePython A9G 2.JPG
①BAT: 3.7V Lipo battery connector
②CHRG: 5V power input
③Micro SD Card Holder
④Micro SIM Card Holder
⑤A9G Module
⑥GSM: GSM Antenna IPX Interface
⑦GPS: GPS Antenna IPX Interface

Usage

Warning: Don't operate when in power supply on (That is, don’t plug or unplug the Antenna ,SIM Cars, SD Card , in case of short-circuit that may burn the IC down.)

AT command

AT+GPS=1	#1:Turn the GPS on, 0:Turn the GPS off
AT+CCID		
AT+CREG?   
AT+CSQ		
AT+CGATT=1		
AT+CGDCONT=1,”IP”,”CMNET”	
AT+CGACT=1,1	
AT+GPSRD=N	
AT+GPSRD=0	
AT+LOCATION=2 

Select “Both NL & CR”, and baud rate 115200, it will show the board begin to work:
Maduino Zero A9G 3V3 14.JPG

Click Send button after input AT and it will response OK. Now you can input other AT Commands refer to AT Command Set,Such as AT+CCID to show CCID, AT+CSQ to report GSM/GPRS signal quality and so on. Thus you can learn much about A9/A9G Module that will be a great helpful to your next program.

How to get GPS Location information?

A9G Module is a GPRS/GSM+ GPS Quad-band module, with this board, we can use it as a GPS tracker, data acquisition, remote control and a lot of IOT project or smart home project. This example show you how to get GPS location.
Attention: To get GPS location, please ensure you are outdoor, and plug the GPS Antenna. Indoor may get the incorrect location or no location information.

1. Turn on GPS, using the AT command “AT+GPS=1” to turn the GPS on:
Maduino Zero A9G 3V3 16.JPG
Note: The AT command “AT+GPS=0” to turn the GPS off.

2. The AT command “AT+GPSRD=10” to read NEMA information every 10 seconds
Maduino Zero A9G 3V3 17.JPG
Note: It may take a while to report the location. Sometimes it should be outdoor, sky visible.

3. AT+GPSRD=0 to stop the report and input AT+LOCATION=2 to get GPS address
Maduino Zero A9G 3V3 18.JPG

We can show our location where we are in https://www.gps-coordinates.net/
Maduino Zero A9G 3V3 19.JPG

Maduino Zero A9G GPS Tracker Projects

Project_1: Shows the GPS location on OLED display

We need a 0.96"I2C OLED 128x64 at:
https://www.makerfabs.com/0.96-inch-i2c-oled-128x64-blue.html

Maduino Zero A9G 3V3 30.JPG
Check the Pin J3 on Maduino Zero A9G v3.3 (GND/3V3/SCL/SDA), as the pins definition compatible, plug the OLED directly on J3.
Maduino Zero A9G 3V3 21.JPG
And install the SSD1306 OLED driver library
Maduino Zero A9G 3V3 22.JPG
Maduino Zero A9G 3V3 23.JPG

And then upload our example (A9G_GPS_OLED.ino) to Maduino board, the result shows the location on the OLED screen:
Maduino Zero A9G 3V3 24.JPG
And we can show the humidity and temperature on OLED screen too, Follow me to finish it.
Install DHT library.
Maduino Zero A9G 3V3 25.JPG

Hardware Connection:
Connect the simple sensor to Maduino boards as following:

Sensor Maduino Pins
Sensor's GND Maduino's GND
Sensor's DATA Maduino's D6
Sensor's Vcc Maduino's Vcc

Maduino Zero A9G 3V3 26.JPG
Insert the I2C SSD1306 OLED:
Maduino Zero A9G 3V3 27.JPG

Upload the code A9G_DHT11_OLED.ino to the board. We can see the humidity and temperature on the screen.
Maduino Zero A9G 3V3 28.JPG

Project_2: A Simple IOT Project- SMS Remote Control

Note that some fee maybe needed for each SMS depends on your local GSM Operator, make sure that the SIM Card is active, support SMS and enough money left for this application.
1. Hardware connection
Connect the LED to Maduino boards as following:

LED Maduino Pins
Red PIN Maduino's D2
Green PIN Maduino's D3
Blue PIN Maduino's D4
Sensor's Vcc 3V3

Maduino Zero A9G 3V3 29.JPG

2. Upload A9G_SMS_Control.ino to the board. Using your phone send a message to the SIM card you insert in board for turning on or turning off the led, such as ‘onr’ to turn the red led on, ‘offr’ to turn the red led off.
Maduino Zero A9G 3V3 45.JPG

Supported messages in the code.

Message Result
onr turn the red led on
ong turn the green led on
onb turn the blue led on
offr turn the red led off
offg turn the green led off
offb turn the blue led off

Then we can see the related LED on or off
Maduino Zero A9G 3V3 32.JPG

Also, We can see the serial monitor shows the log when operate. That we can make sure the SIM card received a message.
Maduino Zero A9G 3V3 33.JPG

Project_3: A Simple IOT Project- Environment Remote

Monitor
A9 or A9G Module is a GPRS/GSM+ GPS Quad-band module, with this board, we can use it as a GPS tracker, data acquisition, remote control and a lot of IOT project or smart home project. In this project, we will detect the humidity/temperature of our soldering lab, and reports it to internet thingspeak(https://thingspeak.com/channels/920821), so we can monitor the lab/home/office/farm environment remotely.
We use the humidity /temperature sensor at:
  https://www.makerfabs.com/dht11-temperature-humidity-module.html

1. Sensor Connection Connect the simple sensor to Maduino boards as following:

Sensor Maduino Pins
Sensor's GND Maduino's GND
Sensor's DATA Maduino's D6
Sensor's Vcc Maduino's Vcc

Maduino Zero A9G 3V3 34.JPG
2. Insert a Micro SIM card and GSM antenna, power the Maduino with battery or MicroUSB. The Maduino Zero A9/A9G board uses the micro SIM card that is widely used in Android phone, install the Micro SIM card to the holder as below picture, and also the GSM antenna.
Maduino Zero A9G 3V3 35.JPG
Note that some fee maybe needed for each SMS or GPRS depends on your local GSM Operator, make sure that the SIM Card is active and enough money left for this application.
3.Programming
3.1 Sign up an account in https://thingspeak.com/ . If you already have one, sign in directly.
3.2 Click New Channel to create a new ThingSpeak channel.
Maduino Zero A9G 3V3 36.JPG
3.3 Input name, Description, Select Field 1, Field 2, Field3, Field4.
Maduino Zero A9G 3V3 37.JPG
Note: Field 3 and Field4 are reserved for other application.
Then save channel on the bottom.
Maduino Zero A9G 3V3 38.JPG

3.4 Copy your API Key, we will instead it in the code A9G_DHT_GSM.ino
Maduino Zero A9G 3V3 39.JPG
Maduino Zero A9G 3V3 40.JPG
Below are some ways to use the API, what we used is Write A Channel Feed
Maduino Zero A9G 3V3 41.JPG
Select the right port and Arduino board: Arduino Zero(Native USB Port) to upload the code(A9G_DHT_GSM.ino) to Maduino Zero A9/A9G board
Maduino Zero A9G 3V3 42.JPG
If demo code run successful, you could refresh your cannel on thingspeak.com to see the result.
https://thingspeak.com/channels/920821
Maduino Zero A9G 3V3 43.JPG
Have fun in making Maduino!
You can get the code from our Github.

FAQ

You can list your questions here or contact with support@makerfabs.com for technology support.

Resources