Building OpenAstroExplorer: Learning to Understand the System
I have always found astrophotography fascinating because of the contrast between the simplicity of the final image and the complexity required to produce it. A photograph of a galaxy or nebula may appear almost effortless once processed, yet behind it sits a system of optics, mechanical tracking, electronics, software and mathematics, all of which have to work together with a surprising degree of precision.
That complexity is what drew me towards building an OpenAstroExplorer.
OpenAstroExplorer is an open-source GoTo equatorial mount: a motorised system designed to compensate for the Earth’s rotation, track astronomical objects and automatically slew a camera towards coordinates in the night sky. I initially approached the project as a way of improving my astrophotography setup whilst making use of components I already had from an old 3D printer. In reality, it became much broader than that. Building it forced me into areas of electronics, mechanical design and software that I had little experience with, and exposed the difference between assembling individual components and actually understanding the system they form.
The project was often frustrating. Motors refused to move, drivers became unexpectedly hot, mechanical components developed backlash, computers refused to boot and software occasionally appeared to have a completely different understanding of where the telescope was pointing than I did.
Very little worked perfectly the first time, and most of the useful learning came from understanding why.
Building the hardware
Much of the hardware was adapted from components I either already owned or could source relatively cheaply. The controller was an MKS Gen L v2.1, originally designed for 3D-printer applications, whilst the mount itself combined 3D-printed parts with aluminium extrusion, shafts, gears and stepper motors.
The two principal axes of an equatorial mount are right ascension and declination. For these I used NEMA 17 motors, controlled through TMC2209 stepper drivers. The altitude and azimuth adjustment mechanisms used smaller modified 28BYJ-48 motors with A4988 drivers.
Individually, none of these components is especially unusual. The difficulty emerged from their interaction.
Different motors required different current settings; the drivers had different configuration requirements; the physical board I owned did not always correspond perfectly with the diagrams I was using; and small mechanical imperfections that appeared insignificant in isolation became far more important once translated through a gear train.
This was probably the first point at which the project changed the way I approached technical problems. Initially, when something failed, I tended to regard the system as a whole: the motor is not moving, therefore something about the mount is broken. That description was technically true, but almost useless.
I gradually learnt to decompose the problem.
Was the controller sending the command? Was the driver responding? Was the motor receiving sufficient current? Were the coil pairs wired correctly? Could the motor rotate without the mechanical load attached?
The more specific the question became, the easier it was to answer.
When a motor makes noise but does not move
One of my earliest recurring problems involved motors which appeared to be doing something, but not actually rotating. They would whirr, jerk slightly or hold position without producing meaningful motion.
There were several plausible explanations, which initially made the fault difficult to isolate. A stepper motor can display similar behaviour if its phases are wired incorrectly, if the current supplied by the driver is inadequate, if the firmware configuration is wrong, or if the mechanical resistance exceeds the available torque.
At one stage, the declination motor produced little more than small movements despite apparently receiving commands correctly. Rather than continuing to change settings at random, I traced the motor coils and reconsidered the wiring order. The issue ultimately came down to the arrangement of the coil pairs. Once these were wired correctly, the motor developed proper holding torque and began moving as expected.
The solution itself was simple.
Finding it was not.
The useful part was realising that debugging becomes far easier when a large system is reduced into smaller questions that can actually be tested.
I had been inclined to assume that a complicated-looking failure required an equally complicated explanation. In reality, a single wiring error was enough to undermine the entire axis. That experience became a recurring theme throughout the project: complexity in the system does not necessarily imply complexity in the root cause.
Moving from adjustment to measurement
Current calibration raised a similar issue.
The A4988 drivers used for the altitude and azimuth motors required their current limits to be set manually through the driver’s reference voltage, or Vref. Before I had a multimeter available, adjustment was necessarily imprecise; I could alter the potentiometer and observe whether the motor behaved differently, but I had no meaningful way of quantifying what I had changed.
Once I began measuring Vref properly, the process became much more systematic. Through testing, I found the lowest values at which each motor operated reliably, eventually settling at approximately 0.136 V for azimuth and 0.150 V for altitude.
The numbers themselves are relatively unimportant. What mattered was the transition from qualitative trial-and-error towards controlled testing.
Instead of altering a setting until the system appeared to work, I could change one variable, measure it, observe the consequence and compare the result. It is an elementary experimental principle, but applying it to something I had physically built made its value much clearer than it had appeared in theory.
The TMC2209 drivers created their own questions. Both drivers became surprisingly hot, including periods when the motors were not actively slewing. This forced me to investigate current configuration, idle behaviour, cooling and the UART communication used to configure the drivers through software. At several points, the hardware layout also differed from what I expected from reference diagrams, meaning that blindly following a pinout would have been a poor substitute for understanding the board in front of me.
I became considerably less willing to assume that something was correct simply because two components looked similar.
The mechanical problem that took the longest to understand
The most persistent problem was not electronic at all.
The declination mechanism developed significant backlash when changing direction. I could rotate the input by several millimetres before the worm wheel began responding, creating exactly the kind of lost motion that is undesirable in an astrophotography mount where small angular errors matter.
My immediate assumption was that the worm and worm wheel were badly meshed.
This appeared reasonable. Moving the components closer reduced some of the backlash; moving them further apart increased it. However, attempts to correct the mesh created other problems. In some positions the assembly rotated freely, whilst in others the brass wheel began contacting the housing. Removing the cover could make the system noticeably smoother, only for the resistance to return once everything was assembled again.
For a while, I concentrated almost entirely on alignment.
The useful clue came from noticing that the resistance varied depending on the rotational position of the worm wheel. A purely fixed alignment problem should not have changed so significantly as the wheel rotated, which suggested that the wheel itself was not remaining concentric.
The reason was surprisingly simple: the brass worm wheel had a 6 mm bore mounted onto a 5 mm steel shaft.
It was secured using a single grub screw. Tightening the screw therefore did not centre the shaft inside the bore; it pushed the shaft against one side. The wheel was consequently mounted slightly eccentrically. Depending on its orientation, one side could sit acceptably whilst the opposite side moved far enough to interfere with the surrounding housing.
The fault had presented itself as a problem between the worm and wheel, yet its origin was the dimensional relationship between the wheel and shaft.
That distinction became one of the most useful lessons I took from the entire build. The point at which a system displays an error is not necessarily the point at which that error originates. Mechanical systems transmit imperfections, just as software systems propagate incorrect inputs. Fixating on the visible symptom can therefore obscure the underlying cause.
I had encountered the problem as backlash. What I eventually had to understand was eccentricity.
3D printing made tolerances tangible
Before this project, I largely understood tolerances as an abstract engineering consideration. OpenAstroExplorer made them physical.
The mount combines printed plastic parts with manufactured shafts, bearings, fasteners and aluminium extrusion. A fraction of a millimetre that appears negligible on a CAD model can become significant when two parts are expected to rotate concentrically or hold a gear in precise alignment.
Even preparing the aluminium extrusion introduced practical challenges. Sections had to be cut, holes drilled and threads tapped for M5 bolts. A slightly uneven cut might be irrelevant in one location but problematic in another. A bolt passing through a hole with some clearance could appear perfectly acceptable until the assembly depended on that part for alignment.
The broader lesson was that manufacturing error cannot simply be separated from design. The physical version of a model inevitably contains tolerances, and a good design needs to accommodate them rather than assume perfect geometry.
That is an idea I understood far better after repeatedly assembling and disassembling the same mechanism trying to work out why something that looked aligned was not behaving as though it was.
Choosing reliability over specification
The computer controlling the mount provided a different type of lesson.
I initially experimented with using a Jetson Nano. On paper, it was the more capable computer and therefore seemed like the obvious choice. In practice, I repeatedly encountered boot and display problems which consumed time without bringing the mount any closer to working.
Eventually, I stopped trying to force that setup and used a spare Raspberry Pi 3B instead.
It was older and considerably less impressive in terms of raw specification, but it booted reliably and performed the task I actually required from it. I installed a lightweight Linux environment, configured the necessary astronomy software and eventually had it operating consistently as the mount computer.
It was a useful correction to the assumption that greater capability automatically makes something the better engineering choice. The more powerful component is irrelevant if the simpler one fulfils the requirement more reliably.
Connecting the mount to the rest of the system
Once the electronics and mechanics were functioning sufficiently well, the project moved from hardware into software.
The Raspberry Pi runs an INDI server, which provides a standard interface between astronomical hardware and control software. My Mac then runs KStars and Ekos as the client, communicating with the Pi across the local network.
The architecture therefore became something closer to this:
Mount motors / controller
↓
Raspberry Pi 3B
↓
INDI
↓
Local network
↓
KStars / Ekos
↓
Nikon D7200 + mount control This was the point at which the collection of individual components began to behave like an actual astrophotography system.
The camera could be connected, exposures could be initiated from the computer and the mount could receive astronomical coordinates rather than simple motor commands. Until then, much of my testing had consisted of establishing whether a particular axis could move by issuing direct commands. Through KStars and Ekos, those movements became part of a larger coordinate model of the sky.
This introduced another difficulty: a GoTo mount has to know considerably more than how many steps a motor has taken.
It needs a reliable understanding of time, geographic location, its initial mechanical orientation and the relationship between those variables and celestial coordinates. Errors in any of these inputs can produce movements that are mechanically correct but astronomically meaningless.
I encountered problems with time and location configuration, home position and the physical interpretation of where the declination axis should face. These were not failures of the motors or electronics; the system was doing what it had been told. The problem was that the information it had been given did not accurately describe reality.
Again, the visible behaviour was downstream of the actual error.
Plate solving and closing the gap between model and reality
Plate solving was probably the part of the software stack I found most interesting.
An astronomical mount maintains an internal model of where it believes it is pointing. However, the real mechanical system contains backlash, alignment error and manufacturing tolerances, so calculated position and actual position will never correspond perfectly.
Plate solving provides an independent observation.
An image is captured through the camera and analysed against a catalogue of known stars. By identifying the geometry of the star field, the software can determine the actual coordinates represented by the image. I installed ASTAP and the relevant local star databases so that this process could be performed within Ekos.
Conceptually, the system is comparing two states:
Where the mount calculates it is pointing
vs.
Where the image demonstrates it is actually pointing The error between them can then be used to correct the mount.
I found this particularly interesting because it transforms the mount from a system relying primarily on its own calculated position into one that can verify that calculation against external information.
Rather than trusting the model blindly, the software observes reality and uses the discrepancy to improve the result.
That principle extends beyond astronomy. Models simplify reality, but their usefulness still depends on whether their assumptions remain consistent with what can actually be observed.
Working around the real world
The physical environment imposed constraints of its own.
My garden does not provide an unobstructed 360-degree horizon; the house blocks a substantial part of the sky behind the mount. Some procedures described neatly in documentation therefore become considerably less neat when attempted in a real garden.
Polar alignment was one example.
Ekos can perform a computer-assisted polar-alignment routine by capturing and plate solving several images whilst the mount rotates through part of the right-ascension axis. During my first attempts, the system seemed to take image after image and progress far more slowly than I expected.
My initial reaction was to assume that it had failed.
Understanding what it was attempting to calculate made the behaviour more comprehensible. Each image formed part of the geometric information needed to estimate the mount’s rotational axis relative to the celestial pole. What initially looked like the software doing very little was, in reality, a process I simply had not understood properly yet.
This happened repeatedly throughout OpenAstroExplorer. The point at which I became less frustrated with a problem was normally the point at which I stopped asking only why is this not working? and began asking what is the system actually trying to do?
That distinction changed the direction of my debugging.
What the project actually taught me
It would be easy to describe this project by listing the technologies involved: stepper motors, TMC2209s, A4988s, UART, Raspberry Pi, INDI, KStars, Ekos, ASTAP, 3D printing and custom firmware.
I did learn about all of them.
However, I do not think that list captures what I gained from the project.
The more important development was in how I approached unfamiliar problems.
At the beginning, a malfunctioning mount felt like one enormous problem. By the end, I had become much more comfortable separating it into layers: electronics, firmware, networking, coordinate configuration, mechanical alignment and software. I learnt to establish what I knew was working before investigating what was not; to alter one variable rather than several; to measure where measurement was possible; and, perhaps most importantly, to question the assumptions that appeared too obvious to question.
Some of the hardest problems were ultimately caused by the smallest details. A motor’s wires were in the wrong sequence. A connector was loose. A current setting was too low. A 5 mm shaft was sitting inside a 6 mm bore. A more powerful computer was simply less useful than an older Raspberry Pi that worked reliably.
None of these discoveries required particularly advanced engineering knowledge. They required persistence, a willingness to revisit assumptions and enough humility to accept that the problem could be something basic that I had overlooked.
That is probably the part of the project I value most.
I am not an electrical engineer, a mechanical engineer or an astronomer, and the project certainly did not turn me into one. There is still a great deal about the mount, and about astrophotography more broadly, that I do not understand.
What changed was how comfortable I became working within that gap in knowledge.
Instead of treating an unfamiliar technical problem as something I should already know how to solve, I became more systematic about finding the information I was missing: reading documentation, breaking the system into smaller parts, testing components independently and checking assumptions against measurements.
For me, OpenAstroExplorer ultimately became less about simply assembling a mount and more about understanding how a relatively complicated system behaves when its individual parts interact.
The final objective is still astrophotography. I want to refine the mechanics further, improve the software configuration and eventually use the mount to produce better images.
But the project has already been worthwhile because of how much I had to understand in order to make it work.
Most of that understanding did not come from getting things right the first time. It came from identifying, one problem at a time, exactly why they were going wrong.