VFD Parameters (Huanyang model)

@Julien

PD143 = ??? ; 4 or 2 poles in motor. Default is 4. How do I determine if my spindle is 4 or 2 poles ?” It appears that G Penny’s spindles for metalworking are 4 pole (800 Hz for 24 kRPM) and woodworking are 2 pole (400 Hz for 24 kRPM)..
"@gmack, I remember you mentioning the need to tune the VFD to match my spindle settings, did you have any specific parameter in mind beyond max V (220), max amps (10), max RPM (24000), and setting the constant torque curve params ?" Nope - that’s it. So the maximum/rated spindle power input is 220V X 10A X 1.7331 = 3810 Watts.

IMO you’re doing a real service by sharing how to properly setup these VFDs. Kudos!:slightly_smiling_face:

2 Likes

PD143 = 2 it is then, thanks.
The 1.7331 thing went over my head, what does it correspond to ?

1 Like

VFDs provide three phase power to the spindle motors. The phase shift between the phases of three phase power is 120 degrees. Only two phases are sourcing current (10A max.) at the phase voltage (220 V max.) at a time. So, the effective maximum voltage to the load is 220Vx2xsin(120 degrees/2) = 220Vx1.7321 (OOPS - not 1.7331). So, if the motor happens to be 1/1.7321=57.74% efficient (a reasonable value), it should have 2200 Watts of output power at the rated speed (24000 RPM).

1 Like

What sort of torque are we looking at? Sorry if I missed it earlier in the thread.

Don’t really know, but if it’s output power is 2200 Watts at 24000 RPM, the torque would be 7.7475 in-lbf.

3 Likes

This morning I figured I would skim over the parameters out of curiosity, then got carried away and ended up making a note of every single parameter value currently set in my VFD and what it does. In others words, I RTFM. I will leave my notes here in case this could be useful for others with the same VFD model. I highlighted the ones that I think need to be considered for the Shapeoko usecase, feel free to comment if you went through the same exercize and optimized some of these params !

PD000 = 0 ; parameters left unlocked, set to 1 to lock
PD001 = 1 ; required to use Shapeoko’s PWM signal as the activation trigger (default was 0=manual)
PD002 = 1 ; required to use Shapeoko’s PWM signal as the RPM input (default was 0=manual)
PD003 = 400 ; main frequency (the speed the spindle WOULD start off at if PD002 was set to 0, so irrelevant here)
PD004 = 400 ; base frequency as rated on my spindle (default was 50)
PD005 = 400 ; max frequency the VFD will allow (default was 50)

PD006 through PD010 define the Voltage vs Frequency curve, I figured I want the “Curve of constant torque” from the manual:
<VF_curve>
Therefore:
PD006 = 2.5 ; default value for Intermediate Frequency (Hz)
PD007 = 0.5 ; default value for Minimum Frequency (Hz)
PD008 = 220 ; default value for my 220V spindle
PD009 = 15 ; Intermediate Voltage
PD010 = 8 ; Minimum Voltage

PD011 = 0 ; frequency lower limit. Left at default value of 0 RPM, which is fine for a water-cooled spindle that has constant liquid flow. For an air-cooled spindle, this should be set to a value that ensures a minimum air flow, e.g. 120Hz = 7200 RPM

PD012 is reserved (NULL)
PD013 = 0 ; factory reset: set to “8” and validate to reset to factory settings

PD014 = 5; spindle acceleration time1 in seconds, I picked 5 to not be too aggressive.
PD015 = 5; spindle deceleration time1 in seconds, I picked 5 to not be too aggressive.
PD016 = 20; spindle acceleration time2 in seconds; seems unused ?
PD017 = 20; spindle deceleration time2 in seconds; seems unused ?
PD018 = 40; spindle acceleration time3 in seconds; seems unused ?
PD019 = 40; spindle deceleration time3 in seconds; seems unused ?
PD020 = 80; spindle acceleration tim4 in seconds; seems unused ?
PD021 = 80; spindle deceleration time4 in seconds; seems unused ?

PD022 is reserved (0)
PD023 = 1; reverse rotation allowed (set to 0 to lock to forward rotation); irrelevant since FOR(ward) signal is shorted to 0V, forcing forward rotation.
PD024 = 1; STOP key select, 1 = valid = pushing the STOP button will stop the spindle, even though it is controlled externally by the Shapeoko’s PWM
PD025 = 0 ; when starting from idle the inverter will start at the initial frequency set in PD0027. Value 1 is another control mode when breaking is involved for large loads.
PD026 = 0 ; when stopping, the VFD will first do a controlled deceleration to the stop frequency, then remove power. “1” would remove power immediately and let the spindle slow down on its own.
PD027 = 0.5; starting frequency (from which the VFD ramps up when accelerating)
PD028 = 0.5; stopping frequency (to which the VFD ramps down when decelerating)
PD029 = 0.0; braking time at start (=no braking)
PD030 = 0.0; braking time at stop (=no braking)
PD031 = 2.0; DC braking voltage level percentage: irrelevant since braking is not used
PD032 = 5.0; frequency track time : irrelevant since PD025 is set to 0
PD033 = 150; current level percentage for frequency track : irrelevant since PD025 is set to 0
PD034 = 0.5; inverter track time: irrelevant since PD025 is set to 0
PD035 to PD040 = RESERVED
PD041 = 8; Carrier frequency, 0 to 15 corresponds to [0-20]kHz range. Obscure compromise between EMI and heating capacity, I left it alone. Note: it was set to “8” for me while the manual mentioned a default value of “5”.
PD042 = 5; jogging frequency. Sounds like a function for externally testing the VFD, I left it alone.
PD043 = 0.0; acceleration curve disabled, spindle will just accelerate linearly to PD014 value.

PD044 through 49 control the mapping of terminal input signals FOR,REV,RST,SPH,SPM,SPL to corresponding actions/functions in the VFD:

PD044 = 2; FOR input mapped to trig forward rotation; FOR signal is shorted to 0V/ground (DCM) anyway in our setup to force forward rotation.
PD045 = 3; REV input mapped to trig reverse rotation; irrelevant since not this signal is not wired in our setup
PD046 = 14; RESET input mapped to trig reset; irrelevant since not this signal is not wired in our setup
PD047 = 22; SPH input mapped to trig high speed; irrelevant since not this signal is not wired in our setup
PD048 = 24; SPM input mapped to trig low speed (typo?); irrelevant since not this signal is not wired in our setup
PD049 = 23; SPL input mapped to trig medium speed (typo?); irrelevant since not this signal is not wired in our setup

PD050 through 053 configure conditions to trig some of the terminal outputs:

PD050 = 2; Y1/DRV output condition; irrelevant since not this signal is not wired in our setup
PD051 = 2; Y2/UPF output condition; irrelevant since not this signal is not wired in our setup
PD052 = 2; FA,FB,FC output condition; irrelevant since not this signal is not wired in our setup
PD053 = 2; KA,KB output condition; irrelevant since not this signal is not wired in our setup

PD054 = 0; set VO output range to 0-10V; irrelevant since not this signal is not wired in our setup
PD055 = 100; set VO analog output gain (0 to 100%); irrelevant since not this signal is not wired in our setup

PD056 through 59 configure up to three small specific frequency ranges that the VFD would avoid going through in the linear V/F curve, to avoid mechanical resonances:

PD056 = 0; skip frequency 1 disabled
PD057 = 0; skip frequency 2 disabled
PD058 = 0; skip frequency 3 disabled
PD059 = 0.5; skip frequency margin below and above defined skip frequencies; irrelevant since 56/57/58 are disabled.

PD060 through 61 configure up some obscure frequency ramp control when using external “multi-inputs/multi-outputs” control signals:

PD060 = 0 ; uniform frequency 1 disabled; irrelevant for our case
PD061 = 0 ; uniform frequency 2 disabled; irrelevant for our case
PD062 = 0.5; uniform frequency range around 60 and 61; irrelevant for our case

PD063 through 66 configure timings signals, in the “multi-inputs/multi-outputs” scenario:

PD063 = 0.1; timer 1 ; irrelevant for our case
PD064 = 1; timer 2; irrelevant for our case
PD065 = 0; counting value; irrelevant for our case
PD066 = 0; intermediate counter; irrelevant for our case

PD067 through 69 : RESERVED

PD070 = 1 ; required to configured PWM as being a 0-5V input (default was 0 = 0-10V)
PD071 = 20; analog filtering constant ([0-50]). No details…I left it alone.

PD072 through 76 configure the linear frequency curve that the VFD will apply based on the value of the VO analog input: in our case we want the simplest possible thing, 0V for 0Hz, 5V for 400Hz, positive slope, forward direction:

PD072 = 400.0; frequency for max VO (5V)
PD073 = 0.0; frequency for min VO (0V)
PD074 = 0; direction for 72 = forward
PD075 = 0; direction for 73 = forward
PD076 = 0; forbid “negative bias reverse”

PD077 = 0; do not memorize values set with UP/DOWN buttons after power off; irrelevant, UP/DOWN ignored in our case due to PD002=1
PD078 = 0; UP/DOWN speed increment; irrelevant, UP/DOWN ignored in our case due to PD002=1

PD079 = RESERVED (0.01);

PD080 through 117 configure the “PLC” operation that can run a cycle of predefined frequencies/duration steps. This is of no interest in our case, I’ll skip them

PD118 = 1; VFD over-voltage protection during deceleration is enabled
PD119 = 150; VFD will allow only up to 150% of nominal current value during acceleration, as a self-protection

PD120 = 0; VFD over-current protection disabled (??). Ajustable from 0 to 200% of rated current of the spindle

PD121 = 5: deceleration time in seconds when PD119 protection triggers.
PD122 = NULL ; ?? supposed to be the current protection during deceleration (similar to PD120 but during decel)
PD123 = 0; over-torque detection behavior: continue to run; irrelevant since disabled
PD124 = 0; over-torque detection disabled
PD125 = 1.0; over-torque detection time; irrelevant since disabled
PD126 = 0; mysterious “counter memory” set to “not memorized”

PD127 through 129 = RESERVED

PD130 through 140 relates to the use of “auxiliary pumps”; irrelevant for out setup

PD141 = 220 ; my spindle max rated voltage
PD142 = 10 ; my spindle max rate current
PD143 = 02 ; 4 or 2 poles in motor. Default is 4. My spindle being 24000RPM@400Hz implies 2 poles
PD144 = 3000; max rated motor revolution at 50Hz => 24000@400Hz = 3000@50HZ

PD145 = 2.0; auto-torque compensation set to 2%, I’m not messing with that.
PD146 = 40; motor no-load current, in percent of rated motor current. No clue what this does
PD147 = 0; motor slip compensation 0 to 10. No idea what this does.
PD148 and 149 : RESERVED
PD150 = 1; auto-voltage regulation (against input voltage variations). Sounds good to have.
PD151 = 0.0; auto energy saving disabled
PD152 = 1; 1s restart time in case of fault
PD153 = 0; no restart after power loss
PD154 = 0.5; max power interruption time in seconds
PD155 = 0; automatic reset/restart disabled

PD156 through 162 configure the PID regulation loop:

PD156 = 100.0; Proportional § constant, in percent (0 to 1000%)
PD157 = 5.0; Integral (I) constant, in seconds (0 to 3600)
PD158 = 0.0; Differential (D) constant, in seconds (0.01 to 10)
PD159 = 0.0; PID target value: I assume that it being 0.0, disabled the PID closed-loop control.
PD160 = 0; PID target select mode, value is read from PD159
PD161 = 100; PID upper limit in %
PD162 = 0; PID lower limit in %

PD163 through 165 configure the communication settings when using RS485 to talk to the VFD; not applicable here

PD166 through 169 : RESERVED

PD170 = 0; allows to add VFD temperature to the list of displayable values
PD171 = 7; enables display of DC voltage, AC voltage, and PD170 (temperature)
PD172 = 0; set to 1 to clear faults
PD173 = 255.0; voltage rating of the inverter, read-only.
PD174 = 11.0; rated current of the inverter, read-only
PD175 = 0; inverter type = constant torque; read-only
PD176 = 0 ; 0 = 50 Hz = inverter frequency standard; read-only

PD177 = ELu.n; Fault record 1, read-only.
PD178 = ELu.A; Fault record 2, read-only.
PD179 = Err.n; Fault record 3, read-only.
PD180 = Err.n; Fault record 4, read-only.

PD181 = UR1.00 ; software version, read-only.
PD182 = 19068; year/month/week of manufacturing
PD183 = 65535; should be “serial number” but looks like it is not set (0xFFFF)
PD184 through 250: RESERVED

13 Likes

and while I’m here, two wiring snapshots .

220V Hot and Neutral wired to R and T (apparently, it would also work with R and S or S and T too), Earth connected to the VFD’s earth terminal
Spindle’s aviation connecteur pin 1 to U, pin 2 to V, pin 3 to W, pin 4 to Earth terminal

For control signals, I followed @Luke’s instructions religiously:

  • FOR(ward) to DCM(ground) = forces forward rotation, i.e. the right direction.
  • Shapeoko’s GND to ACM (ground)
  • Shapeoko’s PWM to VI (voltage input)

EDIT: I forgot to include a very important HW setting that is easy to overlook: there are header pins located to the right of the green connectors, and the small jumper must be set in the “VI” position for external PWM control to work:

Oh, and I finally flipped the switch and everything worked fine, the spindle is not humming quietly at low RPMs. Call me crazy but I am more or less following the chenglish advice from the vendor:

"Spindle in the preservation and transportation, high-speed grease inside the bearing state will change, customers should be running at low speed for 30 minutes. 3000 rpm and then follow the poor increase, run 20 minutes each"

5 Likes

Annnnd…it’s spinning in the wrong direction. There was no way I could get this right on first try :slight_smile:
Looking into it, will update the above post as required when I find the mistake.

EDIT: the interwebs tells me I need to swap any 2 of the three U,V,W wires. I had triple-checked that my U is on pin 1 of the spindle, V on 2 and W on 3, but who knows, maybe they messed up the internal connection (or I did). If anyone had to do this, I would be interested to know

EDIT: while search for confirmation on youtube, in between two tutorials to wire VFDs, there was this “Are You Spinning Your Chakras the Wrong Way?”. Maybe that’s my problem ! :slight_smile:

3 Likes

Thank you yet again. Thinking about figuring out how to set up the VFD is/was one of my road blocks to acquiring one.

Now just waiting for @Vince.Fab to comment on his 60k adventure…

3 Likes

I have an air-cooled 1.5KW spindle and went through the exact same thing. I was sure I had it right but had to swap two just the same. I just figured that the rotation was specified differently (like, I thought it was as viewed from the top, and it was supposed to be from the bottom, or vice-versa).

1 Like

yep pretty sure I have 2 and 3 inverted (I am dead certain about 4 since this is ground and I bip’ed it, hence I am certain about pin 1 too which is opposite of 4). The markings on the aviation connector are very faint and ambiguous.
Anyway, I’ll try this and report.

2 Likes

Yep, swapping 2 and 3 fixed the problem:

For reference, the pins on my spindle are mapped like this:

2 Likes

I also checked the accuracy/linearity of the RPM using a laser tachometer and comparing to the VFD displayed RPM, and to the commanded RPM at G-code level. I’ll leave this here in case this is of interest to anyone:

The large difference at low RPMs is actually normal, given the configured V/F curve that has a different slope below 2.5Hz / 1200RPM

Bottomline: I will not even bother tuning the VFD params, the error is lower than a few percent in the usable range.

5 Likes

@Julien
Did you notice this from GPenny “It should ensure that before use of water-cooled spindle, the cooling system is working properly. Every day before using the spindle must be running at low speed for 15-20 minutes.” and “If you don’t know how to set up the inverter or connect the spindle to inverter,please contact us.We will help you to set up it.” How are you connecting it to the Carbide Motion board and software? Do you do anything to ensure that the spindle can’t turn on unexpectedly when you’re changing cutters, etc.?

2 Likes

The first point is why I inquired about water-flow indicators in another thread : for now I have bought a cheap spinning wheel that will provide a visual cue that water is flowing, but eventually I will wire a flow detector that will shutdown the spindle if triggered.

The second point is just unrealistic for my hobbyist usecase. There is no way I will let my spindle warm up at low speed for 15 minutes (!) each time I use it. What I did do though, is follow their recommandation to let is run at low speed after initial commissioning, and gradually increase RPM. I started out at 2000 RPM, let it run for a few minutes, increase for 1000RPM steps and let it run for a few minutes each time. Also because I wanted to check/detect any possible resonant frequencies. What I also did is pick a somewhat conservative RPM ramp-up/ramp-down value (5 seconds).

Last point is the most interesting: there is indeed no way to be 100% sure that the PWM signal from the Shapeoko controller won’t act up and send activation pulses to the VFD at an unexpected moment. While this is highly unlikely to happen, working in the civil aviation industry in the past has left me with an acute awareness of what “single point failures” are, and a promise to myself to never trust any single piece of SW or HW/wire to ensure my safety. Why is why I power off the machine (and now the VFD) before changing cutters. A little extreme, but very safe.

1 Like

You’re very wise. Is Amazon available in France?

1 Like

Yep, and I still remember the time three years ago when I figured “ok, I’ll try this Prime thing for a week or two, then cancel it”. Of course I never did :slight_smile:

1 Like

Thank you for this. Something else I would never have thought of, nor have I noticed it mentioned elsewhere in my research.

1 Like

Just a note, ShopBot uses similar spindles and they say that one must warm up the spindle for 20 min before the first use within a few hours. I was told this is to make a solid grease turn liquid that surrounds the bearings. Not saying I would wait either, I just know it’s not uncommon.

1 Like

Interesting. A few minutes of warm up per shapeoko session might not be such a big deal if there is a real value for bearing life. Does anyone here do this?