Welcome to Our Community

Some features disabled for guests. Register Today.

XPro v4 won't control VFD & Spindle

Discussion in 'Controller Boards' started by Semper Why, Sep 2, 2019.

Tags:
  1. Semper Why

    Builder

    Joined:
    May 16, 2018
    Messages:
    5
    Likes Received:
    0
    I'm having a devil of a time getting the last bits operational. I can get the VFD to control the 800W spindle from the panel, I can get it to control the speed from the analog dial on the VFD. The XPro v4 is doing a great job moving the motors. But I cannot get the XPro v4 to control the spindle speed.

    After getting the spindle turning manually, I did the following:
    Connected the spindle control pin to "VI" on the VFD.
    Connected the ground pin near the spindle control pin to "ACM" on the VFD
    Moved the jumper on the VFD to bridge pins 1 & 2 (from previously bridging 2 & 3)
    Set PD002 to 1 (external control)
    Set PD070 to 0 (10V range)
    Set the switch on the XPro V4 to 10V.

    I'm using CNCjs, which for the most part does quite well. But sending M3 or M4 does not make the spindle move at all. I used the interface to set an rpm of 1000rpm and then measured the voltage at VI and got 9.83V so that seems to be working normally. Photo of the VFD wiring is included.

    At this point I'm at my wit's end. Any suggestions?
    vfd_wiring.jpg
     
  2. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Resident Builder Project Maker Builder

    Joined:
    Mar 1, 2017
    Messages:
    1,919
    Likes Received:
    996
    Although your voltage looks good (so probably parameters on the VFD, or wiring)just want to point out Grbl needs Sxxx set for M3/4 commands. Also setup $30 and $31. Then send M3 S1000 (if $30=1000 default, else replace 1000 with what $30 is setup instead)

    Wiring and params, check Blackbox VFD question ***Solved: Added howto guide*** (Blackbox, but similar in terms of 0-10v - enable is handled by relay on the BlackBox, not sure how its handled on the xPro sorry)
     
  3. Semper Why

    Builder

    Joined:
    May 16, 2018
    Messages:
    5
    Likes Received:
    0
    Thank you. I'll go pull those values and post them in a few minutes. To answer your other question, the XPro V4 has a switch on the board to set 5v or 10v.
     
  4. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Resident Builder Project Maker Builder

    Joined:
    Mar 1, 2017
    Messages:
    1,919
    Likes Received:
    996
    No no, my question was more how you plan on switching ACM. We use the relay on BlackBox along with the coolant pin.
     
  5. Critical

    Critical New
    Builder

    Joined:
    Feb 9, 2017
    Messages:
    24
    Likes Received:
    11
    First of all, how have you got on over the last few weeks, did you manage to get your xPro v4 to talk to your VFD, or are you still running it from the operator panel on the front? I'm currently in this boat, I'm thinking we should be able to solve this together :thumbsup:

    The only GRBL values you're interested in for this should be $30 and $31, as Peter pointed out. Provided they're set, you'll get a voltage which is a scaled value based on the speed you set (M3 SXXXXX). Like you said, you got 9.83v, so you're all good in terms of the GRBL configuration.

    That 5/10v switch is great, setting your PD070 (Analog Input) to 0 is equal to 0~10v expected input at that pin.


    Looking at the wiring in the attached image, I thought that looping the DCM to FOR means that you don't have to switch it and it would always be moving forwards when it was receiving any voltage to the VI pin. Setting this, along with PD010 (Minimum Voltage) to a nominal voltage [or even PD007 (Minimum frequency)], the spindle should not 'kick-in' until it receives a voltage above this threshold, or am I not understand correctly?

    I wrote this, and then found this guys post confirming it - Looping DCM and FOR, and then your post immediately below stating that some do, some don't. This at very least helps because I was thinking I'm going mad and everyone else's is working fine, except mine o_O

    Resources;
    VFD Manual
    Blackbox to VFD using the Relay/Coolant
     
    Peter Van Der Walt likes this.
  6. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Resident Builder Project Maker Builder

    Joined:
    Mar 1, 2017
    Messages:
    1,919
    Likes Received:
    996
  7. Critical

    Critical New
    Builder

    Joined:
    Feb 9, 2017
    Messages:
    24
    Likes Received:
    11
    I'll set mine up from a factory reset when I get home tonight, note down PD changes and see how it goes. The theory is there :)
     
    Peter Van Der Walt likes this.
  8. Critical

    Critical New
    Builder

    Joined:
    Feb 9, 2017
    Messages:
    24
    Likes Received:
    11
    Also, @JacobE1988 , if you could let me know what you're PD values are, that would be really helpful. I've gone with these for now, but I'm still working on getting mine running via the xPro v4;

    [​IMG]
    (sorry about the horrible green, this is because I've verified the value applies to me, and that it's right for my application)

    There's certainly scope for a comprehensive guide and what to take into account depending on which hardware is running which version of GRBL etc. Plenty of MACH4 guides out there already :rolleyes:

    TIA
     
  9. Critical

    Critical New
    Builder

    Joined:
    Feb 9, 2017
    Messages:
    24
    Likes Received:
    11
    I factory reset my VFD and set it as per this table (note the additional settings PD072, PD011)
    [​IMG]

    Now I think I'm getting somewhere because I have it wired in exactly the same way that @JacobE1988 has his, and doing both of these things has given me a spindle which responds to M3 S3000. Great stuff so far, and I believe having PD011 set to anything other than zero is the key.
    [​IMG]

    This is still very much a work in progress as the second the spindle comes on (very slowly), I get a GRBL Hard Limit error, so I think I have a grounding issue somewhere.

    I get the same error when the machine is connected, homed and just sat idle waiting for input and I turn the VFD on at the wall, which is rather interesting.
    [​IMG]

    I tried to connect to the FOR using the Spindle Direction on the xPro - UGS sent M3 S3000, it showed "3000" in the visualiser and the spindle did nothing.
    [​IMG]

    @Semper Why , sorry but I've hijacked your thread! :ROFL:
     
    Peter Van Der Walt likes this.
  10. Critical

    Critical New
    Builder

    Joined:
    Feb 9, 2017
    Messages:
    24
    Likes Received:
    11
    Just a bit more on this; I set the VFD to use the operator and the pot on the front and when the machine is moving, and I turn the spindle on using the run button, I get that same hard limit error so I set the xPro error handling to IGNORE and it still tripped it, indicating that there's something touching somewhere that shouldn't be.

    I've isolated everything from everything, so it's just the xPro connected via USB, powered from an ATX power supply, plugged into the 230v outlet on the wall. Plugged in next to it is the VFD, wired R=Live, T= Neutral, GND=Earth, and the only other connection is to the Spindle U=2, V= 1, W=3.

    I set the machine to move and that's all fine until I turn on the VFD from the panel, and everything craps out. Literally the only shared connection there is the wall socket, so I ran a long extension from the other side of the room and the same thing happens.

    The VFD and the xPro (plus all cable runs) couldn't be further away from each other! :banghead:
    [​IMG]
     
    #10 Critical, Sep 23, 2019
    Last edited: Sep 23, 2019
  11. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Resident Builder Project Maker Builder

    Joined:
    Mar 1, 2017
    Messages:
    1,919
    Likes Received:
    996
    VFDs dump a tonne of EMI in the air. Some tips:
    - Shielded 3 core cable to the spindle, earth the shield
    - Add some clip-on ferrite cores on power cables, USB cable and limit switch cables.
    - Add some distance between VFD and xPRO
    - Put xPro in metal enclosure with enclosure earthed
    - Add external pullup resistor to 5v and 0.1uf cap to GND to limit pins (RC filter): See the schematic of BlackBox (files and drawings tab of BlackBox) for how we do it on the BlackBox

     
    sharmstr and Critical like this.
  12. Critical

    Critical New
    Builder

    Joined:
    Feb 9, 2017
    Messages:
    24
    Likes Received:
    11
    @Peter Van Der Walt , thank you for the pointers!

    - I used 4 Core CY Cable and connected the shield to ground (earth) on the VFD, but not to pin 4 on the Spindle end. I'll connect the spindle too to drain emi away.

    - I've just ordered several, good shout

    - They couldn't be further away, this is what's crushing me

    - I've just built it into an ABS plastic enclosure, although I belled out all my grounds last night and was happy with them - Will a metal enclosure act as a faraday cage?

    - I see you've got 3 pins for the limit switches on the Blackbox (1,2,3), although I have 2 on the xPro (I can't find a schematic for it), I'm unsure where exactly I would add these? I envisage soldering one leg of the resistor to the input side of the limit switch circuit and the other leg back to the 5vdc output of the xPro, keeping the pin HIGH/preventing floating, sound right? I'm pretty sure though the xPro has pull-ups installed to the board, so I wouldn't have thought I'd need to add more?

    - Now these sound promising, I could very easily install a few of these to filter what's getting back to the LS pins, I'll order myself some and get them fitted.

    [​IMG]
     
    sharmstr likes this.
  13. Semper Why

    Builder

    Joined:
    May 16, 2018
    Messages:
    5
    Likes Received:
    0
    Guys, thank you very much for the new information. My apologies for being away for so long. Lots of stuff cropped up at home. It will take me some time to digest & implement the information.

    A new issue has cropped up, which is that the limit switches keep triggering while the spindle is running. I suspect I'm getting some sort of EM interference. It probably is the cheap 4-strand wire I'm using.

    GRBL:
    $0=10 ;Step pulse time, microseconds
    [00:50:25] [ $$ ] $1=255 ;Step idle delay, milliseconds
    [00:50:25] [ $$ ] $2=0 ;Step pulse invert, mask
    [00:50:25] [ $$ ] $3=3 ;Step direction invert, mask
    [00:50:25] [ $$ ] $4=1 ;Invert step enable pin, boolean
    [00:50:25] [ $$ ] $5=0 ;Invert limit pins, boolean
    [00:50:25] [ $$ ] $6=0 ;Invert probe pin, boolean
    [00:50:25] [ $$ ] $10=1 ;Status report options, mask
    [00:50:25] [ $$ ] $11=0.020 ;Junction deviation, millimeters
    [00:50:25] [ $$ ] $12=0.002 ;Arc tolerance, millimeters
    [00:50:25] [ $$ ] $13=0 ;Report in inches, boolean
    [00:50:25] [ $$ ] $20=0 ;Soft limits enable, boolean
    [00:50:25] [ $$ ] $21=1 ;Hard limits enable, boolean
    [00:50:25] [ $$ ] $22=1 ;Homing cycle enable, boolean
    [00:50:25] [ $$ ] $23=3 ;Homing direction invert, mask
    [00:50:25] [ $$ ] $24=50.000 ;Homing locate feed rate, mm/min
    [00:50:25] [ $$ ] $25=500.000 ;Homing search seek rate, mm/min
    [00:50:25] [ $$ ] $26=250 ;Homing switch debounce delay, milliseconds
    [00:50:25] [ $$ ] $27=5.000 ;Homing switch pull-off distance, millimeters
    [00:50:25] [ $$ ] $30=1000 ;Maximum spindle speed, RPM
    [00:50:25] [ $$ ] $31=0 ;Minimum spindle speed, RPM
    [00:50:25] [ $$ ] $32=0 ;Laser-mode enable, boolean
    [00:50:25] [ $$ ] $100=199.100 ;X-axis steps per millimeter
    [00:50:25] [ $$ ] $101=199.100 ;Y-axis steps per millimeter
    [00:50:25] [ $$ ] $102=199.100 ;Z-axis steps per millimeter
    [00:50:25] [ $$ ] $110=2500.000 ;X-axis maximum rate, mm/min
    [00:50:25] [ $$ ] $111=2500.000 ;Y-axis maximum rate, mm/min
    [00:50:25] [ $$ ] $112=2500.000 ;Z-axis maximum rate, mm/min
    [00:50:25] [ $$ ] $120=150.000 ;X-axis acceleration, mm/sec^2
    [00:50:25] [ $$ ] $121=150.000 ;Y-axis acceleration, mm/sec^2
    [00:50:25] [ $$ ] $122=150.000 ;Z-axis acceleration, mm/sec^2
    [00:50:25] [ $$ ] $130=317.000 ;X-axis maximum travel, millimeters
    [00:50:25] [ $$ ] $131=762.000 ;Y-axis maximum travel, millimeters
    [00:50:25] [ $$ ] $132=122.000 ;Z-axis maximum travel, millimeters
     
  14. Critical

    Critical New
    Builder

    Joined:
    Feb 9, 2017
    Messages:
    24
    Likes Received:
    11
    Hey @Semper Why , this is exactly what's happening for me, too (Hard Limit Error). I will keep pressing on with mine as I want it fixed so check back when you're ready and I'll keep posting as I make progress. The previous post from @Peter Van Der Walt details the (most important) steps to remedy emi, I'll let you know how I get on with them but I 100% recommend a braided CY cable for the Spindle :thumbsup:

    I picked mine up on eBay - Braided CY cable - 1mm (per core), 4 cores, as long as you need it.

     
    sharmstr likes this.
  15. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Resident Builder Project Maker Builder

    Joined:
    Mar 1, 2017
    Messages:
    1,919
    Likes Received:
    996
    Critical and sharmstr like this.
  16. JacobE1988

    Builder

    Joined:
    Jul 23, 2019
    Messages:
    33
    Likes Received:
    13
    Sorry for the delay. It's been a busy few days. I'll try and get back to you tonight with my settings.
     
  17. Critical

    Critical New
    Builder

    Joined:
    Feb 9, 2017
    Messages:
    24
    Likes Received:
    11
    No rush mate, it's appreciated.

    I've just this second had success moving the machine without it throwing-down - There was no ground to the pin on the inside of the Spindle, so there was no direct drain! Having installed one, I just this second homed it, ran the spindle, moved, sped up, slowed down, moved again, etc and fingers crossed, all looks good!

    @Semper Why , one to look for (inside of your spindle pin not actually being attached to ground) - This, CY cable, ferrites and RC filter looks like the right combination.

    So yes, I'm much happier! @Peter Van Der Walt thank you very much for that info, I will install the ferrites and RC filter before I even try and cut anything, it's obviously a necessity! :thumbsup:

    [​IMG]
     
  18. Critical

    Critical New
    Builder

    Joined:
    Feb 9, 2017
    Messages:
    24
    Likes Received:
    11
    Yep, we're good. @Semper Why , here are the confirmed working PD values to go with a confirmed working wiring diagram for the xPro v4 and the HY01D523B VFD.

    Remember that these were set from a VFD factory reset, and PD003, PD005 and PD004 may need to be set in (that) order. PD009~PD041 are spindle specific values, check page 28 of this manual (look for PD007 description) for them (also posted below for convenience ;)).

    [​IMG]

    [​IMG]

    [​IMG]

    Happy CNC'ing!
     
    Peter Van Der Walt likes this.
  19. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Resident Builder Project Maker Builder

    Joined:
    Mar 1, 2017
    Messages:
    1,919
    Likes Received:
    996
    Will wait on a few independant confirmations :)
     
  20. gmorse7

    gmorse7 New
    Builder

    Joined:
    Feb 20, 2017
    Messages:
    9
    Likes Received:
    2
    Help! Similar problem with 110v 1.5KW Air Cooled spindle. In manual, VFD panel, control mode all works well (dial pot and press run...). I'm using xPro-v4 and currently spindle control output is set to 0-5 vdc. I've confirmed g-code s#### commands generate an appropriate output from the xpro with wires removed from VFD (VI1 & GND/ACM). Have tried with and without FOR jumper and many, many different VFD parameter setting combinations but can't get the spindle to run at a set speed from g-code. Ideas? Is there another output needed to run the spindle on M3?
     
  21. phoenix fab

    Builder

    Joined:
    Mar 12, 2019
    Messages:
    29
    Likes Received:
    3
    im trying to get mine running as well but using the Xpro V3
     
  22. JacobE1988

    Builder

    Joined:
    Jul 23, 2019
    Messages:
    33
    Likes Received:
    13
    So I've attached a very easy instruction manual I found somewhere on the web. After much trial and error and lots of searching I finally found this and pretty much went entirely by it.

    Here are my VFD settings. They match @Critical minus the different spindle specifics. Please note that you have to double check PD143 and PD144 as they are most likely incorrect from the factory.

    Capture.JPG

    I have also found that setting your GRBL firmware of $30= max RPM and $31=0 is a must. If you change $31 to match your minimum RPM and not 0 it will not function correctly. I do not know why this is. Somewhere in the system GRBL is not sending the correct voltage OR the VFD's misinterpreting it. The latter is more likely. At this time I don't know the fix but it's also not that big of a deal. It would help to get a more accurate RPM reading but as it is mine is plus/minus 100 RPM so I'm not complaining.

    Let me know if I can be of anymore assistance.
     

    Attached Files:

    Giarc and Critical like this.
  23. Critical

    Critical New
    Builder

    Joined:
    Feb 9, 2017
    Messages:
    24
    Likes Received:
    11
    That's a great read, everything I've found to be an issue with mine is in there in one way or another, I wish I'd have read this before. Thanks for sharing :thumbsup:
     
  24. Critical

    Critical New
    Builder

    Joined:
    Feb 9, 2017
    Messages:
    24
    Likes Received:
    11
    How have you got it all connected? (xPro & VFD)?
     
  25. phoenix fab

    Builder

    Joined:
    Mar 12, 2019
    Messages:
    29
    Likes Received:
    3
    ive made the changes to my settings following the above reference on the vfd settings. my issue is when turning the spindle on from openbuilds control max rpm's are only 1748 and at stop the spindle is still turning at 72 rpm's.
    super frustrating also im using an Xpro V3
     
  26. Critical

    Critical New
    Builder

    Joined:
    Feb 9, 2017
    Messages:
    24
    Likes Received:
    11
    That's what, 4.1% (ish) of the maximum (1748) RPM value. What's do you have PD007, PD011, PD072 & PD073 set to?

    Also, what are your $$ GRBL values? More specifically $30 & $31?
     
  27. gmorse7

    gmorse7 New
    Builder

    Joined:
    Feb 20, 2017
    Messages:
    9
    Likes Received:
    2
    I looked at the Spindle Direction and Coolant pins and didn't see any changes with M3/4/5 comm
    Spindle control pins from xPro-v4 to VI1 & GND on VFD. I had a jumper between FOR & GND but removed it. M3 Sxxxx g-code commands cause these outputs on spindle control pins to vary as expected from a max of 5v with S24000 and return to 0v with M5. Going to try a different combo of vfd parameters this morning as well as both grbl $31 = 0 and 7200
     
  28. phoenix fab

    Builder

    Joined:
    Mar 12, 2019
    Messages:
    29
    Likes Received:
    3
    ok for the GRBL I have $30 = 24000
    $31 = 0

    for vfd settings are
    7 = .5
    11 =120
    72 = 400
    73 = 120

    after reconfirming some of the other settings and making a few changes along the way to match the guide now the openbuilds control will not control the start or stop of the vfd. upon starting the vfd up it spools up to 7284 rpm's. and will only stop upon pressing the stop botton on the vfd.
     
  29. gmorse7

    gmorse7 New
    Builder

    Joined:
    Feb 20, 2017
    Messages:
    9
    Likes Received:
    2
    Attempted with revised vfd settings for external control, no luck. Tried with both grbl min $31 at 0 and at 7200, no difference. Made note of all vfd parameter settings since mine appear to be numbered/ordered differently vfd is YL620
     
  30. JacobE1988

    Builder

    Joined:
    Jul 23, 2019
    Messages:
    33
    Likes Received:
    13
    73 "should" be 0. Any other number is for controlling it via the VFD itself and not a controller.

    Note: That is based upon my own testing with that specific setting using the Openbuilds Blackbox and Openbuilds Control. I cannot reference that to any article or manual. So I can't guarantee it will work.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice