Skip to content

OpenAstroTech/OpenAstroFocuser

Repository files navigation

Contributors Forks Stargazers Issues project_license


OpenAstroFocuser

Moonlite-compatible focuser firmware built on Zephyr RTOS.
Explore the docs »

View Demo · Report Bug · Request Feature

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

About The Project

OpenAstroFocuser is built for astrophotographers and observatory tinkerers who want reliable, scriptable focusing on DIY hardware. Plug it into any Moonlite-compatible controller (real hardware or software clients such as NINA, Ekos, or ASCOM drivers) and you get:

  • Preset-aware autofocus – store and recall absolute positions, then let your capture suite step through autofocus routines without losing calibration.
  • Live telemetry – query current/new positions, motion state, temperature, and speed over the Moonlite serial link to feed dashboards or automation scripts.
  • Manual and automated motion – stage moves, cancel in-flight slews, or flip between half/full-step microstepping directly from your control software.
  • Configurable speed profiles – adjust the Moonlite delay multiplier on the fly to trade speed for torque when heavy imaging trains are attached.
  • Hardware flexibility – run on ESP32-S3 reference hardware, custom shields, or any board with Zephyr support and a UART interface.
  • Ready-to-use documentation & tests – follow the included docs, CI, and ztest suites to adapt the firmware to your rig with confidence.

Every release follows Zephyr main, so you always know which toolchain and modules were used to build the shipped firmware.

Built With

  • Zephyr
  • CMake
  • C++20
  • ESP-IDF

(back to top)

Getting Started

Set up the Zephyr toolchain per the Getting Started Guide. The commands below assume a Linux host and Zephyr SDK.

Prerequisites

  • West (installed via pip install west)
  • Zephyr SDK or an equivalent toolchain
  • Python 3.10+

Installation

  1. Initialise a workspace pointing at this manifest:
west init -m https://github.com/OpenAstroTech/OpenAstroFocuser --mr main OpenAstroFocuser-workspace
cd OpenAstroFocuser-workspace
west update
  1. Export the Zephyr environment (optional but handy):

    source zephyr/zephyr-env.sh
  2. (Optional) Install Python requirements for documentation:

    pip install -r OpenAstroFocuser/doc/requirements.txt

(back to top)

Usage

Build & Flash

west build -b esp32s3_devkitc/esp32s3/procpu OpenAstroFocuser/app
west flash

Pass -DEXTRA_CONF_FILE=debug.conf for verbose logging or switch -b to any supported board/overlay.

Run Moonlite Parser Tests

west build -b qemu_x86 OpenAstroFocuser/tests/lib/moonlite --build-dir build/moonlite_test --pristine auto
west build -t run --build-dir build/moonlite_test

Twister Integration Suite

west twister -T OpenAstroFocuser/tests --integration

(back to top)

Roadmap

  • Automatic homing / end stop detection.
  • Saving of last known position in EEPROM

See the open issues for the full backlog.

(back to top)

Contributing

Contributions keep this firmware evolving. If you have ideas or fixes:

  1. Fork the repo
  2. Create your feature branch (git checkout -b feature/AmazingFocuserBoost)
  3. Commit (git commit -m 'Add some AmazingFocuserBoost')
  4. Push (git push origin feature/AmazingFocuserBoost)
  5. Open a Pull Request

Please run the formatter (west clang-format) and the applicable tests before sending PRs.

(back to top)

Top contributors

Contributor graph

License

Distributed under the Apache License 2.0. See LICENSE for details.

(back to top)

Contact

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

(back to top)

Acknowledgments

(back to top)

About

Moonlite-compatible focuser firmware built on Zephyr RTOS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published