CNC_Controller_Upgrade_Project_Plan


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

ComponentLabelTypeDescription
SW-F01PWRSPST SwitchMain power on/off
SW-F02VACSPST SwitchVacuum override control
CN-F01WIFISMD AntennaESP32 WiFi/Bluetooth antenna
CN-F02PENDANTRJ12CNC pendant connection
CN-F03E-STOPGX12/4PEmergency stop button
CN-F04SD-CARDSD ExtensionDirect SD card access
CN-F05USBUSB-C ExtensionProgramming 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

ConnectorLabelPhaseDescription
CN-R05X-LIM(+)2X-Axis positive limit
CN-R06X-LIM(-)1X-Axis negative limit
CN-R07Z-LIM(+)2Z-Axis positive limit
CN-R08Z-LIM(-)1Z-Axis negative limit

Row 2: Y-Axis Limits & Probe

ConnectorLabelPhaseDescription
CN-R09YL-LIM(+)2Y-Left positive limit
CN-R10YL-LIM(-)1Y-Left negative limit
CN-R11YR-LIM(-)2Y-Right negative limit
CN-R12PROBE1Tool probe input

Row 3: Communications & Special Functions

ConnectorLabelPhaseDescription
CN-R13VFD1VFD RS485 communication
CN-R14LASER4Laser PWM and enable
CN-R15ToolSet2Tool setter sensor
CN-R16IoT-PDU1IoT power distribution

Row 4: MOSFET Outputs

ConnectorLabelPhaseDescription
CN-R17AIR-SOL1Air solenoid control
CN-R18AuxFET-12AUX PiBot MOSFET
CN-R19AuxFET-22AUX STM32 MOSFET
CN-R20AuxFET-32AUX STM32 MOSFET

Row 5: Motor Connections

ConnectorLabelPhaseDescription
CN-R01X-MOT1X-Axis motor
CN-R02YL-MOT1Y-Left motor
CN-R03YR-MOT1Y-Right motor
CN-R04Z-MOT1Z-Axis motor

Row 6: Multi-Pin Connections

ConnectorLabelPhaseDescription
CN-R21A-AXIS1A-Axis rotary
CN-R22AuxOut-12AUX PWM outputs
CN-R23AuxOut-22AUX PWM outputs
CN-R24AuxIn-12AUX inputs

Power Connections

ComponentLabelDescription
InputMAIN PWR110VAC 3-pin power inlet
Outlet 1VACUUMSwitched 110VAC outlet for vacuum
Outlet 2AUXAuxiliary switched 110VAC outlet
CB-01PSU CBCircuit breaker for 24V power supply
CB-02OUTLET CBCircuit 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