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.”

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

From The MagPi store

Subscribe

Subscribe to the newsletter

Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.