Bill,
I bought a water-cooled 220 volt 1.5kw spindle/VFD combo from Amazon a couple years ago that was used on my old home-built and very imprecise CNC machine. The VFD and motor kit is model number HY01D523B, but from what I can tell most models are similar in setup. It’s an inexpensive Chinese product, but other than having a little guilt for not buying a US product, I’ve been very happy with the way it works on the LongMill. I think the max collet size is 3/8", so no 1/2" bits.
Link to the product (no longer available - but plenty of other options are): https://www.amazon.com/gp/product/B01M4I7YHQ/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&psc=1
The most difficult part of the setup was figuring out the wiring from the LongMill board to the VFD and the VFD programming codes.
For the wiring you’ll need to run the Spindle PWM to the “VI” (Voltage Input for the potentiometer) input on the VFD and the GND to the “ACM” (analog ground) on the VFD. I would think this is the only thing you need to do from the LongMill board to the VFD, but I could not get the VFD to go to a 0 RPM when the M5 code was applied. It would go to ~100 RPM, and obviously that’s not acceptable. So after a lot (i mean a lot) of tinkering, I was ran another wire from the LongBoard Coolant output to the “FOR” (forward rotation) input on the VFD and the Coolant GND to the “DCM” (digital ground - which i believe makes it a simple on/off switch for the spindle commands).
VFD program codes are below. I’ve added the Code number and the function just in case it doesn’t necessarily match up with other models:
PD013 (Reset) - 8 (do this first if you are using a previously programmed VFD and need to factory reset the codes)
PD001 (Source of Run Commands) - 1 (External commands, i.e. Longmill Board)
PD002 (Source of Operating Frequency) - 1 (External Terminal)
PD003 (Main Frequency) - 400 (Motor dependent)
PD004 (Base Frequency) - 400 (Motor dependent)
PD005 (Max Operating Frequency) - 400 (Motor dependent)
PD006 (Intermediate Frequency) - 2.5
PD007 (Min Frequency) - .2
PD008 (Max Voltage) - 220 (Motor dependent)
PD009 (Intermediate Voltage) - 15 (Motor dependent)
PD010 (Min Voltage) - 8 (Motor dependent)
PD011 (Frequency Lower Limit) - 120
PD014 (Motor Acceleration Time) - 10 seconds (this becomes important when setting your GCode delay after M3 command
PD015 (Motor Deceleration Time) - 10 seconds
PD041 (Carrier Frequency) - 8 (Motor Dependent)
PD044 (Forward Function tied to the FOR digital input discussed above) - 2 (Forward rotation when VI received Spindle PWM input > 0 volts)
PD70 (Analog Input - VI Input) - 1 (5VDC which is what the Longboard Spindle PWM outputs)
PD141 (Rated Motor Voltage) - 220
PD142 (Rated Motor Current) - 5
PD143 (Number of Poles) - 2
PD144 (Rated Motor Revolution)- 3000 (this equated a 5V input from the Spindle PWM to 24,000 RPM)
I’m not sure what CAD/CAM software you’re using, but with VCarve I had to go into the GBRL mm post-processor and add the following to the Spindle On command:
±--------------------------------------------------
- Command output after the header to switch spindle on
±--------------------------------------------------
begin SPINDLE_ON
“[S]”
“M3”
“G4 P12”
…and the following to the end of file command:
±--------------------------------------------------
- Commands output at the end of the file
±--------------------------------------------------
begin FOOTER
“M5”
“G0 [ZH]”
“G0 [XH] [YH]”
“M2”
After that I could trigger the spindle on and off with the M3/M5 commands and set spindle speed using SXXXX. I’ll give the M6 command a try with CNCJS when I get back to hobby time.
Hope that helps. I’ll try to make a better tutorial with pictures in a couple weeks.