ESP32-S3 GPS Radiation Logger With Self-Hosted Map Viewer

by ryansusman in Circuits > Microcontrollers

98 Views, 2 Favorites, 0 Comments

ESP32-S3 GPS Radiation Logger With Self-Hosted Map Viewer

PXL_20260525_134721188.LONG_EXPOSURE-01.COVER.jpg

I wanted a radiation survey logger that worked reliably in the field — no app crashes, no cloud dependency, no reliance on anyone else's infrastructure. This is an ESP32-S3 (Heltec Wireless Tracker V2) that connects to a RadiaCode-110 BLE dosimeter, logs GPS coordinates + dose readings to flash storage, and syncs everything to a self-hosted FastAPI + MongoDB backend whenever it finds Wi-Fi. A web viewer renders the data as an interactive map, 16K-resolution PNG survey images, or Safecast-compatible export files.



The firmware handles automatic always-on recording, dual-network Wi-Fi upload (home + mobile hotspot), and a live TFT display showing dose rate, GPS fix quality, battery, and upload status. Everything runs on a 3D-printed case you can hold in one hand.



Everything is open source and self-hosted.



Demo video: https://www.youtube.com/watch?v=xzfiZ4xy9B8



Full source code and build instructions: https://github.com/darkmatter2222/HELTEC-Wireless-Tracker-2.0-Rediacode-GPS-Recorder

Supplies

  1. Heltec Wireless Tracker V2 (ESP32-S3FN8 + UC6580 GNSS + ST7735 TFT + SX1262 LoRa)
  2. RadiaCode-110 BLE radiation dosimeter
  3. LiPo battery (3.7V, 500-2000mAh with JST connector)
  4. MicroSD card (any Class 10, 4GB+)
  5. 3D-printed case — STL files in repo under hardware/stl/
  6. Server running Docker (Linux, Raspberry Pi, or any home server) for the backend and web viewer

Hardware Setup and Wiring

The Heltec Wireless Tracker V2 is an all-in-one development board with ESP32-S3, a UC6580 GNSS receiver, a 0.96" ST7735 TFT display, and SX1262 LoRa radio — all in a compact package. You just need to pair it with a LiPo battery and optionally a 3D-printed case.



Key notes:



  • The board uses native USB-CDC — plug it in and Windows/Mac will recognize it immediately as a serial port (no FTDI driver needed)

  • The UC6580 GNSS receiver supports GPS, GLONASS, Galileo, and BeiDou simultaneously

  • The ST7735 display runs in landscape mode (160x80 pixels)

  • No external SD card is required — the firmware uses the ESP32-S3's built-in 8MB flash (LittleFS) for session storage by default



Power: Connect a 3.7V LiPo battery to the JST-PH 2-pin connector on the board. The onboard charger handles USB charging automatically.



3D-printed case: STL files are in the repo under hardware/stl/. There are three parts: the case body, the lid, and a MagSafe adapter ring. Print in PLA or PETG. M2 screws hold the lid on.

Firmware Build and Flash

The firmware is built with PlatformIO. Clone the repo, open in VS Code with the PlatformIO extension, and it will automatically install all dependencies.

Configuration (create secrets.h from the template):

  • Set your primary Wi-Fi SSID and password (home network)
  • Set a secondary Wi-Fi SSID and password (mobile hotspot for field use)
  • Set your backend server IP address and port

Flash: Connect via USB-C. In PlatformIO, run "Upload" for the heltec_tracker_v2 environment. The board will reboot and immediately begin scanning for the RadiaCode over BLE and acquiring GPS fix.

What the display shows: GPS fix quality (2D/3D/NO FIX), battery percentage, sample count, dose rate in nSv/h, and upload status. The display cycles between STATS, GPS, STORAGE, and DOSE views.

Backend Setup (FastAPI + MongoDB)

The backend is a FastAPI application with MongoDB for storage. The easiest deployment is via Docker Compose on any Linux server or home server running Docker.

Steps:

  • Clone the repo on your server
  • Navigate to api/vega-tracker-ingest/
  • Copy .env.example to .env and set your MongoDB URI and desired port
  • Run docker compose up -d to start the ingest API
  • Navigate to web/vega-tracker-viewer/, set your API base URL in .env, and run docker compose up -d

The tracker firmware will POST readings to the API automatically whenever it connects to either configured Wi-Fi network. No manual intervention needed — just power on the tracker and walk around.

Full source and documentation: https://github.com/darkmatter2222/HELTEC-Wireless-Tracker-2.0-Rediacode-GPS-Recorder

Web Viewer and Data Export

The web viewer provides four main modes for analyzing your radiation survey data:

  • Explore — Interactive Leaflet map with GPS tracks color-coded by dose rate, CPS, speed, altitude, or HDOP. Switch between Track lines, Dots, Hex-bin density, and Bearing-arrow overlays. Tile layers include OpenStreetMap, CartoDB Dark, OpenTopoMap, and Esri Satellite.
  • Data Management — Browse sessions, rename them, soft-delete or restore, merge sessions, and export data. Also shows backup history and database stats with activity charts.
  • Render — Offline high-resolution PNG renderer. Generate survey images up to 16K resolution with color palettes, basemap tile overlays, vignette/grain post-effects, and a title + color bar legend. Useful for wall prints and detailed analysis.
  • Export — Time-range data export in RadiaCode native format (.rctrk), RadiaCode .txt, RadiaCode .csv, or full internal schema. Supports quick-select presets (Today, This Week, Last Month) and custom date ranges.

Access the viewer at http://YOUR_SERVER_IP:PORT from any browser on your local network, or through a reverse proxy for remote access.

Demo video: https://www.youtube.com/watch?v=xzfiZ4xy9B8

Field Use and Results

Charge the tracker overnight, pair the RadiaCode-110 via BLE on first boot (it auto-reconnects on subsequent boots), and head out. The tracker begins logging immediately — no app, no phone required in the field.

Tips for a good survey:

  • Wait for a 3D GPS fix before starting your survey (the display shows "3D" in the GPS field and HDOP below 2.0)
  • The RadiaCode BLE connection is automatic — just keep the dosimeter within approximately 5 meters
  • When you return to Wi-Fi range, the tracker uploads all queued readings automatically — no manual sync needed
  • Battery life is approximately 6–8 hours with continuous GPS and BLE active on a 1000mAh LiPo

After uploading, open the web viewer to see your survey on the interactive map. Background radiation in most locations reads between 50–200 nSv/h depending on local geology, altitude, and building materials. The color gradient helps identify any hotspots worth investigating further.

Demo video showing a live survey at a local playground: https://www.youtube.com/watch?v=xzfiZ4xy9B8

Full source code, firmware, and self-hosted backend: https://github.com/darkmatter2222/HELTEC-Wireless-Tracker-2.0-Rediacode-GPS-Recorder