Initial commit: Heltec Wireless Tracker documentation site
Astro/Starlight documentation covering hardware specs, pinout, schematics, GNSS protocol, LoRa frequencies, and getting started guides. Includes extracted datasheet images and Docker deployment.
7
.gitignore
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
# OS
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Environment overrides
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 149 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 2.9 MiB |
|
After Width: | Height: | Size: 225 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 503 KiB |
384
docs/datasheet/markdown/wireless-tracker-datasheet.md
Normal file
@ -0,0 +1,384 @@
|
||||
# Document Metadata
|
||||
**Format:** PDF 1.7
|
||||
**Author:** Aaron Lee
|
||||
**Creator:** WPS 文字
|
||||
**Creation Date:** D:20241224151548+08'00'
|
||||
**Mod Date:** D:20241224151548+08'00'
|
||||
|
||||
---
|
||||
|
||||
## Page 1
|
||||
|
||||
https://heltec.org
|
||||
Documents
|
||||
Rev 1.1
|
||||
P 1/17
|
||||
May 2023
|
||||
Heltec Automation © Limited standard files
|
||||
Wireless Tracker V1.1
|
||||
Wi-Fi/LoRa/BLE/GNSS(L5)
|
||||
Development Kit
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## Page 2
|
||||
|
||||
https://heltec.org
|
||||
Documents
|
||||
Rev 1.1
|
||||
P 2/17
|
||||
May 2023
|
||||
Heltec Automation © Limited standard files
|
||||
Document version
|
||||
Version
|
||||
Time
|
||||
Description
|
||||
Remark
|
||||
V1.0
|
||||
2023-05-16
|
||||
Documents creating
|
||||
Richard
|
||||
V1.1
|
||||
2023-05-21
|
||||
Document structure update
|
||||
Richard
|
||||
V1.1.1
|
||||
2024-10-10
|
||||
Update the GNSS module parameter description
|
||||
Richard
|
||||
Copyright Notice
|
||||
All contents in the files are protected by copyright law, and all copyrights are
|
||||
reserved by Chengdu Heltec Automation Technology Co., Ltd. (hereinafter referred to
|
||||
as Heltec). Without written permission, all commercial use of the files from Heltec
|
||||
are forbidden, such as copy, distribute, reproduce the files, etc., but non-commercial
|
||||
purpose, downloaded or printed by individual are welcome.
|
||||
Disclaimer
|
||||
Chengdu Heltec Automation Technology Co., Ltd. reserves the right to change,
|
||||
modify or improve the document and product described herein. Its contents are
|
||||
subject to change without notice. These instructions are intended for you use.
|
||||
|
||||
## Page 3
|
||||
|
||||
https://heltec.org
|
||||
Documents
|
||||
Rev 1.1
|
||||
P 3/17
|
||||
May 2023
|
||||
Heltec Automation © Limited standard files
|
||||
Content
|
||||
Wireless Tracker...................................................................................................................................1
|
||||
Document version.................................................................................................................................2
|
||||
Copyright Notice................................................................................................................................... 2
|
||||
Disclaimer............................................................................................................................................. 2
|
||||
Content..................................................................................................................................................3
|
||||
1. Description........................................................................................................................................ 4
|
||||
1.1 Overview.................................................................................................................................... 4
|
||||
1.2 Product features.........................................................................................................................5
|
||||
2. Pin Definition.....................................................................................................................................6
|
||||
2.1 Pin assignment...........................................................................................................................6
|
||||
2.2 Pin description............................................................................................................................7
|
||||
3. Specifications.................................................................................................................................. 10
|
||||
3.1 General specifications..............................................................................................................10
|
||||
3.2 Power supply............................................................................................................................11
|
||||
3.3 Power output............................................................................................................................11
|
||||
3.4 Power characteristics...............................................................................................................12
|
||||
3.5 LoRa RF characteristics............................................................................................................ 12
|
||||
3.6 GNSS Characteristics................................................................................................................14
|
||||
4. Typical hardware connections........................................................................ 错误!未定义书签。
|
||||
4.1 Physical dimensions................................................................................................................. 16
|
||||
5. Resource..........................................................................................................................................16
|
||||
5.1 Relevant Resource....................................................................................................................16
|
||||
5.2 Contact Information.................................................................................................................16
|
||||
|
||||
## Page 4
|
||||
|
||||
https://heltec.org
|
||||
Documents
|
||||
Rev 1.1
|
||||
P 4/17
|
||||
May 2023
|
||||
Heltec Automation © Limited standard files
|
||||
# 1. Description
|
||||
## 1.1 Overview
|
||||
Wireless Tracker is a development kit based on ESP32-S3FN8. It integrates both SX1262 and
|
||||
UC6580 to provide fast GNSS solution for IoT. Collaborate with the sample programs and
|
||||
development tools we provide, you can track any object and then upload that data wirelessly
|
||||
by Wi-Fi, Bluetooth, LoRa.
|
||||
Wireless Tracker supports L1 + L5 and supports GPS, GLONASS, BDS, Galileo, NAVIC, QZSS
|
||||
multi-system joint positioning. It is perfectly compatible with Arduino, can be widely used in
|
||||
development such as bicycle sharing services, tracking pets or livestock, locating vehicles,
|
||||
tracking children, etc.
|
||||
Wireless Tracker are available in two product variants:
|
||||
|
||||
### Table 1.1: Product model list
|
||||
| No. | Model | Description |
|
||||
|-----|-------|-------------|
|
||||
| 1 | Wireless Tracker-LF | 470~510MHz working LoRa frequency, used for China mainland (CN470) LPW band. |
|
||||
| 2 | Wireless Tracker-HF | For EU868, IN865, US915, AU915, AS923, KR920 and other LPW networks with operating frequencies between 863~928MHz. |
|
||||
|
||||
## Page 5
|
||||
|
||||
https://heltec.org
|
||||
Documents
|
||||
Rev 1.1
|
||||
P 5/17
|
||||
May 2023
|
||||
Heltec Automation © Limited standard files
|
||||
## 1.2 Product features
|
||||
|
||||
- ESP32-S3FN8+SX1262+UC6580 Chipset, supports Wi-Fi, LoRa, Bluetooth, GNSS.
|
||||
- Low power design of dual-frequency multi-system based on 22nm technology.
|
||||
- Supports L1 + L5, supports GPS, GLONASS, BDS, Galileo, NAVIC, QZSS multi-system joint positioning.¹
|
||||
- Type-C USB interface with a complete voltage regulator, ESD protection, short circuit protection, RF shielding, and other protection measures.
|
||||
- Onboard SH1.25-2 battery interface, integrated lithium battery management system (charge and discharge management, overcharge protection, battery power detection, USB / battery power automatic switching).
|
||||
- Onboard Wi-Fi, Bluetooth dedicated 2.4GHz metal spring antenna, reserved IPEX (U.FL) interface for LoRa and GNSS use.
|
||||
- Onboard 0.96-inch 80(H) x 160(V) RGB TFT-LCD display, which can be used to display debugging information, battery power, and other information.
|
||||
- Support the Arduino development environment.
|
||||
|
||||
¹ See the GNSS module manual for details on supported projects: UFirebird_Standard Positioning Products Protocol Specification
|
||||
|
||||
## Page 6
|
||||
|
||||
https://heltec.org
|
||||
Documents
|
||||
Rev 1.1
|
||||
P 6/17
|
||||
May 2023
|
||||
Heltec Automation © Limited standard files
|
||||
# 2. Pin Definition
|
||||
## 2.1 Pin assignment
|
||||
|
||||

|
||||
|
||||
## Page 7
|
||||
|
||||
https://heltec.org
|
||||
Documents
|
||||
Rev 1.1
|
||||
P 7/17
|
||||
May 2023
|
||||
Heltec Automation © Limited standard files
|
||||
## 2.2 Pin description
|
||||
|
||||
### Header J2
|
||||
Table 2-2-1: Pin description
|
||||
|
||||
| No. | Name | Type | Function |
|
||||
|-----|------|------|----------|
|
||||
| 1 | 5V | P | 5V Power Supply |
|
||||
| 2 | GND | P | Ground |
|
||||
| 3 | 3V3 | P | Output 3.3V |
|
||||
| 4 | GND | P | Ground |
|
||||
| 5 | 3V3 | P | Output 3.3V |
|
||||
| 6 | GND | P | Ground |
|
||||
| 7 | Vext | P | Output 3.3V, power supply for built-in TFT and GNSS |
|
||||
| 8 | GND | P | Ground |
|
||||
| 1 | RST | P | RST_SW |
|
||||
| 2 | 0 | I/O | GPIO0, USER_SW |
|
||||
| 3 | 1 | I/O | GPIO1, Vbat_Read², Touch1, ADC1_CH0 |
|
||||
| 4 | 2 | I/O | GPIO2, ADC Ctrl, Touch1, ADC1_CH0 |
|
||||
| 5 | 3 | I/O | GPIO3, Vext Ctrl, Touch1, ADC1_CH0 |
|
||||
| 6 | 19 | I/O | GPIO19, USB_D-, CLK_OUT2, ADC2_CH8, U1RTS |
|
||||
| 7 | 20 | I | GPIO20, USB_D+, CLK_OUT1, ADC2_CH9, U1CTS |
|
||||
| 8 | 21 | I/O | GPIO21, TFT_LED_K |
|
||||
| 9 | 26 | I/O | GPIO26, SPICS1 |
|
||||
| 10 | 48 | I/O | GPIO48, D_SEL |
|
||||
| 11 | 47 | I/O | GPIO47, Boot_Mode |
|
||||
| 12 | 33 | I/O | GPIO33, SPIIO4, FSPIHD, SUBSPIHD, GNSS_TX |
|
||||
| 13 | 34 | I/O | GPIO34, SPI05, FSPICS0, SUBSPICS0, GNSS_RX |
|
||||
| 14 | 35 | I/O | GPIO35, SPI06, FSPID, SUBSPID, GNSS_RST |
|
||||
| 15 | 36 | I/O | GPIO36, SPI07, FSPICLK, SUBSPICLK, GNSS_PPS |
|
||||
| 16 | 37 | I/O | GPIO37, SPIDQS, FSPIQ, SUBSPIQ |
|
||||
|
||||
² VBAT=Vbat_Read*4.9
|
||||
|
||||
### Header J3
|
||||
Table 2-2-2: Pin description
|
||||
|
||||
| No. | Name | Type | Function |
|
||||
|-----|------|------|----------|
|
||||
| 1 | 18 | I/O | GPIO18, U1RXD, ADC2_CH7, CLK_OUT3, LED Write Ctrl |
|
||||
| 2 | 17 | I/O | GPIO17, U1TXD, ADC2_CH6 |
|
||||
| 3 | 16 | I/O | GPIO16, U0CTS, ADC2_CH5, XTAL_32K_N |
|
||||
| 4 | 15 | I/O | GPIO15, U0RTS, ADC2_CH4, XTAL_32K_P |
|
||||
| 5 | 7 | I/O | GPIO7, ADC1_CH6, TOUCH7 |
|
||||
| 6 | 6 | I/O | GPIO6, ADC1_CH5, TOUCH6 |
|
||||
| 7 | 5 | I/O | GPIO5, ADC1_CH4, TOUCH5 |
|
||||
| 8 | 4 | I/O | GPIO4, ADC1_CH3, TOUCH4 |
|
||||
| 1 | 46 | I/O | GPIO46 |
|
||||
| 2 | 45 | I/O | GPIO45 |
|
||||
| 4 | 44 | I/O | GPIO44, U0RXD |
|
||||
| 5 | 43 | I/O | GPIO43, U0TXD |
|
||||
| 6 | 14 | I/O | GPIO14, ADC2_CH3, TOUCH14, FSPIDQS, SUBSPIWP, FSPIWP, LoRa_DIO1 |
|
||||
| 7 | 13 | I/O | GPIO13, ADC2_CH2, TOUCH13, FSPIIO7, SUBSPIQ, FSPIQ, LoRa_Busy |
|
||||
| 8 | 12 | I/O | GPIO12, ADC2_CH1, TOUCH12, FSPIIO6, SUBSPICLK, FSPICLK, LoRa_RST |
|
||||
| 9 | 11 | I/O | GPIO11, ADC2_CH0, TOUCH11, FSPIIO5, SUBSPID, FSPID, LoRa_MISO |
|
||||
| 10 | 10 | I/O | GPIO10, ADC1_CH9, TOUCH10, FSPIIO4, SUBSPICS0, FSPICS0, LoRa_MOSI |
|
||||
| 11 | 9 | I/O | GPIO9, ADC1_CH8, TOUCH9, SUBSPIHD, FSPIHD, LoRa_SCK |
|
||||
| 12 | 8 | I/O | GPIO8, ADC1_CH7, TOUCH8, SUBSPICS1, LoRa_NSS |
|
||||
| 13 | 42 | I/O | GPIO42, MTMS, TFT_SDIN |
|
||||
| 14 | 41 | I/O | GPIO41, MTDI, TFT_SCLK |
|
||||
| 15 | 40 | I/O | GPIO40, MTMS, TFT_RS |
|
||||
| 16 | 39 | I/O | GPIO39, MTMS, TFT_RES |
|
||||
| 18 | 38 | I/O | GPIO38, FSPIWP, SUBSPIWP, TFT_CS |
|
||||
|
||||
## Page 10
|
||||
|
||||
https://heltec.org
|
||||
Documents
|
||||
Rev 1.1
|
||||
P 10/17
|
||||
May 2023
|
||||
Heltec Automation © Limited standard files
|
||||
# 3. Specifications
|
||||
## 3.1 General specifications
|
||||
|
||||
### Table 3-1: General specifications
|
||||
| Parameters | Description |
|
||||
|------------|-------------|
|
||||
| Master Chip | ESP32-S3FN8 (Xtensa®32-bit lx7 dual core processor) |
|
||||
| LoRa Chipset | SX1262 |
|
||||
| GNSS Chipset | UC6580 |
|
||||
| Frequency | 470~510MHz, 863~928MHz |
|
||||
| Max TX Power | 21 ± 1dBm |
|
||||
| Receiving sensitivity | -135dBm |
|
||||
| Wi-Fi | 802.11 b/g/n |
|
||||
| Bluetooth | Bluetooth LE: Bluetooth 5, Bluetooth mesh |
|
||||
| Interface | Type-C USB; 2*1.25 lithium battery interface; LoRa ANT(IPEX); GNSS ANT(IPEX) |
|
||||
| Battery | 3.7V lithium battery power supply and charging |
|
||||
| Operating temperature | -20 ~ 70℃ |
|
||||
| Dimensions | 65.48mm* 28.06mm* 13.52mm |
|
||||
|
||||
## Page 11
|
||||
|
||||
## 3.2 Power supply
|
||||
Except when USB or 5V Pin is connected separately, lithium battery can be connected to charge it.
|
||||
In other cases, only a single power supply can be connected.
|
||||
|
||||
### Table 3-2: Power supply
|
||||
| Power supply mode | Minimum | Typical | Maximum | Unit |
|
||||
|-------------------|---------|---------|---------|------|
|
||||
| Type-C USB(≥500mA) | 4.7 | 5 | 6 | V |
|
||||
| Lithium battery(≥250mA) | 3.3 | 3.7 | 4.2 | V |
|
||||
| 5V pin(≥500mA) | 4.7 | 5 | 6 | V |
|
||||
| 3V3 pin(≥150mA) | 2.7 | 3.3 | 3.5 | V |
|
||||
|
||||
## 3.3 Power output
|
||||
|
||||
### Table 3-3: Power output
|
||||
| Output Pin | electric current | Unit |
|
||||
|------------|------------------|------|
|
||||
| 3.3V Pin | 500 | mA |
|
||||
| 5V Pin (USB Powered only) | 500 | mA |
|
||||
| Vext Pin | 350 | mA |
|
||||
|
||||
## Page 12
|
||||
|
||||
## 3.4 Power characteristics
|
||||
|
||||
### Table 3-4: Power characteristics
|
||||
| Mode | USB power | VBAT/battery powered | Unit |
|
||||
|------|-----------|---------------------|------|
|
||||
| Wi-Fi Scan | 100 | 74 | mA |
|
||||
| Wi-Fi AP | 150 | 111 | mA |
|
||||
| BT | 102 | 75 | mA |
|
||||
| GNSS | 120 | 89 | mA |
|
||||
| TX 14dbm | 200 | 148 | mA |
|
||||
| TX 17dbm | 220 | 163 | mA |
|
||||
| TX 22dbm | 240 | 178 | mA |
|
||||
| RX (TX disabled; RX enabled) | 80 | 59 | mA |
|
||||
| sleep | 2mA | 15μA | |
|
||||
|
||||
## 3.5 LoRa RF characteristics
|
||||
|
||||
### 3.5.1 Transmit power
|
||||
Table3-5-1: Transmit power
|
||||
| Operating frequency band | Maximum power value/[dBm] |
|
||||
|--------------------------|---------------------------|
|
||||
| 470~510 | 21 ± 1 |
|
||||
| 867~870 | 21 ± 1 |
|
||||
| 902~928 | 21 ± 1 |
|
||||
|
||||
### 3.5.2 Receiving sensitivity
|
||||
The following table gives typically sensitivity level of the Wireless Tracker-(L/H).
|
||||
|
||||
Table3-5-2: Receiving sensitivity
|
||||
| Signal Bandwidth/[KHz] | Spreading Factor | Sensitivity/[dBm] |
|
||||
|------------------------|------------------|-------------------|
|
||||
| 125 | SF12 | -135 |
|
||||
| 125 | SF10 | -130 |
|
||||
| 125 | SF7 | -124 |
|
||||
|
||||
### 3.5.3 Operation Frequencies
|
||||
Wireless Tracker supports LoRaWAN frequency channels and models corresponding table.
|
||||
|
||||
Table3-5-3: Operation Frequencies
|
||||
| Region | Frequency (MHz) | Model |
|
||||
|--------|-----------------|-------|
|
||||
| EU433 | 433.175~434.665 | Wireless Tracker-LF |
|
||||
| CN470 | 470~510 | Wireless Tracker-LF |
|
||||
| IN868 | 865~867 | Wireless Tracker-HF |
|
||||
| EU868 | 863~870 | Wireless Tracker-HF |
|
||||
| US915 | 902~928 | Wireless Tracker-HF |
|
||||
| AU915 | 915~928 | Wireless Tracker-HF |
|
||||
| KR920 | 920~923 | Wireless Tracker-HF |
|
||||
| AS923 | 920~925 | Wireless Tracker-HF |
|
||||
|
||||
## Page 14
|
||||
|
||||
## 3.6 GNSS Characteristics
|
||||
|
||||
### 3.6.1 Basic information
|
||||
Table3-6-1: Basic information
|
||||
| Parameter | Value |
|
||||
|-----------|-------|
|
||||
| Channel | 96 |
|
||||
| Update frequency | Max 10 Hz |
|
||||
| Data format | NMEA-0183, Unicore, RTCM 3.x |
|
||||
| Frequency point | BDS: B2a, GPS: L1+L5, GLONASS: G1, Galileo: E1+E5a, QZSS: L1+L5, SBAS: L1, NAVIC: L5*(Specific firmware) |
|
||||
|
||||
### 3.6.2 Accuracy and TTFF
|
||||
Table3-6-2: Accuracy and TTFF
|
||||
| Parameter | Value |
|
||||
|-----------|-------|
|
||||
| Horizontal position accuracy(RMS) | 1.5m |
|
||||
| Vertical position accuracy(RMS) | 2.5m |
|
||||
| Time accuracy(RMS) | 5ns |
|
||||
| Speed accuracy | 0.02m/s³ |
|
||||
| Cold boot | <26s |
|
||||
| Warm boot | <2s |
|
||||
| Recapture | 1s |
|
||||
|
||||
³ -33 mps linear uniform motion scene under the simulator
|
||||
|
||||
### 3.6.3 Sensitivity (Unit: dBm)
|
||||
Table3-6-3: Sensitivity
|
||||
|
||||
| Sensitivity | GNSS | BDS | GPS | GAL | GLONASS |
|
||||
|-------------|------|-----|-----|-----|---------|
|
||||
| Cold boot | -148 | -146 | -148 | -144 | -144 |
|
||||
| Warm boot | -156 | -155 | -155 | -154 | -148 |
|
||||
| Trace | -165 | -163 | -165 | -163 | -158 |
|
||||
| Recapture | -156 | -154 | -156 | -154 | -152 |
|
||||
|
||||
## Page 16
|
||||
|
||||
# 4. Physical dimensions
|
||||
|
||||

|
||||
|
||||
# 5. Resource
|
||||
|
||||
## 5.1 Relevant Resource
|
||||
- Heltec ESP (ESP32 & ESP8266) framework (Already included Heltec ESP32 LoRaWAN library)
|
||||
- Heltec LoRaWAN test server based on SnapEmu
|
||||
- User Manual Document
|
||||
|
||||
## 5.2 Contact Information
|
||||
Heltec Automation Technology Co., Ltd
|
||||
Chengdu, Sichuan, China
|
||||
Email: support@heltec.cn
|
||||
Phone: +86-028-62374838
|
||||
https://heltec.org
|
||||
294
docs/examples/heart-rate-monitor.md
Normal file
@ -0,0 +1,294 @@
|
||||
# Monitor Heart Rate on SnapEmu with Wireless Tracker
|
||||
|
||||
## Overview
|
||||
|
||||
This project enables real-time heart rate monitoring using a wireless tracker connected to a heart rate sensor. Data transmits via LoRaWAN protocol to the SnapEmu platform for visualization and analysis.
|
||||
|
||||
## Hardware Components Required
|
||||
|
||||
| Component | Purpose |
|
||||
|-----------|---------|
|
||||
| Heltec Wireless Tracker | Main controller + LoRa TX |
|
||||
| HT-M7603 Indoor LoRa Gateway | LoRaWAN network gateway |
|
||||
| MAX30102 Heart Rate Sensor | Pulse oximetry sensor |
|
||||
| DuPont Wires | Connections |
|
||||
|
||||
## Hardware Configuration
|
||||
|
||||
### Pin Connections
|
||||
|
||||
The MAX30102 sensor connects to the Heltec Wireless Tracker using I2C:
|
||||
|
||||
| MAX30102 Pin | Wireless Tracker Pin | Description |
|
||||
|--------------|---------------------|-------------|
|
||||
| VCC | 3V3 | Power (3.3V) |
|
||||
| GND | GND | Ground |
|
||||
| SDA | GPIO45 | I2C Data |
|
||||
| SCL | GPIO46 | I2C Clock |
|
||||
|
||||
> **Note:** GPIO45 and GPIO46 are recommended as they don't have conflicting built-in functions.
|
||||
|
||||
## Software Setup
|
||||
|
||||
### Step 1: Configure HT-M7603 Gateway
|
||||
|
||||
Configure your LoRa gateway connection to SnapEmu platform:
|
||||
- Follow [official Heltec documentation](https://docs.heltec.cn/en/gateway/ht-m7603/connect_to_snapemu.html)
|
||||
|
||||
### Step 2: Register Tracker Node
|
||||
|
||||
Register your wireless tracker device on SnapEmu:
|
||||
- Follow [node device connection guidelines](https://snapemudoc.readthedocs.io/en/latest/Node%20Devices%20Connection/register_on_snapemu.html)
|
||||
|
||||
### Step 3: Install Libraries
|
||||
|
||||
Required Arduino libraries:
|
||||
- `Wire.h` (built-in)
|
||||
- `MAX30102_PulseOximeter.h`
|
||||
- `LoRaWan_APP.h` (Heltec library)
|
||||
|
||||
### Step 4: Sensor Test Code
|
||||
|
||||
First, test the sensor standalone:
|
||||
|
||||
```cpp
|
||||
#include <Wire.h>
|
||||
#include "MAX30102_PulseOximeter.h"
|
||||
|
||||
#define REPORTING_PERIOD_MS 1000
|
||||
PulseOximeter pox;
|
||||
uint32_t tsLastReport = 0;
|
||||
|
||||
void onBeatDetected() {
|
||||
Serial.println("Beat detected!");
|
||||
}
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
Wire.begin(45, 46); // SDA=GPIO45, SCL=GPIO46
|
||||
Serial.print("Initializing MAX30102..");
|
||||
delay(3000);
|
||||
|
||||
if (!pox.begin()) {
|
||||
Serial.println("FAILED");
|
||||
for(;;);
|
||||
} else {
|
||||
Serial.println("SUCCESS");
|
||||
}
|
||||
|
||||
pox.setIRLedCurrent(MAX30102_LED_CURR_7_6MA);
|
||||
pox.setOnBeatDetectedCallback(onBeatDetected);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
pox.update();
|
||||
|
||||
if (millis() - tsLastReport > REPORTING_PERIOD_MS) {
|
||||
float heartRate = pox.getHeartRate();
|
||||
float spo2 = pox.getSpO2();
|
||||
|
||||
if (heartRate > 0) {
|
||||
Serial.print("Heart rate: ");
|
||||
Serial.print(heartRate);
|
||||
Serial.print(" bpm / ");
|
||||
} else {
|
||||
Serial.print("Heart rate: N/A / ");
|
||||
}
|
||||
|
||||
if (spo2 > 0) {
|
||||
Serial.print("SpO2: ");
|
||||
Serial.print(spo2);
|
||||
Serial.println(" %");
|
||||
} else {
|
||||
Serial.println("SpO2: N/A");
|
||||
}
|
||||
|
||||
tsLastReport = millis();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Step 5: Full LoRaWAN Code
|
||||
|
||||
Complete code with LoRaWAN transmission:
|
||||
|
||||
```cpp
|
||||
#include <Wire.h>
|
||||
#include "MAX30102_PulseOximeter.h"
|
||||
#include "LoRaWan_APP.h"
|
||||
|
||||
#define REPORTING_PERIOD_MS 1000
|
||||
|
||||
// OTAA Parameters - Replace with your values from SnapEmu
|
||||
uint8_t devEui[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA8 };
|
||||
uint8_t appEui[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
uint8_t appKey[] = { 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
|
||||
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88 };
|
||||
|
||||
// LoRaWAN Configuration
|
||||
uint16_t userChannelsMask[6] = { 0x00FF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 };
|
||||
LoRaMacRegion_t loraWanRegion = ACTIVE_REGION;
|
||||
DeviceClass_t loraWanClass = CLASS_A;
|
||||
uint32_t appTxDutyCycle = 15000; // 15 second transmit interval
|
||||
bool overTheAirActivation = true;
|
||||
bool loraWanAdr = true;
|
||||
bool isTxConfirmed = true;
|
||||
uint8_t appPort = 2;
|
||||
uint8_t confirmedNbTrials = 4;
|
||||
|
||||
PulseOximeter pox;
|
||||
uint32_t tsLastReport = 0;
|
||||
|
||||
static void prepareTxFrame(uint8_t port) {
|
||||
pox.update();
|
||||
float heartRate = pox.getHeartRate();
|
||||
float spo2 = pox.getSpO2();
|
||||
unsigned char *puc;
|
||||
|
||||
appDataSize = 0;
|
||||
|
||||
// Packet header
|
||||
appData[appDataSize++] = 0x04;
|
||||
appData[appDataSize++] = 0x00;
|
||||
appData[appDataSize++] = 0x0A;
|
||||
appData[appDataSize++] = 0x02;
|
||||
|
||||
// Heart rate (4 bytes float)
|
||||
puc = (unsigned char *)(&heartRate);
|
||||
appData[appDataSize++] = puc[0];
|
||||
appData[appDataSize++] = puc[1];
|
||||
appData[appDataSize++] = puc[2];
|
||||
appData[appDataSize++] = puc[3];
|
||||
|
||||
// Separator
|
||||
appData[appDataSize++] = 0x12;
|
||||
|
||||
// SpO2 (4 bytes float)
|
||||
puc = (unsigned char *)(&spo2);
|
||||
appData[appDataSize++] = puc[0];
|
||||
appData[appDataSize++] = puc[1];
|
||||
appData[appDataSize++] = puc[2];
|
||||
appData[appDataSize++] = puc[3];
|
||||
|
||||
Serial.print("TX: HR=");
|
||||
Serial.print(heartRate);
|
||||
Serial.print(" SpO2=");
|
||||
Serial.println(spo2);
|
||||
}
|
||||
|
||||
void onBeatDetected() {
|
||||
Serial.println("♥ Beat!");
|
||||
}
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
Wire.begin(45, 46);
|
||||
Mcu.begin(HELTEC_BOARD, SLOW_CLK_TPYE);
|
||||
|
||||
Serial.print("Initializing MAX30102..");
|
||||
delay(3000);
|
||||
|
||||
if (!pox.begin()) {
|
||||
Serial.println("FAILED");
|
||||
for(;;);
|
||||
}
|
||||
Serial.println("SUCCESS");
|
||||
|
||||
pox.setIRLedCurrent(MAX30102_LED_CURR_27_1MA);
|
||||
pox.setOnBeatDetectedCallback(onBeatDetected);
|
||||
|
||||
LoRaWAN.init(loraWanClass, loraWanRegion);
|
||||
LoRaWAN.setDefaultDR(3);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
pox.update();
|
||||
|
||||
// Local display
|
||||
if (millis() - tsLastReport > REPORTING_PERIOD_MS) {
|
||||
float heartRate = pox.getHeartRate();
|
||||
float spo2 = pox.getSpO2();
|
||||
|
||||
Serial.print("HR: ");
|
||||
Serial.print(heartRate > 0 ? String(heartRate) : "N/A");
|
||||
Serial.print(" bpm | SpO2: ");
|
||||
Serial.print(spo2 > 0 ? String(spo2) : "N/A");
|
||||
Serial.println("%");
|
||||
|
||||
tsLastReport = millis();
|
||||
}
|
||||
|
||||
// LoRaWAN state machine
|
||||
switch (deviceState) {
|
||||
case DEVICE_STATE_INIT:
|
||||
case DEVICE_STATE_JOIN:
|
||||
LoRaWAN.join();
|
||||
break;
|
||||
case DEVICE_STATE_SEND:
|
||||
prepareTxFrame(appPort);
|
||||
LoRaWAN.send();
|
||||
deviceState = DEVICE_STATE_CYCLE;
|
||||
break;
|
||||
case DEVICE_STATE_CYCLE:
|
||||
txDutyCycleTime = appTxDutyCycle + randr(-APP_TX_DUTYCYCLE_RND, APP_TX_DUTYCYCLE_RND);
|
||||
LoRaWAN.cycle(txDutyCycleTime);
|
||||
deviceState = DEVICE_STATE_SLEEP;
|
||||
break;
|
||||
case DEVICE_STATE_SLEEP:
|
||||
LoRaWAN.sleep(loraWanClass);
|
||||
break;
|
||||
default:
|
||||
deviceState = DEVICE_STATE_INIT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Data Decoding on SnapEmu
|
||||
|
||||
Custom decoder function for the payload format:
|
||||
|
||||
```javascript
|
||||
function Decoder(bytes, port) {
|
||||
var decoded = {};
|
||||
|
||||
if (bytes.length >= 13) {
|
||||
// Extract heart rate (bytes 4-7)
|
||||
var hrBytes = new Uint8Array([bytes[4], bytes[5], bytes[6], bytes[7]]);
|
||||
var hrView = new DataView(hrBytes.buffer);
|
||||
decoded.heartRate = hrView.getFloat32(0, true);
|
||||
|
||||
// Extract SpO2 (bytes 9-12)
|
||||
var spo2Bytes = new Uint8Array([bytes[9], bytes[10], bytes[11], bytes[12]]);
|
||||
var spo2View = new DataView(spo2Bytes.buffer);
|
||||
decoded.spo2 = spo2View.getFloat32(0, true);
|
||||
}
|
||||
|
||||
return decoded;
|
||||
}
|
||||
```
|
||||
|
||||
## Platform Visualization
|
||||
|
||||
SnapEmu displays:
|
||||
- Real-time heart rate graph
|
||||
- SpO2 level monitoring
|
||||
- Historical data (up to 1 month)
|
||||
- Mobile app + web interface
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
| Issue | Solution |
|
||||
|-------|----------|
|
||||
| No heartbeat detected | Ensure finger is properly placed, adjust LED current |
|
||||
| Erratic readings | Clean sensor, reduce movement, check power supply |
|
||||
| LoRa join failed | Verify gateway connection, check credentials |
|
||||
| Data not showing on platform | Check decoder function, verify port number |
|
||||
|
||||
## References
|
||||
|
||||
- [SnapEmu Documentation](https://snapemudoc.readthedocs.io/)
|
||||
- [Heltec Sensor Decoding](https://docs.heltec.cn/general/define_sensor_decoding_function_on_snapemu.html)
|
||||
- Original project by ashley15 on Hackster.io
|
||||
|
||||
**License:** GPL3+
|
||||
107
docs/examples/meshtastic-low-power.md
Normal file
@ -0,0 +1,107 @@
|
||||
# Heltec Tracker Meshtastic Low Power Setting Tutorial
|
||||
|
||||
## Overview
|
||||
|
||||
This project demonstrates how to configure a Heltec Wireless Tracker with Meshtastic to achieve extended battery life through low-power mode settings. The device integrates ESP32-S3FN8, SX1262 LoRa module, and UC6580 GNSS for IoT tracking applications.
|
||||
|
||||
## Hardware Requirements
|
||||
|
||||
- Heltec Wireless Tracker development kit
|
||||
- 1000mAh lithium battery (fully charged)
|
||||
- LoRa adapter antenna
|
||||
- Latest Meshtastic firmware version
|
||||
|
||||
## Configuration Steps
|
||||
|
||||
### Device Role Setup
|
||||
|
||||
Set the device operating mode:
|
||||
- **Role**: TRACKER
|
||||
|
||||
### Position Configuration
|
||||
|
||||
Adjust location broadcasting parameters:
|
||||
|
||||
| Parameter | Value | Description |
|
||||
|-----------|-------|-------------|
|
||||
| Position broadcast interval | 900 seconds | How often to broadcast location |
|
||||
| Smart broadcast min distance | 10 meters | Minimum movement to trigger broadcast |
|
||||
| Smart broadcast min interval | 900 seconds | Minimum time between broadcasts |
|
||||
| GPS update interval | 30 seconds | How often to poll GPS |
|
||||
| GPS_RX_PIN | 33 | GNSS receive pin |
|
||||
| GPS_TX_PIN | 34 | GNSS transmit pin |
|
||||
| PIN_GPS_EN | 3 | GNSS power enable (V1.1) |
|
||||
|
||||
### Power Management Configuration
|
||||
|
||||
Enable sleep modes for power conservation:
|
||||
|
||||
| Parameter | Value | Description |
|
||||
|-----------|-------|-------------|
|
||||
| Wait for Bluetooth | 0 | Don't wait for BT connection |
|
||||
| Super deep sleep duration | 1800 seconds | Deep sleep period |
|
||||
| Light sleep duration | 900 seconds | Light sleep period |
|
||||
| Minimum wake time | 30 seconds | Minimum active time |
|
||||
|
||||
## Meshtastic App Configuration
|
||||
|
||||
Using the Meshtastic mobile app:
|
||||
|
||||
1. Connect to device via Bluetooth
|
||||
2. Navigate to **Settings** → **Device Config**
|
||||
3. Set Role to **TRACKER**
|
||||
4. Navigate to **Position Config**
|
||||
5. Apply the position parameters above
|
||||
6. Navigate to **Power Config**
|
||||
7. Apply the power parameters above
|
||||
8. Save and reboot device
|
||||
|
||||
## Results
|
||||
|
||||
Successfully configured devices achieve dramatically reduced power consumption:
|
||||
|
||||
| Metric | Value |
|
||||
|--------|-------|
|
||||
| **Idle current draw** | 13 microamps |
|
||||
| **Active operation** | ~1% battery per hour |
|
||||
| **Expected runtime (1000mAh)** | ~100 hours active |
|
||||
|
||||
## Power Consumption Breakdown
|
||||
|
||||
| Mode | Current Draw |
|
||||
|------|--------------|
|
||||
| Deep Sleep | 13 µA |
|
||||
| Light Sleep | ~1 mA |
|
||||
| GPS Active | ~89 mA |
|
||||
| LoRa TX | ~178 mA |
|
||||
| LoRa RX | ~59 mA |
|
||||
|
||||
## Tips for Maximum Battery Life
|
||||
|
||||
1. **Use larger battery**: 2000-3000mAh recommended for multi-day operation
|
||||
2. **Optimize broadcast interval**: Increase if tracking precision isn't critical
|
||||
3. **Use external antenna**: Better signal = faster TX, less power
|
||||
4. **Disable WiFi**: If not needed for configuration
|
||||
5. **Reduce GPS polling**: 60-120 second intervals for stationary tracking
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Device won't enter deep sleep
|
||||
- Ensure Bluetooth timeout is set to 0
|
||||
- Check that no active mesh traffic is preventing sleep
|
||||
- Verify firmware version supports deep sleep
|
||||
|
||||
### GPS not getting fix
|
||||
- Ensure GPIO3 is HIGH (V1.1 hardware)
|
||||
- Check antenna connection
|
||||
- Allow 30-60 seconds for cold start fix
|
||||
|
||||
### Battery draining fast
|
||||
- Check if device is stuck in active mode
|
||||
- Verify sleep settings were saved
|
||||
- Monitor serial output for wake events
|
||||
|
||||
## Source
|
||||
|
||||
Original project by ashley15 on Hackster.io
|
||||
License: Open source
|
||||
BIN
docs/gnss-protocol/images/gnss-protocol_page_1_img_1.png
Normal file
|
After Width: | Height: | Size: 674 B |
BIN
docs/gnss-protocol/images/gnss-protocol_page_1_img_2.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
3190
docs/gnss-protocol/markdown/gnss-protocol.md
Normal file
BIN
docs/images/2.png
Normal file
|
After Width: | Height: | Size: 321 KiB |
BIN
docs/images/Tracker-121.webp
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
docs/images/pinout-diagram.png
Normal file
|
After Width: | Height: | Size: 565 KiB |
BIN
docs/images/structure-chart.png
Normal file
|
After Width: | Height: | Size: 332 KiB |
BIN
docs/images/tracker-1.png
Normal file
|
After Width: | Height: | Size: 269 KiB |
BIN
docs/images/tracker-3.png
Normal file
|
After Width: | Height: | Size: 249 KiB |
BIN
docs/images/wireless-tracker-pin-map.png
Normal file
|
After Width: | Height: | Size: 396 KiB |
BIN
docs/pdfs/gnss-protocol.pdf
Normal file
BIN
docs/pdfs/schematic.pdf
Normal file
BIN
docs/pdfs/wireless-tracker-datasheet.pdf
Normal file
BIN
docs/schematic/images/schematic_page_1_img_1.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
166
docs/schematic/markdown/schematic.md
Normal file
@ -0,0 +1,166 @@
|
||||
# HTIT-Tracker V0.5 Schematic
|
||||
|
||||
## Document Metadata
|
||||
- **Format:** PDF 1.4
|
||||
- **Title:** New Output
|
||||
- **Keywords:** Altium
|
||||
- **Creator:** Altium Designer
|
||||
- **Producer:** llPDFLib 3.x
|
||||
- **Creation Date:** 2023-07-31
|
||||
|
||||
---
|
||||
|
||||
## Schematic Components
|
||||
|
||||
This is the full schematic for the Heltec Wireless Tracker V0.5, designed in Altium Designer.
|
||||
|
||||
### Power Management
|
||||
|
||||
| Component | Value/Part | Function |
|
||||
|-----------|-----------|----------|
|
||||
| F1 | 6V 500mA | Fuse |
|
||||
| D1 | RSB6.8S | TVS Diode |
|
||||
| D2 | 1N5819 | Schottky Diode |
|
||||
| Q1 | AO3401 | P-channel MOSFET |
|
||||
| U2 | TP4054 | LiPo Charger IC |
|
||||
| U4 | CE6260B33M | 3.3V LDO |
|
||||
| U6 | CE6260B33M | 3.3V LDO (Vext) |
|
||||
| R16 | 2K/5% | Charge current set |
|
||||
|
||||
### ESP32-S3FN8 Main MCU (U7)
|
||||
|
||||
**Crystal:**
|
||||
| Component | Value |
|
||||
|-----------|-------|
|
||||
| U5 | 40MHz Crystal |
|
||||
| C19, C20 | 22pF/10V |
|
||||
| X1 | 32.768KHz (RTC) |
|
||||
| C8, C22 | 4.7pF/10V |
|
||||
|
||||
**Key GPIO Connections:**
|
||||
- GPIO0: USER_Key
|
||||
- GPIO1: Vbat_Read (via ADC)
|
||||
- GPIO2: ADC_Ctrl
|
||||
- GPIO3: Vext_Ctrl
|
||||
- GPIO8: LoRa_NSS
|
||||
- GPIO9: LoRa_SCK
|
||||
- GPIO10: LoRa_MOSI
|
||||
- GPIO11: LoRa_MISO
|
||||
- GPIO12: LoRa_RST
|
||||
- GPIO13: LoRa_BUSY
|
||||
- GPIO14: DIO1
|
||||
- GPIO18: LED Write Ctrl
|
||||
- GPIO19/20: USB_D-/USB_D+
|
||||
- GPIO21: LED_K (TFT backlight)
|
||||
- GPIO33: GNSS_TX
|
||||
- GPIO34: GNSS_RX
|
||||
- GPIO35: GNSS_RST
|
||||
- GPIO36: GNSS_PPS
|
||||
- GPIO38-42: TFT Display (CS, RES, RS, SCLK, SDIN)
|
||||
- GPIO47: BOOT_MODE
|
||||
- GPIO48: D_SEL
|
||||
|
||||
### SX1262 LoRa Module (U12)
|
||||
|
||||
| Component | Value | Function |
|
||||
|-----------|-------|----------|
|
||||
| L1 | 2.7nH | RF matching |
|
||||
| L2 | 24nH | RF filter |
|
||||
| L3 | 2.0nH | RF matching |
|
||||
| C12, C15, C18, C25 | 0.1uF | Decoupling |
|
||||
| C13, C14 | 1.8pF | RF matching |
|
||||
| U11 | UPG2179 | RF Switch |
|
||||
| X4 | 32MHz | TCXO |
|
||||
| E4 | IPEX | LoRa Antenna |
|
||||
|
||||
### UC6580 GNSS Module (U9)
|
||||
|
||||
| Component | Value | Function |
|
||||
|-----------|-------|----------|
|
||||
| X2 | 26MHz | TCXO |
|
||||
| X3 | 32.768KHz | RTC Crystal |
|
||||
| C34, C41 | 4.7pF | Crystal load |
|
||||
| R27 | 10K/5% | Reset pullup |
|
||||
| U8 | HDDL1L5RSS-B8 | L1/L5 LNA |
|
||||
| U10 | SW7125DE | RF Amplifier |
|
||||
| E3 | IPEX | GNSS Antenna |
|
||||
|
||||
**RF Frontend:**
|
||||
| Component | Value |
|
||||
|-----------|-------|
|
||||
| L4 | 68nH |
|
||||
| L5 | 1nH |
|
||||
| L6 | 2.2nH |
|
||||
| L7 | 18nH |
|
||||
| L8 | 0R/5% |
|
||||
| L9 | 6.8nH |
|
||||
| L10 | 7nH |
|
||||
| L11 | 4.5nH |
|
||||
| EL2 | 1uH (inductor) |
|
||||
|
||||
### TFT Display (U1 - 0.96" OLED)
|
||||
|
||||
| Pin | Signal |
|
||||
|-----|--------|
|
||||
| SDIN | GPIO42 |
|
||||
| SCLK | GPIO41 |
|
||||
| RS | GPIO40 |
|
||||
| RES | GPIO39 |
|
||||
| CS | GPIO38 |
|
||||
| LED_K | GPIO21 (via Q4) |
|
||||
|
||||
### USB Type-C (U3)
|
||||
|
||||
| Pin | Signal |
|
||||
|-----|--------|
|
||||
| VBUS | VDD_5V |
|
||||
| DN1/DN2 | USB_N |
|
||||
| DP1/DP2 | USB_P |
|
||||
| CC1 | R3 (5.1K to GND) |
|
||||
| CC2 | R6 (5.1K to GND) |
|
||||
|
||||
### Battery Management
|
||||
|
||||
| Component | Value | Function |
|
||||
|-----------|-------|----------|
|
||||
| JP3 | 1.25X2P-LiPo | Battery connector |
|
||||
| C1 | 10uF/10V | Input cap |
|
||||
| C2 | 220nF/10V | Charge cap |
|
||||
| R13 | 390K/1% | Voltage divider |
|
||||
| R14 | 100K/1% | Voltage divider |
|
||||
| Q2 | AO3401 | Power switch |
|
||||
| Q3 | S9013 | ADC control |
|
||||
|
||||
### LEDs
|
||||
|
||||
| LED | Color | Resistor | Function |
|
||||
|-----|-------|----------|----------|
|
||||
| LED1 | Orange | R7 (330R) | Charging indicator |
|
||||
| LED2 | White | R10 (330R) | User LED |
|
||||
|
||||
### Buttons
|
||||
|
||||
| Button | Function |
|
||||
|--------|----------|
|
||||
| S1 | RESET_SW |
|
||||
| S2 | USER_SW (GPIO0) |
|
||||
|
||||
---
|
||||
|
||||
## Pin Headers
|
||||
|
||||
### Header P2 (8-pin)
|
||||
Power and ground pins
|
||||
|
||||
### Header P3 (8-pin)
|
||||
Additional GPIO
|
||||
|
||||
### Header P4 (16-pin)
|
||||
Main GPIO header J2
|
||||
|
||||
### Header P5 (16-pin)
|
||||
Main GPIO header J3
|
||||
|
||||
---
|
||||
|
||||

|
||||
101
docs/wiki/development-platforms.md
Normal file
@ -0,0 +1,101 @@
|
||||
# ESP32 Development Platforms Overview
|
||||
|
||||
## Summary
|
||||
|
||||
Three primary development approaches for ESP32 microcontrollers, each suited to different development goals:
|
||||
|
||||
---
|
||||
|
||||
## ESP-IDF
|
||||
|
||||
**Best for:** Production-ready applications, low-level control
|
||||
|
||||
The official and most comprehensive framework for low-level control and production-ready applications. This platform provides extensive control capabilities for developers building robust, production-level systems.
|
||||
|
||||
### Pros:
|
||||
- Full access to ESP32 features
|
||||
- Official Espressif support
|
||||
- Best performance optimization
|
||||
- Production-ready tooling
|
||||
|
||||
### Cons:
|
||||
- Steeper learning curve
|
||||
- More verbose code
|
||||
- Longer development time
|
||||
|
||||
---
|
||||
|
||||
## MicroPython
|
||||
|
||||
**Best for:** Rapid prototyping, interactive development
|
||||
|
||||
Enables rapid prototyping through an interactive scripting runtime. This approach favors quick iteration and experimentation over embedded systems projects.
|
||||
|
||||
### Pros:
|
||||
- Fast prototyping
|
||||
- Interactive REPL
|
||||
- Easy to learn
|
||||
- Great for education
|
||||
|
||||
### Cons:
|
||||
- Slower execution
|
||||
- Higher memory usage
|
||||
- Limited hardware access
|
||||
|
||||
---
|
||||
|
||||
## Arduino via PlatformIO
|
||||
|
||||
**Best for:** Library ecosystem, familiar workflow
|
||||
|
||||
Offers a simplified development model with access to a rich ecosystem of libraries and tools. This combines the familiar Arduino framework with PlatformIO's professional development environment.
|
||||
|
||||
### Pros:
|
||||
- Huge library ecosystem
|
||||
- Familiar Arduino syntax
|
||||
- Good documentation
|
||||
- Active community
|
||||
|
||||
### Cons:
|
||||
- Abstraction overhead
|
||||
- May hide hardware details
|
||||
|
||||
---
|
||||
|
||||
## Heltec Wireless Tracker Recommendations
|
||||
|
||||
For the Wireless Tracker specifically:
|
||||
|
||||
| Use Case | Recommended Platform |
|
||||
|----------|---------------------|
|
||||
| Meshtastic | Pre-built firmware |
|
||||
| LoRaWAN Projects | Arduino/PlatformIO |
|
||||
| GNSS Development | ESP-IDF or Arduino |
|
||||
| Quick Prototyping | MicroPython |
|
||||
| Production Devices | ESP-IDF |
|
||||
|
||||
### Heltec Library Support
|
||||
|
||||
Heltec provides official libraries for:
|
||||
- **Arduino**: `Heltec ESP32 Dev-Boards` library
|
||||
- **PlatformIO**: `heltec-automation/Heltec ESP32 Dev-Boards`
|
||||
- **ESP-IDF**: Examples in Heltec GitHub repository
|
||||
|
||||
---
|
||||
|
||||
## Quick Start Commands
|
||||
|
||||
### PlatformIO
|
||||
```ini
|
||||
[env:heltec_wireless_tracker]
|
||||
platform = espressif32
|
||||
board = heltec_wireless_tracker
|
||||
framework = arduino
|
||||
lib_deps =
|
||||
heltec-automation/Heltec ESP32 Dev-Boards
|
||||
```
|
||||
|
||||
### Arduino IDE
|
||||
1. Add board URL: `https://resource.heltec.cn/download/package_heltec_esp32_index.json`
|
||||
2. Install "Heltec ESP32 Series Dev-boards"
|
||||
3. Select "Wireless Tracker" from board menu
|
||||
47
docs/wiki/faq.md
Normal file
@ -0,0 +1,47 @@
|
||||
# Wireless Tracker Frequently Asked Questions
|
||||
|
||||
## Q: How do I access boot mode manually if I'm unable to upload code?
|
||||
|
||||
**A:** The Wireless Tracker uses ESP32S3's internal USB, which may fail to enter bootloader in low-power mode or when certain pins are occupied. To manually enter boot mode:
|
||||
|
||||
- **Device not connected:** Press the `USER` button before plugging into a USB port
|
||||
- **Device already connected:** Hold `USER` button → Press `RESET` → Release `RESET` → Release `USER` button
|
||||
|
||||
Timing requirement: TRST ≥ 10 ms
|
||||
|
||||
---
|
||||
|
||||
## Q: Why isn't Meshtastic firmware working properly on V1.1 hardware?
|
||||
|
||||
**A:** The V1.1 hardware changed the GNSS chip power supply control pin to GPIO3, causing compatibility issues with official Meshtastic firmware.
|
||||
|
||||
**Solution:** Download the temporary firmware package from Heltec's resources and flash using the CLI command: `device-install.bat -f firmware.factory.bin`
|
||||
|
||||
*Note: This was resolved in Meshtastic 2.2.17 Beta, which auto-detects device version.*
|
||||
|
||||
---
|
||||
|
||||
## Q: Why is my screen not displaying?
|
||||
|
||||
**A:** Two common causes:
|
||||
|
||||
1. When running LoRa/LoRaWAN sample code: Check the serial port and press RST. Verify device activation via the licensing documentation.
|
||||
|
||||
2. When running Meshtastic: Confirm you've downloaded the correct firmware version for your device.
|
||||
|
||||
---
|
||||
|
||||
## Q: What are the key GPIO differences between V1.0 and V1.1?
|
||||
|
||||
**A:** The main change in V1.1:
|
||||
- **GPIO3** now controls GNSS power (set HIGH to enable)
|
||||
- Added dedicated LDO for UC6580 GNSS module
|
||||
- Improved power isolation between LoRa and GNSS subsystems
|
||||
|
||||
---
|
||||
|
||||
## Q: How do I check which hardware version I have?
|
||||
|
||||
**A:** Look for the version marking on the PCB near the USB connector, or check:
|
||||
- V1.0: GNSS power tied to main rail
|
||||
- V1.1: GNSS has independent power control via GPIO3
|
||||
50
docs/wiki/hardware-update-log.md
Normal file
@ -0,0 +1,50 @@
|
||||
# Wireless Tracker Hardware Update Log
|
||||
|
||||
## V1.0
|
||||
**Release Date:** June 30, 2023
|
||||
|
||||
- First release
|
||||
- Initial public sale
|
||||
- [Schematic diagram](https://resource.heltec.cn/download/Wireless_Tracker/Wireless_Tacker1.0/HTIT-Tracker_V0.3.pdf)
|
||||
- [Datasheet](https://resource.heltec.cn/download/Wireless_Tracker/Wireless%20tracke.pdf)
|
||||
|
||||
---
|
||||
|
||||
## V1.1
|
||||
**Release Date:** Late 2023
|
||||
|
||||
### Changes:
|
||||
- **Fixed:** Power loss issue affecting the GNSS module during LoRa operation
|
||||
- **Enhanced:** Low-power functionality
|
||||
- **Added:** Additional LDO to supply power to the UC6580 GNSS module independently
|
||||
- **Changed:** GNSS control pin removed; GPIO 3 set to `HIGH` enables GNSS power
|
||||
|
||||
### Key Differences from V1.0:
|
||||
|
||||
| Feature | V1.0 | V1.1 |
|
||||
|---------|------|------|
|
||||
| GNSS Power | Shared rail | Dedicated LDO |
|
||||
| GNSS Control | N/A | GPIO3 |
|
||||
| Power Isolation | Limited | Improved |
|
||||
| Low Power Mode | Basic | Enhanced |
|
||||
|
||||
### Documentation:
|
||||
- [Schematic diagram](https://resource.heltec.cn/download/Wireless_Tracker/Wireless_Tacker1.1)
|
||||
- [Datasheet](https://resource.heltec.cn/download/Wireless_Tracker/Wireless%20Tracker%201.1.pdf)
|
||||
|
||||
---
|
||||
|
||||
## Hardware Version Detection
|
||||
|
||||
To determine your hardware version programmatically:
|
||||
|
||||
```cpp
|
||||
// V1.1 requires GPIO3 HIGH to enable GNSS
|
||||
#define GNSS_CTRL_PIN 3
|
||||
|
||||
void setup() {
|
||||
// For V1.1 hardware - enable GNSS power
|
||||
pinMode(GNSS_CTRL_PIN, OUTPUT);
|
||||
digitalWrite(GNSS_CTRL_PIN, HIGH);
|
||||
}
|
||||
```
|
||||
31
docs/wiki/product-info.md
Normal file
@ -0,0 +1,31 @@
|
||||
# Wireless Tracker Product Summary
|
||||
|
||||
## Overview
|
||||
The Wireless Tracker is an IoT development kit combining ESP32-S3FN8 with dual wireless and positioning capabilities. It integrates LoRa, GPS, and multi-system GNSS functionality for tracking applications.
|
||||
|
||||
## Key Components
|
||||
- **Main Processor:** ESP32-S3FN8 (dual-core Xtensa 32-bit)
|
||||
- **LoRa Module:** SX1262
|
||||
- **GNSS Chip:** UC6580 (supports GPS, GLONASS, BDS, Galileo, NAVIC, QZSS)
|
||||
- **Display:** 0.96-inch 160×80 TFT LCD
|
||||
- **Connectivity:** Wi-Fi 802.11 b/g/n, Bluetooth 5 & Mesh, LoRa
|
||||
|
||||
## Core Features
|
||||
- Low power design of dual-frequency multi-system based on 22nm technology
|
||||
- USB Type-C interface with voltage regulation and protection circuits
|
||||
- Integrated lithium battery management with automatic power switching
|
||||
- 2.4GHz metal spring antenna for Wi-Fi/Bluetooth; IPEX connector for LoRa/GNSS
|
||||
- Arduino IDE compatible
|
||||
- Meshtastic and LoRaWAN support
|
||||
|
||||
## Technical Specifications
|
||||
| Parameter | Value |
|
||||
|-----------|-------|
|
||||
| **TX Power** | 21±1 dBm |
|
||||
| **RX Sensitivity** | -134 dBm |
|
||||
| **Operating Temp** | -20°C to 70°C |
|
||||
| **Dimensions** | 65.48 × 28.06 × 13.52 mm |
|
||||
| **Battery** | 3.7V lithium supply/charging |
|
||||
|
||||
## Applications
|
||||
Object tracking, vehicle location, pet/livestock monitoring, bicycle sharing, children tracking, field sensing networks.
|
||||
37
docs/wiki/wireless-tracker-overview.md
Normal file
@ -0,0 +1,37 @@
|
||||
# Wireless Tracker Documentation
|
||||
|
||||
## Overview
|
||||
|
||||
The Wireless Tracker is an ESP32-S3FN8-based development kit combining SX1262 and UC6580 chipsets for "fast GNSS solution for IoT" with multi-connectivity options and precision positioning capabilities.
|
||||
|
||||
## Key Features
|
||||
|
||||
- **Chipset**: ESP32-S3FN8 + SX1262 + UC6580
|
||||
- **Connectivity**: Wi-Fi, LoRa, Bluetooth 5, GNSS
|
||||
- **Positioning**: Multi-system support (GPS, GLONASS, BDS, Galileo, NAVIC, QZSS) with L1/L5/L2 bands
|
||||
- **Display**: 0.96" 160×80 LCD
|
||||
- **Power**: 3.7V lithium battery with charging capability
|
||||
- **Dimensions**: 65.48 × 28.06 × 13.52mm
|
||||
- **Max TX Power**: 21±1dBm
|
||||
|
||||
## Technical Specifications
|
||||
|
||||
| Component | Spec |
|
||||
|-----------|------|
|
||||
| Main Processor | ESP32-S3FN8 |
|
||||
| LoRa Transceiver | SX1262 |
|
||||
| GNSS Module | UC6580 |
|
||||
| Bluetooth | Version 5 |
|
||||
| Antenna | Wi-Fi/BT 2.4GHz onboard; IPEX slots for LoRa/GNSS |
|
||||
|
||||
## Getting Started Resources
|
||||
|
||||
The documentation references guides for:
|
||||
- Development environment setup
|
||||
- LoRaWAN integration
|
||||
- Meshtastic application
|
||||
- License usage
|
||||
|
||||
## Available Documentation
|
||||
|
||||
Complete technical materials including datasheets, schematics, pin maps, and hardware update logs are available through the Heltec resource portal.
|
||||
30
site/.dockerignore
Normal file
@ -0,0 +1,30 @@
|
||||
# Dependencies
|
||||
node_modules/
|
||||
|
||||
# Build output
|
||||
dist/
|
||||
|
||||
# Git
|
||||
.git/
|
||||
.gitignore
|
||||
|
||||
# IDE
|
||||
.vscode/
|
||||
.idea/
|
||||
|
||||
# Logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
|
||||
# OS
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Environment files (use docker-compose env)
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# Dev files
|
||||
*.md
|
||||
!README.md
|
||||
Makefile
|
||||
21
site/.gitignore
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
# build output
|
||||
dist/
|
||||
# generated types
|
||||
.astro/
|
||||
|
||||
# dependencies
|
||||
node_modules/
|
||||
|
||||
# logs
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
pnpm-debug.log*
|
||||
|
||||
|
||||
# environment overrides (keep .env tracked for defaults)
|
||||
.env.local
|
||||
.env.*.local
|
||||
|
||||
# macOS-specific files
|
||||
.DS_Store
|
||||
57
site/Dockerfile
Normal file
@ -0,0 +1,57 @@
|
||||
# Multi-stage build for Heltec Wireless Tracker Documentation
|
||||
# Stage 1: Build the static site
|
||||
FROM node:22-slim AS builder
|
||||
|
||||
# Disable telemetry
|
||||
ENV ASTRO_TELEMETRY_DISABLED=1
|
||||
ENV CI=true
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files
|
||||
COPY package.json package-lock.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm ci
|
||||
|
||||
# Copy source files
|
||||
COPY . .
|
||||
|
||||
# Build the static site
|
||||
RUN npm run build
|
||||
|
||||
# Stage 2: Production server with nginx
|
||||
FROM nginx:alpine-slim AS production
|
||||
|
||||
# Copy nginx config
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Copy built static files
|
||||
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||
|
||||
# Add healthcheck
|
||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||
CMD wget -q --spider http://127.0.0.1:80/ || exit 1
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
# Stage 3: Development server
|
||||
FROM node:22-slim AS development
|
||||
|
||||
# Disable telemetry
|
||||
ENV ASTRO_TELEMETRY_DISABLED=1
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files
|
||||
COPY package.json package-lock.json ./
|
||||
|
||||
# Install dependencies
|
||||
RUN npm ci
|
||||
|
||||
# Copy source files (will be overridden by volume mount in dev)
|
||||
COPY . .
|
||||
|
||||
EXPOSE 4321
|
||||
|
||||
CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]
|
||||
62
site/Makefile
Normal file
@ -0,0 +1,62 @@
|
||||
.PHONY: dev prod build logs stop clean restart shell
|
||||
|
||||
# Default target
|
||||
.DEFAULT_GOAL := dev
|
||||
|
||||
# Development mode with hot reloading
|
||||
dev:
|
||||
@echo "Starting development server..."
|
||||
docker compose --profile dev up -d heltec-docs-dev
|
||||
@echo "Site available at https://$(shell grep DOMAIN .env | cut -d= -f2)"
|
||||
docker compose logs -f heltec-docs-dev
|
||||
|
||||
# Production mode with static build
|
||||
prod:
|
||||
@echo "Building and starting production server..."
|
||||
docker compose --profile prod up -d --build heltec-docs-prod
|
||||
@echo "Site available at https://$(shell grep DOMAIN .env | cut -d= -f2)"
|
||||
docker compose logs -f heltec-docs-prod
|
||||
|
||||
# Build the Docker image
|
||||
build:
|
||||
docker compose build
|
||||
|
||||
# Build production image specifically
|
||||
build-prod:
|
||||
docker compose --profile prod build heltec-docs-prod
|
||||
|
||||
# Show logs
|
||||
logs:
|
||||
docker compose logs -f
|
||||
|
||||
# Stop all containers
|
||||
stop:
|
||||
docker compose --profile dev --profile prod down
|
||||
|
||||
# Stop and remove volumes
|
||||
clean:
|
||||
docker compose --profile dev --profile prod down -v --remove-orphans
|
||||
docker image prune -f
|
||||
|
||||
# Restart containers
|
||||
restart: stop dev
|
||||
|
||||
# Shell into development container
|
||||
shell:
|
||||
docker compose --profile dev exec heltec-docs-dev /bin/sh
|
||||
|
||||
# Check container status
|
||||
status:
|
||||
docker compose ps
|
||||
|
||||
# Local development without Docker (requires Node.js)
|
||||
local:
|
||||
npm run dev
|
||||
|
||||
# Build locally without Docker
|
||||
local-build:
|
||||
npm run build
|
||||
|
||||
# Preview local build
|
||||
local-preview:
|
||||
npm run preview
|
||||
49
site/README.md
Normal file
@ -0,0 +1,49 @@
|
||||
# Starlight Starter Kit: Basics
|
||||
|
||||
[](https://starlight.astro.build)
|
||||
|
||||
```
|
||||
npm create astro@latest -- --template starlight
|
||||
```
|
||||
|
||||
> 🧑🚀 **Seasoned astronaut?** Delete this file. Have fun!
|
||||
|
||||
## 🚀 Project Structure
|
||||
|
||||
Inside of your Astro + Starlight project, you'll see the following folders and files:
|
||||
|
||||
```
|
||||
.
|
||||
├── public/
|
||||
├── src/
|
||||
│ ├── assets/
|
||||
│ ├── content/
|
||||
│ │ └── docs/
|
||||
│ └── content.config.ts
|
||||
├── astro.config.mjs
|
||||
├── package.json
|
||||
└── tsconfig.json
|
||||
```
|
||||
|
||||
Starlight looks for `.md` or `.mdx` files in the `src/content/docs/` directory. Each file is exposed as a route based on its file name.
|
||||
|
||||
Images can be added to `src/assets/` and embedded in Markdown with a relative link.
|
||||
|
||||
Static assets, like favicons, can be placed in the `public/` directory.
|
||||
|
||||
## 🧞 Commands
|
||||
|
||||
All commands are run from the root of the project, from a terminal:
|
||||
|
||||
| Command | Action |
|
||||
| :------------------------ | :----------------------------------------------- |
|
||||
| `npm install` | Installs dependencies |
|
||||
| `npm run dev` | Starts local dev server at `localhost:4321` |
|
||||
| `npm run build` | Build your production site to `./dist/` |
|
||||
| `npm run preview` | Preview your build locally, before deploying |
|
||||
| `npm run astro ...` | Run CLI commands like `astro add`, `astro check` |
|
||||
| `npm run astro -- --help` | Get help using the Astro CLI |
|
||||
|
||||
## 👀 Want to learn more?
|
||||
|
||||
Check out [Starlight’s docs](https://starlight.astro.build/), read [the Astro documentation](https://docs.astro.build), or jump into the [Astro Discord server](https://astro.build/chat).
|
||||
111
site/astro.config.mjs
Normal file
@ -0,0 +1,111 @@
|
||||
// @ts-check
|
||||
import { defineConfig } from 'astro/config';
|
||||
import starlight from '@astrojs/starlight';
|
||||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
site: 'https://heltec-tracker-module.l.zmesh.systems',
|
||||
|
||||
// Disable telemetry
|
||||
telemetry: false,
|
||||
|
||||
// Disable devToolbar
|
||||
devToolbar: { enabled: false },
|
||||
|
||||
integrations: [
|
||||
starlight({
|
||||
title: 'Heltec Wireless Tracker',
|
||||
description: 'Documentation for the Heltec Wireless Tracker ESP32-S3FN8 development kit with LoRa, GNSS, and WiFi',
|
||||
|
||||
logo: {
|
||||
src: './src/assets/tracker-icon.svg',
|
||||
alt: 'Heltec Wireless Tracker',
|
||||
},
|
||||
|
||||
social: [
|
||||
{ icon: 'github', label: 'GitHub', href: 'https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series' },
|
||||
{ icon: 'external', label: 'Heltec Wiki', href: 'https://wiki.heltec.org' },
|
||||
],
|
||||
|
||||
head: [
|
||||
{
|
||||
tag: 'meta',
|
||||
attrs: {
|
||||
name: 'keywords',
|
||||
content: 'ESP32-S3, LoRa, GNSS, GPS, Meshtastic, LoRaWAN, Heltec, Wireless Tracker',
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
sidebar: [
|
||||
{
|
||||
label: 'Getting Started',
|
||||
items: [
|
||||
{ label: 'Overview', slug: 'getting-started/overview' },
|
||||
{ label: 'Hardware Versions', slug: 'getting-started/hardware-versions' },
|
||||
{ label: 'Development Platforms', slug: 'getting-started/development-platforms' },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Hardware',
|
||||
items: [
|
||||
{ label: 'Specifications', slug: 'hardware/specifications' },
|
||||
{ label: 'Pinout', slug: 'hardware/pinout' },
|
||||
{ label: 'Power', slug: 'hardware/power' },
|
||||
{ label: 'Schematic', slug: 'hardware/schematic' },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Guides',
|
||||
items: [
|
||||
{ label: 'Meshtastic Low Power', slug: 'guides/meshtastic-low-power' },
|
||||
{ label: 'Heart Rate Monitor', slug: 'guides/heart-rate-monitor' },
|
||||
{ label: 'LoRaWAN Setup', slug: 'guides/lorawan-setup' },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Reference',
|
||||
items: [
|
||||
{ label: 'GNSS Protocol', slug: 'reference/gnss-protocol' },
|
||||
{ label: 'LoRa Frequencies', slug: 'reference/lora-frequencies' },
|
||||
{ label: 'FAQ', slug: 'reference/faq' },
|
||||
],
|
||||
},
|
||||
{
|
||||
label: 'Resources',
|
||||
items: [
|
||||
{ label: 'Downloads', slug: 'resources/downloads' },
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
// Customize search
|
||||
pagefind: true,
|
||||
|
||||
// Custom CSS
|
||||
customCss: [
|
||||
'./src/styles/custom.css',
|
||||
],
|
||||
|
||||
// Components customization
|
||||
components: {
|
||||
// Override the page title to show hardware version warnings
|
||||
},
|
||||
}),
|
||||
],
|
||||
|
||||
vite: {
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
// Only configure HMR for reverse proxy when explicitly set
|
||||
// Without this, Vite auto-detects localhost settings correctly
|
||||
...(process.env.VITE_HMR_HOST && {
|
||||
hmr: {
|
||||
host: process.env.VITE_HMR_HOST,
|
||||
protocol: 'wss',
|
||||
clientPort: 443,
|
||||
},
|
||||
}),
|
||||
},
|
||||
},
|
||||
});
|
||||
58
site/docker-compose.yml
Normal file
@ -0,0 +1,58 @@
|
||||
services:
|
||||
heltec-docs:
|
||||
build:
|
||||
context: .
|
||||
target: ${MODE:-development}
|
||||
container_name: heltec-tracker-docs
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- ASTRO_TELEMETRY_DISABLED=1
|
||||
- VITE_HMR_HOST=${VITE_HMR_HOST:-}
|
||||
networks:
|
||||
- caddy
|
||||
labels:
|
||||
# Caddy reverse proxy configuration
|
||||
caddy: ${DOMAIN:-heltec-tracker-module.l.zmesh.systems}
|
||||
caddy.reverse_proxy: "{{upstreams ${PORT:-4321}}}"
|
||||
# HMR WebSocket support for dev mode
|
||||
caddy.reverse_proxy.flush_interval: "-1"
|
||||
caddy.reverse_proxy.transport: "http"
|
||||
caddy.reverse_proxy.transport.read_timeout: "0"
|
||||
caddy.reverse_proxy.transport.write_timeout: "0"
|
||||
caddy.reverse_proxy.transport.keepalive: "5m"
|
||||
caddy.reverse_proxy.transport.keepalive_idle_conns: "10"
|
||||
caddy.reverse_proxy.stream_timeout: "24h"
|
||||
caddy.reverse_proxy.stream_close_delay: "5s"
|
||||
|
||||
# Development mode override
|
||||
heltec-docs-dev:
|
||||
extends:
|
||||
service: heltec-docs
|
||||
profiles:
|
||||
- dev
|
||||
build:
|
||||
target: development
|
||||
volumes:
|
||||
- ./src:/app/src:ro
|
||||
- ./public:/app/public:ro
|
||||
- ./astro.config.mjs:/app/astro.config.mjs:ro
|
||||
environment:
|
||||
- ASTRO_TELEMETRY_DISABLED=1
|
||||
- VITE_HMR_HOST=${VITE_HMR_HOST}
|
||||
labels:
|
||||
caddy.reverse_proxy: "{{upstreams 4321}}"
|
||||
|
||||
# Production mode override
|
||||
heltec-docs-prod:
|
||||
extends:
|
||||
service: heltec-docs
|
||||
profiles:
|
||||
- prod
|
||||
build:
|
||||
target: production
|
||||
labels:
|
||||
caddy.reverse_proxy: "{{upstreams 80}}"
|
||||
|
||||
networks:
|
||||
caddy:
|
||||
external: true
|
||||
29
site/nginx.conf
Normal file
@ -0,0 +1,29 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
# Enable gzip compression
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_min_length 1024;
|
||||
gzip_proxied any;
|
||||
gzip_types text/plain text/css text/xml text/javascript application/javascript application/json application/xml application/rss+xml image/svg+xml;
|
||||
|
||||
# Cache static assets
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
# Handle SPA routing - serve index.html for all routes
|
||||
location / {
|
||||
try_files $uri $uri/ $uri.html /index.html;
|
||||
}
|
||||
|
||||
# Security headers
|
||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
}
|
||||
6394
site/package-lock.json
generated
Normal file
17
site/package.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "site",
|
||||
"type": "module",
|
||||
"version": "0.0.1",
|
||||
"scripts": {
|
||||
"dev": "astro dev",
|
||||
"start": "astro dev",
|
||||
"build": "astro build",
|
||||
"preview": "astro preview",
|
||||
"astro": "astro"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/starlight": "^0.37.6",
|
||||
"astro": "^5.6.1",
|
||||
"sharp": "^0.34.2"
|
||||
}
|
||||
}
|
||||
1
site/public/favicon.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill-rule="evenodd" d="M81 36 64 0 47 36l-1 2-9-10a6 6 0 0 0-9 9l10 10h-2L0 64l36 17h2L28 91a6 6 0 1 0 9 9l9-10 1 2 17 36 17-36v-2l9 10a6 6 0 1 0 9-9l-9-9 2-1 36-17-36-17-2-1 9-9a6 6 0 1 0-9-9l-9 10v-2Zm-17 2-2 5c-4 8-11 15-19 19l-5 2 5 2c8 4 15 11 19 19l2 5 2-5c4-8 11-15 19-19l5-2-5-2c-8-4-15-11-19-19l-2-5Z" clip-rule="evenodd"/><path d="M118 19a6 6 0 0 0-9-9l-3 3a6 6 0 1 0 9 9l3-3Zm-96 4c-2 2-6 2-9 0l-3-3a6 6 0 1 1 9-9l3 3c3 2 3 6 0 9Zm0 82c-2-2-6-2-9 0l-3 3a6 6 0 1 0 9 9l3-3c3-2 3-6 0-9Zm96 4a6 6 0 0 1-9 9l-3-3a6 6 0 1 1 9-9l3 3Z"/><style>path{fill:#000}@media (prefers-color-scheme:dark){path{fill:#fff}}</style></svg>
|
||||
|
After Width: | Height: | Size: 696 B |
BIN
site/public/images/2.png
Normal file
|
After Width: | Height: | Size: 321 KiB |
BIN
site/public/images/Tracker-121.webp
Normal file
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 149 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 2.9 MiB |
|
After Width: | Height: | Size: 225 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 503 KiB |
|
After Width: | Height: | Size: 503 KiB |
BIN
site/public/images/gnss-protocol/gnss-protocol_page_1_img_1.png
Normal file
|
After Width: | Height: | Size: 674 B |
BIN
site/public/images/gnss-protocol/gnss-protocol_page_1_img_2.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
site/public/images/pinout-diagram.png
Normal file
|
After Width: | Height: | Size: 565 KiB |
BIN
site/public/images/schematic/schematic_page_1_img_1.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
site/public/images/structure-chart.png
Normal file
|
After Width: | Height: | Size: 332 KiB |
BIN
site/public/images/tracker-1.png
Normal file
|
After Width: | Height: | Size: 269 KiB |
BIN
site/public/images/tracker-3.png
Normal file
|
After Width: | Height: | Size: 249 KiB |
BIN
site/public/images/wireless-tracker-pin-map.png
Normal file
|
After Width: | Height: | Size: 396 KiB |
BIN
site/src/assets/houston.webp
Normal file
|
After Width: | Height: | Size: 96 KiB |
41
site/src/assets/tracker-icon.svg
Normal file
@ -0,0 +1,41 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" fill="none">
|
||||
<!-- PCB Board -->
|
||||
<rect x="8" y="12" width="48" height="40" rx="3" fill="#1a472a" stroke="#2d5a3d" stroke-width="1.5"/>
|
||||
|
||||
<!-- Circuit traces -->
|
||||
<path d="M12 20h8M12 44h8M44 20h8M44 44h8" stroke="#4ade80" stroke-width="0.75" opacity="0.6"/>
|
||||
<path d="M20 16v32M44 16v32" stroke="#4ade80" stroke-width="0.5" opacity="0.4"/>
|
||||
|
||||
<!-- ESP32-S3 Chip -->
|
||||
<rect x="22" y="22" width="20" height="16" rx="1" fill="#1f2937"/>
|
||||
<text x="32" y="32" font-family="monospace" font-size="5" fill="#9ca3af" text-anchor="middle">S3</text>
|
||||
|
||||
<!-- LoRa Antenna connector (IPEX) -->
|
||||
<circle cx="52" cy="32" r="3" fill="#fbbf24" stroke="#f59e0b" stroke-width="0.5"/>
|
||||
<path d="M49 32h-5" stroke="#f59e0b" stroke-width="1"/>
|
||||
|
||||
<!-- GNSS Antenna connector -->
|
||||
<circle cx="52" cy="22" r="2.5" fill="#60a5fa" stroke="#3b82f6" stroke-width="0.5"/>
|
||||
|
||||
<!-- Display (TFT) -->
|
||||
<rect x="11" y="24" width="8" height="12" rx="0.5" fill="#0f172a" stroke="#334155" stroke-width="0.5"/>
|
||||
<rect x="12" y="25" width="6" height="10" rx="0.25" fill="#1e293b"/>
|
||||
|
||||
<!-- USB-C Port -->
|
||||
<rect x="28" y="48" width="8" height="4" rx="1" fill="#6b7280"/>
|
||||
<rect x="30" y="49" width="4" height="2" rx="0.5" fill="#374151"/>
|
||||
|
||||
<!-- Battery connector -->
|
||||
<rect x="12" y="40" width="6" height="3" rx="0.5" fill="#dc2626"/>
|
||||
|
||||
<!-- Status LEDs -->
|
||||
<circle cx="16" y="18" r="1.5" fill="#22c55e"/>
|
||||
<circle cx="48" cy="42" r="1.5" fill="#3b82f6"/>
|
||||
|
||||
<!-- LoRa signal waves -->
|
||||
<path d="M56 28c2 2 2 6 0 8" stroke="#f59e0b" stroke-width="1" fill="none" opacity="0.8"/>
|
||||
<path d="M58 26c3 3 3 10 0 13" stroke="#f59e0b" stroke-width="0.75" fill="none" opacity="0.5"/>
|
||||
|
||||
<!-- GPS satellite signal -->
|
||||
<path d="M52 16l2-4M52 16l-1-4M52 16l3-3" stroke="#60a5fa" stroke-width="0.75" opacity="0.7"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
7
site/src/content.config.ts
Normal file
@ -0,0 +1,7 @@
|
||||
import { defineCollection } from 'astro:content';
|
||||
import { docsLoader } from '@astrojs/starlight/loaders';
|
||||
import { docsSchema } from '@astrojs/starlight/schema';
|
||||
|
||||
export const collections = {
|
||||
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
|
||||
};
|
||||
173
site/src/content/docs/getting-started/development-platforms.mdx
Normal file
@ -0,0 +1,173 @@
|
||||
---
|
||||
title: Development Platforms
|
||||
description: Choose your development environment for the Heltec Wireless Tracker
|
||||
---
|
||||
|
||||
import { Aside, Tabs, TabItem, Card, CardGrid } from '@astrojs/starlight/components';
|
||||
|
||||
Three primary development approaches are available for the Wireless Tracker, each suited to different goals and experience levels.
|
||||
|
||||
## Platform Comparison
|
||||
|
||||
<CardGrid>
|
||||
<Card title="Arduino / PlatformIO" icon="seti:arduino">
|
||||
**Best for**: Library ecosystem, familiar workflow, rapid development
|
||||
|
||||
Pros: Huge library ecosystem, familiar syntax, active community
|
||||
|
||||
Cons: Abstraction overhead, may hide hardware details
|
||||
</Card>
|
||||
<Card title="ESP-IDF" icon="seti:c">
|
||||
**Best for**: Production applications, low-level control
|
||||
|
||||
Pros: Full feature access, official support, best performance
|
||||
|
||||
Cons: Steeper learning curve, more verbose code
|
||||
</Card>
|
||||
<Card title="MicroPython" icon="seti:python">
|
||||
**Best for**: Rapid prototyping, education, scripting
|
||||
|
||||
Pros: Fast iteration, interactive REPL, easy to learn
|
||||
|
||||
Cons: Slower execution, higher memory usage
|
||||
</Card>
|
||||
</CardGrid>
|
||||
|
||||
## Recommended Platform by Use Case
|
||||
|
||||
| Use Case | Recommended |
|
||||
|----------|-------------|
|
||||
| Meshtastic | Pre-built firmware |
|
||||
| LoRaWAN projects | Arduino/PlatformIO |
|
||||
| GNSS development | ESP-IDF or Arduino |
|
||||
| Quick prototyping | MicroPython |
|
||||
| Production devices | ESP-IDF |
|
||||
|
||||
## Setup Instructions
|
||||
|
||||
<Tabs>
|
||||
<TabItem label="PlatformIO">
|
||||
PlatformIO provides a professional development environment with dependency management.
|
||||
|
||||
### platformio.ini
|
||||
|
||||
```ini
|
||||
[env:heltec_wireless_tracker]
|
||||
platform = espressif32
|
||||
board = heltec_wireless_tracker
|
||||
framework = arduino
|
||||
monitor_speed = 115200
|
||||
lib_deps =
|
||||
heltec-automation/Heltec ESP32 Dev-Boards
|
||||
```
|
||||
|
||||
### Installation
|
||||
|
||||
1. Install VS Code with PlatformIO extension
|
||||
2. Create new project with the configuration above
|
||||
3. Build and upload with Ctrl+Alt+U
|
||||
</TabItem>
|
||||
<TabItem label="Arduino IDE">
|
||||
The Arduino IDE offers a beginner-friendly environment.
|
||||
|
||||
### Board Manager Setup
|
||||
|
||||
1. Open **File → Preferences**
|
||||
2. Add to "Additional Board Manager URLs":
|
||||
```
|
||||
https://resource.heltec.cn/download/package_heltec_esp32_index.json
|
||||
```
|
||||
3. Open **Tools → Board → Boards Manager**
|
||||
4. Search for "Heltec ESP32" and install
|
||||
5. Select **Tools → Board → Heltec ESP32 Series Dev-boards → Wireless Tracker**
|
||||
|
||||
### Library Installation
|
||||
|
||||
1. Open **Sketch → Include Library → Manage Libraries**
|
||||
2. Search "Heltec ESP32" and install
|
||||
</TabItem>
|
||||
<TabItem label="ESP-IDF">
|
||||
The official Espressif framework provides maximum control.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
1. Install ESP-IDF v5.x following [official docs](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/get-started/)
|
||||
2. Clone Heltec examples:
|
||||
```bash
|
||||
git clone https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series.git
|
||||
```
|
||||
|
||||
### Build Example
|
||||
|
||||
```bash
|
||||
cd WiFi_Kit_series/esp-idf/examples/wireless_tracker
|
||||
idf.py set-target esp32s3
|
||||
idf.py build
|
||||
idf.py -p /dev/ttyUSB0 flash monitor
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem label="MicroPython">
|
||||
MicroPython enables interactive development and rapid prototyping.
|
||||
|
||||
### Firmware Installation
|
||||
|
||||
1. Download ESP32-S3 MicroPython firmware from [micropython.org](https://micropython.org/download/ESP32_GENERIC_S3/)
|
||||
2. Flash with esptool:
|
||||
```bash
|
||||
esptool.py --port /dev/ttyUSB0 erase_flash
|
||||
esptool.py --port /dev/ttyUSB0 write_flash -z 0 esp32s3-*.bin
|
||||
```
|
||||
|
||||
### Basic Example
|
||||
|
||||
```python
|
||||
from machine import Pin, UART
|
||||
import time
|
||||
|
||||
# Enable GNSS power (V1.1)
|
||||
gnss_pwr = Pin(3, Pin.OUT)
|
||||
gnss_pwr.value(1)
|
||||
|
||||
# Setup GNSS UART
|
||||
gnss = UART(1, baudrate=115200, tx=34, rx=33)
|
||||
|
||||
while True:
|
||||
if gnss.any():
|
||||
print(gnss.readline())
|
||||
time.sleep(0.1)
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Heltec Library Functions
|
||||
|
||||
The official Heltec library provides helper functions for common operations:
|
||||
|
||||
```cpp
|
||||
#include "HT_st7735.h" // TFT display
|
||||
#include "LoRaWan_APP.h" // LoRaWAN stack
|
||||
#include "HT_TinyGPS++.h" // GNSS parsing
|
||||
|
||||
// Display initialization
|
||||
HT_st7735 display;
|
||||
display.init();
|
||||
display.clear();
|
||||
display.drawString(0, 0, "Hello Tracker!");
|
||||
|
||||
// LoRa initialization
|
||||
Mcu.begin(HELTEC_BOARD, SLOW_CLK_TPYE);
|
||||
LoRaWAN.init(CLASS_A, ACTIVE_REGION);
|
||||
```
|
||||
|
||||
<Aside type="tip">
|
||||
Start with PlatformIO and the Heltec library for the smoothest development experience. Move to ESP-IDF when you need fine-grained control or are preparing for production.
|
||||
</Aside>
|
||||
|
||||
## Bootloader Access
|
||||
|
||||
If code upload fails, manually enter bootloader mode:
|
||||
|
||||
1. **Device not connected**: Press and hold `USER` before plugging in USB
|
||||
2. **Device already connected**: Hold `USER` → Press `RESET` → Release `RESET` → Release `USER`
|
||||
|
||||
Timing requirement: Reset signal must be held for ≥10 ms.
|
||||
122
site/src/content/docs/getting-started/hardware-versions.mdx
Normal file
@ -0,0 +1,122 @@
|
||||
---
|
||||
title: Hardware Versions
|
||||
description: Differences between Wireless Tracker V1.0 and V1.1 hardware revisions
|
||||
---
|
||||
|
||||
import { Aside, Tabs, TabItem } from '@astrojs/starlight/components';
|
||||
|
||||
The Wireless Tracker has undergone hardware revisions since its initial release. Understanding the differences is critical for firmware compatibility.
|
||||
|
||||
## Version Timeline
|
||||
|
||||
| Version | Release | Key Change |
|
||||
|---------|---------|------------|
|
||||
| **V1.0** | June 2023 | Initial release |
|
||||
| **V1.1** | Late 2023 | Added dedicated GNSS LDO, GPIO3 control |
|
||||
|
||||
## V1.1 Changes
|
||||
|
||||
The V1.1 revision addressed power isolation issues that could cause GNSS failures during LoRa transmission.
|
||||
|
||||
### What Changed
|
||||
|
||||
| Feature | V1.0 | V1.1 |
|
||||
|---------|------|------|
|
||||
| GNSS Power | Shared rail | Dedicated LDO |
|
||||
| GNSS Control | Always on | GPIO3 (HIGH = enabled) |
|
||||
| Power Isolation | Limited | Improved |
|
||||
| Low Power Mode | Basic | Enhanced |
|
||||
|
||||
<Aside type="caution" title="Important">
|
||||
V1.1 requires **GPIO3 set to HIGH** to enable the GNSS module. Firmware written for V1.0 may not work correctly on V1.1.
|
||||
</Aside>
|
||||
|
||||
## Identifying Your Version
|
||||
|
||||
### Physical Inspection
|
||||
|
||||
Look for the version marking on the PCB near the USB connector.
|
||||
|
||||
### Programmatic Detection
|
||||
|
||||
```cpp
|
||||
// V1.1 detection - check if GPIO3 controls GNSS
|
||||
#define GNSS_CTRL_PIN 3
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
|
||||
// For V1.1 hardware - enable GNSS power
|
||||
pinMode(GNSS_CTRL_PIN, OUTPUT);
|
||||
digitalWrite(GNSS_CTRL_PIN, HIGH);
|
||||
|
||||
delay(1000); // Allow GNSS to power up
|
||||
|
||||
// Check for GNSS response...
|
||||
}
|
||||
```
|
||||
|
||||
## Firmware Compatibility
|
||||
|
||||
### Meshtastic
|
||||
|
||||
<Tabs>
|
||||
<TabItem label="V1.1 Hardware">
|
||||
Meshtastic **2.2.17 Beta** and later auto-detect the hardware version.
|
||||
|
||||
For earlier versions, use the temporary firmware from Heltec:
|
||||
```bash
|
||||
device-install.bat -f firmware.factory.bin
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem label="V1.0 Hardware">
|
||||
Standard Meshtastic firmware works without modification.
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
### Custom Firmware
|
||||
|
||||
Always include GNSS power initialization for V1.1 compatibility:
|
||||
|
||||
```cpp
|
||||
// Universal initialization - works on both V1.0 and V1.1
|
||||
void initGNSS() {
|
||||
// V1.1: Enable GNSS power via GPIO3
|
||||
// V1.0: This has no effect (pin not connected to GNSS power)
|
||||
pinMode(3, OUTPUT);
|
||||
digitalWrite(3, HIGH);
|
||||
|
||||
// Wait for GNSS module to initialize
|
||||
delay(100);
|
||||
|
||||
// Continue with GNSS serial setup...
|
||||
}
|
||||
```
|
||||
|
||||
## Technical Details
|
||||
|
||||
### V1.1 Power Architecture
|
||||
|
||||
The V1.1 added a dedicated low-dropout regulator (LDO) for the UC6580 GNSS module:
|
||||
|
||||
- **Input**: Vext rail (controlled by GPIO3)
|
||||
- **Output**: Clean 3.3V for GNSS
|
||||
- **Benefit**: Eliminates voltage drops during high-current LoRa TX
|
||||
|
||||
### Power Consumption Improvements
|
||||
|
||||
| Mode | V1.0 | V1.1 |
|
||||
|------|------|------|
|
||||
| Deep Sleep | ~25 µA | ~15 µA |
|
||||
| GNSS Only | 90 mA | 89 mA |
|
||||
| LoRa + GNSS | Unstable | 89 + TX mA |
|
||||
|
||||
<Aside type="tip">
|
||||
The V1.1's isolated power design allows simultaneous GNSS tracking and LoRa transmission without the GNSS losing lock.
|
||||
</Aside>
|
||||
|
||||
## Documentation Links
|
||||
|
||||
- [V1.0 Schematic](https://resource.heltec.cn/download/Wireless_Tracker/Wireless_Tacker1.0/HTIT-Tracker_V0.3.pdf)
|
||||
- [V1.1 Schematic](https://resource.heltec.cn/download/Wireless_Tracker/Wireless_Tacker1.1)
|
||||
- [V1.1 Datasheet](https://resource.heltec.cn/download/Wireless_Tracker/Wireless%20Tracker%201.1.pdf)
|
||||
63
site/src/content/docs/getting-started/overview.mdx
Normal file
@ -0,0 +1,63 @@
|
||||
---
|
||||
title: Product Overview
|
||||
description: Introduction to the Heltec Wireless Tracker ESP32-S3FN8 development kit
|
||||
---
|
||||
|
||||
import { Aside, Card, CardGrid } from '@astrojs/starlight/components';
|
||||
|
||||
The **Wireless Tracker** is a development kit based on the ESP32-S3FN8. It integrates both SX1262 and UC6580 to provide a fast GNSS solution for IoT. Combined with the sample programs and development tools provided, you can track any object and upload data wirelessly via Wi-Fi, Bluetooth, or LoRa.
|
||||
|
||||

|
||||
|
||||
## Key Features
|
||||
|
||||
<CardGrid>
|
||||
<Card title="Triple Connectivity" icon="setting">
|
||||
Wi-Fi 802.11 b/g/n, Bluetooth 5 with mesh support, and LoRa SX1262 for long-range communication.
|
||||
</Card>
|
||||
<Card title="Dual-Frequency GNSS" icon="rocket">
|
||||
L1+L5 positioning with GPS, GLONASS, BDS, Galileo, NAVIC, and QZSS support.
|
||||
</Card>
|
||||
<Card title="Onboard Display" icon="document">
|
||||
0.96" RGB TFT-LCD (80×160) for status, debugging, and user interface.
|
||||
</Card>
|
||||
<Card title="Battery Management" icon="star">
|
||||
Integrated lithium battery charging, discharge protection, and automatic USB/battery switching.
|
||||
</Card>
|
||||
</CardGrid>
|
||||
|
||||
## Hardware Highlights
|
||||
|
||||
- **ESP32-S3FN8** dual-core Xtensa LX7 processor with 8MB flash
|
||||
- **SX1262** LoRa transceiver with up to +21 dBm TX power
|
||||
- **UC6580** 96-channel GNSS receiver
|
||||
- **Type-C USB** with ESD protection and voltage regulation
|
||||
- **SH1.25-2** battery connector with charging circuit
|
||||
- **IPEX connectors** for LoRa and GNSS external antennas
|
||||
- **Metal spring antenna** for 2.4 GHz Wi-Fi/Bluetooth
|
||||
|
||||
## Product Models
|
||||
|
||||
| Model | LoRa Frequency | Regional Networks |
|
||||
|-------|----------------|-------------------|
|
||||
| Wireless Tracker-LF | 470-510 MHz | CN470 (China) |
|
||||
| Wireless Tracker-HF | 863-928 MHz | EU868, US915, AU915, AS923, KR920 |
|
||||
|
||||
<Aside type="tip">
|
||||
Choose the **HF** (High Frequency) variant for most global deployments. The **LF** variant is specifically for China's CN470 band.
|
||||
</Aside>
|
||||
|
||||
## Typical Applications
|
||||
|
||||
- **Asset tracking**: Vehicles, containers, equipment
|
||||
- **Personal safety**: Elderly, children, pets
|
||||
- **Agriculture**: Livestock, irrigation systems
|
||||
- **Fleet management**: Delivery, logistics
|
||||
- **Sports & recreation**: Hiking, cycling, boating
|
||||
- **Mesh networking**: Meshtastic off-grid communication
|
||||
|
||||
## What's Next?
|
||||
|
||||
- [Hardware Versions](/getting-started/hardware-versions/) - Differences between V1.0 and V1.1
|
||||
- [Development Platforms](/getting-started/development-platforms/) - Choose your development environment
|
||||
- [Pinout Reference](/hardware/pinout/) - Pin assignments and GPIO functions
|
||||
290
site/src/content/docs/guides/heart-rate-monitor.mdx
Normal file
@ -0,0 +1,290 @@
|
||||
---
|
||||
title: Heart Rate Monitor via LoRaWAN
|
||||
description: Build a wireless heart rate monitor using the Heltec Wireless Tracker and MAX30102 sensor
|
||||
---
|
||||
|
||||
import { Aside, Steps, Tabs, TabItem } from '@astrojs/starlight/components';
|
||||
|
||||
This project enables real-time heart rate monitoring using the Wireless Tracker connected to a MAX30102 pulse oximetry sensor. Data transmits via LoRaWAN to the SnapEmu platform for visualization.
|
||||
|
||||
## Hardware Requirements
|
||||
|
||||
| Component | Purpose |
|
||||
|-----------|---------|
|
||||
| Heltec Wireless Tracker | Main controller + LoRa TX |
|
||||
| HT-M7603 Indoor LoRa Gateway | LoRaWAN network gateway |
|
||||
| MAX30102 Heart Rate Sensor | Pulse oximetry sensor |
|
||||
| DuPont Wires | Connections |
|
||||
|
||||
## Wiring Diagram
|
||||
|
||||
The MAX30102 connects via I2C:
|
||||
|
||||
| MAX30102 Pin | Tracker Pin | Description |
|
||||
|--------------|-------------|-------------|
|
||||
| VCC | 3V3 | Power (3.3V) |
|
||||
| GND | GND | Ground |
|
||||
| SDA | GPIO45 | I2C Data |
|
||||
| SCL | GPIO46 | I2C Clock |
|
||||
|
||||
<Aside type="tip">
|
||||
GPIO45 and GPIO46 are recommended for I2C as they don't conflict with built-in peripherals on the Wireless Tracker.
|
||||
</Aside>
|
||||
|
||||
## Software Setup
|
||||
|
||||
<Steps>
|
||||
|
||||
1. **Configure LoRa Gateway**
|
||||
|
||||
Set up your HT-M7603 gateway with SnapEmu platform following the [official Heltec documentation](https://docs.heltec.cn/en/gateway/ht-m7603/connect_to_snapemu.html).
|
||||
|
||||
2. **Register Device on SnapEmu**
|
||||
|
||||
Register your Wireless Tracker node following the [SnapEmu device connection guide](https://snapemudoc.readthedocs.io/en/latest/Node%20Devices%20Connection/register_on_snapemu.html).
|
||||
|
||||
3. **Install Libraries**
|
||||
|
||||
Required Arduino libraries:
|
||||
- `Wire.h` (built-in)
|
||||
- `MAX30102_PulseOximeter.h`
|
||||
- `LoRaWan_APP.h` (Heltec library)
|
||||
|
||||
4. **Test Sensor Standalone**
|
||||
|
||||
Upload the test code to verify sensor operation before adding LoRaWAN.
|
||||
|
||||
5. **Deploy Full Application**
|
||||
|
||||
Upload the complete LoRaWAN code with your OTAA credentials.
|
||||
|
||||
</Steps>
|
||||
|
||||
## Code Examples
|
||||
|
||||
<Tabs>
|
||||
<TabItem label="Sensor Test">
|
||||
```cpp
|
||||
#include <Wire.h>
|
||||
#include "MAX30102_PulseOximeter.h"
|
||||
|
||||
#define REPORTING_PERIOD_MS 1000
|
||||
PulseOximeter pox;
|
||||
uint32_t tsLastReport = 0;
|
||||
|
||||
void onBeatDetected() {
|
||||
Serial.println("Beat detected!");
|
||||
}
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
Wire.begin(45, 46); // SDA=GPIO45, SCL=GPIO46
|
||||
Serial.print("Initializing MAX30102..");
|
||||
delay(3000);
|
||||
|
||||
if (!pox.begin()) {
|
||||
Serial.println("FAILED");
|
||||
for(;;);
|
||||
} else {
|
||||
Serial.println("SUCCESS");
|
||||
}
|
||||
|
||||
pox.setIRLedCurrent(MAX30102_LED_CURR_7_6MA);
|
||||
pox.setOnBeatDetectedCallback(onBeatDetected);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
pox.update();
|
||||
|
||||
if (millis() - tsLastReport > REPORTING_PERIOD_MS) {
|
||||
float heartRate = pox.getHeartRate();
|
||||
float spo2 = pox.getSpO2();
|
||||
|
||||
Serial.print("HR: ");
|
||||
Serial.print(heartRate > 0 ? String(heartRate) : "N/A");
|
||||
Serial.print(" bpm / SpO2: ");
|
||||
Serial.print(spo2 > 0 ? String(spo2) : "N/A");
|
||||
Serial.println("%");
|
||||
|
||||
tsLastReport = millis();
|
||||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem label="LoRaWAN Code">
|
||||
```cpp
|
||||
#include <Wire.h>
|
||||
#include "MAX30102_PulseOximeter.h"
|
||||
#include "LoRaWan_APP.h"
|
||||
|
||||
#define REPORTING_PERIOD_MS 1000
|
||||
|
||||
// OTAA Parameters - Replace with your SnapEmu values
|
||||
uint8_t devEui[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA8 };
|
||||
uint8_t appEui[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
uint8_t appKey[] = { 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88,
|
||||
0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88 };
|
||||
|
||||
// LoRaWAN Configuration
|
||||
uint16_t userChannelsMask[6] = { 0x00FF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 };
|
||||
LoRaMacRegion_t loraWanRegion = ACTIVE_REGION;
|
||||
DeviceClass_t loraWanClass = CLASS_A;
|
||||
uint32_t appTxDutyCycle = 15000; // 15 second transmit interval
|
||||
bool overTheAirActivation = true;
|
||||
bool loraWanAdr = true;
|
||||
bool isTxConfirmed = true;
|
||||
uint8_t appPort = 2;
|
||||
uint8_t confirmedNbTrials = 4;
|
||||
|
||||
PulseOximeter pox;
|
||||
uint32_t tsLastReport = 0;
|
||||
|
||||
static void prepareTxFrame(uint8_t port) {
|
||||
pox.update();
|
||||
float heartRate = pox.getHeartRate();
|
||||
float spo2 = pox.getSpO2();
|
||||
unsigned char *puc;
|
||||
|
||||
appDataSize = 0;
|
||||
|
||||
// Packet header
|
||||
appData[appDataSize++] = 0x04;
|
||||
appData[appDataSize++] = 0x00;
|
||||
appData[appDataSize++] = 0x0A;
|
||||
appData[appDataSize++] = 0x02;
|
||||
|
||||
// Heart rate (4 bytes float)
|
||||
puc = (unsigned char *)(&heartRate);
|
||||
appData[appDataSize++] = puc[0];
|
||||
appData[appDataSize++] = puc[1];
|
||||
appData[appDataSize++] = puc[2];
|
||||
appData[appDataSize++] = puc[3];
|
||||
|
||||
// Separator
|
||||
appData[appDataSize++] = 0x12;
|
||||
|
||||
// SpO2 (4 bytes float)
|
||||
puc = (unsigned char *)(&spo2);
|
||||
appData[appDataSize++] = puc[0];
|
||||
appData[appDataSize++] = puc[1];
|
||||
appData[appDataSize++] = puc[2];
|
||||
appData[appDataSize++] = puc[3];
|
||||
|
||||
Serial.printf("TX: HR=%.1f SpO2=%.1f\n", heartRate, spo2);
|
||||
}
|
||||
|
||||
void onBeatDetected() {
|
||||
Serial.println("Beat!");
|
||||
}
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
Wire.begin(45, 46);
|
||||
Mcu.begin(HELTEC_BOARD, SLOW_CLK_TPYE);
|
||||
|
||||
Serial.print("Initializing MAX30102..");
|
||||
delay(3000);
|
||||
|
||||
if (!pox.begin()) {
|
||||
Serial.println("FAILED");
|
||||
for(;;);
|
||||
}
|
||||
Serial.println("SUCCESS");
|
||||
|
||||
pox.setIRLedCurrent(MAX30102_LED_CURR_27_1MA);
|
||||
pox.setOnBeatDetectedCallback(onBeatDetected);
|
||||
|
||||
LoRaWAN.init(loraWanClass, loraWanRegion);
|
||||
LoRaWAN.setDefaultDR(3);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
pox.update();
|
||||
|
||||
// Local display
|
||||
if (millis() - tsLastReport > REPORTING_PERIOD_MS) {
|
||||
float heartRate = pox.getHeartRate();
|
||||
float spo2 = pox.getSpO2();
|
||||
|
||||
Serial.printf("HR: %s bpm | SpO2: %s%%\n",
|
||||
heartRate > 0 ? String(heartRate).c_str() : "N/A",
|
||||
spo2 > 0 ? String(spo2).c_str() : "N/A");
|
||||
|
||||
tsLastReport = millis();
|
||||
}
|
||||
|
||||
// LoRaWAN state machine
|
||||
switch (deviceState) {
|
||||
case DEVICE_STATE_INIT:
|
||||
case DEVICE_STATE_JOIN:
|
||||
LoRaWAN.join();
|
||||
break;
|
||||
case DEVICE_STATE_SEND:
|
||||
prepareTxFrame(appPort);
|
||||
LoRaWAN.send();
|
||||
deviceState = DEVICE_STATE_CYCLE;
|
||||
break;
|
||||
case DEVICE_STATE_CYCLE:
|
||||
txDutyCycleTime = appTxDutyCycle +
|
||||
randr(-APP_TX_DUTYCYCLE_RND, APP_TX_DUTYCYCLE_RND);
|
||||
LoRaWAN.cycle(txDutyCycleTime);
|
||||
deviceState = DEVICE_STATE_SLEEP;
|
||||
break;
|
||||
case DEVICE_STATE_SLEEP:
|
||||
LoRaWAN.sleep(loraWanClass);
|
||||
break;
|
||||
default:
|
||||
deviceState = DEVICE_STATE_INIT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem label="Decoder">
|
||||
```javascript
|
||||
// SnapEmu payload decoder
|
||||
function Decoder(bytes, port) {
|
||||
var decoded = {};
|
||||
|
||||
if (bytes.length >= 13) {
|
||||
// Extract heart rate (bytes 4-7)
|
||||
var hrBytes = new Uint8Array([bytes[4], bytes[5], bytes[6], bytes[7]]);
|
||||
var hrView = new DataView(hrBytes.buffer);
|
||||
decoded.heartRate = hrView.getFloat32(0, true);
|
||||
|
||||
// Extract SpO2 (bytes 9-12)
|
||||
var spo2Bytes = new Uint8Array([bytes[9], bytes[10], bytes[11], bytes[12]]);
|
||||
var spo2View = new DataView(spo2Bytes.buffer);
|
||||
decoded.spo2 = spo2View.getFloat32(0, true);
|
||||
}
|
||||
|
||||
return decoded;
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Platform Features
|
||||
|
||||
SnapEmu provides:
|
||||
|
||||
- Real-time heart rate graph
|
||||
- SpO2 level monitoring
|
||||
- Historical data (up to 1 month)
|
||||
- Mobile app + web interface
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
| Issue | Solution |
|
||||
|-------|----------|
|
||||
| No heartbeat detected | Ensure finger is properly placed, adjust LED current |
|
||||
| Erratic readings | Clean sensor, reduce movement, check power supply |
|
||||
| LoRa join failed | Verify gateway connection, check OTAA credentials |
|
||||
| Data not on platform | Check decoder function, verify port number matches |
|
||||
|
||||
## References
|
||||
|
||||
- [SnapEmu Documentation](https://snapemudoc.readthedocs.io/)
|
||||
- [Heltec Sensor Decoding Guide](https://docs.heltec.cn/general/define_sensor_decoding_function_on_snapemu.html)
|
||||
|
||||
Based on the project by ashley15 on Hackster.io.
|
||||
299
site/src/content/docs/guides/lorawan-setup.mdx
Normal file
@ -0,0 +1,299 @@
|
||||
---
|
||||
title: LoRaWAN Setup Guide
|
||||
description: Connect your Heltec Wireless Tracker to LoRaWAN networks
|
||||
---
|
||||
|
||||
import { Aside, Steps, Tabs, TabItem } from '@astrojs/starlight/components';
|
||||
|
||||
This guide covers connecting your Wireless Tracker to LoRaWAN networks including The Things Network (TTN), SnapEmu, and other LoRaWAN servers.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Heltec Wireless Tracker with LoRa antenna
|
||||
- Gateway coverage in your area (or your own gateway)
|
||||
- Account on your chosen LoRaWAN network server
|
||||
- Arduino IDE or PlatformIO with Heltec libraries
|
||||
|
||||
## Regional Frequencies
|
||||
|
||||
Choose the correct model for your region:
|
||||
|
||||
| Region | Frequency | Model |
|
||||
|--------|-----------|-------|
|
||||
| EU868 | 863-870 MHz | Wireless Tracker-HF |
|
||||
| US915 | 902-928 MHz | Wireless Tracker-HF |
|
||||
| AU915 | 915-928 MHz | Wireless Tracker-HF |
|
||||
| AS923 | 920-925 MHz | Wireless Tracker-HF |
|
||||
| KR920 | 920-923 MHz | Wireless Tracker-HF |
|
||||
| CN470 | 470-510 MHz | Wireless Tracker-LF |
|
||||
|
||||
<Aside type="caution">
|
||||
Using the wrong frequency band is illegal in most jurisdictions. Verify your local regulations before transmitting.
|
||||
</Aside>
|
||||
|
||||
## OTAA vs ABP
|
||||
|
||||
| Method | Pros | Cons |
|
||||
|--------|------|------|
|
||||
| **OTAA** (Over-The-Air Activation) | More secure, automatic session renewal | Requires join process |
|
||||
| **ABP** (Activation By Personalization) | Immediate transmission | Less secure, manual key management |
|
||||
|
||||
<Aside type="tip">
|
||||
OTAA is recommended for most applications. Use ABP only when join latency is unacceptable.
|
||||
</Aside>
|
||||
|
||||
## Network Registration
|
||||
|
||||
<Tabs>
|
||||
<TabItem label="The Things Network">
|
||||
|
||||
### Register on TTN
|
||||
|
||||
<Steps>
|
||||
|
||||
1. Create account at [thethingsnetwork.org](https://www.thethingsnetwork.org/)
|
||||
|
||||
2. Create a new **Application**
|
||||
|
||||
3. Add an **End Device**:
|
||||
- Select "Enter end device specifics manually"
|
||||
- Frequency plan: Match your region (e.g., US915 FSB2)
|
||||
- LoRaWAN version: 1.0.3
|
||||
- Regional Parameters: RP001 Regional Parameters 1.0.3 revision A
|
||||
|
||||
4. Generate credentials:
|
||||
- DevEUI: Generate or use chip's MAC
|
||||
- AppEUI: All zeros or generate
|
||||
- AppKey: Generate (save this!)
|
||||
|
||||
5. Copy credentials for firmware
|
||||
|
||||
</Steps>
|
||||
|
||||
### TTN Payload Decoder
|
||||
|
||||
```javascript
|
||||
function decodeUplink(input) {
|
||||
return {
|
||||
data: {
|
||||
// Parse your payload format here
|
||||
battery: input.bytes[0] / 10,
|
||||
latitude: ((input.bytes[1] << 24) | (input.bytes[2] << 16) |
|
||||
(input.bytes[3] << 8) | input.bytes[4]) / 1000000,
|
||||
longitude: ((input.bytes[5] << 24) | (input.bytes[6] << 16) |
|
||||
(input.bytes[7] << 8) | input.bytes[8]) / 1000000
|
||||
},
|
||||
warnings: [],
|
||||
errors: []
|
||||
};
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem label="SnapEmu">
|
||||
|
||||
### Register on SnapEmu
|
||||
|
||||
<Steps>
|
||||
|
||||
1. Create account at [snapemu.com](https://snapemu.com/)
|
||||
|
||||
2. Configure your Heltec gateway to connect to SnapEmu
|
||||
|
||||
3. Add a new **Node Device**
|
||||
|
||||
4. Copy the generated credentials:
|
||||
- DevEUI
|
||||
- AppEUI
|
||||
- AppKey
|
||||
|
||||
</Steps>
|
||||
|
||||
### SnapEmu Features
|
||||
|
||||
- Automatic device provisioning for Heltec devices
|
||||
- Built-in decoder library
|
||||
- Real-time data visualization
|
||||
- Historical data storage
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Firmware Configuration
|
||||
|
||||
### Basic LoRaWAN Example
|
||||
|
||||
```cpp
|
||||
#include "LoRaWan_APP.h"
|
||||
|
||||
// OTAA Credentials - Replace with your values
|
||||
uint8_t devEui[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
uint8_t appEui[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
uint8_t appKey[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
|
||||
// Channel mask for US915 FSB2 (channels 8-15)
|
||||
uint16_t userChannelsMask[6] = { 0xFF00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 };
|
||||
|
||||
// For EU868, use:
|
||||
// uint16_t userChannelsMask[6] = { 0x00FF, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 };
|
||||
|
||||
LoRaMacRegion_t loraWanRegion = LORAMAC_REGION_US915; // Change for your region
|
||||
DeviceClass_t loraWanClass = CLASS_A;
|
||||
uint32_t appTxDutyCycle = 60000; // 60 second transmit interval
|
||||
bool overTheAirActivation = true;
|
||||
bool loraWanAdr = true;
|
||||
bool isTxConfirmed = true;
|
||||
uint8_t appPort = 1;
|
||||
uint8_t confirmedNbTrials = 4;
|
||||
|
||||
void setup() {
|
||||
Serial.begin(115200);
|
||||
Mcu.begin(HELTEC_BOARD, SLOW_CLK_TPYE);
|
||||
|
||||
LoRaWAN.init(loraWanClass, loraWanRegion);
|
||||
LoRaWAN.setDefaultDR(3); // SF7-SF12 depending on region
|
||||
}
|
||||
|
||||
static void prepareTxFrame(uint8_t port) {
|
||||
appDataSize = 4;
|
||||
|
||||
// Example: Send battery voltage and status
|
||||
float voltage = readBatteryVoltage();
|
||||
uint16_t vBat = (uint16_t)(voltage * 100);
|
||||
|
||||
appData[0] = (uint8_t)(vBat >> 8);
|
||||
appData[1] = (uint8_t)(vBat & 0xFF);
|
||||
appData[2] = 0x00; // Status byte
|
||||
appData[3] = 0x00; // Reserved
|
||||
}
|
||||
|
||||
void loop() {
|
||||
switch (deviceState) {
|
||||
case DEVICE_STATE_INIT:
|
||||
LoRaWAN.init(loraWanClass, loraWanRegion);
|
||||
deviceState = DEVICE_STATE_JOIN;
|
||||
break;
|
||||
|
||||
case DEVICE_STATE_JOIN:
|
||||
LoRaWAN.join();
|
||||
break;
|
||||
|
||||
case DEVICE_STATE_SEND:
|
||||
prepareTxFrame(appPort);
|
||||
LoRaWAN.send();
|
||||
deviceState = DEVICE_STATE_CYCLE;
|
||||
break;
|
||||
|
||||
case DEVICE_STATE_CYCLE:
|
||||
txDutyCycleTime = appTxDutyCycle +
|
||||
randr(-APP_TX_DUTYCYCLE_RND, APP_TX_DUTYCYCLE_RND);
|
||||
LoRaWAN.cycle(txDutyCycleTime);
|
||||
deviceState = DEVICE_STATE_SLEEP;
|
||||
break;
|
||||
|
||||
case DEVICE_STATE_SLEEP:
|
||||
LoRaWAN.sleep(loraWanClass);
|
||||
break;
|
||||
|
||||
default:
|
||||
deviceState = DEVICE_STATE_INIT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
float readBatteryVoltage() {
|
||||
pinMode(2, OUTPUT);
|
||||
digitalWrite(2, LOW);
|
||||
int raw = analogRead(1);
|
||||
digitalWrite(2, HIGH);
|
||||
return (raw / 4095.0) * 3.3 * 4.9;
|
||||
}
|
||||
```
|
||||
|
||||
### Region Configuration
|
||||
|
||||
| Region | `LoRaMacRegion_t` | Default DR | Notes |
|
||||
|--------|-------------------|------------|-------|
|
||||
| EU868 | `LORAMAC_REGION_EU868` | DR5 (SF7) | 1% duty cycle |
|
||||
| US915 | `LORAMAC_REGION_US915` | DR3 (SF7) | Use FSB2 for TTN |
|
||||
| AU915 | `LORAMAC_REGION_AU915` | DR3 (SF7) | Similar to US915 |
|
||||
| AS923 | `LORAMAC_REGION_AS923` | DR5 (SF7) | Multiple sub-bands |
|
||||
| CN470 | `LORAMAC_REGION_CN470` | DR3 (SF7) | LF model only |
|
||||
|
||||
## Sending GPS Data
|
||||
|
||||
```cpp
|
||||
#include "TinyGPS++.h"
|
||||
|
||||
TinyGPSPlus gps;
|
||||
HardwareSerial GPSSerial(1);
|
||||
|
||||
void setup() {
|
||||
// Enable GNSS power (V1.1)
|
||||
pinMode(3, OUTPUT);
|
||||
digitalWrite(3, HIGH);
|
||||
|
||||
// Initialize GNSS serial
|
||||
GPSSerial.begin(115200, SERIAL_8N1, 33, 34);
|
||||
}
|
||||
|
||||
static void prepareTxFrame(uint8_t port) {
|
||||
// Read latest GPS data
|
||||
while (GPSSerial.available()) {
|
||||
gps.encode(GPSSerial.read());
|
||||
}
|
||||
|
||||
if (gps.location.isValid()) {
|
||||
int32_t lat = gps.location.lat() * 1000000;
|
||||
int32_t lon = gps.location.lng() * 1000000;
|
||||
|
||||
appDataSize = 9;
|
||||
|
||||
// Latitude (4 bytes, big-endian)
|
||||
appData[0] = (lat >> 24) & 0xFF;
|
||||
appData[1] = (lat >> 16) & 0xFF;
|
||||
appData[2] = (lat >> 8) & 0xFF;
|
||||
appData[3] = lat & 0xFF;
|
||||
|
||||
// Longitude (4 bytes, big-endian)
|
||||
appData[4] = (lon >> 24) & 0xFF;
|
||||
appData[5] = (lon >> 16) & 0xFF;
|
||||
appData[6] = (lon >> 8) & 0xFF;
|
||||
appData[7] = lon & 0xFF;
|
||||
|
||||
// Satellites
|
||||
appData[8] = gps.satellites.value();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Join Failures
|
||||
|
||||
| Symptom | Cause | Solution |
|
||||
|---------|-------|----------|
|
||||
| No join accept | Wrong credentials | Double-check DevEUI, AppEUI, AppKey |
|
||||
| Timeout | No gateway | Verify gateway coverage |
|
||||
| Repeated joins | Session expired | Check network server settings |
|
||||
|
||||
### No Uplinks Received
|
||||
|
||||
1. Verify antenna is connected
|
||||
2. Check frequency plan matches gateway
|
||||
3. Increase spreading factor (lower DR) for better range
|
||||
4. Monitor RSSI/SNR on gateway
|
||||
|
||||
### Duty Cycle Exceeded
|
||||
|
||||
EU868 has strict 1% duty cycle limits:
|
||||
|
||||
```cpp
|
||||
// Increase transmit interval to respect duty cycle
|
||||
uint32_t appTxDutyCycle = 300000; // 5 minutes minimum for EU868
|
||||
```
|
||||
|
||||
## References
|
||||
|
||||
- [LoRaWAN Specification](https://lora-alliance.org/resource-hub/lorawanr-specification-v103)
|
||||
- [Heltec LoRaWAN Examples](https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series)
|
||||
- [TTN Device Registration](https://www.thethingsnetwork.org/docs/devices/)
|
||||
162
site/src/content/docs/guides/meshtastic-low-power.mdx
Normal file
@ -0,0 +1,162 @@
|
||||
---
|
||||
title: Meshtastic Low Power Configuration
|
||||
description: Optimize battery life on the Heltec Wireless Tracker with Meshtastic
|
||||
---
|
||||
|
||||
import { Aside, Steps } from '@astrojs/starlight/components';
|
||||
|
||||
This guide demonstrates how to configure a Heltec Wireless Tracker with Meshtastic to achieve extended battery life through optimized sleep settings.
|
||||
|
||||
## Hardware Requirements
|
||||
|
||||
- Heltec Wireless Tracker development kit
|
||||
- 1000mAh (or larger) lithium battery, fully charged
|
||||
- LoRa antenna (IPEX connector)
|
||||
- Meshtastic firmware (2.2.17+ recommended)
|
||||
|
||||
<Aside type="caution" title="Hardware Version">
|
||||
V1.1 hardware requires GPIO3 set HIGH to enable GNSS. Meshtastic 2.2.17+ auto-detects the version. For older firmware, use the Heltec-provided temporary firmware.
|
||||
</Aside>
|
||||
|
||||
## Expected Results
|
||||
|
||||
With proper configuration, you can achieve:
|
||||
|
||||
| Metric | Value |
|
||||
|--------|-------|
|
||||
| Idle current draw | 13 µA |
|
||||
| Active operation | ~1% battery/hour |
|
||||
| Runtime (1000mAh) | ~100 hours active |
|
||||
|
||||
## Power Consumption Reference
|
||||
|
||||
| Mode | Current Draw |
|
||||
|------|--------------|
|
||||
| Deep Sleep | 13 µA |
|
||||
| Light Sleep | ~1 mA |
|
||||
| GPS Active | ~89 mA |
|
||||
| LoRa TX | ~178 mA |
|
||||
| LoRa RX | ~59 mA |
|
||||
|
||||
## Configuration Steps
|
||||
|
||||
<Steps>
|
||||
|
||||
1. **Flash Meshtastic Firmware**
|
||||
|
||||
Download and flash the latest Meshtastic firmware for Wireless Tracker:
|
||||
```bash
|
||||
# Using esptool
|
||||
esptool.py write_flash 0x0 firmware-heltec-wireless-tracker.factory.bin
|
||||
|
||||
# Or use the Meshtastic flasher app
|
||||
```
|
||||
|
||||
2. **Connect via Bluetooth**
|
||||
|
||||
Open the Meshtastic mobile app and pair with your device via Bluetooth.
|
||||
|
||||
3. **Set Device Role**
|
||||
|
||||
Navigate to **Settings → Device Config**:
|
||||
- Set **Role** to `TRACKER`
|
||||
|
||||
4. **Configure Position Settings**
|
||||
|
||||
Navigate to **Settings → Position Config**:
|
||||
|
||||
| Parameter | Value | Description |
|
||||
|-----------|-------|-------------|
|
||||
| Position broadcast interval | 900 s | Broadcast every 15 minutes |
|
||||
| Smart broadcast min distance | 10 m | Movement threshold |
|
||||
| Smart broadcast min interval | 900 s | Minimum time between broadcasts |
|
||||
| GPS update interval | 30 s | How often to poll GPS |
|
||||
|
||||
**Pin Configuration** (should be auto-detected):
|
||||
| Pin | Value |
|
||||
|-----|-------|
|
||||
| GPS_RX_PIN | 33 |
|
||||
| GPS_TX_PIN | 34 |
|
||||
| PIN_GPS_EN | 3 (V1.1) |
|
||||
|
||||
5. **Configure Power Settings**
|
||||
|
||||
Navigate to **Settings → Power Config**:
|
||||
|
||||
| Parameter | Value | Description |
|
||||
|-----------|-------|-------------|
|
||||
| Wait for Bluetooth | 0 | Don't wait for BT connection |
|
||||
| Super deep sleep duration | 1800 s | 30-minute deep sleep |
|
||||
| Light sleep duration | 900 s | 15-minute light sleep |
|
||||
| Minimum wake time | 30 s | Minimum active time |
|
||||
|
||||
6. **Save and Reboot**
|
||||
|
||||
Apply settings and reboot the device.
|
||||
|
||||
</Steps>
|
||||
|
||||
## Tips for Maximum Battery Life
|
||||
|
||||
1. **Use a larger battery**
|
||||
- 2000-3000mAh recommended for multi-day operation
|
||||
- Higher capacity = proportionally longer runtime
|
||||
|
||||
2. **Optimize broadcast interval**
|
||||
- Increase if tracking precision isn't critical
|
||||
- 15-30 minute intervals work well for most uses
|
||||
|
||||
3. **Use external antenna**
|
||||
- Better signal = faster TX completion = less power
|
||||
- Quality antenna reduces retransmissions
|
||||
|
||||
4. **Disable unused features**
|
||||
- Wi-Fi: Disable if not needed for configuration
|
||||
- Bluetooth: Set timeout to 0 after configuration
|
||||
|
||||
5. **Reduce GPS polling**
|
||||
- 60-120 second intervals for stationary tracking
|
||||
- Disable GPS entirely for relay-only nodes
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Device won't enter deep sleep
|
||||
|
||||
<Aside type="tip">
|
||||
Check that Bluetooth timeout is set to 0 and no active mesh traffic is preventing sleep.
|
||||
</Aside>
|
||||
|
||||
- Verify firmware version supports deep sleep
|
||||
- Check for continuous mesh traffic
|
||||
- Ensure no USB power connected (keeps device awake)
|
||||
|
||||
### GPS not getting fix
|
||||
|
||||
- **V1.1 hardware**: Ensure GPIO3 is HIGH (automatic in new firmware)
|
||||
- Check antenna connection (IPEX connector fully seated)
|
||||
- Allow 30-60 seconds for cold start fix
|
||||
- Move to area with clear sky view
|
||||
|
||||
### Battery draining faster than expected
|
||||
|
||||
- Check if device is stuck in active mode (monitor serial output)
|
||||
- Verify sleep settings were saved (check via app)
|
||||
- Look for wake events in serial log
|
||||
- Ensure no continuous retransmissions (poor antenna/coverage)
|
||||
|
||||
## Serial Monitoring
|
||||
|
||||
Monitor power states via serial console:
|
||||
|
||||
```cpp
|
||||
// Connect at 115200 baud
|
||||
// Look for these messages:
|
||||
// "Going to deep sleep for X seconds"
|
||||
// "Waking from deep sleep"
|
||||
// "GPS fix acquired"
|
||||
// "Transmitting position"
|
||||
```
|
||||
|
||||
## Source
|
||||
|
||||
Based on the tutorial by ashley15 on Hackster.io, adapted for Wireless Tracker V1.1.
|
||||
229
site/src/content/docs/hardware/pinout.mdx
Normal file
@ -0,0 +1,229 @@
|
||||
---
|
||||
title: Pinout Reference
|
||||
description: Pin assignments and GPIO functions for the Heltec Wireless Tracker
|
||||
---
|
||||
|
||||
import { Aside, Tabs, TabItem } from '@astrojs/starlight/components';
|
||||
|
||||
## Pin Map Overview
|
||||
|
||||

|
||||
|
||||
<Aside type="note">
|
||||
The pin assignments follow the ESP32-S3 GPIO numbering scheme. Color coding: **Red** = Power, **Green** = GND, **Blue** = GPIO, **Pink** = ADC/DAC, **Yellow** = Serial/SPI/I2C, **Purple** = Connected internally.
|
||||
</Aside>
|
||||
|
||||
## Header J2 (Left Side)
|
||||
|
||||
### Power Pins
|
||||
|
||||
| Pin | Name | Type | Function |
|
||||
|-----|------|------|----------|
|
||||
| 1 | 5V | Power | 5V power supply |
|
||||
| 2 | GND | Power | Ground |
|
||||
| 3 | 3V3 | Power | 3.3V output |
|
||||
| 4 | GND | Power | Ground |
|
||||
| 5 | 3V3 | Power | 3.3V output |
|
||||
| 6 | GND | Power | Ground |
|
||||
| 7 | Vext | Power | 3.3V output for TFT and GNSS |
|
||||
| 8 | GND | Power | Ground |
|
||||
|
||||
### GPIO Pins (J2)
|
||||
|
||||
| Pin | GPIO | Type | Primary Function | Alternate Functions |
|
||||
|-----|------|------|------------------|---------------------|
|
||||
| 1 | RST | - | Reset button | - |
|
||||
| 2 | 0 | I/O | USER button | Boot select |
|
||||
| 3 | 1 | I/O | **Vbat_Read**¹ | Touch1, ADC1_CH0 |
|
||||
| 4 | 2 | I/O | ADC Control | Touch2, ADC1_CH1 |
|
||||
| 5 | 3 | I/O | **Vext Control**² | Touch3, ADC1_CH2 |
|
||||
| 6 | 19 | I/O | USB D- | CLK_OUT2, ADC2_CH8, U1RTS |
|
||||
| 7 | 20 | I | USB D+ | CLK_OUT1, ADC2_CH9, U1CTS |
|
||||
| 8 | 21 | I/O | TFT backlight | - |
|
||||
| 9 | 26 | I/O | General I/O | SPICS1 |
|
||||
| 10 | 48 | I/O | D_SEL | - |
|
||||
| 11 | 47 | I/O | Boot mode | - |
|
||||
| 12 | 33 | I/O | **GNSS TX** | SPIIO4, FSPIHD |
|
||||
| 13 | 34 | I/O | **GNSS RX** | SPI05, FSPICS0 |
|
||||
| 14 | 35 | I/O | **GNSS RST** | SPI06, FSPID |
|
||||
| 15 | 36 | I/O | **GNSS PPS** | SPI07, FSPICLK |
|
||||
| 16 | 37 | I/O | General I/O | SPIDQS, FSPIQ |
|
||||
|
||||
<Aside type="tip" title="Battery Reading">
|
||||
¹ Battery voltage: `VBAT = Vbat_Read × 4.9`
|
||||
</Aside>
|
||||
|
||||
<Aside type="caution" title="V1.1 Hardware">
|
||||
² GPIO3 controls GNSS power on V1.1. Set HIGH to enable the GNSS module.
|
||||
</Aside>
|
||||
|
||||
## Header J3 (Right Side)
|
||||
|
||||
### GPIO Pins (J3)
|
||||
|
||||
| Pin | GPIO | Type | Primary Function | Alternate Functions |
|
||||
|-----|------|------|------------------|---------------------|
|
||||
| 1 | 18 | I/O | **LED Control** | U1RXD, ADC2_CH7, CLK_OUT3 |
|
||||
| 2 | 17 | I/O | General I/O | U1TXD, ADC2_CH6 |
|
||||
| 3 | 16 | I/O | General I/O | U0CTS, ADC2_CH5, XTAL_32K_N |
|
||||
| 4 | 15 | I/O | General I/O | U0RTS, ADC2_CH4, XTAL_32K_P |
|
||||
| 5 | 7 | I/O | General I/O | ADC1_CH6, Touch7 |
|
||||
| 6 | 6 | I/O | General I/O | ADC1_CH5, Touch6 |
|
||||
| 7 | 5 | I/O | General I/O | ADC1_CH4, Touch5 |
|
||||
| 8 | 4 | I/O | General I/O | ADC1_CH3, Touch4 |
|
||||
|
||||
| Pin | GPIO | Type | Primary Function | Alternate Functions |
|
||||
|-----|------|------|------------------|---------------------|
|
||||
| 1 | 46 | I/O | **I2C SCL** | - |
|
||||
| 2 | 45 | I/O | **I2C SDA** | - |
|
||||
| 4 | 44 | I/O | U0RXD | Serial RX |
|
||||
| 5 | 43 | I/O | U0TXD | Serial TX |
|
||||
| 6 | 14 | I/O | **LoRa DIO1** | ADC2_CH3, Touch14 |
|
||||
| 7 | 13 | I/O | **LoRa Busy** | ADC2_CH2, Touch13 |
|
||||
| 8 | 12 | I/O | **LoRa RST** | ADC2_CH1, Touch12 |
|
||||
| 9 | 11 | I/O | **LoRa MISO** | ADC2_CH0, Touch11 |
|
||||
| 10 | 10 | I/O | **LoRa MOSI** | ADC1_CH9, Touch10 |
|
||||
| 11 | 9 | I/O | **LoRa SCK** | ADC1_CH8, Touch9 |
|
||||
| 12 | 8 | I/O | **LoRa NSS** | ADC1_CH7, Touch8, SUBSPICS1 |
|
||||
| 13 | 42 | I/O | **TFT SDIN** | MTMS |
|
||||
| 14 | 41 | I/O | **TFT SCLK** | MTDI |
|
||||
| 15 | 40 | I/O | **TFT RS** | MTMS |
|
||||
| 16 | 39 | I/O | **TFT RES** | MTMS |
|
||||
| 18 | 38 | I/O | **TFT CS** | FSPIWP, SUBSPIWP |
|
||||
|
||||
## Peripheral Pin Assignments
|
||||
|
||||
### GNSS Module (UC6580)
|
||||
|
||||
| Function | GPIO | Notes |
|
||||
|----------|------|-------|
|
||||
| TX | 33 | GNSS → ESP32 |
|
||||
| RX | 34 | ESP32 → GNSS |
|
||||
| RST | 35 | Active low reset |
|
||||
| PPS | 36 | 1PPS timing output |
|
||||
| Power | 3 | V1.1: HIGH to enable |
|
||||
|
||||
### LoRa Module (SX1262)
|
||||
|
||||
| Function | GPIO | Notes |
|
||||
|----------|------|-------|
|
||||
| MOSI | 10 | SPI data out |
|
||||
| MISO | 11 | SPI data in |
|
||||
| SCK | 9 | SPI clock |
|
||||
| NSS | 8 | Chip select (active low) |
|
||||
| RST | 12 | Reset |
|
||||
| BUSY | 13 | Busy indicator |
|
||||
| DIO1 | 14 | Interrupt |
|
||||
|
||||
### TFT Display (ST7735S)
|
||||
|
||||
| Function | GPIO | Notes |
|
||||
|----------|------|-------|
|
||||
| SDIN | 42 | SPI data |
|
||||
| SCLK | 41 | SPI clock |
|
||||
| RS (DC) | 40 | Data/Command |
|
||||
| RES | 39 | Reset |
|
||||
| CS | 38 | Chip select |
|
||||
| LED_K | 21 | Backlight control |
|
||||
|
||||
### I2C Bus
|
||||
|
||||
| Function | GPIO | Notes |
|
||||
|----------|------|-------|
|
||||
| SDA | 45 | Data |
|
||||
| SCL | 46 | Clock |
|
||||
|
||||
<Aside type="tip">
|
||||
GPIO45 and GPIO46 are recommended for external I2C devices as they don't conflict with built-in peripherals.
|
||||
</Aside>
|
||||
|
||||
## Code Examples
|
||||
|
||||
<Tabs>
|
||||
<TabItem label="Pin Definitions">
|
||||
```cpp
|
||||
// Wireless Tracker Pin Definitions
|
||||
|
||||
// GNSS (UC6580)
|
||||
#define GNSS_TX_PIN 33
|
||||
#define GNSS_RX_PIN 34
|
||||
#define GNSS_RST_PIN 35
|
||||
#define GNSS_PPS_PIN 36
|
||||
#define GNSS_PWR_PIN 3 // V1.1 only
|
||||
|
||||
// LoRa (SX1262)
|
||||
#define LORA_MOSI_PIN 10
|
||||
#define LORA_MISO_PIN 11
|
||||
#define LORA_SCK_PIN 9
|
||||
#define LORA_NSS_PIN 8
|
||||
#define LORA_RST_PIN 12
|
||||
#define LORA_BUSY_PIN 13
|
||||
#define LORA_DIO1_PIN 14
|
||||
|
||||
// TFT Display
|
||||
#define TFT_SDIN_PIN 42
|
||||
#define TFT_SCLK_PIN 41
|
||||
#define TFT_DC_PIN 40
|
||||
#define TFT_RST_PIN 39
|
||||
#define TFT_CS_PIN 38
|
||||
#define TFT_LED_PIN 21
|
||||
|
||||
// I2C
|
||||
#define I2C_SDA_PIN 45
|
||||
#define I2C_SCL_PIN 46
|
||||
|
||||
// User Interface
|
||||
#define USER_BTN_PIN 0
|
||||
#define LED_PIN 18
|
||||
|
||||
// Battery
|
||||
#define VBAT_ADC_PIN 1
|
||||
#define VBAT_ADC_CTRL 2
|
||||
#define VEXT_CTRL_PIN 3
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem label="Initialization">
|
||||
```cpp
|
||||
void initGNSS() {
|
||||
// Enable GNSS power (V1.1)
|
||||
pinMode(GNSS_PWR_PIN, OUTPUT);
|
||||
digitalWrite(GNSS_PWR_PIN, HIGH);
|
||||
|
||||
// Setup GNSS serial
|
||||
Serial1.begin(115200, SERIAL_8N1, GNSS_RX_PIN, GNSS_TX_PIN);
|
||||
}
|
||||
|
||||
void initLoRa() {
|
||||
SPI.begin(LORA_SCK_PIN, LORA_MISO_PIN, LORA_MOSI_PIN, LORA_NSS_PIN);
|
||||
|
||||
pinMode(LORA_RST_PIN, OUTPUT);
|
||||
pinMode(LORA_BUSY_PIN, INPUT);
|
||||
pinMode(LORA_DIO1_PIN, INPUT);
|
||||
|
||||
// Reset LoRa module
|
||||
digitalWrite(LORA_RST_PIN, LOW);
|
||||
delay(10);
|
||||
digitalWrite(LORA_RST_PIN, HIGH);
|
||||
delay(10);
|
||||
}
|
||||
|
||||
void initDisplay() {
|
||||
pinMode(TFT_LED_PIN, OUTPUT);
|
||||
digitalWrite(TFT_LED_PIN, HIGH); // Enable backlight
|
||||
|
||||
// TFT initialization via library...
|
||||
}
|
||||
|
||||
float readBatteryVoltage() {
|
||||
pinMode(VBAT_ADC_CTRL, OUTPUT);
|
||||
digitalWrite(VBAT_ADC_CTRL, LOW);
|
||||
|
||||
int raw = analogRead(VBAT_ADC_PIN);
|
||||
float voltage = (raw / 4095.0) * 3.3 * 4.9;
|
||||
|
||||
digitalWrite(VBAT_ADC_CTRL, HIGH);
|
||||
return voltage;
|
||||
}
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
207
site/src/content/docs/hardware/power.mdx
Normal file
@ -0,0 +1,207 @@
|
||||
---
|
||||
title: Power Management
|
||||
description: Power supply options and consumption characteristics for the Wireless Tracker
|
||||
---
|
||||
|
||||
import { Aside, Tabs, TabItem } from '@astrojs/starlight/components';
|
||||
|
||||
## Power Supply Options
|
||||
|
||||
The Wireless Tracker supports multiple power sources with automatic switching.
|
||||
|
||||
<Aside type="caution">
|
||||
Only connect a single power source at a time, except when using USB/5V pin specifically to charge the lithium battery.
|
||||
</Aside>
|
||||
|
||||
### Input Specifications
|
||||
|
||||
| Power Mode | Min | Typical | Max | Unit |
|
||||
|------------|-----|---------|-----|------|
|
||||
| Type-C USB (≥500mA) | 4.7 | 5.0 | 6.0 | V |
|
||||
| Lithium battery (≥250mA) | 3.3 | 3.7 | 4.2 | V |
|
||||
| 5V pin (≥500mA) | 4.7 | 5.0 | 6.0 | V |
|
||||
| 3V3 pin (≥150mA) | 2.7 | 3.3 | 3.5 | V |
|
||||
|
||||
### Output Specifications
|
||||
|
||||
| Output | Max Current | Notes |
|
||||
|--------|-------------|-------|
|
||||
| 3.3V Pin | 500 mA | Regulated output |
|
||||
| 5V Pin | 500 mA | USB powered only |
|
||||
| Vext Pin | 350 mA | Powers TFT + GNSS |
|
||||
|
||||
## Power Consumption
|
||||
|
||||
### By Operating Mode
|
||||
|
||||
| Mode | USB Power | Battery Power |
|
||||
|------|-----------|---------------|
|
||||
| Wi-Fi Scanning | 100 mA | 74 mA |
|
||||
| Wi-Fi Access Point | 150 mA | 111 mA |
|
||||
| Bluetooth Active | 102 mA | 75 mA |
|
||||
| GNSS Active | 120 mA | 89 mA |
|
||||
| LoRa TX @ 14 dBm | 200 mA | 148 mA |
|
||||
| LoRa TX @ 17 dBm | 220 mA | 163 mA |
|
||||
| LoRa TX @ 22 dBm | 240 mA | 178 mA |
|
||||
| LoRa RX Only | 80 mA | 59 mA |
|
||||
| Deep Sleep | 2 mA | **15 µA** |
|
||||
|
||||
<Aside type="tip">
|
||||
Battery operation is more efficient because it avoids USB-to-3.3V regulator losses. The dramatic difference in sleep current (2mA vs 15µA) makes battery power essential for long-term deployments.
|
||||
</Aside>
|
||||
|
||||
## Battery Management
|
||||
|
||||
The Wireless Tracker includes an integrated battery management system:
|
||||
|
||||
- **Charging**: Automatic when USB connected with battery attached
|
||||
- **Protection**: Overcharge, over-discharge, short circuit
|
||||
- **Switching**: Automatic USB/battery source selection
|
||||
- **Monitoring**: Battery voltage readable via GPIO1 ADC
|
||||
|
||||
### Reading Battery Voltage
|
||||
|
||||
```cpp
|
||||
#define VBAT_ADC_PIN 1
|
||||
#define VBAT_CTRL_PIN 2
|
||||
|
||||
float getBatteryVoltage() {
|
||||
// Enable ADC voltage divider
|
||||
pinMode(VBAT_CTRL_PIN, OUTPUT);
|
||||
digitalWrite(VBAT_CTRL_PIN, LOW);
|
||||
|
||||
// Read ADC
|
||||
int rawADC = analogRead(VBAT_ADC_PIN);
|
||||
|
||||
// Disable voltage divider to save power
|
||||
digitalWrite(VBAT_CTRL_PIN, HIGH);
|
||||
|
||||
// Convert to voltage
|
||||
// Formula: VBAT = ADC_Reading × (3.3V / 4095) × 4.9
|
||||
float voltage = (rawADC / 4095.0) * 3.3 * 4.9;
|
||||
|
||||
return voltage;
|
||||
}
|
||||
|
||||
int getBatteryPercent() {
|
||||
float voltage = getBatteryVoltage();
|
||||
|
||||
// Simple linear approximation
|
||||
// 4.2V = 100%, 3.3V = 0%
|
||||
int percent = (int)((voltage - 3.3) / (4.2 - 3.3) * 100);
|
||||
|
||||
return constrain(percent, 0, 100);
|
||||
}
|
||||
```
|
||||
|
||||
### Battery Voltage Thresholds
|
||||
|
||||
| Voltage | State | Approximate % |
|
||||
|---------|-------|---------------|
|
||||
| 4.20 V | Full | 100% |
|
||||
| 4.00 V | High | 80% |
|
||||
| 3.80 V | Medium | 50% |
|
||||
| 3.60 V | Low | 20% |
|
||||
| 3.40 V | Critical | 5% |
|
||||
| 3.30 V | Cutoff | 0% |
|
||||
|
||||
## Low Power Modes
|
||||
|
||||
### Deep Sleep
|
||||
|
||||
The ESP32-S3 supports ultra-low-power deep sleep mode:
|
||||
|
||||
```cpp
|
||||
#include "esp_sleep.h"
|
||||
|
||||
void enterDeepSleep(uint64_t sleepTimeUs) {
|
||||
// Disable peripherals
|
||||
digitalWrite(GNSS_PWR_PIN, LOW); // V1.1
|
||||
digitalWrite(TFT_LED_PIN, LOW);
|
||||
|
||||
// Configure wakeup
|
||||
esp_sleep_enable_timer_wakeup(sleepTimeUs);
|
||||
|
||||
// Optional: wakeup on button press
|
||||
esp_sleep_enable_ext0_wakeup(GPIO_NUM_0, LOW);
|
||||
|
||||
// Enter deep sleep
|
||||
esp_deep_sleep_start();
|
||||
}
|
||||
|
||||
void setup() {
|
||||
// Check wakeup reason
|
||||
esp_sleep_wakeup_cause_t reason = esp_sleep_get_wakeup_cause();
|
||||
|
||||
switch (reason) {
|
||||
case ESP_SLEEP_WAKEUP_TIMER:
|
||||
Serial.println("Woke from timer");
|
||||
break;
|
||||
case ESP_SLEEP_WAKEUP_EXT0:
|
||||
Serial.println("Woke from button");
|
||||
break;
|
||||
default:
|
||||
Serial.println("Normal boot");
|
||||
break;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Light Sleep
|
||||
|
||||
For faster wake with moderate power savings:
|
||||
|
||||
```cpp
|
||||
void enterLightSleep(uint64_t sleepTimeUs) {
|
||||
esp_sleep_enable_timer_wakeup(sleepTimeUs);
|
||||
esp_light_sleep_start();
|
||||
// Execution continues here after wakeup
|
||||
}
|
||||
```
|
||||
|
||||
## Peripheral Power Control
|
||||
|
||||
### Vext Control (V1.1)
|
||||
|
||||
GPIO3 controls the Vext rail that powers the TFT display and GNSS module:
|
||||
|
||||
```cpp
|
||||
#define VEXT_PIN 3
|
||||
|
||||
void enableVext() {
|
||||
pinMode(VEXT_PIN, OUTPUT);
|
||||
digitalWrite(VEXT_PIN, HIGH);
|
||||
}
|
||||
|
||||
void disableVext() {
|
||||
digitalWrite(VEXT_PIN, LOW);
|
||||
}
|
||||
```
|
||||
|
||||
<Aside type="note">
|
||||
On V1.0 hardware, Vext is always enabled. The GPIO3 control was added in V1.1 for better power management.
|
||||
</Aside>
|
||||
|
||||
### Display Backlight
|
||||
|
||||
```cpp
|
||||
#define TFT_LED 21
|
||||
|
||||
void setBacklight(bool on) {
|
||||
digitalWrite(TFT_LED, on ? HIGH : LOW);
|
||||
}
|
||||
|
||||
// PWM dimming (optional)
|
||||
void setBacklightBrightness(uint8_t level) {
|
||||
analogWrite(TFT_LED, level); // 0-255
|
||||
}
|
||||
```
|
||||
|
||||
## Power Optimization Tips
|
||||
|
||||
1. **Disable unused peripherals**: Turn off Wi-Fi, Bluetooth, GNSS when not needed
|
||||
2. **Use deep sleep**: 15µA vs 74mA is a 5000× improvement
|
||||
3. **Reduce LoRa TX power**: 14dBm uses 25% less current than 22dBm
|
||||
4. **Lower GNSS update rate**: 1Hz vs 10Hz reduces average current
|
||||
5. **PWM the display**: Dimming backlight saves significant power
|
||||
6. **Batch operations**: Wake, collect data, transmit, sleep
|
||||
189
site/src/content/docs/hardware/schematic.mdx
Normal file
@ -0,0 +1,189 @@
|
||||
---
|
||||
title: Schematic Reference
|
||||
description: Component reference and circuit details for the Heltec Wireless Tracker
|
||||
---
|
||||
|
||||
import { Aside } from '@astrojs/starlight/components';
|
||||
|
||||
This page provides a reference to the key components and circuit blocks in the Wireless Tracker. For full schematics, see the [Downloads](/resources/downloads/) page.
|
||||
|
||||
## Block Diagram
|
||||
|
||||

|
||||
|
||||
## Power Management
|
||||
|
||||
The power section provides battery charging, voltage regulation, and power path management.
|
||||
|
||||
### Components
|
||||
|
||||
| Component | Value/Part | Function |
|
||||
|-----------|-----------|----------|
|
||||
| F1 | 6V 500mA | Input fuse |
|
||||
| D1 | RSB6.8S | TVS diode (ESD protection) |
|
||||
| D2 | 1N5819 | Schottky diode (reverse polarity) |
|
||||
| Q1 | AO3401 | P-channel MOSFET (power switch) |
|
||||
| U2 | TP4054 | Li-Po charger IC |
|
||||
| U4 | CE6260B33M | 3.3V LDO (main) |
|
||||
| U6 | CE6260B33M | 3.3V LDO (Vext) |
|
||||
| R16 | 2K/5% | Charge current programming |
|
||||
|
||||
<Aside type="tip">
|
||||
The charge current is set by R16. With 2KΩ, charging current is approximately 500mA. Modify this resistor to adjust charging rate.
|
||||
</Aside>
|
||||
|
||||
### Battery Monitoring
|
||||
|
||||
| Component | Value | Function |
|
||||
|-----------|-------|----------|
|
||||
| R13 | 390K/1% | Voltage divider (high side) |
|
||||
| R14 | 100K/1% | Voltage divider (low side) |
|
||||
| Q3 | S9013 | ADC enable transistor |
|
||||
|
||||
Voltage divider ratio: `4.9:1` → `VBAT = ADC × 4.9`
|
||||
|
||||
## ESP32-S3FN8 (U7)
|
||||
|
||||
The main MCU handles all processing, connectivity, and peripheral control.
|
||||
|
||||
### Crystal Oscillators
|
||||
|
||||
| Component | Value | Function |
|
||||
|-----------|-------|----------|
|
||||
| U5 | 40 MHz | Main crystal |
|
||||
| C19, C20 | 22pF | Main crystal load caps |
|
||||
| X1 | 32.768 kHz | RTC crystal |
|
||||
| C8, C22 | 4.7pF | RTC crystal load caps |
|
||||
|
||||
### Key GPIO Assignments
|
||||
|
||||
| GPIO | Function | Notes |
|
||||
|------|----------|-------|
|
||||
| 0 | USER_Key | Boot select / user button |
|
||||
| 1 | Vbat_Read | Battery ADC input |
|
||||
| 2 | ADC_Ctrl | ADC enable control |
|
||||
| 3 | Vext_Ctrl | External power control (V1.1) |
|
||||
| 8-14 | LoRa SPI | NSS, SCK, MOSI, MISO, RST, BUSY, DIO1 |
|
||||
| 18 | LED | User LED control |
|
||||
| 19/20 | USB | D-/D+ native USB |
|
||||
| 21 | LED_K | TFT backlight |
|
||||
| 33-36 | GNSS | TX, RX, RST, PPS |
|
||||
| 38-42 | TFT | CS, RES, RS, SCLK, SDIN |
|
||||
|
||||
## SX1262 LoRa Module (U12)
|
||||
|
||||
The LoRa transceiver provides long-range, low-power wireless communication.
|
||||
|
||||
### RF Components
|
||||
|
||||
| Component | Value | Function |
|
||||
|-----------|-------|----------|
|
||||
| L1 | 2.7nH | RF matching |
|
||||
| L2 | 24nH | RF filter |
|
||||
| L3 | 2.0nH | RF matching |
|
||||
| C12, C15, C18, C25 | 0.1µF | Decoupling |
|
||||
| C13, C14 | 1.8pF | RF matching |
|
||||
| U11 | UPG2179 | RF switch |
|
||||
| X4 | 32 MHz | TCXO |
|
||||
| E4 | IPEX | LoRa antenna connector |
|
||||
|
||||
### SPI Interface
|
||||
|
||||
| Signal | GPIO | Direction |
|
||||
|--------|------|-----------|
|
||||
| NSS | 8 | Output (chip select) |
|
||||
| SCK | 9 | Output (clock) |
|
||||
| MOSI | 10 | Output (data to SX1262) |
|
||||
| MISO | 11 | Input (data from SX1262) |
|
||||
| RST | 12 | Output (reset) |
|
||||
| BUSY | 13 | Input (busy indicator) |
|
||||
| DIO1 | 14 | Input (interrupt) |
|
||||
|
||||
## UC6580 GNSS Module (U9)
|
||||
|
||||
The GNSS receiver provides multi-constellation positioning with L1+L5 frequencies.
|
||||
|
||||
### Crystal and Timing
|
||||
|
||||
| Component | Value | Function |
|
||||
|-----------|-------|----------|
|
||||
| X2 | 26 MHz | Main TCXO |
|
||||
| X3 | 32.768 kHz | RTC crystal |
|
||||
| C34, C41 | 4.7pF | Crystal load caps |
|
||||
| R27 | 10K | Reset pullup |
|
||||
|
||||
### RF Frontend
|
||||
|
||||
| Component | Value | Function |
|
||||
|-----------|-------|----------|
|
||||
| U8 | HDDL1L5RSS-B8 | L1/L5 LNA |
|
||||
| U10 | SW7125DE | RF amplifier |
|
||||
| E3 | IPEX | GNSS antenna connector |
|
||||
|
||||
### RF Matching Network
|
||||
|
||||
| Component | Value |
|
||||
|-----------|-------|
|
||||
| L4 | 68nH |
|
||||
| L5 | 1nH |
|
||||
| L6 | 2.2nH |
|
||||
| L7 | 18nH |
|
||||
| L9 | 6.8nH |
|
||||
| L10 | 7nH |
|
||||
| L11 | 4.5nH |
|
||||
| EL2 | 1µH |
|
||||
|
||||
### UART Interface
|
||||
|
||||
| Signal | GPIO | Direction |
|
||||
|--------|------|-----------|
|
||||
| TX | 33 | GNSS → ESP32 |
|
||||
| RX | 34 | ESP32 → GNSS |
|
||||
| RST | 35 | Reset (active low) |
|
||||
| PPS | 36 | 1PPS timing pulse |
|
||||
|
||||
## TFT Display (U1)
|
||||
|
||||
The 0.96" TFT display (ST7735S driver) provides visual feedback.
|
||||
|
||||
| Signal | GPIO | Function |
|
||||
|--------|------|----------|
|
||||
| SDIN | 42 | SPI data |
|
||||
| SCLK | 41 | SPI clock |
|
||||
| RS (DC) | 40 | Data/Command select |
|
||||
| RES | 39 | Reset |
|
||||
| CS | 38 | Chip select |
|
||||
| LED_K | 21 | Backlight (via Q4) |
|
||||
|
||||
## USB Type-C (U3)
|
||||
|
||||
| Pin | Signal | Notes |
|
||||
|-----|--------|-------|
|
||||
| VBUS | VDD_5V | 5V power input |
|
||||
| DN1/DN2 | USB_N | Data negative |
|
||||
| DP1/DP2 | USB_P | Data positive |
|
||||
| CC1 | R3 (5.1K) | Configuration channel |
|
||||
| CC2 | R6 (5.1K) | Configuration channel |
|
||||
|
||||
<Aside type="note">
|
||||
The 5.1K resistors on CC1/CC2 identify the device as a UFP (Upstream Facing Port) sink, requesting 5V power from USB-C sources.
|
||||
</Aside>
|
||||
|
||||
## Status LEDs
|
||||
|
||||
| LED | Color | Resistor | Function |
|
||||
|-----|-------|----------|----------|
|
||||
| LED1 | Orange | R7 (330Ω) | Charging indicator |
|
||||
| LED2 | White | R10 (330Ω) | User LED (GPIO18) |
|
||||
|
||||
## Buttons
|
||||
|
||||
| Button | Function | GPIO |
|
||||
|--------|----------|------|
|
||||
| S1 | RESET_SW | RST |
|
||||
| S2 | USER_SW | GPIO0 |
|
||||
|
||||
## Download Links
|
||||
|
||||
- [V1.0 Schematic (PDF)](https://resource.heltec.cn/download/Wireless_Tracker/Wireless_Tacker1.0/HTIT-Tracker_V0.3.pdf)
|
||||
- [V1.1 Schematic (PDF)](https://resource.heltec.cn/download/Wireless_Tracker/Wireless_Tacker1.1/HTIT-Tracker_V0.5.pdf)
|
||||
147
site/src/content/docs/hardware/specifications.mdx
Normal file
@ -0,0 +1,147 @@
|
||||
---
|
||||
title: Specifications
|
||||
description: Complete technical specifications for the Heltec Wireless Tracker
|
||||
---
|
||||
|
||||
import { Aside } from '@astrojs/starlight/components';
|
||||
|
||||
## General Specifications
|
||||
|
||||
| Parameter | Value |
|
||||
|-----------|-------|
|
||||
| **Master Chip** | ESP32-S3FN8 (Xtensa 32-bit LX7 dual-core) |
|
||||
| **LoRa Chipset** | Semtech SX1262 |
|
||||
| **GNSS Chipset** | Unicore UC6580 |
|
||||
| **LoRa Frequency** | 470-510 MHz (LF) / 863-928 MHz (HF) |
|
||||
| **Max TX Power** | 21 ±1 dBm |
|
||||
| **LoRa Sensitivity** | -135 dBm @ SF12/125kHz |
|
||||
| **Wi-Fi** | 802.11 b/g/n (2.4 GHz) |
|
||||
| **Bluetooth** | Bluetooth 5, BLE, Mesh |
|
||||
| **Operating Temp** | -20°C to +70°C |
|
||||
| **Dimensions** | 65.48 × 28.06 × 13.52 mm |
|
||||
|
||||
## Interfaces
|
||||
|
||||
| Interface | Description |
|
||||
|-----------|-------------|
|
||||
| USB | Type-C with ESD protection |
|
||||
| Battery | SH1.25-2 lithium battery connector |
|
||||
| LoRa Antenna | IPEX (U.FL) connector |
|
||||
| GNSS Antenna | IPEX (U.FL) connector |
|
||||
| Wi-Fi/BT Antenna | Onboard 2.4 GHz metal spring |
|
||||
| Display | 0.96" TFT-LCD (80×160 RGB) |
|
||||
|
||||
## Power Supply
|
||||
|
||||
<Aside type="caution">
|
||||
Except when USB or 5V Pin is connected for lithium battery charging, only connect a single power source at a time.
|
||||
</Aside>
|
||||
|
||||
| Power Mode | Minimum | Typical | Maximum | Unit |
|
||||
|------------|---------|---------|---------|------|
|
||||
| Type-C USB (≥500mA) | 4.7 | 5.0 | 6.0 | V |
|
||||
| Lithium battery (≥250mA) | 3.3 | 3.7 | 4.2 | V |
|
||||
| 5V pin (≥500mA) | 4.7 | 5.0 | 6.0 | V |
|
||||
| 3V3 pin (≥150mA) | 2.7 | 3.3 | 3.5 | V |
|
||||
|
||||
## Power Output
|
||||
|
||||
| Output Pin | Max Current |
|
||||
|------------|-------------|
|
||||
| 3.3V Pin | 500 mA |
|
||||
| 5V Pin (USB powered only) | 500 mA |
|
||||
| Vext Pin | 350 mA |
|
||||
|
||||
## Power Consumption
|
||||
|
||||
| Mode | USB Power | Battery Power |
|
||||
|------|-----------|---------------|
|
||||
| Wi-Fi Scan | 100 mA | 74 mA |
|
||||
| Wi-Fi AP | 150 mA | 111 mA |
|
||||
| Bluetooth | 102 mA | 75 mA |
|
||||
| GNSS Active | 120 mA | 89 mA |
|
||||
| LoRa TX 14 dBm | 200 mA | 148 mA |
|
||||
| LoRa TX 17 dBm | 220 mA | 163 mA |
|
||||
| LoRa TX 22 dBm | 240 mA | 178 mA |
|
||||
| LoRa RX | 80 mA | 59 mA |
|
||||
| Deep Sleep | 2 mA | 15 µA |
|
||||
|
||||
<Aside type="tip">
|
||||
Battery-powered operation is more efficient due to the lack of USB-to-3.3V conversion losses. The 15µA sleep current enables months of standby on a typical lithium cell.
|
||||
</Aside>
|
||||
|
||||
## LoRa RF Specifications
|
||||
|
||||
### Transmit Power
|
||||
|
||||
| Frequency Band | Max Power |
|
||||
|----------------|-----------|
|
||||
| 470-510 MHz | 21 ±1 dBm |
|
||||
| 867-870 MHz | 21 ±1 dBm |
|
||||
| 902-928 MHz | 21 ±1 dBm |
|
||||
|
||||
### Receiver Sensitivity
|
||||
|
||||
| Bandwidth | Spreading Factor | Sensitivity |
|
||||
|-----------|------------------|-------------|
|
||||
| 125 kHz | SF12 | -135 dBm |
|
||||
| 125 kHz | SF10 | -130 dBm |
|
||||
| 125 kHz | SF7 | -124 dBm |
|
||||
|
||||
### Regional Frequencies
|
||||
|
||||
| Region | Frequency (MHz) | Model |
|
||||
|--------|-----------------|-------|
|
||||
| EU433 | 433.175-434.665 | Wireless Tracker-LF |
|
||||
| CN470 | 470-510 | Wireless Tracker-LF |
|
||||
| IN868 | 865-867 | Wireless Tracker-HF |
|
||||
| EU868 | 863-870 | Wireless Tracker-HF |
|
||||
| US915 | 902-928 | Wireless Tracker-HF |
|
||||
| AU915 | 915-928 | Wireless Tracker-HF |
|
||||
| KR920 | 920-923 | Wireless Tracker-HF |
|
||||
| AS923 | 920-925 | Wireless Tracker-HF |
|
||||
|
||||
## GNSS Specifications
|
||||
|
||||
### Basic Information
|
||||
|
||||
| Parameter | Value |
|
||||
|-----------|-------|
|
||||
| Channels | 96 |
|
||||
| Update Rate | Up to 10 Hz |
|
||||
| Data Format | NMEA-0183, Unicore, RTCM 3.x |
|
||||
| Frequency Points | GPS L1+L5, BDS B2a, GLONASS G1, Galileo E1+E5a, QZSS L1+L5, SBAS L1, NAVIC L5* |
|
||||
|
||||
*NAVIC L5 requires specific firmware
|
||||
|
||||
### Position Accuracy
|
||||
|
||||
| Parameter | Value |
|
||||
|-----------|-------|
|
||||
| Horizontal (RMS) | 1.5 m |
|
||||
| Vertical (RMS) | 2.5 m |
|
||||
| Time (RMS) | 5 ns |
|
||||
| Speed | 0.02 m/s |
|
||||
|
||||
### Time to First Fix (TTFF)
|
||||
|
||||
| Mode | Time |
|
||||
|------|------|
|
||||
| Cold Start | < 26 s |
|
||||
| Warm Start | < 2 s |
|
||||
| Recapture | 1 s |
|
||||
|
||||
### Sensitivity by System
|
||||
|
||||
| Sensitivity | GNSS | BDS | GPS | Galileo | GLONASS |
|
||||
|-------------|------|-----|-----|---------|---------|
|
||||
| Cold Start | -148 | -146 | -148 | -144 | -144 dBm |
|
||||
| Warm Start | -156 | -155 | -155 | -154 | -148 dBm |
|
||||
| Tracking | -165 | -163 | -165 | -163 | -158 dBm |
|
||||
| Recapture | -156 | -154 | -156 | -154 | -152 dBm |
|
||||
|
||||
## Physical Dimensions
|
||||
|
||||

|
||||
|
||||
Dimensions: **65.48 × 28.06 × 13.52 mm**
|
||||
71
site/src/content/docs/index.mdx
Normal file
@ -0,0 +1,71 @@
|
||||
---
|
||||
title: Heltec Wireless Tracker
|
||||
description: Documentation for the Heltec Wireless Tracker ESP32-S3FN8 development kit
|
||||
template: splash
|
||||
hero:
|
||||
tagline: A compact development kit combining ESP32-S3, LoRa, and multi-constellation GNSS for IoT tracking applications
|
||||
image:
|
||||
file: ../../assets/tracker-icon.svg
|
||||
actions:
|
||||
- text: Get Started
|
||||
link: /getting-started/overview/
|
||||
icon: right-arrow
|
||||
variant: primary
|
||||
- text: View Pinout
|
||||
link: /hardware/pinout/
|
||||
icon: external
|
||||
---
|
||||
|
||||
import { Card, CardGrid, LinkCard } from '@astrojs/starlight/components';
|
||||
|
||||
## What is the Wireless Tracker?
|
||||
|
||||
The **Heltec Wireless Tracker** is a development kit based on the ESP32-S3FN8 that integrates:
|
||||
|
||||
- **SX1262** LoRa transceiver for long-range, low-power communication
|
||||
- **UC6580** GNSS module with L1+L5 dual-frequency positioning
|
||||
- **0.96" TFT display** for status and debugging
|
||||
- **Lithium battery management** with charging and protection
|
||||
|
||||
<CardGrid stagger>
|
||||
<Card title="Multi-Constellation GNSS" icon="rocket">
|
||||
Supports GPS, GLONASS, BDS, Galileo, NAVIC, and QZSS for fast, accurate positioning anywhere in the world.
|
||||
</Card>
|
||||
<Card title="LoRaWAN Ready" icon="setting">
|
||||
Compatible with EU868, US915, AU915, AS923, and other regional LoRaWAN frequencies for global deployment.
|
||||
</Card>
|
||||
<Card title="Low Power Design" icon="star">
|
||||
22nm technology enables sleep currents as low as 15µA on battery power for extended field operation.
|
||||
</Card>
|
||||
<Card title="Meshtastic Compatible" icon="puzzle">
|
||||
Works with Meshtastic firmware for decentralized off-grid mesh networking.
|
||||
</Card>
|
||||
</CardGrid>
|
||||
|
||||
## Hardware Variants
|
||||
|
||||
| Model | Frequency Range | Use Case |
|
||||
|-------|-----------------|----------|
|
||||
| **Wireless Tracker-LF** | 470-510 MHz | China mainland (CN470) |
|
||||
| **Wireless Tracker-HF** | 863-928 MHz | EU868, US915, AU915, AS923, KR920 |
|
||||
|
||||
:::caution[Hardware Version]
|
||||
The V1.1 hardware revision changed GNSS power control to GPIO3. Check [Hardware Versions](/getting-started/hardware-versions/) for compatibility details.
|
||||
:::
|
||||
|
||||
## Quick Links
|
||||
|
||||
<CardGrid>
|
||||
<LinkCard title="Specifications" href="/hardware/specifications/" description="Full technical specifications" />
|
||||
<LinkCard title="Pinout Reference" href="/hardware/pinout/" description="Pin assignments and functions" />
|
||||
<LinkCard title="Development Platforms" href="/getting-started/development-platforms/" description="Arduino, ESP-IDF, MicroPython" />
|
||||
<LinkCard title="Downloads" href="/resources/downloads/" description="Datasheets, schematics, firmware" />
|
||||
</CardGrid>
|
||||
|
||||
## Popular Guides
|
||||
|
||||
<CardGrid>
|
||||
<LinkCard title="Meshtastic Low Power" href="/guides/meshtastic-low-power/" description="Extend battery life with optimized sleep settings" />
|
||||
<LinkCard title="Heart Rate Monitor" href="/guides/heart-rate-monitor/" description="Build a LoRaWAN health sensor" />
|
||||
<LinkCard title="LoRaWAN Setup" href="/guides/lorawan-setup/" description="Connect to The Things Network and SnapEmu" />
|
||||
</CardGrid>
|
||||
212
site/src/content/docs/reference/faq.mdx
Normal file
@ -0,0 +1,212 @@
|
||||
---
|
||||
title: Frequently Asked Questions
|
||||
description: Common questions and solutions for the Heltec Wireless Tracker
|
||||
---
|
||||
|
||||
import { Aside } from '@astrojs/starlight/components';
|
||||
|
||||
## Bootloader & Programming
|
||||
|
||||
### How do I enter boot mode manually?
|
||||
|
||||
The Wireless Tracker uses ESP32-S3's internal USB, which may fail to enter bootloader mode in certain situations. To manually enter boot mode:
|
||||
|
||||
**Device not connected:**
|
||||
1. Press and hold the `USER` button
|
||||
2. Connect the USB cable
|
||||
3. Release `USER` button
|
||||
|
||||
**Device already connected:**
|
||||
1. Hold `USER` button
|
||||
2. Press `RESET` button
|
||||
3. Release `RESET` button
|
||||
4. Release `USER` button
|
||||
|
||||
<Aside type="note">
|
||||
Timing requirement: Reset signal must be held for ≥10 ms
|
||||
</Aside>
|
||||
|
||||
### Why can't I upload code?
|
||||
|
||||
Common causes:
|
||||
1. Wrong board selected in IDE
|
||||
2. Device not in bootloader mode
|
||||
3. Serial port driver issues
|
||||
4. Another program has the port open
|
||||
|
||||
**Solutions:**
|
||||
1. Select "Heltec Wireless Tracker" in board manager
|
||||
2. Use manual boot mode entry (see above)
|
||||
3. Install CP210x or CH340 drivers if needed
|
||||
4. Close serial monitor before uploading
|
||||
|
||||
## Hardware Versions
|
||||
|
||||
### What are the key differences between V1.0 and V1.1?
|
||||
|
||||
| Feature | V1.0 | V1.1 |
|
||||
|---------|------|------|
|
||||
| GNSS Power | Shared rail | Dedicated LDO |
|
||||
| GNSS Control | Always on | GPIO3 (HIGH = enabled) |
|
||||
| Power Isolation | Limited | Improved |
|
||||
| Sleep Current | ~25 µA | ~15 µA |
|
||||
|
||||
<Aside type="caution" title="Important">
|
||||
V1.1 requires **GPIO3 set to HIGH** to enable the GNSS module. Firmware written for V1.0 may not work correctly on V1.1.
|
||||
</Aside>
|
||||
|
||||
### How do I identify my hardware version?
|
||||
|
||||
1. **Physical marking**: Look for version marking on PCB near USB connector
|
||||
2. **Programmatic detection**: V1.1 has GNSS tied to GPIO3 control
|
||||
|
||||
```cpp
|
||||
// Simple test - if GNSS works after this, it's V1.1
|
||||
pinMode(3, OUTPUT);
|
||||
digitalWrite(3, HIGH);
|
||||
```
|
||||
|
||||
## Meshtastic
|
||||
|
||||
### Why isn't Meshtastic firmware working on V1.1?
|
||||
|
||||
The V1.1 hardware changed the GNSS power control pin to GPIO3. Older Meshtastic firmware didn't know about this change.
|
||||
|
||||
**Solution:**
|
||||
- Use **Meshtastic 2.2.17 Beta or later** (auto-detects version)
|
||||
- Or use temporary Heltec firmware: `device-install.bat -f firmware.factory.bin`
|
||||
|
||||
### Device shows "No GPS" in Meshtastic
|
||||
|
||||
1. **V1.1 hardware**: Ensure you're using compatible firmware
|
||||
2. **Antenna**: Check GNSS antenna is connected (IPEX connector)
|
||||
3. **Location**: Move outdoors with clear sky view
|
||||
4. **Cold start**: Allow 30-60 seconds for initial fix
|
||||
|
||||
## Display Issues
|
||||
|
||||
### Why is my screen not displaying?
|
||||
|
||||
**When running LoRa/LoRaWAN code:**
|
||||
1. Check serial output for errors
|
||||
2. Press RST button
|
||||
3. Verify device activation via licensing docs
|
||||
|
||||
**When running Meshtastic:**
|
||||
1. Confirm correct firmware version for your hardware
|
||||
2. Check display settings in Meshtastic app
|
||||
3. Verify backlight pin (GPIO21) is enabled
|
||||
|
||||
### Screen shows garbage or artifacts
|
||||
|
||||
1. Check TFT library version compatibility
|
||||
2. Verify SPI pin configuration
|
||||
3. Try reducing SPI clock speed
|
||||
4. Check power supply stability
|
||||
|
||||
## Power & Battery
|
||||
|
||||
### How do I read battery voltage?
|
||||
|
||||
```cpp
|
||||
#define VBAT_ADC_PIN 1
|
||||
#define VBAT_CTRL_PIN 2
|
||||
|
||||
float readBattery() {
|
||||
pinMode(VBAT_CTRL_PIN, OUTPUT);
|
||||
digitalWrite(VBAT_CTRL_PIN, LOW); // Enable divider
|
||||
|
||||
int raw = analogRead(VBAT_ADC_PIN);
|
||||
|
||||
digitalWrite(VBAT_CTRL_PIN, HIGH); // Disable to save power
|
||||
|
||||
// VBAT = ADC * 4.9
|
||||
return (raw / 4095.0) * 3.3 * 4.9;
|
||||
}
|
||||
```
|
||||
|
||||
### Device won't charge
|
||||
|
||||
1. Verify USB cable supports data+power (not charge-only)
|
||||
2. Check battery polarity (red=positive)
|
||||
3. Battery may be deeply discharged - leave connected for 30 min
|
||||
4. Check charging LED (orange when charging)
|
||||
|
||||
### High sleep current consumption
|
||||
|
||||
1. **V1.1**: Set GPIO3 LOW to disable GNSS in sleep
|
||||
2. Disable display backlight (GPIO21 LOW)
|
||||
3. Disable WiFi/BT before sleep
|
||||
4. Use `esp_deep_sleep_start()` not light sleep
|
||||
|
||||
## GPS/GNSS
|
||||
|
||||
### GPS won't get a fix
|
||||
|
||||
1. **Antenna**: Ensure IPEX antenna is connected securely
|
||||
2. **Power (V1.1)**: Set GPIO3 HIGH to enable GNSS
|
||||
3. **Location**: Clear sky view required, move away from buildings
|
||||
4. **Time**: Cold start takes up to 26 seconds
|
||||
5. **Interference**: Move away from other electronics
|
||||
|
||||
### GPS accuracy is poor
|
||||
|
||||
1. Allow time for multi-constellation acquisition
|
||||
2. Use external active antenna for better signal
|
||||
3. Check if all GNSS systems are enabled (`$CFGSYS,H11`)
|
||||
4. Verify antenna has clear sky view (not just outdoors)
|
||||
|
||||
## LoRa
|
||||
|
||||
### No LoRa communication
|
||||
|
||||
1. Verify antenna is connected (IPEX connector on LoRa port)
|
||||
2. Check frequency matches between devices
|
||||
3. Verify regional settings are correct
|
||||
4. Increase spreading factor for longer range
|
||||
|
||||
### LoRaWAN join fails
|
||||
|
||||
1. Double-check DevEUI, AppEUI, AppKey
|
||||
2. Verify gateway is online and in range
|
||||
3. Check frequency plan matches network server
|
||||
4. Try increasing TX power or SF
|
||||
|
||||
### Short range
|
||||
|
||||
1. Use higher spreading factor (SF10-SF12)
|
||||
2. Check antenna connection and orientation
|
||||
3. Verify TX power settings
|
||||
4. Consider terrain and obstacles
|
||||
|
||||
## Software
|
||||
|
||||
### "Board not found" in Arduino IDE
|
||||
|
||||
1. Add Heltec board URL to preferences:
|
||||
```
|
||||
https://resource.heltec.cn/download/package_heltec_esp32_index.json
|
||||
```
|
||||
2. Install "Heltec ESP32 Series Dev-boards" from Boards Manager
|
||||
3. Select "Wireless Tracker" from board menu
|
||||
|
||||
### Library conflicts
|
||||
|
||||
The Heltec library may conflict with generic ESP32 libraries. Solutions:
|
||||
1. Use Heltec-specific library versions
|
||||
2. Remove duplicate libraries from Arduino/libraries folder
|
||||
3. Use PlatformIO with explicit lib_deps
|
||||
|
||||
### Memory issues (sketch too large)
|
||||
|
||||
1. Use minimal partition scheme
|
||||
2. Enable PSRAM if available
|
||||
3. Reduce debug output
|
||||
4. Use release build (-O2 optimization)
|
||||
|
||||
## Resources
|
||||
|
||||
- [Heltec Wiki](https://wiki.heltec.org)
|
||||
- [Heltec GitHub](https://github.com/Heltec-Aaron-Lee/WiFi_Kit_series)
|
||||
- [Meshtastic Documentation](https://meshtastic.org/docs/)
|
||||
- [Downloads Page](/resources/downloads/)
|
||||