Skip to content

OpenAstroTech/OpenAstroFirmware

Repository files navigation

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!


Contributors Forks Stargazers Issues MIT License


Logo

OpenAstroFirmware

Official Firmware for DIY astronomical telescope mounts. This firmware is the 2.x successor of the OpenAstroTracker-Firmware.

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact

About The Project

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:

Usage

  • 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

Development

  • 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

(back to top)

Built With

  • 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

(back to top)

Getting Started

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.

Supported hardware

  • 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

Development Environment Setup

Before getting started, make sure you have a proper Zephyr development environment. Follow the official Zephyr Getting Started Guide.

Prerequisites

  • 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

Installation

  1. Install the Zephyr SDK: Follow the official Zephyr getting started guide for your operating system.

  2. Set up Python virtual environment and install West:

    python3 -m venv ~/.venv
    source ~/.venv/bin/activate
    pip install west

Workspace Initialization

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

Configuration

The firmware uses Zephyr's Kconfig system for configuration. Key configuration files:

  • app/prj.conf - Main project configuration
  • app/boards/native_sim.conf - Native simulator specific settings
  • app/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

Build

For Native Simulation (Development/Testing)

cd OpenAstroTech-workspace/OpenAstroFirmware/app
west build -b native_sim

For MKS Robin Nano (Production Hardware)

cd OpenAstroTech-workspace/OpenAstroFirmware/app  
west build -b mks_robin_nano

Clean Build

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

Upload

Native Simulation

west build -t run          # Run the firmware in simulation

Hardware Targets (MKS Robin Nano)

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

(back to top)

Usage

OpenAstroFirmware provides telescope mount control with the following capabilities:

Core Features

  • 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

LX200 Command Interface

The firmware implements the standard LX200 protocol for communication with planetarium software like:

  • SkySafari
  • Stellarium
  • TheSkyX
  • Cartes du Ciel
  • Any ASCOM-compatible software

Hardware Control

  • Stepper motor drivers (TMC, GPIO-based)
  • STM32F407xx microcontroller support
  • Extensible driver architecture for additional hardware components

Development and Testing

  • Native simulation support for PC-based development
  • Comprehensive logging system
  • Automated testing framework
  • In-hardware debugging capabilities

(back to top)

Roadmap

  • 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).

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Project Link: https://github.com/OpenAstroTech/OpenAstroFirmware

(back to top)

About

Official Firmware for DIY astronomical telescope mounts. This firmware is the 2.x successor of OpenAstroTracker-Firmware.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •