Here is the hardware configuration for the GNSS receiver on the Yuz Badge:
1. Pinout Mapping
- GNSS TX (ESP32 RX):
GPIO 44 (UART1_RXD)
- GNSS RX (ESP32 TX):
GPIO 43 (UART1_TXD)
- GNSS Power Enable (EN / VCC control):
GPIO 17 (Active HIGH). You must set gpio_set_level(GPIO_NUM_17, 1) to power on the GNSS LDO.
- TIMEPULSE (1PPS): Routed to
GPIO 18 for sub-millisecond time synchronization interrupt.
2. Default Configuration
- Baud Rate:
9600 bps (8 data bits, no parity, 1 stop bit).
- Protocol: NMEA 0183 standard sentences (GNGGA, GNRMC, GNVTG, GNZDA).
3. ESP-IDF Initialization Snippet
#define GNSS_UART_NUM UART_NUM_1
#define GNSS_TX_PIN GPIO_NUM_43
#define GNSS_RX_PIN GPIO_NUM_44
#define GNSS_EN_PIN GPIO_NUM_17
void init_gnss(void) {
// Power on GNSS module
gpio_set_direction(GNSS_EN_PIN, GPIO_MODE_OUTPUT);
gpio_set_level(GNSS_EN_PIN, 1);
vTaskDelay(pdMS_TO_TICKS(100)); // allow LDO to stabilize
uart_config_t uart_config = {
.baud_rate = 9600,
.data_bits = UART_DATA_8_BITS,
.parity = UART_PARITY_DISABLE,
.stop_bits = UART_STOP_BITS_1,
.flow_ctrl = UART_HW_FLOWCTRL_DISABLE,
.source_clk = UART_SCLK_DEFAULT,
};
uart_param_config(GNSS_UART_NUM, &uart_config);
uart_set_pin(GNSS_UART_NUM, GNSS_TX_PIN, GNSS_RX_PIN, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);
uart_driver_install(GNSS_UART_NUM, 1024 * 2, 0, 0, NULL, 0);
}
If you test indoors, place the badge near an open window or connect an active external patch antenna to get a 3D satellite fix.