Table of Contents
Multiple Spindles Can be Used
V4.96 Pro supports multiple spindles on one machine. Spindles can be controlled by different hardware interfaces like relays, PWM, DACs, or RS485 serial interfaces to VFDs. Lasers are treated as spindles.
Each spindle is assigned a range of tool numbers. You change spindles by issuing the GCode command “M6 Tn”, where n is the tool number. Tool numbers within the assigned range for a given spindle will activate that spindle - and the detailed number within the range could be used to select the specific tool on the spindle. This lets you have, for example, a single machine with an ATC spindle and a laser. A single GCode file could allow you to etch and cut out a part. Most CAM programs support tool numbers. You could also have a gantry with both a low-speed high-torque pulley spindle and also a high-speed direct drive spindle.
If you want a particular spindle to be the default spindle upon power-on, simply set it as T0.
Spindle Control Methods
- 0-10V
- DAC
- RS485
- Variable Frequency Drives (VFD)
- Huanyang VFD (RS485)
- YL620 (RS485)
- H100 (RS485)
- P2 series inverters (RS485)
- NowForever (RS485)
- Danfoss VLT 2800
- Siemens v20
- (Generic) ModbusVFD (RS485)
- PWM
- BESC
- HBridge
- Laser
- Relay
- Plasma
Example Connect 0-10V VFD
Wiring Notes for Variable Frequency Drives (VFDs)
Due to differences in wiring diagrams provided by various manufacturers, always consult the relevant manual for detailed instructions. Below are key points to keep in mind:
1. 0–10V Analog Input Connection Notice
- Some VFDs have a terminal marked “10V” on the wiring panel.
- Important: This terminal is not for direct connection to the mainboard's 0–10V output port.
- It is designed for an external adjustable resistor that provides a voltage divider.
- To connect the 0–10V signal:
- Connect the signal wire to the VFD’s analog voltage input terminal (typically labeled AVI or Vl1).
- Connect the other wire to the GND terminal on the VFD.
2. Enable Signal (Start/Stop) via Relay Notice
- Some VFDs use a switch (enable signal) for start/stop control.
- Our mainboard includes a relay that can provide this on/off signal.
- Typical connection:
- One wire to the NO (Normally Open) contact of the relay from the VFD X1 OR S1.
- The other wire to the GND terminal on the VFD.
0-10V Hardware Connect Diagram
For functions such as forward rotation and reverse rotation, please refer to the relevant documentation provided by the manufacturer and conduct appropriate testing.
When you input the command M3 S24000, relay I2SO.23 will be triggered, and the 0-10V voltage will be output via GPIO.13.
You can also use the onboard relay for control, which is managed by controlling the output of GPIO.26.
0-10V Yaml Example with enable_pin
# Begin 10V 10V: forward_pin: NO_PIN reverse_pin: NO_PIN pwm_hz: 5000 output_pin: gpio.13 enable_pin: I2SO.23 # direction_pin: NO_PIN disable_with_s0: false s0_with_disable: true # spinup_ms: 0 # spindown_ms: 0 tool_num: 3 speed_map: 0=0.000% 1000=0.000% 24000=100.000% off_on_alarm: false
Example Connect Laser PWM
Wiring Notes for Laser
Power and Ground Connection
- The 12V GND of the laser head must be shared with the mainboard GND.
- The mainboard signal output should be connected to the PWM pin of the laser head.
Control Methods for Laser On/Off
- Onboard Relay:Can be used to switch the laser head's power supply.
- PiBot Expansion Board V4:Supports 12V PWM output if required for laser control.
Notes
- Ensure proper voltage matching between the laser head and the control board.
- Verify signal compatibility before connecting PWM lines.
Laser PWM Hardware Connect Diagram
Laser PWM Yaml Example
# Begin Laser Laser: pwm_hz: 5000 output_pin: gpio.12 enable_pin: NO_PIN disable_with_s0: false s0_with_disable: true tool_num: 2 speed_map: 0=0.000% 255=100.000% off_on_alarm: true
Example RC Servo or BESC
Wiring Notes for RC Servo or BESC
BESC means “Brushless Electronic Speed Controller” of the type used to power propeller motors for hobby-type radio-controlled planes, helicopters, and drones. Those motors can be used for high-speed spindles on light-duty machines that do not have substantial tool side loads. They use the same type of PWM signal as an RC servo. Conventional PWM controls power by adjusting the duty cycle between 0% and 100%, whereas RC servo PWM adjusts the pulse length between (typically) 1 ms (for motor off) and 2 ms (motor full on) within a pulse repetition period of about 20 ms. Only one PWM-capable I/O pin is required. It must be a digital output pin that presents the raw PWM waveform, not a PWM-to-analog output that creates a variable DC voltage by low-pass filtering the PWM waveform.
Earlier versions of FluidNC had a special BESC spindle type, but we realized that, with suitable config settings for pwm_hz and speed_map, the PWM spindle type works perfectly for BESCs.
The usual pulse repetition rate for BESCs is 20ms which is 50 Hz in frequency units, so set the pwm_hz config item to 50 (some BESCs can operate with higher pulse repetition rates, up to perhaps 200Hz). Let's assume that the minimum pulse time is the typical 1ms (motor off) and the maximum time is 2 ms (motor full on). 1ms is 5% of 20ms and 2ms is 10%. Let's also assume that you wish to set the motor speed with GCode S values between 0 and 1000. Therefore, the speed_map config item would have the value “0=5% 1000=10%”.
RC Servo or BESC Hardware Connect Diagram
RC Servo or BESC Yaml Example
pwm: pwm_hz: 50 # direction_pin: NO_PIN output_pin: gpio.4 # enable_pin: NO_PIN # disable_with_s0: false # s0_with_disable: true # spinup_ms: 0 # spindown_ms: 0 tool_num: 1 speed_map: 0=5% 1000=10% # off_on_alarm: false
Also Can Define RC Servo or Solenoid as an Axis
z: steps_per_mm: 100.000 max_rate_mm_per_min: 5000.000 acceleration_mm_per_sec2: 100.000 max_travel_mm: 5.000 soft_limits: true homing: cycle: 1 positive_direction: true mpos_mm: 5.000 motor0: rc_servo: pwm_hz: 50 output_pin: gpio.27 min_pulse_us: 1000 max_pulse_us: 2000
example with rotation reversed
rc_servo: pwm_hz: 60 output_pin: gpio.27 min_pulse_us: 2000 max_pulse_us: 1000
More Spindle Connection Methods
Please visit: http://wiki.fluidnc.com/en/config/config_spindles
Please visit: http://wiki.fluidnc.com/en/config/axes
