Difference between revisions of "MakaPython A9G"

From MakerFabsWiki
Jump to: navigation, search
(AT command)
Line 50: Line 50:
 
</pre>
 
</pre>
  
Select “Both NL & CR”, and baud rate 115200, it will show the board begin to work:<br>
 
[[File:Maduino Zero A9G 3V3_14.JPG|700px]]<br>
 
  
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.<br>
 
 
===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.<br>
 
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.<br>
 
 
1. Turn on GPS, using the AT command “AT+GPS=1” to turn the GPS on:<br>
 
[[File:Maduino_Zero_A9G_3V3_16.JPG|700px]]<br>
 
Note: The AT command “AT+GPS=0” to turn the GPS off.<br>
 
 
2. The AT command “AT+GPSRD=10” to read NEMA information every 10 seconds<br>
 
[[File:Maduino_Zero_A9G_3V3_17.JPG|700px]]<br>
 
Note: It may take a while to report the location. Sometimes it should be outdoor, sky visible.<br>
 
 
3. AT+GPSRD=0 to stop the report and input AT+LOCATION=2 to get GPS address<br>
 
[[File:Maduino_Zero_A9G_3V3_18.JPG|700px]]<br>
 
 
We can show our location where we are in https://www.gps-coordinates.net/<br>
 
[[File:Maduino_Zero_A9G_3V3_19.JPG|700px]]<br>
 
 
===Maduino Zero A9G GPS Tracker Projects===
 
Project_1: Shows the GPS location on OLED display <br>
 
 
We need a 0.96"I2C OLED 128x64 at:<br>
 
https://www.makerfabs.com/0.96-inch-i2c-oled-128x64-blue.html
 
 
[[File:Maduino_Zero_A9G_3V3_30.JPG|700px]]<br>
 
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.<br>
 
[[File:Maduino_Zero_A9G_3V3_21.JPG|700px]]<br>
 
And install the SSD1306 OLED driver library<br>
 
[[File:Maduino_Zero_A9G_3V3_22.JPG|700px]]<br>
 
[[File:Maduino_Zero_A9G_3V3_23.JPG|700px]]<br>
 
 
And then upload our example ([https://github.com/Makerfabs/Maduino-Zero-A9G A9G_GPS_OLED.ino]) to Maduino board, the result shows the location on the OLED screen:<br>
 
[[File:Maduino_Zero_A9G_3V3_24.JPG|700px]]<br>
 
And we can show the humidity and temperature on OLED screen too, Follow me to finish it.<br>
 
Install DHT library.<br>
 
[[File:Maduino_Zero_A9G_3V3_25.JPG|700px]]<br>
 
 
Hardware Connection:<br>
 
Connect the simple sensor to Maduino boards as following:<br>
 
{| cellspacing="0" cellpadding="5" border="1"
 
|-
 
| align="center" width="150" | '''Sensor'''
 
| align="center" width="200" | '''Maduino Pins'''
 
 
|- style="font-size: 90%"
 
| align="center" | Sensor's GND
 
| align="center" | Maduino's GND
 
|- style="font-size: 90%"
 
| align="center" | Sensor's DATA
 
| align="center" | Maduino's D6
 
|- style="font-size: 90%"
 
| align="center" | Sensor's Vcc
 
| align="center" | Maduino's Vcc
 
|}
 
 
[[File:Maduino_Zero_A9G_3V3_26.JPG|700px]]<br>
 
Insert the I2C SSD1306 OLED:<br>
 
[[File:Maduino_Zero_A9G_3V3_27.JPG|700px]]<br>
 
 
Upload the code [https://github.com/Makerfabs/Maduino-Zero-A9G A9G_DHT11_OLED.ino] to the board. We can see the humidity and temperature on the screen.<br>
 
[[File:Maduino_Zero_A9G_3V3_28.JPG|700px]]<br>
 
<br>
 
Project_2: A Simple IOT Project- SMS Remote Control<br>
 
 
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.<br>
 
1. Hardware connection<br>
 
Connect the LED to Maduino boards as following:<br>
 
{| cellspacing="0" cellpadding="5" border="1"
 
|-
 
| align="center" width="150" | '''LED'''
 
| align="center" width="200" | '''Maduino Pins'''
 
 
|- style="font-size: 90%"
 
| align="center" | Red PIN
 
| align="center" | Maduino's D2
 
|- style="font-size: 90%"
 
| align="center" | Green PIN
 
| align="center" | Maduino's D3
 
|- style="font-size: 90%"
 
| align="center" | Blue PIN
 
| align="center" | Maduino's D4
 
|- style="font-size: 90%"
 
| align="center" | Sensor's Vcc
 
| align="center" | 3V3
 
|}
 
 
[[File:Maduino_Zero_A9G_3V3_29.JPG|700px]]<br>
 
 
2. Upload [https://github.com/Makerfabs/Maduino-Zero-A9G 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.<br>
 
[[File:Maduino_Zero_A9G_3V3_45.JPG|700px]]<br>
 
 
Supported messages in the code.<br>
 
{| cellspacing="0" cellpadding="5" border="1"
 
|-
 
| align="center" width="150" | '''Message'''
 
| align="center" width="200" | '''Result'''
 
 
|- style="font-size: 90%"
 
| align="center" | onr
 
| align="center" | turn the red led on
 
|- style="font-size: 90%"
 
| align="center" | ong
 
| align="center" | turn the green led on
 
|- style="font-size: 90%"
 
| align="center" | onb
 
| align="center" | turn the blue led on
 
|- style="font-size: 90%"
 
| align="center" | offr
 
| align="center" | turn the red led off
 
|- style="font-size: 90%"
 
| align="center" | offg
 
| align="center" | turn the green led off
 
|- style="font-size: 90%"
 
| align="center" | offb
 
| align="center" | turn the blue led off
 
|}
 
 
Then we can see the related LED on or off<br>
 
[[File:Maduino_Zero_A9G_3V3_32.JPG|700px]]<br>
 
 
Also, We can see the serial monitor shows the log when operate. That we can make sure the SIM card received a message.<br>
 
[[File:Maduino_Zero_A9G_3V3_33.JPG|700px]]<br>
 
 
Project_3: A Simple IOT Project- Environment Remote<br>
 
 
Monitor<br>
 
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.<br>
 
We use the humidity /temperature sensor at:<br> 
 
https://www.makerfabs.com/dht11-temperature-humidity-module.html
 
 
1. Sensor Connection
 
Connect the simple sensor to Maduino boards as following:
 
{| cellspacing="0" cellpadding="5" border="1"
 
|-
 
| align="center" width="150" | '''Sensor'''
 
| align="center" width="200" | '''Maduino Pins'''
 
 
|- style="font-size: 90%"
 
| align="center" | Sensor's GND
 
| align="center" | Maduino's GND
 
|- style="font-size: 90%"
 
| align="center" | Sensor's DATA
 
| align="center" | Maduino's D6
 
|- style="font-size: 90%"
 
| align="center" | Sensor's Vcc
 
| align="center" | Maduino's Vcc
 
|}
 
[[File:Maduino_Zero_A9G_3V3_34.JPG|700px]]<br>
 
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.<br>
 
[[File:Maduino_Zero_A9G_3V3_35.JPG|700px]]<br>
 
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.<br>
 
3.Programming<br>
 
3.1 Sign up an account in https://thingspeak.com/ . If you already have one, sign in directly.<br>
 
3.2 Click New Channel to create a new ThingSpeak channel.<br>
 
[[File:Maduino_Zero_A9G_3V3_36.JPG|700px]]<br>
 
3.3 Input name, Description, Select Field 1, Field 2, Field3, Field4.<br>
 
[[File:Maduino_Zero_A9G_3V3_37.JPG|700px]]<br>
 
Note: Field 3 and Field4 are reserved for other application.<br>
 
Then save channel on the bottom.<br>
 
[[File:Maduino_Zero_A9G_3V3_38.JPG|700px]]<br>
 
 
3.4 Copy your API Key, we will instead it in the code [https://github.com/Makerfabs/Maduino-Zero-A9G A9G_DHT_GSM.ino]<br>
 
[[File:Maduino_Zero_A9G_3V3_39.JPG|700px]]<br>
 
[[File:Maduino_Zero_A9G_3V3_40.JPG|700px]]<br>
 
Below are some ways to use the API, what we used is Write A Channel Feed<br>
 
[[File:Maduino_Zero_A9G_3V3_41.JPG|700px]]<br>
 
Select the right port and Arduino board: Arduino Zero(Native USB Port) to upload the code([https://github.com/Makerfabs/Maduino-Zero-A9G A9G_DHT_GSM.ino]) to Maduino Zero A9/A9G board<br>
 
[[File:Maduino_Zero_A9G_3V3_42.JPG|700px]]<br>
 
If demo code run successful, you could refresh your cannel on thingspeak.com to see the result.<br>
 
https://thingspeak.com/channels/920821<br>
 
[[File:Maduino_Zero_A9G_3V3_43.JPG|700px]]<br>
 
Have fun in making Maduino!<br>
 
You can get the code from our [https://github.com/Makerfabs/Maduino-Zero-A9G Github.]<br>
 
  
 
== FAQ  ==
 
== FAQ  ==

Revision as of 07:07, 16 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 


FAQ

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

Resources