Retrieve GPS Position Using Ameba
by daphwl in Circuits > Microcontrollers
6 Views, 0 Favorites, 0 Comments
Retrieve GPS Position Using Ameba
Ameba RTL8722DM_MINI
Ameba RTL8722DM is a low-power dual-band WLAN and BLE (Bluetooth Low Energy) SoC by Realtek. It also includes memory for Wi-Fi protocol functions and application making it simple for anyone to develop various kind of IoT applications. At the same time, it has a wide range of peripheral interfaces. With all these interfaces, it can connect to most of the electronics components like LEDs, temperature and humidity sensors, and so on
In this project, we will use Adafruit Ultimate GPS Breakout. Its data format is pure text, so we can connect it to USB to TTL Adapter and observe the output.
Supplies
AmebaD [RTL8722DM_MINI] x1
Adafruit Ultimate GPS Breal
Setting Up
It follows the NMEA sentence format (refer to http://aprs.gids.nl/nmea/ ) The GPS signal is weak in indoor environement. The status that the GPS signal is not received is called "not fix". Bring the GPS module outdoors, when the GPS signal is "fix", you would get message similar to the figure below.
In this example we are only interested in the “$GPRMC (Global Positioning Recommended Minimum Coordinates)”: $GPRMC,032122.000,A,2446.8181,N,12059.7251,E,0.39,78.89,270116,,,A*53 Each field is separated by a comma.
First field is the GMT time (Greenwich Mean Time), that is 032122.000 in this example. The time format is HH:MM:SS.SSS, i.e., 03:21:22.000. Note that the time zone and the daylight-saving time adjustment should be handled on your own. Second field represents the status code V: Void (Invalid) A: Active, meaning the GPS signal is fix. The third to sixth fields represent the geolocation In this example, 2446.8181,N represents 24 degrees 46.8181 minutes north latitude, and 12059.7251,E represents 120 degrees 59.7251 minutes east longitude. We can search +24 46.8181’, +120 59.7251’ in Google map to check whether the position is correct.
Setting Up (WIring Diagram)
Connect the Adafruit Ultimate GPS Breakout board to the RTL8722DM_MINI.
Next, open the example, "File" → "Examples"→ "AmebaSoftwareSerial" → "Adafruit_GPS_Parsing".
Final Result
Compile and Upload to Ameba, then press the reset button. The result will output to Serial Monitor.
More Resources
If you need additional technical documents or the source code for this project. Please visit the official websites and join the Facebook group and forum.
Ameba Official Website: https://www.amebaiot.com/en/
Ameba Facebook Group: https://www.facebook.com/groups/amebaioten
Ameba Forum: https://www.amebaiot.com.cn/en/