Table of Contents
|
Prototypes are being tested: run on single 18650 Li-Ion cell, fit in a 100x60x25mm box.
![]() |
![]() |
![]() |
The design proposed here should be taken with flexibility and by no mean it should be considered a fixed design. For example almost any GPS module can work here. The only requirement is that it can be powered from the lithium battery and provides standard NMEA sentences on the TTL serial port. PPS signal is desired but probably with small software modifications it could work without it. External (onboard) aircraft GPS could be used as well.
The box, the battery, the antenna, the charging circuit, etc. are all elements which can be replaced by whatever is locally available. Most likely other CPU's from the STM32 family are able to run the software and steer the hardware.
List of core elements
The core elements required to construct DYI OGN tracker are:
|
All these can be purchased on e-bay or other online sites for total of $25
Note for the RF modules: RFM69W can go up to +13dBm, while RFM69HW up to +20dBm transmit power. The price difference being unimportant, it is probably better to stay with the RFM69HW as a preferred option. At this time they can not be auto-detected by the software and need slightly different programming, thus the choice is remembered in the Flash. Current software works with both RFM69W and RFM69HW with manual first-time-flash selection needed.
Auxiliary parts: not part of the tracker itself but very useful for programming, testing and development
|
I recommend getting both the ST-Link programmer and the USB-UART. Especially if you are a programmer, the cycle: change the code, reload, see the effect is much quicker when you work with the ST-Link. Otherwise you need to start/stop the serial terminal, switch the jumpers for every cycle.
![]() |
![]() |
![]() |
Left: Core tracker element: STM32F103C8T6 CPU, RFM69W radio transceiver and VK16U6 GPS
Center: remaining elements: plastic box, battery with its holder, SMA socket, antenna, power switch, etc.
Right: old recycled laptop battery (in this example 9-cell, taken from an old Thinkpad T42)
Assembly instruction
Word of caution: keep in mind that this is mostly 3.3V electronics and some elements may not tolerate 5V.
In particular the RF module is specified for max. 3.6V thus be careful not to accidentally connect 5V from the USB-UART, logic analyzer or 4V from the battery. The RF module is supplied through the STM32 board low-drop voltage regulator. Only apply 4 or 5V to the 5V input on the STM32 board.
Initial test
To make sure your parts are working, you can quickly test them.
GPS: connect it to the USB-UART, then observe what comes out with PUTTY, GPS port is 9600bps by default.
Even simpler GPS test: apply power (red and black wire) and expose the GPS to (a piece of) open sky - after a minute or two the green LED starts blinking (PPS)
STM32 CPU: power it up through its USB and then red LED should come up, while blue LED starts blinking slowly.
1. Wire the RF69(H)W radio transceiver to the STM32 CPU
Wire the RF module, use short pieces of cables to connect to STM32:
|

Preparation of the cables
![]() |
![]() |
![]() |
Left: Wiring diagram for the RF module
Center: CPU board and RF module just before wiring them together
Right: RF module wired to the CPU board

Assembly and soldering
Possibly the most difficult part, because of the fine pitch of the RF module. Use short wires and fine soldering iron. STM32 and RFM69(H)W pins are clearly marked on each board.
2. Prepare the box
- Drill the holes for the power switch, LED and antenna SMA connector.
- Cut the hole for the USB charger connector.
- Make the antenna counter-weight from a band of copper foil.
- Wire the charger board to the power switch, make battery wires ready
- Glue the GPS and the charger board with fast epoxy or with Hot melt adhesive(HMA), put a ferrite core onto the GPS cables.
- Attach the SMA socket, put a ferrite core onto the coax
![]() |
![]() |
![]() |
Left: Box with holes drilled and the antenna counter-weight (copper foil)
Center: Box with GPS and charger board glued, SMA connector, power switch and status LED installed
Right: LED with the soldered resistor
3. Wire the GPS with the STM32 CPU
Wire the GPS to the CPU+RF according to the following list:
|
![]() |
![]() |
Left: GPS wiring points (RF module not shown for clarity): colors correspond to VK16U6 GPS module standard wires
Right: wired GPS connections
At this point, when you flash in the OGN code you should see the blue LED send short flashes - this means GPS is sending valid NMEA sentences - this is good indication CPU and GPS works. Once the GPS acquires lock there will be two longer flashes every second (one longer flash for PPS and other for GPS lock). Green light on the GPS will blink - this is the PPS.
If you watch the console output, at startup the tracker sends out the RF chip version - if it is 0x27 then you are in business - good indication the SPI and power to the RF chip is wired correctly.
4. Wire battery, power switch, LED

Remaining wires to be connected to the STM32 CPU. Just the battery or other supply is essential, the rest is optional
You can supply the system through the USB connector (on the bottom on the above picture) - then you don't even need a battery and the containing box can be much smaller. With enough programming knowledge you can likely program the CPU tu emulate a serial port on this USB connector.
The pins of the STM32 CPU board are listed on to of the main.cpp file - please consult this description for crosscheck and when you have doubts what the functions of the pins are.
5. Wire the SMA connector with pigtail
Connect the pigtail of the SMA connector to the GND (screen) and ANT (center conductor) of the RF module.
Software for DIY tracker
Once hardware is created, you will need to install OGN DYI tracker firmware on it.
The DYI tracker's firmware source code is available in our GIT repository. The binary version (ready for uploading to the tracker's chip) will be available in the downloads section shortly.
Binary can be uploaded through the serial port (you need to play a bit with the yellow jumpers) or quicker with the ST-Link v2 programmer/debugger.
To compile the software: GNU ARM GCC compiler
To download the code with the ST-Link: ST-Link utility software
If you have trouble compiling, here are the .bin or .hex files to download to the STM32:
|
Beta release of a major rewrite
New features:
- read barometric sensor: BMP180 (temperature and pressure)
- calculate standard pressure altitude, climb rate
- produce vario sound
- correlate altiude from GPS with air pressure and produce more precise altitude
- output as NMEA sentence: temperature, pressure, standard altitude, climb rate, radio noise, positions of other trackers received on radio
- FatFS implemented onto microSD cards
- log all NMEA sentences (and whatever else you want) onto an ASCII log file
- Buzzer driving amplitude twice as high: you need to connect the buzzer between PB8 and PB9 for this to work
- Ctrl-C on the console prints FreeRTOS task status
To get the source code:
git clone https://github.com/glidernet/diy-tracker
then enter the diy-tracker directory, check options in the makefile and type make.
Additional modules
Bluetooth module

HC-06 bluetooth module (costs $3-4) can be easily connected to the tracker console (STM32 UART1) serial port for wireless access. No change in the code, just configure the Bluetooth module with few simple AT commands !
Configuration
You need to make sure at least for the serial bit rate the device is preset for. You can check it by connecting the bluetooth module to a USB-UART port and typing "AT" on the terminal: simplest one is the PuTTY for Windows or minicom for Linux. If you see the module response "OK" - you are at the right speed, if not you need to find the right speed by trial and error. Try first 9600 and 115200.
When you find the right speed and it is not 115200, then issue the following command:
AT+BAUD8
no need for a return or anything, but take care to type all in uppercase.
Now your bluetooth module is configured for 115200bps on the serial port - same as the console serial port on the STM32
Other useful configuration commands are:
|
Connections
|
Usage
Connect to the bluetooth module from your smartphone, tablet or laptop. Default pin is 1234, but can be easily changed by an AT+PINxxxx command. Treat the device as a virtual serial port or like bluetooth GPS (as it already sends the NMEA sentences from the GPS).
Issues
This particular Bluetooth module takes 8 mA when connected to your smartphone but can take as much as 30mA when not connected. It is thus advised no to connect it unless it is really being used. You can either phisically disconnect this module or make a slide switch that disconnects the power when you don't actually want or need to use the bluetooth connection.
More info
Details on the configuration can be found here, here and here
(Micro)SD card slot

yes, you can connect an microSD card to the STM32, using the SPI interface. This has been done, and more details is to come soon. Software exists already to read and write files on the FAT16/32 file system. I used a 2GB microSD, microSDHC should work but has not been tried yet.
Connections
|
BMP180 pressure sensor

is done and reading pressure and temperature works.
Connections
|
Potentiometer
initially it was meant to control the buzzer volume, but as its position can be read by the CPU, it could be used for any software-controlled function, like setup, mode switching, etc.
At same time it integrates the power switch, thus no extra space is needed in the box.

Connection:
The potentiometer is connected to the ADC channel #8, thus PB0.
Usage
at this moment software reads the potentiometer position and produces 4-bit position code, thus it functions as 16-level positional encoder. Histeresis is applied to avoid spurious data and short beep is made with a rising pitch every time the encoder output changes to let the operator get the feel as it turns the knob.
Schematics with the above additional parts





and a very simple PCB which helps to assemble all the parts.
Room to expand
additional hardware on board
The DIY is not closed in the sense it can be expanded with more hardware. Pressure and inertial sensors are one of the natural choices. There is no software for it but it can all be done by the community. One particular item is combined pressure, accelerometer, gyroscope and magnetic compass, can be bought on aliexpress. What if we make a barometric vario compensated and expanded with inertial sensors ? We all know that thermals can be sensed by our "bottom", right ? What if we make an instrument for exactly this purpose ?
additional features
- simplified configuration
Currently the "aircraft type" (Glider, Paraglider, Plane…) is set in the software, so changing it requires the tracker to be connected to the PC, the updated firmware must be recompiled and re-uploaded to the device.
Since tracker is portable, this should be much easier - user should be able to set the type, using one or two buttons/switches on the tracker itself.
The type set (0..15) could be confirmed e.g. by the beeper and be allowed to be set on the ground only (velocity=0) ?
However! One can already set the associated type in the OGN ddb - this one overwrites the type sent in the OGN tracker's packets, so changing the display type in live.glidernet is possible without having to do any "complicated" tracker's software update.
- e-vario (with beeper and volume regulator) - that would be very useful for para-glider pilots ?