Blog

ATGM336H GPS Module – Complete Guide

GPS / GNSS Module

ATGM336H GPS Module

Multi-Constellation GNSS Positioning with NMEA Output

The ATGM336H is a GNSS (Global Navigation Satellite System) receiver that can track not just US GPS satellites but also China's BeiDou constellation at the same time, which in practice means faster fixes and more reliable positioning in partially obstructed environments - dense urban streets, under tree cover - compared to a GPS-only receiver, since more visible satellites means more redundancy for the trilateration math the chip performs internally. Each satellite broadcasts a precisely timed signal; the receiver measures the tiny difference in arrival time from several satellites at once and, knowing each satellite's exact orbital position at that moment, solves for its own position on Earth - a calculation that needs a minimum of four satellites for a full 3D fix of latitude, longitude, and altitude. All of that heavy computation happens onboard the module itself; your microcontroller simply reads a continuous stream of plain-text NMEA sentences over UART and parses out whichever fields it needs - position, altitude, speed, satellite count, and fix quality.

GPS + BeiDou
Constellations
UART (NMEA)
Output
~2.5m CEP
Accuracy

Key features

Multi-Constellation Tracking

Uses GPS and BeiDou together for faster, more reliable fixes.

Standard NMEA-0183 Output

Plain-text sentences readable with widely available parsing libraries.

Built-In Patch Antenna

Ready to use without needing a separate external antenna in most cases.

Fast Time-To-First-Fix

Hot-start reacquisition in seconds once ephemeris data is cached.

Backup Battery Support

An optional coin-cell backup keeps almanac data alive between power cycles.

Compact Footprint

Small enough to fit into handheld and wearable tracking projects.

Technical specifications

Supply Voltage 3.3V – 5V (onboard regulator on most breakouts)
Interface UART (default 9600 baud)
Output Format NMEA-0183 sentences
Constellations GPS + BeiDou (dual mode)
Position Accuracy ~2.5m CEP (open sky)
Cold Start Time ~30s typical (open sky)
Hot Start Time ~1s typical
Update Rate 1Hz default (configurable higher on some firmware)
Antenna Onboard ceramic patch antenna

Pinout

PinFunction
VCC 3.3V – 5V power supply
GND Ground
TX NMEA data out - connect to microcontroller RX
RX Configuration data in - connect to microcontroller TX
PPS Pulse-per-second timing output (present on some breakouts)

Applications

GPS trackers for vehicles, bikes, and pets Drone and RC navigation Hiking and outdoor handheld locators Data logging with timestamped location Geofencing alert projects Precise-time (PPS) reference for clock projects

What's in the box

1x ATGM336H GPS module with onboard antenna

Downloads

Datasheet (PDF) Arduino TinyGPS++ Library Example
🔌
Pin Connections
1 Table
Pin Connections Table 1
BoardSensor PinConnection
ATGM336HVCC/GND/TX/RX3.3-5V / GND / board RX pin / board TX pin
📟
ATGM336H Dual-Mode GNSS GPS Module - High Sensitivity, Fast Fix, NEO-M8N Compatible
7 Examples • C/C++ | Boards: Arduino Uno, Arduino Nano, Arduino Mega, ESP32, ESP8266, STM32, Raspberry Pi Pico
ATGM336H Dual-Mode GNSS GPS Module - High Sensitivity, Fast Fix, NEO-M8N Compatible - Arduino Uno
ATGM336H Dual-Mode GNSS GPS Module - High Sensitivity, Fast Fix, NEO-M8N Compatible - Arduino Nano
ATGM336H Dual-Mode GNSS GPS Module - High Sensitivity, Fast Fix, NEO-M8N Compatible - Arduino Mega
ATGM336H Dual-Mode GNSS GPS Module - High Sensitivity, Fast Fix, NEO-M8N Compatible - ESP32
ATGM336H Dual-Mode GNSS GPS Module - High Sensitivity, Fast Fix, NEO-M8N Compatible - ESP8266
ATGM336H Dual-Mode GNSS GPS Module - High Sensitivity, Fast Fix, NEO-M8N Compatible - STM32
ATGM336H Dual-Mode GNSS GPS Module - High Sensitivity, Fast Fix, NEO-M8N Compatible - Raspberry Pi Pico
📄 File: atgm336h_dual-mode_gnss_gps_module_-_high_sensitivity,_fast_fix,_neo-m8n_compatible_-_arduino_uno.inoArduino Uno
524 characters
1//ekostra.com
2//electronics store in egypt
3//+201008896258
4
5// RX=2, TX=3 on Arduino Uno
6#include <SoftwareSerial.h>
7SoftwareSerial LINK_SERIAL(2, 3);
8
9#include <TinyGPS++.h>
10
11TinyGPSPlus gps;
12
13void setup() {
14 Serial.begin(115200);
15 LINK_SERIAL.begin(9600);
16}
17
18void loop() {
19 while (LINK_SERIAL.available()) {
20 gps.encode(LINK_SERIAL.read());
21 }
22 if (gps.location.isUpdated()) {
23 Serial.print("Lat: "); Serial.print(gps.location.lat(), 6);
24 Serial.print(" Lng: "); Serial.println(gps.location.lng(), 6);
25 }
26}
📄 File: atgm336h_dual-mode_gnss_gps_module_-_high_sensitivity,_fast_fix,_neo-m8n_compatible_-_arduino_nano.inoArduino Nano
525 characters
1//ekostra.com
2//electronics store in egypt
3//+201008896258
4
5// RX=2, TX=3 on Arduino Nano
6#include <SoftwareSerial.h>
7SoftwareSerial LINK_SERIAL(2, 3);
8
9#include <TinyGPS++.h>
10
11TinyGPSPlus gps;
12
13void setup() {
14 Serial.begin(115200);
15 LINK_SERIAL.begin(9600);
16}
17
18void loop() {
19 while (LINK_SERIAL.available()) {
20 gps.encode(LINK_SERIAL.read());
21 }
22 if (gps.location.isUpdated()) {
23 Serial.print("Lat: "); Serial.print(gps.location.lat(), 6);
24 Serial.print(" Lng: "); Serial.println(gps.location.lng(), 6);
25 }
26}
📄 File: atgm336h_dual-mode_gnss_gps_module_-_high_sensitivity,_fast_fix,_neo-m8n_compatible_-_arduino_mega.inoArduino Mega
493 characters
1//ekostra.com
2//electronics store in egypt
3//+201008896258
4
5// RX=19, TX=18 on Arduino Mega
6#define LINK_SERIAL Serial1
7
8#include <TinyGPS++.h>
9
10TinyGPSPlus gps;
11
12void setup() {
13 Serial.begin(115200);
14 LINK_SERIAL.begin(9600);
15}
16
17void loop() {
18 while (LINK_SERIAL.available()) {
19 gps.encode(LINK_SERIAL.read());
20 }
21 if (gps.location.isUpdated()) {
22 Serial.print("Lat: "); Serial.print(gps.location.lat(), 6);
23 Serial.print(" Lng: "); Serial.println(gps.location.lng(), 6);
24 }
25}
📄 File: atgm336h_dual-mode_gnss_gps_module_-_high_sensitivity,_fast_fix,_neo-m8n_compatible_-_esp32.inoESP32
486 characters
1//ekostra.com
2//electronics store in egypt
3//+201008896258
4
5// RX=16, TX=17 on ESP32
6#define LINK_SERIAL Serial1
7
8#include <TinyGPS++.h>
9
10TinyGPSPlus gps;
11
12void setup() {
13 Serial.begin(115200);
14 LINK_SERIAL.begin(9600);
15}
16
17void loop() {
18 while (LINK_SERIAL.available()) {
19 gps.encode(LINK_SERIAL.read());
20 }
21 if (gps.location.isUpdated()) {
22 Serial.print("Lat: "); Serial.print(gps.location.lat(), 6);
23 Serial.print(" Lng: "); Serial.println(gps.location.lng(), 6);
24 }
25}
📄 File: atgm336h_dual-mode_gnss_gps_module_-_high_sensitivity,_fast_fix,_neo-m8n_compatible_-_esp8266.inoESP8266
524 characters
1//ekostra.com
2//electronics store in egypt
3//+201008896258
4
5// RX=D7, TX=D8 on ESP8266
6#include <SoftwareSerial.h>
7SoftwareSerial LINK_SERIAL(D7, D8);
8
9#include <TinyGPS++.h>
10
11TinyGPSPlus gps;
12
13void setup() {
14 Serial.begin(115200);
15 LINK_SERIAL.begin(9600);
16}
17
18void loop() {
19 while (LINK_SERIAL.available()) {
20 gps.encode(LINK_SERIAL.read());
21 }
22 if (gps.location.isUpdated()) {
23 Serial.print("Lat: "); Serial.print(gps.location.lat(), 6);
24 Serial.print(" Lng: "); Serial.println(gps.location.lng(), 6);
25 }
26}
📄 File: atgm336h_dual-mode_gnss_gps_module_-_high_sensitivity,_fast_fix,_neo-m8n_compatible_-_stm32.inoSTM32
489 characters
1//ekostra.com
2//electronics store in egypt
3//+201008896258
4
5// RX=PA10, TX=PA9 on STM32
6#define LINK_SERIAL Serial1
7
8#include <TinyGPS++.h>
9
10TinyGPSPlus gps;
11
12void setup() {
13 Serial.begin(115200);
14 LINK_SERIAL.begin(9600);
15}
16
17void loop() {
18 while (LINK_SERIAL.available()) {
19 gps.encode(LINK_SERIAL.read());
20 }
21 if (gps.location.isUpdated()) {
22 Serial.print("Lat: "); Serial.print(gps.location.lat(), 6);
23 Serial.print(" Lng: "); Serial.println(gps.location.lng(), 6);
24 }
25}
📄 File: atgm336h_dual-mode_gnss_gps_module_-_high_sensitivity,_fast_fix,_neo-m8n_compatible_-_raspberry_pi_pico.inoRaspberry Pi Pico
496 characters
1//ekostra.com
2//electronics store in egypt
3//+201008896258
4
5// RX=1, TX=0 on Raspberry Pi Pico
6#define LINK_SERIAL Serial1
7
8#include <TinyGPS++.h>
9
10TinyGPSPlus gps;
11
12void setup() {
13 Serial.begin(115200);
14 LINK_SERIAL.begin(9600);
15}
16
17void loop() {
18 while (LINK_SERIAL.available()) {
19 gps.encode(LINK_SERIAL.read());
20 }
21 if (gps.location.isUpdated()) {
22 Serial.print("Lat: "); Serial.print(gps.location.lat(), 6);
23 Serial.print(" Lng: "); Serial.println(gps.location.lng(), 6);
24 }
25}
UART GPS/GNSS receiver, NMEA-compatible output.
The first fix after power-on in a new location, or after being off for a long time, can take a minute or more while it downloads fresh almanac and ephemeris data from the satellites at a very low bitrate - that's completely normal, not a fault. GPS signals are extremely weak and do not usefully penetrate roofs, metal enclosures, or thick foliage, so always test outdoors with a clear view of the sky before assuming a wiring or code problem. And for parsing, lean on a proven library like TinyGPS++ rather than hand-parsing NMEA strings yourself - checksum validation and the many sentence-type variations already have solved edge cases in mature libraries that are easy to get subtly wrong from scratch.