What if a tiny electronic device could look at the sky without a camera or telescope and tell you which planets are currently above the horizon? That is the idea behind Whats Up V2, a compact GPS-based circuit built around an STM32G031K8 microcontroller. The device uses a u-blox SAM-M10Q GPS module to obtain its location and precise UTC time, while nine SK6812-EC20 addressable RGB LEDs provide the visual output. Once the GPS gets a satellite fix, the STM32 combines the received latitude, longitude and time with pre-generated astronomical data to determine where the planets should appear in the sky. Unlike a conventional astronomy application running on a phone or computer, almost the entire calculation is performed locally on the tiny microcontroller. The result is displayed through the LEDs, with each illuminated LED indicating that a particular planet is above the user's mathematical horizon.
The interesting part of Whats Up V2 is what happens inside its limited 64 KB memory. Instead of storing huge amounts of planetary position data or performing full orbital calculations in real time, it uses Chebyshev polynomial fitting to compress five years of planetary ephemeris data into a form that the STM32 can evaluate efficiently. A Python program processes NASA JPL DE440s ephemeris data and divides it into different time segments, using different polynomial degrees depending on how quickly each celestial body moves. The Moon, for example, changes position much faster than distant Neptune, so it receives shorter data segments and higher-degree polynomials. The resulting coefficients are converted into signed 16-bit integers, significantly reducing the amount of memory required. During operation, the STM32 receives UTC time from the GPS, selects the appropriate polynomial segment, reconstructs the planet's X, Y and Z position, and converts the result from an inertial reference frame into an Earth-fixed coordinate system. It then combines that information with the user's GPS latitude and longitude to calculate the planet's altitude above the horizon. The Moon receives one additional correction called topocentric parallax, because its relatively close distance to Earth means its apparent position changes depending on exactly where the observer is standing.
There is also plenty of embedded engineering packed into the tiny board. The RGB LEDs are driven using 800 kHz PWM and DMA, allowing the STM32 to generate the precisely timed data stream required by the addressable LEDs without forcing the CPU to manually control every bit. The GPS communicates with the STM32 over 300 kHz I²C, while a SiP32432 power switch creates a low-power latching circuit that allows the device to turn itself off and consume only nanoamps when inactive. A LiPo battery and USB-C charging circuit make the device portable, and an STM32-compatible SWD programming interface allows debugging and firmware updates despite the extremely compact PCB. The maker says the device consistently achieved more than 99.9% accuracy when its calculated results were compared against reference values, even allowing the tiny microcontroller to track changes in the Moon's altitude in real time. As a bonus, holding the off button for three seconds makes the LEDs encode the device's latitude and longitude using a four-color, base-four representation. Whats Up V2 is therefore more than a novelty gadget: it is an impressive demonstration of how GPS, embedded C, numerical mathematics, data compression, astronomical ephemeris and carefully engineered hardware can be squeezed into a pocket-sized electronic circuit.