Project Specification
Purpose
Design a standalone STM32F446RE-header PCB for CAN-bus controlled step motor operation using external 5V input, local 3.3V logic, CAN, RS485 encoder feedback, SWD/debug, reset, and level-shifted STEP/DIR/ENABLE outputs.
Functional Blocks
- Power: 5V input on J_PWR_CAN, AP2112K-3.3TRG1 local 3.3V regulator, 47uF bulk capacitance, 10uF regulator output capacitance, and 100nF local bypass capacitors.
- STM32 control core: J_STM32A and J_STM32B provide STM32F446RE header connectivity.
- CAN interface: U_CAN1 TJA1051T/3 with 5V VCC, 3.3V VIO, CANH/CANL connector, NUP2105LT1G protection, and accessible optional R_TERM1 120 ohm termination.
- RS485 encoder interfaces: U_RS485A and U_RS485B MAX485 modules with UART TX/RX and shared DE/RE control lines from the STM32 header.
- Level shifting: U_LS1 SN74AHCT125DR buffers 3.3V STEP/DIR/ENABLE into 5V-compatible outputs.
- Debug/reset: J_SWD1 SWD header and SW_RST1 reset switch with 10k pull-up.
- Motor driver connector: J_MOTOR provides STEP, DIR, ENABLE, 3.3V reference, 5V, and GND.
Key Net Map
- Power: 5V_IN, 5V, 3V3, GND.
- CAN: CAN_TX_3V3, CAN_RX_3V3, CANH, CANL.
- RS485 channel A: RS485A_TX, RS485A_RX, RS485A_DE_RE, RS485A_A, RS485A_B.
- RS485 channel B: RS485B_TX, RS485B_RX, RS485B_DE_RE, RS485B_A, RS485B_B.
- Motor control: STEP_3V3/STEP_5V, DIR_3V3/DIR_5V, ENABLE_3V3/ENABLE_5V.
- Debug/reset: SWDIO, SWCLK, NRST.
Layout Intent
Use a 4-layer PCB with a solid shared ground reference for low EMI. Place connectors on edges with labels readable from both board orientations. Group modules by function: power/CAN on one edge, STM32 headers central, RS485 encoder interface near its connector, motor connector on the opposite edge, and SWD/reset accessible near the control core. Route CANH/CANL short, parallel, and length-balanced, with TVS and optional termination near the CAN connector.
Future Split Strategy
Keep a logical separation between the main CAN/STM32 control board area and the motor driver/encoder communication area. Maintain clear connector boundaries so the design can later split into a main CAN/STM32 board and a motor/encoder interface board.