Difference between revisions of "Maduino Zero A9G"

From MakerFabsWiki
Jump to: navigation, search
(Interface Function)
(Interface Function)
Line 66: Line 66:
 
*D19(A5)– Unused
 
*D19(A5)– Unused
  
Note: Both the battery or the microUSB can be used for power supply. While microUSB connected, the board will be powered by microUSB, while microUSB, it will switch to battery automaticly.
+
Note: In v3.3 and abobe both the battery or the microUSB can be used for power supply. While microUSB connected, the board will be powered by microUSB, while microUSB, it will switch to battery automaticly.
  
 
==Usage==
 
==Usage==

Revision as of 10:17, 26 November 2019

Introduction

Maduino Zero A9G GPS Tracker is an IOT (Internet of things) Solution based on the 32-bit Atmel’s SAMD21 MCU and GPRS/GSM+GPS module A9G. It integrate a micro Controller ATSAMD21G18, GRRS/GSM+GPS module A9G, which is the upgrade version of Maduino GPRS A7, power management and storage, to make the A9G ready for real project for IOT projects such as smart-home, outdoor monitoring, etc. The Marduino Zero A9G GPS Tracker based on the Arduino, users can program it with Arduino IDE, which is very easy especially suit for the none-programmers. There are also guide for users to learn how to create the first IOT project with this board, with which the starters can learn the hardware and programming skill quickly.
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
Maduino Zero A9G.jpg

Note: A9G is a GPRS/GSM+GPS module, while A9 is just a GPRS/GSM mudule not include GPS.

Features

  • BAT Input Voltage: 3.4-4.2V
  • ATSAMD21G18, 32-Bit ARM Cortex M0+
  • Micro SIM connector
  • Integrated Power Control System
  • 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/18*GPIO
  • Arduino compatible
  • Working Temperature: -40 – 85℃
  • Default baud rate: 115200
  • Size: 40*55mm

Interface Function

Maduino Zero A9G 1.JPG
①PWR: Power indicate
②CHG: Charge indicate
③GSM: GSM Antenna IPX Interface
④VBAT: 3.7V Lipo battery connector
⑤CHG: 5V power input, can connect the solar panel to charge the lipo battery.
⑥Micro USB: 5V power input, USB to serial communication
⑦STA: A9G GPS status indicate
⑧NET: A9G Network indicate
⑨GPS: GPS Antenna IPX Interface
⑩RESET: Reset button for ATSAMD21G18

Maduino Zero A9G 2.JPG

①Micro SIM Card Holder
②Micro SD Card Holder

Pins usage on Arduino

  • D0 – RX from A9G
  • D1 – TX to A9G
  • D2 - Unused
  • D3 - Unused
  • D4 - SD Card CS PIN
  • D5 - Low-Power Mode Control of A9G (Low active)
  • D6 - Hardware reset Control of A9G (High active)
  • D7 - Unused
  • D8 - Unused
  • D9 - Power ONN/OFF Control of A79G (LOW active)
  • D10 - Unused
  • D11 - Unused
  • D12 - Unused
  • D13 - Unused
  • D14(A0) - Unused
  • D15(A1) - Unused
  • D16(A2) - Unused
  • D17(A3) - Unused
  • D18(A4) - Unused
  • D19(A5)– Unused

Note: In v3.3 and abobe both the battery or the microUSB can be used for power supply. While microUSB connected, the board will be powered by microUSB, while microUSB, it will switch to battery automaticly.

Usage

How to Get GPS Location?

A9G 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.

1.Insert a Micro SIM card(Option,GPS NOT need the SIM card, if you want to use the AGPS, the SIM Card will need.)
The Maduino GPRS 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.
Maduino Zero A9G 3.JPG
Note that some fee maybe needed for each SMS depends on your local GSM Operator, make sure that the SIM Card is active and enough money left for this application.
2.Connect the GSM,GPS Antenna and the 3.7V battery
Maduino Zero A9G 4.JPG
3.Programming and Download The Codes for this application is very simple, define the A9G Power control pins:

   while (!SerialUSB) {
    ; // wait for serial port to connect
  }
  Serial1.begin(115200); 
//define the power control pin of A9G:
#define DEBUG true
int PWR_KEY = 9;//power key
int RST_KEY = 6;//reset key
int LOW_PWR_KEY = 5;//low power key

GPS power control

sendData("AT+GPS=1 ",1000,DEBUG);//1:Turn the GPS on, 0:Turn the GPS off

Get current Location information

sendData("AT+GPSRD=1",1000,DEBUG); //Read every 1 second
delay(1000);
sendData("AT+GPSRD=0",1000,DEBUG); //Not Read

Select the right port and Arduino board: Arduino Zero(Native USB Port) to upload the code to Maduino GPRS GPS boards
Maduino Zero A9G 5.JPG
4.Test Result
Open the monitor, it will auto print the GPS Location information, show as below:
Maduino Zero A9G 6.JPG
Note: AT Command:

AT+GPS=1   //open GPS  (NEMA information output from GPS_TXD PIN, but in this board not breakout this pin, please set GPS info output from AT Command serial port)
AT+GPS=0   //close GPS
AT+GPSRD=N  //NEMA information output N	second form serial port
AT+GPSRD=0   // Close the GPS information output form serial port

SMS Control

In this demo, we are going to control a RGB LED by SMS.
1.Hardware connection

Maduino Zero 7.JPG
2.Upload the code

Maduino Zero 8.JPG

3.Send SMS to control the LED: Open the monitor of Arduino IDE, you can check the serial output debug info as:
Maduino Zero 8.JPG

4.Test result

when send the SMS: onr, the Red LED will light up.
Maduino Zero A9G 9.JPG

GPRS DEMO

1 Setup Arduino IDE
1.1 Choose board -> Arduino/Genuino Zero(Native USB Port).
1.png
1.2 If you not find it, you can click -> Boards Manager as the screen snap below. Nest search “arduino zero” and install it.

2.png

3.png


2 Hardware connection

2.1 First you need to find a DHT11 sensor. https://www.makerfabs.com/dht11-temperature-humidity-module.html


Sensor A9/A9G
Sensor's GND A9G's GND (gray line)
Sensor's DATA A9G's D3 (yellow line)
Sensor's Vcc A9G's 3V (red line)

Last Install battery or connect USB line.

4.png


6.jpg

3 Download code and install dependent library.

Code on GitHUB

Frist Click Sketh->Include Library->Manage Library… Nest search "dht sensor library" install "DHT sensor library" like the screen snap below.

7.png

8.png

4 Setup cloud side on ThingSpeak.com Demo's output like this. https://thingspeak.com/channels/920821

9.png

4.1 First you need create a new account and login on https://thingspeak.com

4.2Next Click Channels -> new Channel. And Active Field1 Field2,the demo only use Field1 Field2.

10.png

11.png

4.3 Last you could change apiKey to your "write api key" in your account on ThingSpeak.com

12.png


5 Run code and test.

Upload code to A9G.

If you hotplug sim card, you need to plug out battery and USB. Then plug in they again for Restart A9G

13.png

If demo code run successful, you could refresh your cannel on thingspeak.com to see the result. Good luck !

9.png


Show the temperature and hunidity on OLED

Upload the code A9G_DHT11_OLED.ino

A9G DHT OLED 01.png

FAQ

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

Resources