Skip to content

Support GPS properly on Heltec Wireless Tracker v1.x#1351

Open
weebl2000 wants to merge 1 commit intomeshcore-dev:devfrom
weebl2000:heltec_wireless_tracker_gps
Open

Support GPS properly on Heltec Wireless Tracker v1.x#1351
weebl2000 wants to merge 1 commit intomeshcore-dev:devfrom
weebl2000:heltec_wireless_tracker_gps

Conversation

@weebl2000
Copy link
Contributor

@weebl2000 weebl2000 commented Jan 9, 2026

Update 27 February 2026

After running for nearly two months this seems battled tested, also received feedback from multiple users GPS keeps working and GPS is properly disabled and not causing phantom drain.

Summary

Power usage is high On HTWT even with GPS disabled, it's not being disabled properly.

Adds proper GPS support to the Heltec Wireless Tracker v1.x (HTIT-Tracker V0.5 schematic).

  • Passes &rtc_clock, GPS_RESET, GPS_EN, and &board.periph_power to MicroNMEALocationProvider
  • Delegates power management to MicroNMEALocationProvider::begin()/stop() which use RefCountedDigitalPin to safely share VEXT with the display
  • Adds getLocationProvider() override so firmware can access the GPS provider
  • Enables ENV_INCLUDE_GPS=1 and GPS_BAUD_RATE=115200 in the build config

Pin mapping (verified against V0.5 schematic)

ESP32 GPIO Net Name Function
GPIO33 GPS_TX UART Transmit (ESP32 → GPS)
GPIO34 GPS_RX UART Receive (GPS → ESP32)
GPIO35 GPS_EN Power enable — N-ch MOSFET (Q2) drives P-ch high-side switch, active HIGH
GPIO36 GPS_RST Hardware reset, active LOW
GPIO37 PPS Pulse Per Second (GPS → ESP32, not used in this PR)

GPS power control

Unlike earlier assumptions, the v1 hardware does have independent GPS power control via GPIO35. The stop() path de-asserts GPS_EN to cut GPS power independently of the display, then releases VEXT. This avoids wasting ~25-30mA on an idle GPS chip while the display is active.

Note

Passes &rtc_clock to the location provider, enabling GPS-to-RTC time sync. Complementary with #1364 and #1350 in the GPS chain.


Build firmware: Build from this branch

@weebl2000 weebl2000 changed the base branch from main to dev January 9, 2026 04:06
@weebl2000 weebl2000 changed the title Heltec wireless tracker gps Support GPS properly on Heltec Wireless Tracker v1.x Jan 9, 2026
@weebl2000 weebl2000 force-pushed the heltec_wireless_tracker_gps branch 2 times, most recently from 2b0a97c to cec7988 Compare January 10, 2026 16:57
@weebl2000 weebl2000 force-pushed the heltec_wireless_tracker_gps branch from cec7988 to 3161017 Compare February 6, 2026 01:09
@weebl2000 weebl2000 force-pushed the heltec_wireless_tracker_gps branch 2 times, most recently from 6f37505 to 5fa8f03 Compare February 6, 2026 02:13
@weebl2000
Copy link
Contributor Author

Confirmed this works as expected. With this firmware deployed: with GPS disabled and then GPS enabled. GPS fix works and this is the difference in power consumption.

PXL_20260217_035457850 MP
PXL_20260217_035514461 MP

@weebl2000 weebl2000 force-pushed the heltec_wireless_tracker_gps branch from 5fa8f03 to f247c82 Compare February 25, 2026 02:15
@wikiyu
Copy link

wikiyu commented Feb 26, 2026

Heltec Tracker V1.2 (as on board)
IMG_20260226_120316464_HDR

Works correctly, GPS fix goes onto app on android and then is correctly sent to other devices.

Toggling on/off of GPS works, and power usage changes accordingly

@pon-wessel
Copy link

Works correctly, GPS fix goes onto app on android and then is correctly sent to other devices.

Toggling on/off of GPS works, and power usage changes accordingly

Thanks for testing!

Pin mapping verified against HTIT-Tracker V0.5 schematic:
- GPIO35 (GPS_EN): N-ch MOSFET drives P-ch high-side switch, active HIGH
- GPIO36 (GPS_RST): hardware reset, active LOW
- GPIO33/34: UART TX/RX

Delegates power management to MicroNMEALocationProvider begin()/stop()
which independently controls GPS power via GPS_EN and shares VEXT with
the display through RefCountedDigitalPin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants