PCB-Kicad-F446
PublicLoading…
STM32F446 CNC Control Board
A custom CNC control interface board designed with KiCad 9.0, intended for use with LinuxCNC and the Remora STM32F446 / W5500 firmware real-time firmware. The WeAct Studio STM32F446 64-Pin Core Board plugs onto this control board, and a WIZnet W5500 Ethernet module connects via the on-board SPI socket for Remora Ethernet operation.
WARNING — Read before use
This design is provided as-is, without warranty of any kind, express or implied. CNC machines involve high voltages, high-speed mechanical components, and industrial motor drivers. Improper construction, wiring, or use of this hardware design can cause serious injury, death, fire, or property damage.
The author(s) of this design accept no liability for any damage, injury, or loss resulting from the use, misuse, reproduction, or inability to use this hardware design or any derivative thereof. You are solely responsible for verifying the suitability, safety, and correctness of any implementation before powering or operating it.
This design is intended for personal and educational use by individuals with appropriate knowledge of electronics and machine safety. It is not a finished or certified product.
1. Board Overview
| MCU Module | WeAct Studio STM32F446 64-Pin Core Board |
| Ethernet | WIZnet W5500 (SPI) |
| Step/Dir Outputs | 5 axes — RS-422 differential (X, Y, Z, A, B) |
| Signal Isolation | CBMUD1200LAS8 high-speed digital isolators |
| Differential Driver | AM26LS31CDRG4 quad RS-422 line driver |
| Digital Inputs | 8 × optocoupler-isolated (EL357N) |
| Digital Outputs | 6 × optocoupler-isolated (configurable pull-up / pull-down) |
| Motor Enable Outputs | 2 × optocoupler-isolated (STEP_EN, STEP_EN_Z) |
| Halt / E-Stop | Dedicated halt circuit — selectable NO / NC polarity |
| Alarm Input | Servo driver alarm → hardware halt trigger |
| Probe Input | Parallel dual-signal touch probe input |
| Spindle Control | Analog 0–10 V output via LM358 op-amp |
| Encoder Input | 3-channel differential RS-422 (A/B/Z) with isolation |
| PCB Tool | KiCad 9.0 |
2. PCB Layout
3. Hardware Modules
3.1 MCU: WeAct Studio STM32F446 64-Pin Core Board
The WeAct STM32F446 development module plugs onto this control board via two 30-pin sockets. The sockets expose all GPIO ports (PA0–PA15, PB0–PB15, PC0–PC15, PD2) as well as 3.3 V and 5 V power rails.
Full MCU pin assignment:
3.2 Ethernet: WIZnet W5500 Module
Ethernet connectivity is provided by a WIZnet W5500 module connected to the on-board SPI socket. This enables Remora Ethernet operation, where LinuxCNC communicates with the STM32F446 over UDP in real time.
4. I/O Features
4.1 5-Axis Step / Direction Outputs (RS-422 Differential)
Each of the five axes (X, Y, Z, A, B) has a fully isolated, differential step and direction output channel. The signal chain consists of:
- CBMUD1200LAS8 — Dual-channel high-speed digital isolator (SOIC-8, LCSC C476470). Provides galvanic isolation between the MCU 3.3 V domain and the driver 5 V domain.
- AM26LS31CDRG4 — Quad RS-422 line driver (SOIC-16). Converts single-ended signals from the isolator output to balanced differential pairs (STEP+/STEP−, DIR+/DIR−).
- ZMM5V6 Zener diode — Transient protection on the 5 V driver supply.
Each axis provides a 4-pin screw terminal: STEP+, STEP−, DIR+, DIR−.
MCU GPIO → CBMUD1200 → AM26LS31C → STEP± / DIR±
(3.3 V) (isolator) (RS-422 driver) (to motor driver)
4.2 Isolated Digital Inputs (8 Channels)
Eight optocoupler-isolated digital inputs (EL357N, 1 kΩ series / 4.7 kΩ pull-up / 100 nF filter) connect via 2-pin screw terminals. Each channel is labelled by its intended function:
| Channel | Net Label | Function |
|---|---|---|
| OPT_0 | OPT_0_DOOR | Safety door switch |
| OPT_1 | OPT_1_B_LIM | B-axis limit switch |
| OPT_2 | OPT_2_X_LIM | X-axis limit switch |
| OPT_3 | OPT_3_Y_LIM | Y-axis limit switch |
| OPT_4 | OPT_4_Z_LIM | Z-axis limit switch |
| OPT_5 | OPT_5_FEED_HOLD | Feed hold button |
| OPT_6 | OPT_6_CYCLE_START | Cycle start button |
| OPT_7 | OPT_7_A_LIM | A-axis limit switch |
Note — HALT triggering: OPT_0 (DOOR) and OPT_1 (B_LIM) are wired to also trigger the hardware halt circuit in addition to being read as standard digital inputs by the firmware.
4.3 Isolated Digital Outputs (6 Channels)
Six optocoupler-isolated digital outputs are available for switching relays, solenoids, and other loads. Output polarity (pull-up or pull-down) is configured per channel via on-board jumpers.
| Channel | Net Label | Default Use |
|---|---|---|
| AUX_0 | AUX_0_COOLANT | Flood coolant pump |
| AUX_1 | AUX_1_MIST | Mist coolant |
| AUX_2 | AUX_2 | General purpose |
| AUX_3 | AUX_3 | General purpose |
| AUX_4 | AUX_4 | General purpose |
| AUX_5 | AUX_5 | General purpose |
Pull-Down Configuration
Pull-Up Configuration
Each output connector exposes three pins: Vcc, SIG, GND.
4.4 Motor Enable Outputs
Two dedicated optocoupler-isolated outputs (EL357N) are provided for controlling the enable (ENA) pins of motor drivers:
| Signal | Function |
|---|---|
STEP_EN | Enable output for all axes |
STEP_EN_Z | Independent enable output for the Z axis |
Unlike the AUX outputs (section 4.3), the motor enable outputs have a fixed output configuration — there is no pull-up / pull-down jumper. They connect directly to motor driver ENA inputs via screw terminals.
4.5 Halt / E-Stop Input
A dedicated halt input is provided with optocoupler isolation (EL357N) and AO3400A N-channel MOSFET switching. The trigger polarity is selected by an on-board jumper:
| Jumper Position | Trigger Condition |
|---|---|
| Position A | Normally-open (NO) contact — triggers on circuit open |
| Position B | Normally-closed (NC) contact — triggers on V+ applied |
Multiple sources can trigger the HALT signal in hardware:
- External E-stop switch — connected to the dedicated HALT screw terminal.
- Door input (OPT_0_DOOR) — opening the safety door triggers a halt.
- B-axis limit (OPT_1_B_LIM) — B-axis over-travel triggers a halt.
- Servo ALARM input — described separately below.
4.6 Servo Alarm Input
A separate ALARM input is dedicated to receiving the alarm signal from servo motor drivers. When a servo driver asserts its alarm output, this input hardware-triggers the HALT signal, bringing the machine to an immediate stop independently of the firmware state.
The alarm input circuit uses the same optocoupler isolation and transistor topology as the halt channels, wired in parallel with the main halt circuit.
4.7 Probe / Touch Probe Input
The probe input (PROBE) uses a parallel dual-signal circuit implemented in parallel_switch.kicad_sch. Two independent probe signals (SIG_1, SIG_2) are combined through BAV23 dual-diode packages in a wired-OR configuration before entering the optocoupler (EL357N) and reaching the MCU.
Signal 1 ──┐
├── BAV23 (OR) ── EL357N ── MCU PROBE
Signal 2 ──┘
This allows two different probe switch contacts (e.g. a tool-length sensor and a 3D touch probe) to share the same MCU input. Either signal independently triggers the probe detection.
The probe screw terminal (J21, labeled PROBE) provides three connections: Vcc, SIG 1, SIG 2.
4.8 Spindle Speed Control
An analog spindle speed output is generated using an LM358 dual operational amplifier. The MCU generates a PWM signal (SPINDLE_PWM) which is filtered and scaled by the LM358 stage to produce a 0–10 V analog reference voltage suitable for VFD spindle speed control.
Additional spindle signals: SPINDLE_DIR (direction) and SPINDLE_EN (enable).
4.9 Encoder Input
The encoder input accepts a 3-channel differential quadrature encoder with index (A, B, Z). The signal chain:
- AM26LS32ACDRG4 — Quad RS-422 differential line receiver (SOIC-16). Converts the differential pairs (A+/A−, B+/B−, Z+/Z−) to single-ended logic signals.
- CBMUD1200LAS8 (×2) — High-speed dual-channel digital isolators. Provide galvanic isolation between the encoder cable side (5 V) and the MCU side (3.3 V).
- 8-pin screw terminal — Encoder connector pinout: A+, A−, B+, B−, Z+, Z−, 5 V, GND.
- 100 Ω series resistors + ZMM5V6 Zener — Line termination and transient protection.
Encoder → 8-pin terminal → AM26LS32A → CBMUD1200 → MCU (ENC_A / ENC_B / ENC_Z)
(RS-422) (receiver) (isolator) (3.3 V logic)
The 8-pin terminal is wired 1:1 to a custom encoder board via a straight-through Ethernet (Cat5/Cat6) cable, using the four twisted pairs for the A+/A−, B+/B−, Z+/Z−, and power pairs.
Note: Most industrial encoders provide single-ended (open-collector or push-pull) outputs. To connect such an encoder, an external line driver module must be used to convert the single-ended ABZ signals to RS-422 differential pairs before connecting to the RJ45: axvelo/PCB-Encoder-Line-Driver
5. Software Compatibility
5.1 LinuxCNC
LinuxCNC runs on a real-time Linux PC and acts as the CNC machine controller. It sends motion commands to the Remora firmware over Ethernet.
5.2 Remora Firmware
The STM32F446 runs a Remora port specifically built for this board's hardware combination (STM32F446 + WIZnet W5500). It receives step/direction commands from LinuxCNC via UDP over the W5500 Ethernet interface and generates real-time pulse trains.
Firmware repository: axvelo/Firmware-F446-W5500
6. Schematics
Full schematics are available as a PDF:
The KiCad 9.0 source files (.kicad_sch, .kicad_pcb, .kicad_pro) are included in this repository.
7. Key Components
| Component | Part Number | Package | Function |
|---|---|---|---|
| MCU Module | WeAct STM32F446 64-Pin | Module | Main controller |
| Ethernet Module | WIZnet W5500 | Module | SPI Ethernet |
| Digital Isolator | CBMUD1200LAS8 | SOIC-8 | High-speed 2-ch isolation |
| RS-422 Line Driver | AM26LS31CDRG4 | SOIC-16 | Step/dir differential output |
| RS-422 Line Receiver | AM26LS32ACDRG4 | SOIC-16 | Encoder differential input |
| Optocoupler | EL357N(B)(TA)-G | DIP-4 | I/O galvanic isolation |
| N-ch MOSFET | AO3400A | SOT-23 | Halt circuit switching |
| NPN Transistor | MMBT5551 | SOT-23 | Probe circuit signal switching |
| Dual Diode | BAV23A / BAV23C | SOT-23 | Probe wired-OR logic |
| Op-Amp | LM358 | SOIC-8 | Spindle 0–10V analog output |
| Zener Diode | ZMM5V6 | LL-34 | 5.6 V transient protection |
8. License
This project is licensed under the CERN Open Hardware Licence Version 2 — Strongly Reciprocal (CERN-OHL-S-2.0).
You may redistribute and modify this design under the terms of the CERN-OHL-S v2. Any product or design that incorporates or derives from this work must be released under the same licence, with all source files (schematics, PCB layout, BOMs) made publicly available.
See the LICENSE file for the full licence text.
No comments yet. Be the first to ask about this board.