Control electronics and PCB architecture
Purpose
Provide a clear separation between:
motion control
process supervision
sensing and data acquisition
safety
Enable extensible, modular sensing and supervision
Avoid tight coupling between motion execution and adaptive logic
ECU (master PCB)
Acts as real-time supervisory controller
Responsibilities:
sensor fusion
machine state estimation
process supervision decisions
Interfaces:
CAN-FD:
communication with distributed sensor PCBs
RS-485:
communication with spindle servo drive
GPIO:
low-latency triggering of Duet macros
SPI or UART:
communication with Raspberry Pi
Does not:
generate motion trajectories
directly drive axes
participate in safety chain
Distributed sensor PCBs
Zonal architecture:
multiple PCBs placed near sensors
Connected to ECU via CAN-FD
Responsibilities:
sensor signal acquisition
local filtering
FFT and envelope extraction
threshold detection
Communication behavior:
event-driven data transmission
periodic heartbeat messages
Fault handling:
ECU detects missing heartbeats
missing data treated as sensor failure
Debug and validation:
raw data access via USB or SPI
Communication architecture
CAN-FD used for:
robust, deterministic sensor data exchange
SPI / UART used for:
configuration
logging
visualization
GPIO used for:
low-latency supervisory actions
feed and spindle-related macros
Raspberry Pi integration
Runs Duet services and web interface
Hosts plugins for:
configuration of ECU and sensor PCBs
data logging
visualization (e.g. Grafana)
Not used for:
real-time control
safety-critical functions
Sensor PCB Capabilities
General Architecture
Two identical distributed sensor PCBs are used.
Mounted close to structural measurement locations.
Based on an STM32G4 (CAN-FD capable).
CAN-FD communication to the main ECU.
Optional synchronization line for deterministic simultaneous sampling.
Careful separation of analog and digital domains.
All nodes share the same CAN-FD bus. The ECU is located at one physical end of the bus.
CAN Topology Overview
flowchart LR
%% --- CAN participants forced horizontal ---
subgraph CAN_BUS
direction LR
ECU["ECU
Main Controller
CAN-FD"]
SN_A["Sensor Node A
Left X-Beam"]
SN_B["Sensor Node B
Right X-Beam"]
ECU ---|CAN-FD Bus| SN_A ---|CAN-FD Bus| SN_B
end
%% --- Node B sensors (ABOVE SN_B) ---
DMS_R["X-Beam DMS - Right
Beam bending
Dynamic load estimation"]
ACC_T["Tower Accelerometer
Structural vibration"]
MIC_T["Tower Microphone
Structural acoustics"]
TEMP_T["Tower Temperature
Structural temperature"]
DMS_R --> SN_B
ACC_T --> SN_B
MIC_T --> SN_B
TEMP_T --> SN_B
%% --- Node A sensors (BELOW SN_A) ---
DMS_L["X-Beam DMS - Left
Beam bending
Dynamic load estimation"]
ACC_SP["Spindle Plate Accelerometer
Vibration + Low-freq tilt"]
MIC_SP["Spindle Housing Microphone
Bearing and chatter acoustics"]
TEMP_SP["Spindle Housing Temperature
Thermal growth monitoring"]
DMS_L --> SN_A
ACC_SP --> SN_A
MIC_SP --> SN_A
TEMP_SP -->SN_A
Strain Gauge Interface
Supports multiple full-bridge configurations.
External 24-bit ADC recommended for dynamic strain measurement.
Differential low-noise instrumentation front-end.
Bridge excitation provided by PCB.
Shielded differential wiring to remote DMS.
Typical usage:
2 × X-beam full bridges.
Accelerometer Interface
SPI interface for digital 3-axis accelerometers.
Deterministic sampling capability.
Remote mounting via short shielded cable or rigid daughterboard.
Optional synchronization between PCBs.
Typical usage:
1 × spindle plate accelerometer.
1 × tower accelerometer.
Microphone Interface (Piezo Surface Microphone)
High-impedance charge amplifier front-end.
Anti-alias filtering.
Analog input to ADC.
Shielded cable required.
Typical usage:
1 × spindle housing microphone.
1 × tower microphone.
Temperature Sensor Interface
SPI/I²C thermocouple frontend or RTD interface.
Alternatively precision analog temperature input.
Slow sampling rate sufficient.
Typical usage:
1 × spindle housing temperature.
1 × tower plate temperature.
Piezo Shunt Communication Interface
SPI or I²C master interface.
Used to communicate with external piezo shunt PCBs.
No high-voltage circuitry on the sensor PCB.
Digital control and monitoring only.