← Charles K. Lindberg

GPS Golf Range Finder

Charlie Lindberg · 2024–2025
PCB and software by Charlie Lindberg; mechanical enclosure by Sam Handel

Assembled Rev 2 range finder board on a blue mat: the OLED screen shows a golf ball graphic and 'GPS GOLF RANGEFINDER, C Lindberg 2025' above three push buttons, a USB-C port, a microSD card slot and the GNSS module, with a small LiPo battery beside it. Handheld range finder in a gray 3D-printed enclosure, held in one hand. The OLED screen reads 'GPS Loading' above three round buttons.
The assembled Rev 2 board, and the range finder in its 3D-printed enclosure.

Overview

This is a GPS-based golf range finder that I designed and built: a custom PCB with an integrated PCB GPS antenna, an ATmega328P microcontroller, a small OLED screen, a microSD card holding course data, three buttons and a rechargeable LiPo battery. It shows the distance from where you are standing to the center of the green on the current hole. I was responsible for the PCB and software, and Sam Handel designed the mechanical enclosure.

I started this project in early 2024 because I wanted a simple, cheap and convenient way to get golf distances on the course.

Requirements

The goal was an ultra-low-cost golf range finder that gives accurate distances to the center of the green, is compact, has long battery life, and has an easy-to-read display and user interface. The three key design goals were:

GoalTarget
Cost< $25
Accuracy< 5 yards
Battery life8 hours minimum (two rounds of golf)

System architecture

The device needs to acquire its distance to the green, store course data, display information to the user and take inputs. I chose GPS to acquire distance because it offered the lowest cost and high accuracy, an OLED screen to display data, and an SD card to store course information.

Block diagram: a charger feeds the battery, which feeds an LDO that produces the 3.3 V rail. The ATmega328P MCU connects to the SSD1306 OLED over I2C, three push buttons over GPIO, the microSD card over SPI, the Vollgo GNSS receiver over UART, and an ISP/UART debug header. The GNSS receiver connects to the PCB GPS antenna. Charger Battery LDO 3.3 V rail ATmega328PMCU SSD1306OLED screen 3× push buttons Micro SD card ISP / UARTdebug Vollgo VG7669T160N0SAGNSS receiver PCB GPS antenna I2CGPIOSPI UART / SPI UART
System block diagram (redrawn from my design notes).

Component selection

That set the minimum interfaces the microcontroller needed: one I2C, one SPI, two UARTs (GPS and debug) and three GPIOs. I looked for the simplest MCU that could meet those needs and selected the ATmega328P for its low cost, low power consumption, and existing SSD1306 and microSD card libraries. It runs at 3.3 V and 8 MHz; the clock could probably come down to reduce power consumption.

PCB GPS antenna

The antenna needs to operate in the GPS L1 band (1575.42 MHz). I looked at patch, quarter-wave (¼ λ) and bent quarter-wave antenna structures, and selected a straight ¼ λ antenna for the best performance, small size and a more omnidirectional radiation pattern.

I calculated the quarter wavelength from the effective relative permittivity of a microstrip structure (λ = c / (f·√εeff)), then added 20% of additional length on a coupon board so the antenna could be tuned experimentally. Copper is voided on all layers below the antenna, and vias and planes form a ground plane at the base near the feed point.

Green antenna test coupon PCB with three SMA connectors, lying on a granite countertop.
Antenna test coupons.
PCB layout view of a straight quarter-wave trace antenna shown in red within a voided copper area.
Quarter-wave antenna in the PCB layout.

To tune it, I measured the S11 (input reflection) minimum, which started at lower frequencies, and successively trimmed the antenna until the minimum reached the center of the GPS L1 band. The final antenna showed a clear resonance at 1.575 GHz with an S11 of −11.8 dB, exceeding my initial target of −10 dB.

I measured the antenna's input impedance at 36 + 19j Ω at 1.575 GHz, so it needed to be matched to 50 Ω to maximize power transfer. Only about 15 MHz of bandwidth is needed, so a relatively high Q-factor is fine. I chose a C-L-C pi network for maximum flexibility; in the Rev 2 schematic it is 5.6 pF, 3.7 nH and 4.0 pF.

Handheld vector network analyzer screen showing an S11 trace with a dip.
S11 measurement during successive tuning cuts.
Vector network analyzer displaying a Smith chart.
Measuring the antenna's input impedance.
Small green matching-network test board with SMA connectors on a granite surface.
Matching network test board.
Schematic of a pi matching network: C10 5.6 pF to ground, series L1 3.7 nH, C9 4.0 pF to ground, between two 50-ohm nodes.
C-L-C pi matching network.

Rev 1

Rev 1 was designed to bring all of the systems onto a single board so I could begin writing software. I added a USB–UART interface to ease debugging and programming. I deliberately chose clunky mechanicals and a non-rechargeable battery to speed up development and de-risk the GPS functionality. Rev 1 was designed in January 2025, and I ordered the assembled boards from JLCPCB in March 2025.

Rev 1 green PCB with an OLED screen connected by jumper wires to a breadboard.
Rev 1 board.
Electronics bench with a power supply, oscilloscope, probes and several boards during bring-up.
Bring-up and debug.

Bring-up and debug:

Rev 2

Rev 2 was designed in July 2025, and I ordered the assembled boards from JLCPCB later that month. The goals for Rev 2 were to improve the mechanicals, add a rechargeable battery, and delete components from Rev 1. I removed the USB–serial interface, the GPS amplifier and the large battery headers, downsized the LDO, and shrank the layout as much as possible. View the Rev 2 schematic (PDF).

Rev 2 PCB with OLED screen, three buttons, microSD slot and USB-C port, next to a small LiPo battery.
Rev 2 board.
PCB layout with the quarter-wave antenna along the bottom edge.
PCB layout.
3D render of the range finder PCB showing the component side.
PCB 3D render.
Small silver LiPo pouch battery next to a US quarter on a green PCB, for scale.
350 mAh LiPo cell, with a quarter for scale.

Battery system

The device runs on a single-cell 350 mAh lithium polymer battery, chosen for the smallest size that still meets the eight-hour minimum battery life. Based on a measured current consumption of 33 mA at 3.7 V, it provides about 10.6 hours of battery life. A TI BQ24073 battery charger and management IC handles precharge, constant-current and constant-voltage charging, and the battery recharges over USB-C. In the schematic the fast-charge current is set to 350 mA, and there is an on/off toggle switch on the battery line.

Schematics

Rev 2 schematic sheet for the MCU: ATmega328P with 8 MHz crystal, ISP and UART headers, three push buttons, SSD1306 OLED and microSD card connector.
Rev 2 schematic: MCU, buttons, OLED and microSD (click to enlarge).
Rev 2 schematic sheet for GPS: PCB quarter-wave antenna, pi matching network and the VG7669T160N0SA GNSS module.
Rev 2 schematic: antenna, matching network and GNSS receiver.
Rev 2 schematic sheet for power: USB-C input with fuse and diode, BQ24073 charger, battery connector with on/off switch, and a 3.3 V LDO.
Rev 2 schematic: USB-C charging, battery and 3.3 V regulator.

Enclosure

Sam Handel designed the 3D-printed enclosure. There were two different enclosures.

Green 3D-printed enclosure next to a range finder board with an OLED screen.
Green 3D-printed enclosure.
CAD render of a gray handheld enclosure with a USB-C opening on the side.
Enclosure CAD.

Software

After boot, the microcontroller initializes its systems, then scans a target directory on the SD card to identify the available courses. The user selects a golf course, and the course data is extracted from the corresponding .csv file, where each row is [Hole No.], [Par], [Latitude], [Longitude]. Once the GPS receiver initializes, the distance to the green on hole 1 is displayed, and the user moves to the next hole with the buttons.

Software flowchart: start, then check whether the GPS, SD card and OLED are valid; if not, fault. If yes, display the available courses, load data from the .csv file, show "GPS Initializing", and check whether the GPS is valid, looping back until it is; then display the distance to the current hole. GPS, SD, OLEDvalid? Fault No Yes Display available courses Load data from .csv "GPS Initializing" GPS valid? No Yes Display distance to current hole
Software flow (redrawn from my design notes).

Because the distances involved are small (under 1 km), I use an equirectangular projection and the Pythagorean approximation to calculate the distance between two latitude/longitude pairs, with φ as latitude and λ as longitude in radians:

x = Δλ · cos(φm),   y = Δφ,   d = R · √(x² + y²)

The firmware is written in C++. The firmware source is available here: GPS_RANGEFINDER_FINAL.ino.

Results

I did initial testing around Austin using points extracted from Google Maps: I would walk to an identified landmark, wait 30 seconds, then record the displayed distance. I also wrote a test program to record the time to a valid GPS fix (the receiver's specification is under 35 seconds), and did additional testing on the course.

MeasurementResult
Distance accuracy (average)1.73 yards
Cold boot to valid GPS (average)42.6 seconds
Battery life (from measured 33 mA draw)≈ 10.6 hours

On the course, once the GPS acquired a fix, it gave accurate distances for the whole round.

Range finder board held in an open palm outdoors, with the OLED screen lit.
Field testing.

Cost

The total BoM cost came out to $19.38 per unit at a volume of five units. Non-BoM costs (assembly, shipping, tariffs and tax) added $27.01, for $46.39 per unit in total; those could be driven down at scale.

ItemCost per unit
PCB$1.40
SMT BoM$9.88
Battery$5.95
Through-hole BoM$0.46
OLED screen$1.04
SD card$0.65
BoM total$19.38
Assembly (with setup)$8.23
Shipping$7.77
Tariffs / tax$11.01
Total$46.39
Stacked bar of the per-unit total cost of $46.39: BoM $19.38 and non-BoM costs (assembly, shipping, tariffs and tax) $27.01. Per-unit total: $46.39 BoM $19.38 Non-BoM $27.01 Parts and PCB Assembly, shipping, tariffs/tax Bar chart of the top five BoM components by unit cost: LiPo battery $5.95, GNSS receiver $3.85, MCU $2.09, OLED screen $1.04, TI battery IC $0.70. All other BoM items together come to $5.75, for a BoM total of $19.38. Top 5 BoM components by unit cost LiPo battery $5.95 GNSS receiver $3.85 MCU $2.09 OLED screen $1.04 TI battery IC $0.70 All other BoM $5.75
Per-unit cost at a volume of 5 units. "All other BoM" is the $19.38 BoM total minus the top five components.

The most expensive parts were the LiPo battery ($5.95), the GNSS receiver ($3.85), the MCU ($2.09) and the OLED screen ($1.04). At about $46 per unit in total, the build did not meet the < $25 cost goal. The biggest levers to bring the cost down are a cheaper battery and cheaper PCBA manufacturing.

Lessons learned

Two of the three key design goals were met:

GoalTargetResult
Cost< $25Not met: $46 per unit total
Accuracy< 5 yardsMet: measured 1.73 yards
Battery life8 hours minimumMet: more than 10 hours

Overall I'm generally satisfied with the performance and cost.

What's next

Things to improve in a future revision: