10v spindles

Wiring diagram not available. View SVG

Many VFDs accept a 0-10V analog signal to control spindle speed. The FluidBoard has a built-in 0-10V output with a trimmer for precise calibration — no external DAC or signal converter needed.

How it works

The VFD reads the voltage between its analog input (often labelled VI or AVI) and its analog common (ACM or GND), and translates it into an output frequency: 0V is the minimum frequency, 10V is the maximum. The frequency determines the speed of the spindle motor. For a common 2-pole spindle, 400 Hz corresponds to 24000 RPM.

Speed alone doesn't start the spindle. The VFD also needs a run command, which it gets from its digital inputs for forward and reverse. The FluidBoard's two opto-isolated outputs drive these: when the spindle is switched on, the output connects the VFD's forward (or reverse) input to its digital common, just like a switch would.

This is a one-way connection. The VFD gets a voltage and a run signal, but the controller never hears back whether the spindle is actually turning. If you want that, use RS485 instead.

Setting up the VFD

Before setting up 10v, you need to configure the VFD. This is very device specific, so see the manual of your VFD for details.

If your VFD is supported, check the following:

  • The VFD should be set to 10v input
  • Make sure that the parameters for max spindle speed/frequency, min and max frequency and acceleration/deceleration are sane.
  • If you have a brake resistor circuit, make sure that the VFD is configured to use it.

Most VFDs have two separate settings for this: the frequency source (set it to the analog input) and the run command source (set it to the external terminals). If the run command is still set to the keypad, the spindle won't start from the controller, even though the voltage arrives correctly.

Also check the motor parameters (rated frequency, voltage, current and number of poles) against the plate of your spindle. Wrong motor settings can overheat the spindle.

Spindles are dangerous tools! Always ensure spindles are properly clamped before even attempting to run them. Never run an ATC spindle without a tool. This can damage the seals of the spindle beyond repair.

Configuration

The next step is to setup the configuration of the 10v spindle in the configuration file:

10V:
  forward_pin: gpio.42
  reverse_pin: gpio.1
  pwm_hz: 5000
  output_pin: gpio.2
  enable_pin: NO_PIN
  direction_pin: NO_PIN
  disable_with_s0: false
  s0_with_disable: true
  spinup_ms: 0
  spindown_ms: 0
  tool_num: 0
  speed_map: 0=0.000% 1000=0.000% 24000=100.000%
  off_on_alarm: false

For more details, see the FluidNC wiki

A few settings deserve some attention:

  • speed_map translates the S-word into a percentage of the output voltage, so 100% is 10V. Set the highest point to the maximum speed of your spindle, matching the maximum frequency in the VFD.
  • spinup_ms and spindown_ms tell the controller how long to wait after starting or stopping the spindle before it continues. With both at 0, the machine starts moving immediately after M3, while the spindle may still be accelerating. Set them to at least the acceleration and deceleration times of your VFD, so the tool never enters the material at a low speed.
  • If you don't use reverse, set reverse_pin to NO_PIN.

Calibrating the 10v output

The 10v output can be calibrated with a simple multimeter. Connect the multimeter to the Gnd and 10v pins as shown in the picture.

  • Open the WebUI.
  • Set the spindle speed to 100%.
  • Measure the voltage on the multimeter. If the voltage is not 10v, tune the voltage by rotating the POT meter with a standard cross or Phillips screwdriver.
  • Disable the spindle.

Do this before the VFD is connected, so the spindle can't start. With the configuration above, M3 S24000 gives 100%; M5 switches it off again. Afterwards, check a value halfway, such as M3 S12000, to confirm the output follows the speed_map as you expect.

Wiring

Before wiring, make sure the configuration is correct, and use a multimeter to check the voltage range of the output. Connect the wires as follows:

VFD pin Controller pin Gpio Description
VI 10v gpio.2 Signal voltage input
ACM Gnd Analog Common
DCM Com Digital common
Out1 FOR gpio.42 Forward Direction Signal
Out2 REV gpio.1 Reverse Direction Signal (Optional)

Gpio pin 1 is shared between opto 2 and RS485. If you use RS485, you can still use the 10v spindle, but only the forward direction.

Pin names differ between VFD brands; the forward and reverse inputs are sometimes called FWD/REV or are numbered multi-function inputs such as DI1/DI2 or X1/X2. Check the manual for which inputs your VFD uses for run forward and run reverse.

An analog signal picks up noise easily, and the cable often runs right next to the spindle cable, which is the noisiest cable on the machine. Use shielded cable for the signal wires, connect the shield on one side only (at the VFD's earth or the control cabinet's earth), and keep it as far away from the motor and mains cables as possible. Noise shows up as a spindle speed that wanders around the commanded value.

Testing it

With the spindle clamped and no tool in the material:

  1. Send M3 S12000 (or roughly half your maximum speed). The spindle should start in the forward direction, and the VFD display should show roughly half of its maximum frequency.
  2. Send M5. The spindle should stop.
  3. If you use reverse, send M4 S12000 and check the direction, then M5.
  4. Compare the speed shown on the VFD at a few S values. If it is consistently off, adjust the speed_map or the analog input settings of the VFD so both agree.

Troubleshooting

Symptom Likely cause Fix
VFD shows the right frequency setpoint but doesn't start Run command source still set to the keypad Set the run command source to external terminals
Spindle starts but stays at minimum speed Frequency source not set to the analog input, or 10v/Gnd not connected Check the VFD parameters and the wiring of 10v and Gnd
Spindle reaches less than full speed at the highest S value Output not calibrated, or VFD analog input set to 0-5V Calibrate the output to 10V and set the VFD input to 0-10V
Speed wanders or is unstable Noise on the analog signal Use shielded cable, earth the shield on one side, separate it from motor cables
Reverse doesn't work RS485 is in use on gpio.1, or reverse_pin not configured Use forward only, or move to RS485 control
Spindle runs the wrong way on M3 Motor phases swapped Change the direction parameter in the VFD, or swap two motor phases at the VFD output with the power off and the VFD display dark
Copyright (c) 2024 by NubiloSoft, all rights reserved.
Accepted payment methods