Forge
Open-source CNC controller board with real-time toolpath interpolation, closed-loop stepper drivers, and web-based G-code streaming

CNC controllers haven't evolved in twenty years - most still rely on parallel ports or proprietary dongles, locking you into vendor software with no real-time feedback. Forge replaces them with a custom 4-layer PCB running real-time firmware that handles motion planning and closed-loop stepper control over USB and Ethernet via a gRPC API.
- Custom 4-layer PCB with STM32H743 MCU, TMC5160 closed-loop stepper drivers, and isolated digital I/O for limit switches and relays
- Real-time firmware running FreeRTOS with a dedicated motion planning task at 40kHz step generation using Bresenham interpolation with look-ahead acceleration profiling
- gRPC bi-directional streaming API for toolpath upload, real-time position feedback, and parameter adjustment without pausing operations
- Web-based dashboard with live 3D toolpath preview, axis position readout, speed override, and job queue management
- Automatic calibration routine using limit switch homing and probe-based tool length offset measurement with 0.01mm repeatability
Firmware architecture follows a three-layer design: a hardware abstraction layer (HAL) wrapping TIM peripherals, GPIO, and DMA for step generation; a motion planning layer implementing a look-ahead acceleration planner with trapezoidal velocity profiles and corner rounding; and a command layer that parses buffered G-code blocks into the planner's internal trajectory queue. The planner runs at 1kHz, outputting position setpoints to the step generation ISR running at 40kHz via a double-buffered pipeline.