Little Sun Gazer sun tracker
By David Crookes. Posted

Ever since Dmytro Panin created his Solar System Display to simulate the motion of the planets around the sun (see issue 110), he’s had a burning desire to create a similar project to track and visualise our nearest star.
“One thing I knew I wanted to implement differently is how it was powered,” he says, wanting his latest device to run off a battery. “Additionally, I realised I didn’t get to explore the moon position in my previous project and I really wanted to visualise it too, and be able to see how it circles around the Earth as time passes by.”
Advertisement
The desktop computer you've been waiting for: Raspberry Pi 500+
With that in mind, he got to work on a device that could calculate the sun’s position based on a person’s longitude and latitude. Aside from showing the angle of the sun relative to where the viewer is on Earth, he wanted it to show the position of the Earth in relation to the star, and the position of the moon in relation to Earth. He also wanted to display the current time and show when the sun would rise and set.
Powering on
As with the Solar System Display, he decided to use a Raspberry Pi Pico microcontroller board, not so much out of a desire to experiment, but out of practicality. “As the project was supposed to be battery-powered, I had to go with a microcontroller and not a system-on-a-chip computer such a Raspberry Pi Zero due to the power consumption limitations,” he says.

“Raspberry Pi Pico was my first choice because it has enough RAM to keep a frame buffer and a deep sleep mode which allowed me to save some battery. Additionally, I wanted to experiment with a 3.7-inch e-ink display and Waveshare had a ‘plug-and-play’ version of the display for Raspberry Pi Pico which cemented the choice.”
A precision real-time-clock module completed the setup, along with a Pimoroni LiPo SHIM and Li-Po 2000 mAh 103450 rechargeable battery.

Holding on
The main work has involved calculating positions. “My background is in software engineering, and I always dabbled in astronomy, but astronomical formulas and calculations are definitely not my strong suit,” he says. “To become familiar with the subject and put together the model, I had to consult multiple sources and examples such as Astronomical Algorithms by Jean Meeus, Computing Planetary Positions by Paul Schlyter, and the National Oceanic and Atmospheric Administration website.”
Although he has plans to create a 3D-printable case, which he aims to put on MakerBot Thingiverse, the project is currently on hold. “There are a number of things I was looking to improve, starting from the case and ending at the diagrams/widgets/functionality, but I had to stop working on this project quite abruptly,” he says. As regular readers will know, Dmytro lives in Ukraine and he had to flee Kyiv with only a backpack of possessions when the shelling began.

“I like the state this project is in now, though,” he continues. “But it wasn’t supposed to be the final iteration. For example, I wanted to show and incorporate noon – the code for it has been written but I never got to incorporate it in the diagram. Another example could be that there is still no easy way to set time, so this is the first thing I need to address once I get to work on it. I hope I will be able to continue working on it soon.”
Quick facts
> The device is battery-powered
> It displays the sun’s position in real-time
> It’s based around Raspberry Pi Pico
> The battery powers the microcontroller board and display
> The code is incomplete at the moment
Subscribe to Raspberry Pi Official Magazine
Save up to 37% off the cover price and get a FREE Raspberry Pi Pico 2 W with a subscription to Raspberry Pi Official Magazine.
More articles

Raspberry Pi 500+ in Raspberry Pi Official Magazine issue 158
We’re quite taken with Raspberry Pi 500+. But when you don’t need all that processing power, and just want a board that will make a plastic skeleton jump around in a terrifying manner, you’ll find Raspberry Pi Pico more than up to the job. There’s more terror in the magazine (which is only right as […]
Read more →

Win one of five Raspberry Pi SSD 1TB
Raspberry Pi prides itself on high quality hardware, and this 1TB Raspberry Pi SSD is no different. You can use it with a standard Raspberry Pi or even in your desktop PC – the choice is yours. We have five to give away and you can enter below Win 1 of 5 Raspberry Pi SSD […]
Read more →

Dual-screen cyberdeck
Twin screens mean you can code on one screen while watching David Bowie’s 1978 Musikladen show on the other.
Read more →
Sign up to the newsletter
Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.