Pocket Planetarium: Building a Gadget to Track Planetary Movement

Hello! My name is Dmytro and I am a Delivery Director at Levi9. I’ve always been fascinated by astronomy and wanted to have a handy gadget that would show how the planets of the solar system move in real-time. That’s how my pocket planetarium based on the Raspberry Pi Pico microcontroller was born, displaying the current position of the planets in our solar system. In this article, I’d like to share the principle of its operation and technical specifics in more detail, as well as prove two things with my own example: 

What the device is

For centuries, astronomers have used orbits to model the movement of planets around the Sun. In fact, mechanical models of the solar system date back to around 150 BC, but they got their name when the English nobleman Charles Boyle, the fourth Earl of Orrery, commissioned his own planetarium in 1713, designed by clockmakers George Graham and Thomas Thompion. 

   

My device can display data about the solar system in real time—it shows eight planets moving along a certain path. It works both with and without the RTC module, if you use the Raspberry Pi Pico W in your development. Moreover, the device can also work as a regular clock.

   

If you look closely, you can see the previous location of Pluto on the right side of the screen. At first glance, the planet just moves along a predetermined trajectory without reference to other processes in the app, but this is not the case. Thanks to the “jumps”, Pluto counts down the seconds, and its movement is dictated by a clear algorithm. Thus, the more seconds are left until the next minute, the higher Pluto jumps. And just before the minutes change on the dial, the planet rolls down the screen, reaching the “ground”.

The technical side of the issue

I chose a Raspberry Pi Pico to implement this project. It’s a low-cost board with a powerful microcontroller. It’s a small computer with a small amount of memory and limited ability to connect additional gadgets like a keyboard or monitor. In general, microcontrollers are an amazing thing. Just imagine that such a tiny object can execute your commands and do almost anything with extremely low power consumption. 

   

When I learned about the RP2040 microcontroller and checked its characteristics, I realized that I had to try it. This board is the first in the Raspberry Pi Foundation’s RP2040-based line, which they developed themselves. It was interesting to test itparticularly, how efficient it is compared to older “players”. In addition, the board is quite powerful and has a rather interesting approach to implementing its own PIO protocols (not used in this project). 

    

Since all microcontrollers have a limited amount of memory and resources, C is mostly used to program them. Yes, it is more low-level and allows you to better control memory usage and use the microcontroller’s computing cycles. This often helps me in developing and writing relevant programs. In this case, I wanted to use MicroPython instead of C to program the microcontroller in this project. MicroPython is a limited version of Python for microcontrollers that makes programming faster, easier, and even more cross-platform. But an important note: it doesn’t allow memory control and uses many more resources for the interpreter. 

  

In addition to Pico, the project requires the RTC module, which Pico checks to calculate the location of the planets. I used two other main components: a Waveshare Precision RTC expansion module with an embedded DS3231 chip and a Pimoroni Pico Display Pack. This allows the device to calculate the position of the planets based on the current time and date. Once calculated, the device immediately shows the planets and their relative circular orbits on the display. The best part is that no external data is required. The positions of the planets are calculated on-board, and the only thing the system knows is the current time coming from the RTC module. Instead of relying on the RP2040’s internal clock, the model uses an external DS3231 real-time clock, which once set up can be maintained with an optional battery. The current date can be set using the buttons on the dial. 

   

Of course, what’s a development process without challenges! One of the surprises was that the default library did not have a function for drawing a circle – I had to implement it myself. In addition, given that I created all the planets pixel by pixel on the tablet myself, I needed to have access to this data on the microcontroller. I decided to wrap everything in code by converting images to bytes. This way, I managed to keep the array as a const, and MicroPython optimized the process and speeded up the work with the data.

Tips to make your work easier

As you can see, building a similar device is relatively easy in three steps:

To further simplify the technical implementation for everyone who wants to try their hand at it, I have posted the source code on GitHub. 

   

The project can be developed and transformed: from adding other celestial bodies, monitoring sunrise and sunset, to using batteries for power and switching to an e-ink screen. For example, I used this device as the basis for another project, the Raspberry Pi Based Sun Tracker, which I will discuss in the following articles. 

In this article:
Published:
28 March 2023

Related posts

June 26th

The Cost of Choice

Most companies spend up to 40% to much on cloud, are you? Cut spend, not options. Smart standardizations win.

Cloud cost overruns and growing technical debt rarely stem from tooling alone—they are symptoms of architectural and operational choices. This session looks at how senior technical leaders can regain control by connecting cloud spend directly to business value. We’ll explore unit‑economics thinking, ownership models, and lifecycle management practices that reduce waste while preserving delivery speed. You’ll learn how to combine FinOps principles with technical‑debt controls to create a cloud environment that is financially sustainable and technically healthy.

May 28th

AI AGENTS DESERVE AI PLATFORM

Portable patterns for Azure, AWS and GCP that survive the next upgrade

AI agents are moving rapidly from experimentation into real production use cases, but architectures vary widely across cloud platforms. In this webinar, we compare practical patterns for building and running AI agents on Azure, AWS, and Google Cloud Platform. We’ll focus on what to standardize, where to embrace cloud‑native capabilities, and how to design for security, observability, and future change. The goal is not to pick a winner, but to help leaders understand how to scale agent‑based solutions without locking themselves into fragile designs.

April 23rd

Winning on Repeat: Product Engineering in the Age of AI

Cadence, quality and outcomes over output

Delivering a successful solution once is no longer enough. In the age of AI, organizations need product engineering models that enable them to win consistently across teams, releases, and markets. This session explores how leading organizations evolve from project‑centric delivery to product‑centric execution, supported by AI‑augmented engineering practices. We’ll look at cadence, quality, and accountability, and how leadership decisions shape sustainable delivery performance over time.

April 2nd

GOVERNING AI IN PRODUCTION

Designing cloud and data platforms that survive real-world pressure

Many organizations succeed in building AI proofs of concept, far fewer succeed in scaling them safely into production. This webinar focuses on what it takes to move from experimentation to reliable, governed AI platforms. We’ll discuss platform architecture choices, model governance, security, and policy patterns that enable teams to deploy AI at scale without slowing down delivery. Designed for senior technical leaders, this session provides practical guidance on turning AI initiatives into durable capabilities that deliver value beyond the first demo

March 5th

Navigating Digital Sovereignty and Strategic Cloud Choices

How Organizations Can Balance Innovation, Compliance, and Control in a Multi-Cloud World

In today’s rapidly evolving digital landscape, organisations face increasing pressure to ensure business continuity, maintain public trust, and comply with complex regulations like NIS2, DORA, and GDPR. This webinar explores the critical concepts of digital and operational sovereignty, the strategic importance of hybrid and sovereign cloud models, and the risks of vendor lock-in.