Hello Guest it is April 26, 2024, 05:01:24 AM

Author Topic: Spindle speed not correct  (Read 5317 times)

0 Members and 1 Guest are viewing this topic.

Spindle speed not correct
« on: January 22, 2021, 03:23:23 PM »
I’ve failed to get to the bottom of this so far. The setup is a 2.2kW water cooled spindle with a HuanYang vfd, and Mach4 with an Ethernet Smoothstepper and an MB3 breakout board.

Using MBI, if I run M3 S*********x I don’t get the commanded spindle speed. At lower speeds, the spindle runs slightly faster than it should, and at the higher speeds it is slower, eg

6000rpm, 121Hz, gives me 7400

9000rpm, 152Hz, 9000

12,000rpm, 181Hz, 10800

15,000, 214, 12750

18,000, 250, 14,900

21,000, 283Hz, 16,800

24,000, 318 Hz, 19,200

The actual frequency delivered clearly corresponds to the resulting rpm of the spindle, and this is borne out with checks I’ve done so far. I disconnected the analogue output (two wires) from the breakout board and meter to check the analogue output, which shows a perfect proportional output from 0 to 10volts at all speeds ie m3 s6000 gives 2.5v, s12000 gives 5v, etc.

I also connected a benchtop power supply to the vfd analogue input, and again checking with various voltages from 0 to 10v gives the correct frequency and spindle speed, right up to the 400Hz maximum which should be 24,000rpm.

So, the ESS/MB3 is working correctly when tested, and so is the VFD. Mach4 also seems to be delivering the correct information to the ESS. But when it is connected up it doesn’t.

i have the vfd set to 400Hz Max, and 120Hz minimum. I have trawled the Internet for the correct parameters and I’m pretty confident that I have them correct. There are some settings in Mach4 which I’m not altogether sure about - the spindle is set up in the ESS confit as PWM, frequency 50Hz. There is no sensor fitted to it so PID is not relevant. The min and max speeds in the Mach4 config dialog is set to zero and 24,000.

Two possibles that occur to me - first there is a setting somewhere in Mach4 or in the vfd parameters that I’ve missed, or secondly there is some sort of electrical noise that is disrupting the analogue output of the ESS.

Offline MN300

*
  •  298 298
    • View Profile
Re: Spindle speed not correct
« Reply #1 on: January 22, 2021, 06:11:02 PM »
You write that you have tested the Analog output and the VFD input separately. Check the voltage vs speed with the VDF connected. The VFD may be overloading the analog output causing non-linearity.
If your VFD has the option to use 0 to 5 volts analog input that may be a work-around.
Re: Spindle speed not correct
« Reply #2 on: January 22, 2021, 11:25:33 PM »
Can you connect to the  VFD with modbus? This works well and you can get the spindle load on the screen as a bonus! The low cost drives can be a real challenge to get communication working.
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: Spindle speed not correct
« Reply #3 on: January 23, 2021, 06:51:05 AM »
MN300 - Yes, I tested each separately. I did briefly check the voltage when connected and with the spindle running, and noticed that as soon as the probes made contact I got a slight speed drop. It made me wonder whether the internal resistance of the meter itself was causing the drop, so I stopped in case I damaged the breakout board. So your suggestion that the Vfd May be overloading the output of the BOB seems logical (though why it would cause overspeed at low S settings I don’t know)
So maybe I need to feed the A0 and AG wires through some sort of regulator circuit to ensure there is no voltage drop.

Brian - I have just done a bit of reading about modbus and huanyang vfd’s - it seems Huanyang implement modbus in a non-conventional way which might make things tricky, but I’m tempted to have a go. The only thing I’m not sure about is whether my particular model HY02D223B is fitted with the necessary modbus electronics beyond the RS485 plug socket, as apparently not all models are.
Re: Spindle speed not correct
« Reply #4 on: January 23, 2021, 07:36:10 AM »
Well option number B for bandaid, make some code in the PMC that will scale the value and make it work at the correct speed. I know it’s not the right thing but sometime it’s the best you can do (other than going to automation direct and getting a new VFD) . If you want to do this I can give you a hand. I think if we got 5 points and did linear interpolation through them we could get this really close.
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com

Offline MN300

*
  •  298 298
    • View Profile
Re: Spindle speed not correct
« Reply #5 on: January 23, 2021, 08:56:05 AM »
I assume you are using a digital multimeter with very high input resistance but even an old fashioned mechanical meter shouldn't load the analog output enough to affect the reading. Something is wrong if connecting a meter changes the speed. Without details of the analog output circuit and the VFD input it's hard to guess what's happening. Unfortunately that much detail is seldom published.

If you have a resistor in the with a value of around 10K see if connecting it changes the voltage. Do this with the VFD disconnected. It will show if loading affects the voltage.

Measure the analog voltage with the VFD connected including speeds below the minimum speed, this might give you more clues. Extending your readings to 0 volts in say the speed would be 4000 RPMs at 0 volts.

The MB3 Owner's Manual mentions using a PWM frequency of 260 Hz. Possibly the wrong frequency could affect the behavior of the PWM to analog circuit.

John
Re: Spindle speed not correct
« Reply #6 on: January 23, 2021, 02:43:26 PM »
I think I need to do some more testing, with various parameter settings on the vfd. A quick play this evening seems to indicate that setting different minimum frequencies for the spindle affects the speed obtained throughout the range. So, for example, setting the minimum to be 120hz I managed to obtain a maximum of around 340hz, whereas setting the minimum at 50Hz only gives me a maximum of around 300Hz. It almost seems as though there should be a multiplier parameter setting somewhere!

Offline MN300

*
  •  298 298
    • View Profile
Re: Spindle speed not correct
« Reply #7 on: January 23, 2021, 03:20:36 PM »
The VDF model number or a link to the manual would be helpful if you're looking for advice on the parameter settings, and of course a list of your current settings.
Re: Spindle speed not correct
« Reply #8 on: January 23, 2021, 03:24:06 PM »
Automation direct / delta VFD and you will be happy :) I know it can be fun to try to make the low cost ones work but they can really make you angry trying to set them up.
Fixing problems one post at a time ;)

www.newfangledsolutions.com
www.machsupport.com
Re: Spindle speed not correct
« Reply #9 on: January 24, 2021, 07:46:33 AM »
MN300 - the model number is HY02D223B. The parameters settings that I have either changed, or might be relevant are as follows:
PD002   1       (External source of run commands)
PD002   2       (External source of operating frequency)
PD003   400 Hz    (Main frequency)
PD004   400 Hz    (Base frequency)
PD005   400 Hz    (Max operating frequency)
PD006   2.5       (Intermediate frequency of V/F curve)
PD007   2.5       (Min frequency of V/F curve)
PD008   220v      (Max voltage)
PD009   13       (Intermediate voltage of V/F curve)
PD010   6.5      (Min voltage V/F curve)
PD014   10      (accel time)
PD015   10      (accel time)
PDO41   8      (Carrier frequency)
PD044   02      (Forward)
PD055   100%   (VO analogue output gain)
PD070   0      (0-10v analog input)
PD071   10      (Analog filtering constant)
PD072   400Hz   (Higher analog frequency)
PD073   120Hz   (Lower analog frequency)
PD141   220      (Rated motor voltage)
PD142   11.0      (Rated motor current)
PD143   2      (No of poles)
PD144   3000      (Rated motor rpm at 50Hz)

This morning I checked the effect of changing PD073 , the minimum operating frequency, from the MDI window, M3 S12000 and M3 S24000. It clearly affects the speed throughout the range, and I tried different settings from )Hz to 400Hz.


Brian - I'm afraid I don't know what is involved with making code for a PMC, or what a PMC is.
I have ordered a USB-RS485 converter and length of shielded cable in case I decide to play with Modbus. And I found myself searching for decent-name VFD's yesterday to see what is available that might replace the HuanYang (which I'm sure would be useful for running one of my manual machine tools). In the meantime, the CNC is still useable - I'll just adjust the speeds for each job to take account of the discrepancy until I decide on a permanent solution to sort it.
Thanks for all the help so far.