Introduction
This feature request proposes the implementation of support for detachable MCUs. It’s specifically designed for managing detachable 3D printer accessories like ADXL345 sensor module and Multi-Material Units that are not permanently affixed to the printer.
Problem Statement
Currently, accessories with their own MCU like an ADXL345 modulean MMU requires static Klipper configuration. When these accessories are designed to be easily detachable, the need for manual configuration changes becomes cumbersome.
- ADXL Sensor: After calibration, the sensor is often removed. This involves manually commenting out sections of the Klipper configuration. If the sensor’s MCU is simply unplugged without configuration changes, Klipper reports an error, preventing further use until the configuration is adjusted or the MCU is reconnected.
- MMU: Multi-Material Units are complex accessories with complex configuration files. Currently, switching between single and multi-material configurations in Klipper requires the use of bypass function to temporarily disable MMU functionality, attempting to run Klipper with the MMU disconnected results in immediate errors.
Proposed Solution: Detachable MCU Module
Klipper would need to be enhanced to:
- Auto-detection/Hot-plugging: Automatically detect the presence and identity of the detachable MCU when it’s connected.
- Dynamic Configuration Loading & Switching: Implement the ability to dynamically load, enable, or switch between different sets of Klipper configuration files or profiles based on the detected accessory MCU.
- Graceful Disconnection: Handle the disconnection of the non-critical accessory MCU without requiring a full Klipper restart or causing errors. This is paramount to addressing the current MCU error issue. This might involve:
- Switching to a default profile (e.g., single-material printing when MMU is detached).
- Marking the disconnected MCU as “optional” or “offline” rather than “not found” to prevent hard errors.
- API for Accessory Control: Provide an API for the main Klipper instance to interact with complementary softwares.