Overview
This comprehensive upgrade replaces the factory Genmitsu 4040 Pro Max controller with a PiBot v4.9 Plus B running FluidNC firmware, paired with an Airedale STM32 I/O Expander for enhanced capabilities. The upgrade is structured in four phases to minimize downtime and accommodate component availability.
Hardware Components
- PiBot v4.9 Plus B: ESP32-based controller running FluidNC firmware
- Airedale STM32 I/O Expander: Adds 21 additional I/O pins via UART communication
- TB6600 Stepper Motor Drivers: External drivers for X, Y-Left, Y-Right, and Z axes
- 350W 24V Power Supply: Powers motors and control systems
- Metal Enclosure: 320x268x120mm industrial case housing all electronics
- Inductive Proximity Sensors: 24VDC NPN sensors (Phase 2)
- VFD Spindle: 1.5KW 3-phase motor with H100-1.5C2-1B VFD
Implementation Phases
Phase 1: Core Controller Installation (Current)
Objectives:
- Replace factory controller with PiBot and AireDale boards
- Install TB6600 stepper motor drivers for all four axes
- Implement emergency stop system with hardware and software protection
- Add vacuum relay control for dust collection
- Install air solenoid control for misting system
- Configure A-Axis rotary table support
- Connect CNC pendant for manual control
Retained Components:
- Factory mechanical limit switches (temporary)
- Factory NEMA17 stepper motors
- Factory spindle motor
Phase 2: Advanced Sensing & I/O Expansion
Objectives:
- Replace mechanical limit switches with 7 inductive proximity sensors
- Implement Y-axis auto-squaring capability
- Add tool setter for automated tool length measurement
- Install AUX connectors for future expansion (3 MOSFET outputs, 6 PWM outputs, 3 general inputs)
- Configure all AireDale I/O Expander pins
Benefits:
- More reliable limit detection
- Improved accuracy and repeatability
- Dual Y-axis homing for auto-squaring
Phase 3: Motor Upgrade
Objectives:
- Replace factory NEMA17 motors with NEMA23 high-torque motors
- Increase cutting force and acceleration capabilities
- Reduce motor stalling under heavy loads
Phase 4: Laser Integration
Objectives:
- Add laser head with PWM control
- Implement laser enable/disable safety circuit
- Configure FluidNC for laser mode operation
Enclosure Panel Layout
Front Panel
| Component | Label | Type | Description |
|---|---|---|---|
| SW-F01 | PWR | SPST Switch | Main power on/off |
| SW-F02 | VAC | SPST Switch | Vacuum override control |
| CN-F01 | WIFI | SMD Antenna | ESP32 WiFi/Bluetooth antenna |
| CN-F02 | PENDANT | RJ12 | CNC pendant connection |
| CN-F03 | E-STOP | GX12/4P | Emergency stop button |
| CN-F04 | SD-CARD | SD Extension | Direct SD card access |
| CN-F05 | USB | USB-C Extension | Programming and diagnostic port |
Rear Panel
The rear panel features 24 connectors arranged in 6 rows of 4 positions each, plus power connections.
Row 1: Limit Switches
| Connector | Label | Phase | Description |
|---|---|---|---|
| CN-R05 | X-LIM(+) | 2 | X-Axis positive limit |
| CN-R06 | X-LIM(-) | 1 | X-Axis negative limit |
| CN-R07 | Z-LIM(+) | 2 | Z-Axis positive limit |
| CN-R08 | Z-LIM(-) | 1 | Z-Axis negative limit |
Row 2: Y-Axis Limits & Probe
| Connector | Label | Phase | Description |
|---|---|---|---|
| CN-R09 | YL-LIM(+) | 2 | Y-Left positive limit |
| CN-R10 | YL-LIM(-) | 1 | Y-Left negative limit |
| CN-R11 | YR-LIM(-) | 2 | Y-Right negative limit |
| CN-R12 | PROBE | 1 | Tool probe input |
Row 3: Communications & Special Functions
| Connector | Label | Phase | Description |
|---|---|---|---|
| CN-R13 | VFD | 1 | VFD RS485 communication |
| CN-R14 | LASER | 4 | Laser PWM and enable |
| CN-R15 | ToolSet | 2 | Tool setter sensor |
| CN-R16 | IoT-PDU | 1 | IoT power distribution |
Row 4: MOSFET Outputs
| Connector | Label | Phase | Description |
|---|---|---|---|
| CN-R17 | AIR-SOL | 1 | Air solenoid control |
| CN-R18 | AuxFET-1 | 2 | AUX PiBot MOSFET |
| CN-R19 | AuxFET-2 | 2 | AUX STM32 MOSFET |
| CN-R20 | AuxFET-3 | 2 | AUX STM32 MOSFET |
Row 5: Motor Connections
| Connector | Label | Phase | Description |
|---|---|---|---|
| CN-R01 | X-MOT | 1 | X-Axis motor |
| CN-R02 | YL-MOT | 1 | Y-Left motor |
| CN-R03 | YR-MOT | 1 | Y-Right motor |
| CN-R04 | Z-MOT | 1 | Z-Axis motor |
Row 6: Multi-Pin Connections
| Connector | Label | Phase | Description |
|---|---|---|---|
| CN-R21 | A-AXIS | 1 | A-Axis rotary |
| CN-R22 | AuxOut-1 | 2 | AUX PWM outputs |
| CN-R23 | AuxOut-2 | 2 | AUX PWM outputs |
| CN-R24 | AuxIn-1 | 2 | AUX inputs |
Power Connections
| Component | Label | Description |
|---|---|---|
| Input | MAIN PWR | 110VAC 3-pin power inlet |
| Outlet 1 | VACUUM | Switched 110VAC outlet for vacuum |
| Outlet 2 | AUX | Auxiliary switched 110VAC outlet |
| CB-01 | PSU CB | Circuit breaker for 24V power supply |
| CB-02 | OUTLET CB | Circuit breaker for switched outlets |
Power Distribution
Primary Power System
110VAC Input:
- Main power cord connects to SW-F01 (front panel power switch)
- Protected by inline circuit breakers
- Powers 24V supply and switched outlets
24VDC System:
- 350W power supply provides motor and control power
- Distributed to TB6600 drivers, sensors, and logic circuits
- E-stop relay interrupts 24V power to motor drivers
Switched Outlets
Control System:
- gpio.26 controls internal relay module
- SW-F02 provides manual override for vacuum operation
- Protected by CB-02 circuit breaker (10A)
Available Outlets:
- VACUUM: Automatically controlled by CNC operations
- AUX: General purpose switched outlet
Safety Systems
Emergency Stop
Hardware Protection:
- Normally-closed (NC) contact interrupts 24VDC to all motor drivers via relay
- Cuts power instantly regardless of software state
- Requires manual reset after activation
Software Protection:
- Normally-open (NO) contact connects to gpio.34
- Triggers FluidNC alarm state
- Prevents accidental restart
Circuit Protection
- CB-01: Protects 24V power supply
- CB-02: Protects switched 110VAC outlets
- Fused connections on sensitive circuits
Cooling & Ventilation
- Intake: 80mm side panel fan
- Exhaust: Rear panel ventilation slots
- Airflow: Front-to-back positive pressure design
- Internal component spacing optimized for thermal management
Cable Management Strategy
Connector Standardization
GX12-4P Connectors:
- Used for limit switches, probe, VFD, laser, and motor connections
- 4-pin configuration handles most signal requirements
- Locking metal connectors prevent accidental disconnection
GX16-6P Connectors:
- Used for A-Axis, AUX inputs, and AUX outputs
- 6-pin configuration for multi-signal applications
- Maintains consistent connector family
Pinout Consistency
- Similar functions share pinout patterns
- 24VDC and Ground positions standardized across connectors
- Signal pins grouped logically
Expansion Planning
- Phase 2 AUX connectors pre-wired in Phase 1
- Panel holes cut during initial fabrication
- Connectors installed as needed in later phases
Configuration Management
FluidNC Configuration
Phase 1:
- Basic GPIO and I2SO pin assignments
- UART1 configured for CNC pendant
- Laser configuration commented out
- RS485 configured for VFD communication
Phase 2:
- UART channel 1 reconfigured for AireDale expander
- CNC pendant accessed through AireDale passthrough
- Additional I/O pins become available
- Auto-squaring configuration enabled
Phase 4:
- Laser configuration uncommented and activated
- PWM and enable pins configured
Firmware Updates
- FluidNC firmware updated via USB-C port (CN-F05)
- Configuration files stored on SD card
- Easy rollback to previous configurations
Project Timeline
Phase 1: 2-4 weeks (design, fabrication, installation, testing)
Phase 2: 1-2 weeks (sensor installation, configuration updates)
Phase 3: 1 week (motor replacement, re-tuning)
Phase 4: 1 week (laser installation, safety testing)
Testing & Validation
Phase 1 Testing
- Power-on sequence verification
- Motor direction and homing tests
- Limit switch functionality
- Emergency stop response
- VFD communication
- Pendant operation
- Vacuum control
Phase 2 Testing
- Inductive sensor calibration
- Y-axis auto-squaring accuracy
- Tool setter repeatability
- AUX I/O functionality
Phase 3 Testing
- Motor torque verification
- Acceleration tuning
- Cutting force tests
Phase 4 Testing
- Laser alignment
- PWM control accuracy
- Safety interlock verification
Documentation
- Complete pin assignment reference (see separate Pinouts document)
- FluidNC configuration files
- Wiring diagrams
- Panel layout drawings
- Testing procedures
- Troubleshooting guides
Future Expansion Capabilities
- 6 additional PWM outputs (CN-R22, CN-R23)
- 3 additional digital inputs (CN-R24)
- 3 additional MOSFET outputs (CN-R18, CN-R19, CN-R20)
- Reserved GPIO pins on PiBot
- Additional UART channels available
Related Documents
- CNC Controller Upgrade Pinouts – Complete pin assignments for PiBot and AireDale boards
