Page 1 of 2

### VFD Speed Control

Posted: Thu Jan 22, 2015 2:56 pm
I have been thinking about adding some speed control to my Chinese Spindle (via it's VFD) for a while. I was going to have a potentiometer on the front of my enclosure, which would be simple enough to get the job done. But then our illustrious community started talking about PWM and speed controllers with GRBL 9.
I am using an Arduino running GRBL 9.x and the gshield on my SO2.

My question is for any of you that understand the electrical systems:- Is there a way to make grbl's PWM speed control talk to my VFD?

The analog input options I have for the frequency (i.e. speed) control are as follows:
0-10V
0-5V
0-20mA
4-20mA
0-10V & 4-20mA stacked
XIA
(VI + XIA) / 2
(3VA + XIA) / 4
(XIA + XIB) / 2
Max (XIA, XIB)
Min (XIA, XIB)

I can make sense of the first half, where you choose voltage or current levels to set the speed. The second half totally baffle me, using the XIA and XIB references which are not explained anywhere (or on any forums that I can find).

### Re: VFD Speed Control

Posted: Thu Jan 22, 2015 4:13 pm
I'm baffled by the XIA and XIB too, and my google-fu seems woefully insufficient, but I am pretty sure you can wire the PWM output straight into 0-5 V. If it doesn't, you'll need a simple low-pass filter (a resistor and a capacitor) to convert PWM to a voltage level between 0 and 5 V, which will work for sure.

### Re: VFD Speed Control

Posted: Fri Jan 23, 2015 10:15 am
OK, so I have the Low Pass Filter idea in mind now but I am nervous about directly connecting my VFD into my Arduino/computer directly.

Is there a sensible route for optically isolating the circuits, to mitigate the risk from the VFD circuitry?

(By which I mean: Cat, would you design me one please? )

### Re: VFD Speed Control

Posted: Fri Jan 23, 2015 1:15 pm
Does your VFD have a terminal where it supplies 5 V or 10 V for a small external circuit? If not, you'll need a separate power supply, or an isolated DC-DC converter.

Actually, do you have a link for the manual?

### Re: VFD Speed Control

Posted: Fri Jan 23, 2015 1:32 pm
Yes, it does provide it's own +10V to be used as power for the speed control circuits.

I have attached a copy of the manual.

### Re: VFD Speed Control

Posted: Fri Jan 23, 2015 8:34 pm
This should work, and it uses a very common and inexpensive optocoupler.
VFD spindle PWM connection.png (9.19 KiB) Viewed 7957 times
* Bonus safety feature: if you use a touchplate with an alligator clip to ground the endmill, instead of connecting the optocoupler LED to Arduino GND directly, wire it to an exposed but otherwise insulated metal tab. Park the alligator clip on that tab when not in use. That way, if you forget the clip on the endmill, the spindle won't start, because it needs the clip to close the circuit for the LED.

### Re: VFD Speed Control

Posted: Sat Jan 24, 2015 11:30 am
Thanks Cat, that's just the ticket!

### Re: VFD Speed Control

Posted: Tue Mar 17, 2015 12:21 pm
I took this information and created a board that combined my limit switch circuits along with this PWM and Direction control.
I had to wait a while for the boards to come back from the manufacturer, but I am pleased with the result.
Board Top Side
57 Board Top.JPG (292.38 KiB) Viewed 7676 times
Board Bottom Side
58 Board Bottom.JPG (241.26 KiB) Viewed 7676 times

It needs a bit of testing yet, but I think it should be ok.
Populated Board
59 Board Populated.JPG (280.11 KiB) Viewed 7676 times

### Re: VFD Speed Control

Posted: Wed Apr 06, 2016 11:51 pm
I've been poking around into the unfamiliar world of 3 phase spindles and VFDs, so I came across this thread and was curious if this worked well?

Also, would it be nuts to take GRBL's 0 to 5v output, feed it to the input of another arduino and use a RS485 Shield https://www.sparkfun.com/products/12965 to send that information to the VFD?

### Re: VFD Speed Control

Posted: Thu Apr 07, 2016 11:35 am
Hi Tom,

This design did (and still does) work. I managed to get some of the polarities muddled on the board for my leds and buttons, but it does what I needed, if not exactly as I had intended.
It gives me full automatic control of the VFD; on, off and speed control. So much better that I have the VFD Inverter control completely out of the way now.