This project is work in progress and is not for use or testing yet! Really, you don't want to use it at the moment!

Official Firmware for DIY astronomical telescope mounts. This firmware is the 2.x successor of the OpenAstroTracker-Firmware.
Table of Contents
It was a very long and educational time developing, testing and improving OpenAstroTracker-Firmware for all of us. It evolved and grew over time as did our hardware support. Amount and type of supported mounts, components, addons and software tools keep increasing. This is why dev team decided to go one step back and redesign the firmware based on the experience with v1 and community feedback and requests. This firmware aims to bring following improvements over time compared to OpenAstroTracker-Firmware:
- Easier configuration, flashing and updates
- Improved stability
- Improved/Automated calibration
- New types of addons (these could be among other things Touch display, Mobile app etc.)
- Ability to track "custom" objects (e.g. Sun, Moon, ISS, Comets etc.)
- Support for more types of mounts (OAT, OAM, any further Mounts and their versions designed by OpenAstroTech and retrofitted 3rd party mounts)
- Several new QoL features
- Easier maintenability and extendability
- Automated testing
- Support for modern 32-bit boards to improve performance, accuracy and reduce the need for hardcore optimizations.
- In hardware debugging
- Higher code quality by following best practices and a predefined architecture design
- Ability to test and run main code and test directly on the host pc to simplify issue analysis
- Support and usage of modern c++ features to improve readability and clarity of the code
- Zephyr RTOS - Real-time operating system for connected, resource-constrained devices
- West - Zephyr's meta-tool for managing project repositories
- CMake - Cross-platform build system
- C++ - Modern C++ for telescope mount control implementation
To get started with OpenAstroFirmware development or to build and deploy the firmware for your telescope mount, follow these steps. The project supports both hardware deployment (MKS Robin Nano) and native simulation for development and testing.
- MKS Robin Nano (STM32F407xx-based controller board) - Production target
- native_sim - Development and testing platform
- STM32F407xx microcontroller family support
- Stepper motor drivers:
- TMC stepper motor controllers
- GPIO-based stepper motor drivers
- Testing/simulation drivers for development
Before getting started, make sure you have a proper Zephyr development environment. Follow the official Zephyr Getting Started Guide.
- Zephyr SDK - Required for cross-compilation and board support
- West - Zephyr's meta-tool for project management and building
- CMake (version 3.20.0 or higher) - Build system
- Ninja - Fast build tool
- Python 3 (with pip) - For build scripts and utilities
- Git - For version control and West manifest management
-
Install the Zephyr SDK: Follow the official Zephyr getting started guide for your operating system.
-
Set up Python virtual environment and install West:
python3 -m venv ~/.venv source ~/.venv/bin/activate pip install west
The first step is to initialize the workspace folder where the OpenAstroFirmware
and all Zephyr modules will be cloned. Run the following command:
# Initialize workspace for OpenAstroFirmware
west init -m https://github.com/OpenAstroTech/OpenAstroFirmware --mr main OpenAstroTech-workspace
# Update Zephyr modules
cd OpenAstroTech-workspace
west update
After initialization, your workspace structure will look like:
OpenAstroTech-workspace/
├── OpenAstroFirmware/ # This repository
├── zephyr/ # Zephyr RTOS
└── modules/ # Zephyr modules (HAL, libraries, etc.)
Important: Remember to activate your Python virtual environment each time you start working on the project:
source ~/.venv/bin/activate
The firmware uses Zephyr's Kconfig system for configuration. Key configuration files:
app/prj.conf
- Main project configurationapp/boards/native_sim.conf
- Native simulator specific settingsapp/boards/native_sim.overlay
- Device tree overlay for simulation- Board-specific configurations in
boards/
directory
Configuration can be modified using:
west build -t menuconfig # Interactive configuration menu
west build -t guiconfig # GUI configuration tool
cd OpenAstroTech-workspace/OpenAstroFirmware/app
west build -b native_sim
cd OpenAstroTech-workspace/OpenAstroFirmware/app
west build -b mks_robin_nano
west build -t pristine # Clean all build artifacts
west build -b <board_name> # Rebuild from scratch
The build system supports:
- Cross-compilation for STM32F407xx targets
- Native compilation for PC-based testing
- Comprehensive testing with automated test suites
west build -t run # Run the firmware in simulation
west flash # Flash firmware to connected hardware
west debug # Start debugging session
west attach # Attach debugger to running target
Additional upload options:
west build -t flash
- Alternative flash command- Custom flash runners supported via Zephyr's runner system
OpenAstroFirmware provides telescope mount control with the following capabilities:
- LX200 Protocol Support - Compatible with Meade LX200 command set for telescope control software
- Stepper Motor Control - Precise control of RA and DEC axes with multiple driver support
- Mount Coordinate Management - Right Ascension and Declination positioning
- Cross-Platform Development - Native simulation for testing without hardware
The firmware implements the standard LX200 protocol for communication with planetarium software like:
- SkySafari
- Stellarium
- TheSkyX
- Cartes du Ciel
- Any ASCOM-compatible software
- Stepper motor drivers (TMC, GPIO-based)
- STM32F407xx microcontroller support
- Extensible driver architecture for additional hardware components
- Native simulation support for PC-based development
- Comprehensive logging system
- Automated testing framework
- In-hardware debugging capabilities
- Build environment setup
- Zephyr RTOS integration
- West workspace configuration
- Cross-compilation support
- Native simulation target
- Core Foundation
- LX200 protocol library implementation
- Mount coordinate management (RA/DEC)
- Stepper motor driver framework
- Board support for MKS Robin Nano
- Logging and debugging infrastructure
- MVP (In Progress)
- Basic mount control interface
- Complete LX200 command set implementation
- Motor calibration and homing
- Real-time telescope tracking
- Hardware-in-the-loop testing
- Future Enhancements
- Touch display interface
- Mobile app connectivity
- Custom object tracking (Sun, Moon, ISS, Comets)
- Advanced calibration procedures
- Extended mount type support
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Project Link: https://github.com/OpenAstroTech/OpenAstroFirmware