Electronic Telescope Focuser

System Modules
Electronic Focus Controller for Telescope
Overview
This project addresses a critical challenge in astrophotography: maintaining precise focus throughout extended observation sessions. I developed a custom electronic focus controller using Rust that interfaces with my telescope's focusing mechanism, enabling remote adjustment without physically touching the telescope—a requirement for maintaining tracking alignment and capturing high-quality astronomical images.
The Problem
Astrophotography presents two significant focusing challenges that manual adjustment cannot adequately solve. First, any physical contact with the telescope's focus knob disrupts the delicate auto-tracking alignment essential for long-exposure imaging. Even minor vibrations can ruin hours of careful setup. Second, and less obvious to casual observers, thermal expansion creates a moving target for focus throughout the night. As temperatures drop and the telescope cools, its metal and glass components contract slightly, causing the focal point to drift. A telescope perfectly focused at the start of a session will gradually soften as the night progresses, requiring continuous micro-adjustments to maintain image sharpness.
Technical Implementation
The system consists of three main components: custom hardware, embedded firmware, and a desktop application. For the mechanical interface, I selected a small stepper motor connected to the telescope's existing focus knob via a 3D-printed adapter. This non-permanent mounting approach was intentional—it allows the electronic controller to be easily attached or removed without modifying the telescope itself, preserving the option to use manual focus when desired.
The electronics layer uses an Arduino-compatible microcontroller that communicates with the host computer via serial connection. This simple, reliable protocol proved ideal for the relatively low-bandwidth command and position data flowing between systems. The stepper motor driver provides the precise positional control necessary for the fine adjustments astrophotography demands.
The desktop application, written in Rust, demonstrates the language's growing ecosystem for hardware interfacing and GUI development. Built with the egui crate for the graphical interface, the application manages focus device state, processes input from multiple control methods, and maintains serial communication with the Arduino. The modular architecture separates concerns cleanly: FocusController handles device state and communication, while dedicated modules manage gamepad input, knob control, and system integration.
User Experience Design
I implemented dual input methods to provide flexibility for different observing scenarios and personal preference. The gamepad controller leverages analog trigger inputs to deliver intuitive, variable-speed control—light pressure for fine adjustments during critical focusing, harder pressure for rapid repositioning. This analog control feels natural and provides excellent precision for dialing in focus.
The USB volume knob offers a completely different interaction model. Beyond simple rotation for focus adjustment, additional buttons on the controller toggle between different precision levels, allowing quick switching between coarse and fine adjustment modes. This proves particularly valuable when initially acquiring focus versus making final refinements.
Professional Integration
Recognizing that most astrophotographers use dedicated imaging suites, I developed a custom driver for Astrophotography Tool (APT), one of the most popular imaging applications. This integration enables direct control of the focus motor from within APT's interface, eliminating the need to switch between applications. More significantly, it unlocks APT's auto-focus capabilities, which analyze the camera feed to automatically determine optimal focus position—a substantial workflow improvement over manual adjustment.
Development Experience
The project came together remarkably smoothly, with the complete system functional within a few days of development. This rapid timeline reflected both careful upfront planning and Rust's excellent tooling for this type of systems programming. The serial communication proved reliable, the GUI framework responsive even while handling real-time input events, and the control algorithms required minimal tuning to achieve smooth, precise motor movements.
Reflections and Future Development
In actual field use, the electronic focuser eliminated the tracking disruption issues entirely and made thermal refocusing vastly more convenient. However, the experience highlighted that even electronic focusing remains time-consuming—each adjustment requires judgment, testing, and iteration. If I were to build a version 2.0, I would architect the system from the ground up with automated focusing as the primary use case rather than an add-on feature. This would involve integrating camera interface capabilities directly into the controller, implementing star-analysis algorithms to measure focus quality, and developing optimization routines to automatically find peak focus without human intervention.
The project successfully solved its immediate goals while revealing opportunities for even greater automation in the astrophotography workflow. It demonstrated Rust's viability for hardware interfacing projects and reinforced the value of modular, extensible architectures that can grow with evolving requirements.
Technical Stack
- Language: Rust
- GUI Framework: egui
- Hardware: Arduino-compatible microcontroller, stepper motor
- Communication: Serial protocol
- Integration: Custom APT driver
- Input Devices: Gamepad (analog triggers), USB volume knob
Repository
[GitHub Repository Link]