Hello Guest it is April 16, 2024, 01:59:03 PM

Author Topic: Setting up Spindle/VFD control Issues  (Read 4680 times)

0 Members and 1 Guest are viewing this topic.

Setting up Spindle/VFD control Issues
« on: February 07, 2019, 04:08:25 AM »
Hey all.
Mach4 4.2.0.3804
ESS Build 232
Gecko G540
Nowforever VFD

Ive been using the setup for awhile with just the Potentiometer on the VFD for spindle control, I want to setup software control with the ESS/Gecko/Mach4

Ive set it all up as I believe it should be (following manuals etc) but as soon as I connect the wiring from the GeckoG540 to the VFD it activates the spindle and sets it at 232hz no matter what I change?

My wiring is as follows:
Gecko G540 Pin 7 (VFD Ground) --> Comm Terminal on VFD
Gecko G540 Pin 8 (VFD Out) --> X1 Terminal on VFD (Spindle FWD Input)
Gecko G540 Pin 9 (VFD 10V) --> AIN1 (Analog Input 1)

Software setup:

Mach 4 ESS plugin config:

Spindle: Type = PWM
Frequency Hz = 400z (im not actually sure about this one? how do you know the base hz, I just choose the max hz

Pins Config:
Port 1 - Pin8 - Out - Active High - Spindle PWM
Port 1 - Pin9 - Out - Active High - Spindle FWD
Output Signals:
Spindle Motor PWM - Enabled - Mach Mapping ESS Only - Pin1 Mapping "Spindle PWM"
Spindle FWD - Enabled - Mach Mapping ESS - Pin1 Mapping "Spindle FWD"

Mach 4 Config:
Output Signals:
Spindle FWD - Enabled - Device = ESS - Output Name Spindle FWD

Ive tried setting different pins, setting active low, changing spindle FWD to Spindle ON, even swapped the wires on the VFD (x1 and AIN1)

Oh I should mentioned Ive changed all the setup parameters on the VFD to suit analog control through AIN1.

But yea no matter what I try it just turns the spindle on straight away at 200odd hz

Im out of ideas.
Re: Setting up Spindle/VFD control Issues
« Reply #1 on: February 07, 2019, 04:56:01 AM »
Hi,

Quote
Gecko G540 Pin 7 (VFD Ground) --> Comm Terminal on VFD
Correct

Quote
Gecko G540 Pin 8 (VFD Out) --> X1 Terminal on VFD (Spindle FWD Input)
Incorrect. Pin8 of the G540
is a variable output voltage between 0 and 10V. It needs to be hooked to the AIN input of your VFD

Quote
Gecko G540 Pin 9 (VFD 10V) --> AIN1 (Analog Input 1)
Incorrect. The G540 is expecting a constant 10V input supply, from the VFD if it has one or an external 10V supply
if it doesn't. The G540 will take this 10V supply and 'modulate' it to the required (variable) output. Does you VFD have
a 10-12V supply for this purpose?.

Quote
Spindle: Type = PWM
Frequency Hz = 400z (im not actually sure about this one? how do you know the base hz, I just choose the max hz
Correct although the G540 is expecting a base frequency of 50Hz, probably good idea to provide the signal
that the G540 is designed for, ie 50Hz

Quote
Pins Config:
Port 1 - Pin8 - Out - Active High - Spindle PWM
Port 1 - Pin9 - Out - Active High - Spindle FWD
Incorrect. The ESS pins will hook to the DB25 input of the G540.

Thus Port1 -Pin14 Active High Spindle PWM

You have a problem now. It is common to have a signal to turn the spindle ON/OFF.
If you want to be able to go both directions you'll want a FWD/REV signal as well.

There are two uncommitted outputs on the G540, OUTPUT1 and OUTPUT2. They are driven by two G540 DB25
input pins.

Port1 -Pin1 OUTPUT2
Port1 -Pin17 OUTPUT1

You need to decide whether you want ON/OFF AND direction control OR just plain ON/OFF control.

Quote
Mach 4 Config:
Output Signals:
Spindle FWD - Enabled - Device = ESS - Output Name Spindle FWD
You shouldn't touch this setting. You make the output settings in the ESS plugin and that AUTOMATICALLY populates
the Mach4 Config.

Until you decide the direction/ON/OFF question the ESS outputs are undecided.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline thosj

*
  •  532 532
    • View Profile
Re: Setting up Spindle/VFD control Issues
« Reply #2 on: February 07, 2019, 08:49:33 AM »
Wow, Craig, most excellent post!!

Only thing I'd even consider adding, for the OP's understanding, is the PWM frequency is unrelated to the VFD's frequency!!
--
Tom
Re: Setting up Spindle/VFD control Issues
« Reply #3 on: February 07, 2019, 06:09:57 PM »
Wow thanks JoeAwesome for the indepth reply!

I only require a spindle on and the vfd is set to turn clockwise.

The VFD does have a ā€œ12vā€ out but while I was checking things I happened to probe between this post and the comm post and it was showing 13.2volts. I do remember reading somewhere in the gecko manual not to let this be over 12v. Is this a problem?
Re: Setting up Spindle/VFD control Issues
« Reply #4 on: February 08, 2019, 12:48:20 AM »
Hi,

Quote
The VFD does have a ā€œ12vā€ out but while I was checking things I happened to probe between this post and the comm post and it was showing 13.2volts. I do remember reading somewhere in the gecko manual not to let this be over 12v. Is this a problem?

Yes, it may be. Its quite common for a 'nominal 12V' supply to be somewhat more, as in your case 13.2V.
As you know 12V is the common output voltage of an automotive 6 cell flooded lead acid battery. In fact when absolutely
fully charged you might expect 2.2V per cell for a total output voltage of 12.6V. When in automotive service when the engine runs
the generator (old school)/altenator will elevate the voltage to charge the battery. A modest charge rate could be secured by
charging at 13.2V. A more aggressive charge rate as is the norm for modern cars is 14.2V to 14.5V.

With the long history of 12V use in automotive service then '12V' can be a bit flexible.

I don't recall seeing anything in the G540 manual, but I take your word that it is there, the recommendation not to exceed 12V.
If that is the recommendation I would stick to it. It is worth an email to Gecko to get a little more info.
The simplest solution I can think of would be to drop the voltage slightly with a 9.1V Zener diode and a resistor. That would
mean that the variable output voltage of the G540 would be  0 to 9.1V, slightly less than spec but close enough. 9.1V is a
standard Zener voltage. You might enquire from Gecko about the expected G540 current draw from the nominal 10V supply,
it maybe that a Zener will get a bit hot and bothered.

Another alternative is to use a low dropout voltage regulator. You might get away with a very common and dirt cheap LM317.
It would require two resistors to set the voltage but you can set it very accurately.

Let me know if you need some help to regulate the 13.2V output of your VFD. Electronics is 'my thing'.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Setting up Spindle/VFD control Issues
« Reply #5 on: February 08, 2019, 04:39:05 AM »
Ok so progress! I wired and configured the way you said and now have control of the Frequency on the VFD except for one problem. The GeckoG540 is outputting 0 to 13volts. Maybe thats why they say not to connect it to over 12v as it cant reduce anything over 12v down to 10volts?

So yeh looks like I might have to drop the voltage.

Next problem is I setup Output 2 as Spindle On And the output is working (testing with multimeter) but the VFD only activates the X1 terminal when X1 and Comm terminal (on the vfd) are connected. and Output 2 on the g540 doesnt seem to have continuity to Comm on vfd so im not sure what to do there. Maybe run a wire from the Comm terminal on the VFD to the pin12 on the GeckoG540 (power supply ground)
Re: Setting up Spindle/VFD control Issues
« Reply #6 on: February 08, 2019, 05:12:05 AM »
Hi,

Quote
Maybe thats why they say not to connect it to over 12v as it cant reduce anything over 12v down to 10volts?

Not quite. The G540 can reduce the input voltage in a range of 0% to 100%. If you call for the spindle to go to maximum
speed it will output 100% of the supply voltage it is given. If it is given 13V then at 100% the output voltage will be 13V.

The problem I'm guessing is that Gecko believe that an input voltage of more than 12V will stress the internals of the G540.

Quote
Next problem is I setup Output 2 as Spindle On And the output is working (testing with multimeter) but the VFD only activates the X1 terminal when X1 and Comm terminal (on the vfd) are connected. and Output 2 on the g540 doesnt seem to have continuity to Comm on vfd so im not sure what to do there. Maybe run a wire from the Comm terminal on the VFD to the pin12 on the GeckoG540 (power supply ground)


Sounds like the VFD Enable is active low. If you reverse the sense of the Gecko output, when it goes low it should turn the
VFD on. It may be as you say that the Com terminal is isolated from pin12, the power supply ground. Try in the first instance
the reversal of the signal, done in the ESS plugin Pins Config page. It may be necessary to hook pin 12 of the G540 to the Com
of the VFD.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Setting up Spindle/VFD control Issues
« Reply #7 on: February 08, 2019, 06:35:10 PM »
Ok So I need to drop the voltage from 13.2 to 10volts.

Can this be done with a simple Resistor voltage divider circuit? http://www.learningaboutelectronics.com/Articles/How-to-reduce-voltage-with-resistors.php

If So am I better to use say a 1k resistor as R1 or a 10K for example.

Also where would I connect the earth from this circuit to? The comm of the VFD I would guess but doesn't this create a short circuit?

Or is the other method you mentioned better using a LM317? how is that done?


Lastly why does the VFD have a 12V (13V) output when its analog inputs only work with 0-10v :S
Re: Setting up Spindle/VFD control Issues
« Reply #8 on: February 08, 2019, 06:47:12 PM »
Actually should I just get one of these?
https://www.ebay.com.au/itm/LM317-DC-DC-step-down-converter-4-2V-40V-to-1-2V-37V-linear-voltage-regulator-JO/264175708605?hash=item3d821969bd:g:Mt0AAOSwIAJb~-Xp:rk:2:pf:0

https://www.ebay.com.au/itm/LM317-DC-Linear-Converter-Down-Voltage-Regulator-Board-Speed-Control-Module/272850619516?epid=608069985&hash=item3f872a0c7c:g:jOsAAOSwuLRZvgXX:rk:1:pf:0


The first one says minimum amps is 1.5 output Id imagine the Gecko/vfd would have very small amp output? does this mean it wont work? The second link says 5-1500ma so would this be better? not sure why it has 7 pins tho?
Re: Setting up Spindle/VFD control Issues
« Reply #9 on: February 08, 2019, 07:14:44 PM »
Doh, don't worry... I was thinking its weird it has a 12V output when its Analog input wants a 0-10V signal so reading the VFD manual some more it also has a Analog output which you can configure to output between 0-10v!