System architecture =================== System decomposition -------------------- - Motion control: - Duet 3 6HC - Responsible for: - kinematics - motion planning - step generation - G-code execution - Host system: - Raspberry Pi - Runs: - Duet services and web interface - plugins - logging and visualization (e.g. Grafana) - Real-time supervision: - ECU (master PCB) - Responsible for: - sensor fusion - machine state estimation - feed and spindle supervision - Distributed sensing: - Multiple sensor PCBs in zonal architecture - Local preprocessing and event-based reporting - Safety: - Hardware-only safety chain - Independent of Duet, Pi, and ECU firmware Communication topology ---------------------- - Duet ↔ Raspberry Pi: - Native Duet architecture (services, UI, plugins) - ECU ↔ Raspberry Pi: - SPI or UART - Configuration, data logging, visualization - ECU ↔ Duet: - GPIO signals - Low-latency macro triggering - ECU ↔ Sensor PCBs: - CAN-FD - Event-driven, heartbeat-monitored - ECU ↔ Spindle servo drive: - RS-485 - Safety chain: - Electrically independent - Directly actuates power and pneumatics Responsibility boundaries ------------------------- - Duet: - Motion execution only - No supervision or state estimation - ECU: - Process supervision only - No trajectory planning - Raspberry Pi: - Configuration, logging, visualization - No real-time control - Sensor PCBs: - Local signal processing - No global decision-making - Safety system: - Hardware-only - Overrides all other systems System architecture diagram --------------------------- .. mermaid:: graph TD %% Core control Duet[Duet 3 6HC Motion control G-code Kinematics] Pi[Raspberry Pi Duet services Plugins Logging Grafana] ECU[ECU / Master PCB Real-time supervision Adaptive logic] %% Sensors Piezo[Piezo surface microphones Chatter detection] Accel[Accelerometers Directional vibration Tilt estimation] Temp[Temperature sensors] Strain[Strain gauge X carriage] %% Distributed sensing SensorPCBs[Distributed sensor PCBs FFT / envelopes Event-based reporting] %% Actuators Spindle[Spindle servo drive AC servo] Steppers[Stepper drives Axes] %% Safety Safety[Safety chain Contactors E-stop Pneumatic venting] %% Machine Machine[CNC machine Frame, axes, spindle] %% Connections Pi <-->|Internal Duet link| Duet Pi <-->|SPI / UART| ECU Piezo --> SensorPCBs Accel --> SensorPCBs Temp --> SensorPCBs Strain --> SensorPCBs SensorPCBs <-->|CAN-FD| ECU ECU <-->|RS-485| Spindle ECU <-->|GPIO macros| Duet Duet --> Steppers Steppers --> Machine Spindle --> Machine Safety --> Spindle Safety --> Steppers Safety --> Machine