In this issue, we recommend a smart hardware project: X-TRACK, a GPS bicycle speedometer that supports offline maps and track recording.
X-TRACK IS AN OPEN-SOURCE GPS BIKE COMPUTER DESIGNED AND MANUFACTURED BY FASTSHIFT. It supports offline real-time map display, supports recording and displaying real-time tracks, and exports track files in standard GPX format.
function
Support speed, distance, time, acceleration, heading display
Offline maps, support real-time display, support zoom
Support for step counting
Support latitude and longitude, altitude
Support RTC auto-recovery based on GPS
Tracks can be recorded, and files in GPX format can be exported
Support automatic data saving (JSON format file)
Four hours long (continuous work, always on)
Support for on-PC emulation, off-hardware debugging (configured for Release x86)
Support real-time display
Hardware configuration
Main control: AT32F403ACGU7 (Frequency: 240MHz RAM: 224KB ROM: 1MB)
Screen: ST7788 IPS 1.5inch SPI interface 240×24049 resolution 60Hz refresh rate
Memory: Micro SD CARD 32GB
Input device: Rotary encoder
RTC: The MCU has a built-in RTC clock
Computer step counting: LSM6DSM (support hardware step counting output)
Geomagnetometer: LIS3MDL
GPS:ATGM336H(BDS + GPS + GLONASS + GALILEO + QZSS + SBAS)
Battery: Li-ion 3.7V 683030 700mAh
Power Management: LP5907-3.3 + MCP73831
Shell: 3D printing light-curing
Software Section
The software development environment is divided into two parts, Visual Studio and Keil MDK:
The underlying driver part is developed and debugged using Keil
The application layer code runs on the LVGL simulator and is programmed to the MCU after the function verification is completed
The two projects reuse the same set of code, with driver isolation through the HAL layer
Functional architecture
The overall software architecture of X-TRACK is shown in the following figure, and the system consists of three layers: HAL, Framework, and APP.
The HAL layer is responsible for the underlying chip driver and sensor raw data acquisition
The framework layer is the core part of the software, which consists of three modules: LVGL, page scheduling, and message framework, which are responsible for graphics rendering, page lifecycle management, and message distribution processing, respectively
The APP layer displays the user interface, which consists of three parts: map, watch face, and system information
Functional demo
Real-time trajectory display
- Export historical tracks
- Speed measurement can also be carried out on high-speed rail
- View system data such as battery level, riding records, GPS positioning, sensors, etc
The project uses the GPL3.0 open source license, and you can read more content by yourself.