586,062 active members*
4,790 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > Spindles / VFD > Need help! Speed control of spindle/ vfd through USB breakout board and Mach3
Results 1 to 20 of 29

Hybrid View

  1. #1
    Join Date
    Feb 2018
    Posts
    31

    Need help! Speed control of spindle/ vfd through USB breakout board and Mach3

    So, I've been struggling with this for the last 2 months. I have given my all, watched enough youtube videos to cry myself to sleep for 2 months and have read all the forum postings on Huangyang VFD, so much so I may be able to recite the settings by heart.

    The main problem really is the setup I have is not the same as everything that I have watched/ read, and I know nothing about electrical wiring (or as my wife likes to remind me) anything.

    Background:

    I bought a CNC machine around 7 years ago (based on the famous 3040 CNC router but in a cabinet) thinking I was going to be using it to save the world. I am an architect but was slowly getting myself into trouble aka a field I had no experience, knowledge OR capability in. Life soon took over, the machine was sitting in storage but finally, after an upheaval I decided to take the challenge of learning how to use it. The first thing I realised was that the board took a serial port connection. So that had to go. I swiftly purchased the following board so that I could hook my laptop up to it and control it via the USB:

    https://buildyourcnc.com/item/electr...ach3-USB-Board

    The wiring for ease is here:

    https://www.buildyourcnc.com/images/...iagram-800.jpg

    Everything worked fine, I could jog the spindle and manually control it. I thought it was easy and I could now start my own CNC machine factory. Then I thought how hard could it be to connect it to Mach 3 and control the speed and direction of the spindle?? First thing I did was somehow burn the inverter. So I purchased a new one called the RM101 (I have attached the barely understandable english catalogue).

    I originally thought that I could control the speed of the spindle by using relays. I could not switch the spindle on. Then I thought ah.... maybe I need to control it via 'PWM'? So I followed the instructions and again nothing happened. At some point I did manage to switch on the spindle (when I say this I mean the control panel showed the spindle to be 'RUN' although it never spun). That is where I have been reduced to less of a man..... I have tried everything but I fear my manhood depends heavily on the help you gentlemen can offer. Without it, I fear I may either burn my studio down, or kill my wife whichever comes first.

  2. #2
    Join Date
    Jan 2005
    Posts
    15362

    Re: Need help! Speed control of spindle/ vfd through USB breakout board and Mach3

    Quote Originally Posted by buffedupboy View Post
    So, I've been struggling with this for the last 2 months. I have given my all, watched enough youtube videos to cry myself to sleep for 2 months and have read all the forum postings on Huangyang VFD, so much so I may be able to recite the settings by heart.

    The main problem really is the setup I have is not the same as everything that I have watched/ read, and I know nothing about electrical wiring (or as my wife likes to remind me) anything.

    Background:

    I bought a CNC machine around 7 years ago (based on the famous 3040 CNC router but in a cabinet) thinking I was going to be using it to save the world. I am an architect but was slowly getting myself into trouble aka a field I had no experience, knowledge OR capability in. Life soon took over, the machine was sitting in storage but finally, after an upheaval I decided to take the challenge of learning how to use it. The first thing I realised was that the board took a serial port connection. So that had to go. I swiftly purchased the following board so that I could hook my laptop up to it and control it via the USB:

    https://buildyourcnc.com/item/electr...ach3-USB-Board

    The wiring for ease is here:

    https://www.buildyourcnc.com/images/...iagram-800.jpg

    Everything worked fine, I could jog the spindle and manually control it. I thought it was easy and I could now start my own CNC machine factory. Then I thought how hard could it be to connect it to Mach 3 and control the speed and direction of the spindle?? First thing I did was somehow burn the inverter. So I purchased a new one called the RM101 (I have attached the barely understandable english catalogue).

    I originally thought that I could control the speed of the spindle by using relays. I could not switch the spindle on. Then I thought ah.... maybe I need to control it via 'PWM'? So I followed the instructions and again nothing happened. At some point I did manage to switch on the spindle (when I say this I mean the control panel showed the spindle to be 'RUN' although it never spun). That is where I have been reduced to less of a man..... I have tried everything but I fear my manhood depends heavily on the help you gentlemen can offer. Without it, I fear I may either burn my studio down, or kill my wife whichever comes first.
    It is just the same as any other VFD Drive If you where using any kind of jogging of these spindles that would be bad and should not be doing that with these spindles most likely it failed because of incorrect Parameters set and jogging You have a minimum speed that they can run at so the VFD Drive must be set so you can't run it below the safe speed

    For the speed control the 0-10v connection is AI and 0v for the On / Off it is terminals X0 and 0V not much to it
    Mactec54

  3. #3
    Join Date
    Feb 2018
    Posts
    31

    Re: Need help! Speed control of spindle/ vfd through USB breakout board and Mach3

    Thanks for getting back to me, I really appreciate it.

    Why is jogging it a bad thing? I only really did it to test whether the axis were set up correctly. Didn't do much of it. Why did you state that the spindles have failed? I can still run the spindles with the control panel if I set it back.

    For what you suggested with the speed control, is that for a 'relay' type of connection or a PWM? Because from what I read about the BOB, these are the two ways to do it.

    Quote Originally Posted by mactec54 View Post
    It is just the same as any other VFD Drive If you where using any kind of jogging of these spindles that would be bad and should not be doing that with these spindles most likely it failed because of incorrect Parameters set and jogging You have a minimum speed that they can run at so the VFD Drive must be set so you can't run it below the safe speed

    For the speed control the 0-10v connection is AI and 0v for the On / Off it is terminals X0 and 0V not much to it

  4. #4
    Join Date
    Jan 2005
    Posts
    15362

    Re: Need help! Speed control of spindle/ vfd through USB breakout board and Mach3

    Quote Originally Posted by buffedupboy View Post
    Thanks for getting back to me, I really appreciate it.

    Why is jogging it a bad thing? I only really did it to test whether the axis were set up correctly. Didn't do much of it. Why did you state that the spindles have failed? I can still run the spindles with the control panel if I set it back.

    For what you suggested with the speed control, is that for a 'relay' type of connection or a PWM? Because from what I read about the BOB, these are the two ways to do it.
    You where talking about spindle jogging where you not, and VFD Drive problems Jogging your machine axis is not a problem

    PWM is turned in your 0-10v analog output for the VFD Drive speed control which is connected to A1 and 0v

    The On / Off control, a relay is used connected to X0 and 0v
    Mactec54

  5. #5
    Join Date
    Feb 2018
    Posts
    31

    Re: Need help! Speed control of spindle/ vfd through USB breakout board and Mach3

    Ah, my mistake. I thought 'jogging' only refered to moving the gantry/ axis. I didn't even know the spindle could be jogged. Shows how little I know.

    I thought the PWM was sent through one of the outputs on the board? In the documentations, it states that the PWM signal should be sent via OUT3. Here is the actual quote:

    PWM Mode
    Suppose we need to output PWM (pulse width modulation) signal on terminal OUT3 to drive the spindle motor power supply relay, motor speed adjustment is achieved. In Mach3: Select [Config], select [Ports and Pins], and select [Spindle Setup] page in the popup dialog box. In the Motor Control box, check Use Spindle Motor Output and select PWM Control.
    [Use spindle motor output] is checked, Mach3 will automatically enable the spindle motor output pin. Click OK when the pop-up happens that will say "Spindle Motor has now been enabled. Ensure you set its pinouts.

    But after reading what you wrote and re-reading that quote I can see how I was mistaken.
    If I go by what you wrote I assume the connection should be:

    1) OUT3 to Relay
    2) Relay +ve to X0 (inverter)
    3) Relay com (-ve) to 0V
    4) Avi +ve to A1
    5) Avi -ve to 0V

    Correct?

    Quote Originally Posted by mactec54 View Post
    You where talking about spindle jogging where you not, and VFD Drive problems Jogging your machine axis is not a problem

    PWM is turned in your 0-10v analog output for the VFD Drive speed control which is connected to A1 and 0v

    The On / Off control, a relay is used connected to X0 and 0v

  6. #6
    Join Date
    Jan 2005
    Posts
    15362

    Re: Need help! Speed control of spindle/ vfd through USB breakout board and Mach3

    Quote Originally Posted by buffedupboy View Post
    Ah, my mistake. I thought 'jogging' only refered to moving the gantry/ axis. I didn't even know the spindle could be jogged. Shows how little I know.

    I thought the PWM was sent through one of the outputs on the board? In the documentations, it states that the PWM signal should be sent via OUT3. Here is the actual quote:

    PWM Mode
    Suppose we need to output PWM (pulse width modulation) signal on terminal OUT3 to drive the spindle motor power supply relay, motor speed adjustment is achieved. In Mach3: Select [Config], select [Ports and Pins], and select [Spindle Setup] page in the popup dialog box. In the Motor Control box, check Use Spindle Motor Output and select PWM Control.
    [Use spindle motor output] is checked, Mach3 will automatically enable the spindle motor output pin. Click OK when the pop-up happens that will say "Spindle Motor has now been enabled. Ensure you set its pinouts.

    But after reading what you wrote and re-reading that quote I can see how I was mistaken.
    If I go by what you wrote I assume the connection should be:

    1) OUT3 to Relay
    2) Relay +ve to X0 (inverter)
    3) Relay com (-ve) to 0V
    4) Avi +ve to A1
    5) Avi -ve to 0V

    Correct?

    Correct
    Mactec54

  7. #7
    Join Date
    Mar 2003
    Posts
    35538

    Re: Need help! Speed control of spindle/ vfd through USB breakout board and Mach3

    Sorry for not being clear. The up/ down rpm problem only occurs when the spindle is controlled by mach3. Even if I change the delay settings, that will not explain why the frequency will not go below 270Hz? Or am I missing something?
    What are your Mach3 spindle settings? Pulley settings?
    Have you measured the analog voltage to see if it's correct?
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  8. #8
    Join Date
    Feb 2018
    Posts
    31

    Re: Need help! Speed control of spindle/ vfd through USB breakout board and Mach3

    First and most importantly I would like to say a great big thank you to mactec54. Without your guidance, help, patience and knowledge sharing I am sure there will be many more burnt/ fried spindles/ houses and divorces in the world. For that THANK YOU on behalf of the planet! Here is my contribution in the hope that anyone who has the same issues as me is able to get going and solving your issues. Here are a few things I learnt through my struggles being non electrically inclined, having zero knowledge and experience of machines and circuits.

    1) No one can help you 100% of the way, because every circumstance, part selection is different. People like mactec54 are kind enough to point you in the right direction but ultimately no one can hand you the solution on a platter, so read and equip yourself with as much knowledge as possible
    2) If you bought the same BOB (breakout board) https://buildyourcnc.com/item/electr...ach3-USB-Board as me because it was the cheapest thing you could find, then read on.
    3) The documentation is a good place to start, but the wiring diagram and explaination of how to connect your spindle to the board is rudimentary at best.
    4) It requires a 10V input to power the 'analog' output circuit. This is not shown anywhere in the circuit diagram. In fact you can connect up to a 12V input which I took from my inverter. If your inverter does not have such an output then you'll need to find another way to power it. Without the 10V input, you will not be able to control speed as it relies on a signal from the avi+/- output terminal
    5) It also requires a 24V input to power the 'digital' output circuits. Without this power, you will not be able to provide any digital signals out from your board, hence you can't send on/ off signals to the inverter (via a relay).
    6) Unlike the huangyang VFDs that most people buy and are referenced in numerous online literature, my VDF required a separate on/ off signal from the board as well as a direction signal. This was the part that stumped me the longest. The VFD receives a signal telling it which direction you want it to spin, but it also required a signal to tell it to start spinning (on/ run) which are wired separately. Both signals need to be given otherwise it won't run.
    7) Just because literature tells you that your components can do certain things, it does not mean that function is compatible with your other components. For example, my BOB literature says that there are two ways to control the spindle, 'Relay' or 'PWM'. I took this to mean that I could use either methods. However I now know, that just means the board is capable of both methods. However my spindle is only able to be controled via a relay and 'analog' signals. In fact, I later realised that the switching on/ off has to be done with a relay and it is the 'speed' control that is done either via PWM or 'Analog' signals.
    8) Most lower cost VDFs are made and documented in chinese for the chinese market. What you read are either translated via google or by a non native speaking person. The components may be fine on themselves but the support and literature will be confusing and sometimes downright wrong. If you are not up to the task of trying to work it out, then I do suggest going with safer and more expensive options. I purchased my inverter for around USD90. Compared to the Huangyang VFD, the price difference is big. However in hindsight is the trouble worth it? Maybe it is for me because I am just starting out and I had time to figure it out, but it may not be for you.

    Hope this helps, if I can help anyone with the same predicament as me I am available.

  9. #9
    Join Date
    Feb 2018
    Posts
    31

    Re: Need help! Speed control of spindle/ vfd through USB breakout board and Mach3

    This is beyond frustrating....

    So since the last time I posted here is what happened. Everything was working fine, the computer was controlling the spindle, switching it on/ off and speed. So i decided to tidy up the wiring and close the case. After which, I tried to switch the spindle on. It came on but the speed couldn't be controlled. I checked and realised that there was no voltage coming from the AVI/ ACM pins. So I thought one possiblity could be that I somehow fried the board? So I ordered a new board. It finally arrived today, swapped everything over including a new cable. Same problem.

    I checked the 10V input and there is indeed current being supplied to the board. But again no current is coming out of the AVI/ ACM pins. All advise/ help is needed and appreciated. Other observations are such:

    1) When I set the minimum PWM at 100%, it will spin at 400hz.
    2) If I set minimum PWM at 0%, then no matter what I do it will be at a minimum freq which was set at 120Hz.
    3) When minimum PWM is set, the corresponding voltage can be observed at AVI/ACM!

  10. #10
    Join Date
    Feb 2018
    Posts
    31

    Re: Need help! Speed control of spindle/ vfd through USB breakout board and Mach3

    Ok..... a level of self imposed stupidity has just been realised. All is well now.

Similar Threads

  1. Replies: 0
    Last Post: 03-26-2018, 07:12 PM
  2. Connecting a breakout board to spindle speed control
    By waisberg in forum Commercial CNC Wood Routers
    Replies: 3
    Last Post: 10-25-2012, 08:04 AM
  3. breakout board with spindle speed control
    By 6bx in forum CNC Machine Related Electronics
    Replies: 6
    Last Post: 02-19-2009, 08:35 PM
  4. Need Breakout board to control Mach3
    By Mongkol in forum CNC Machine Related Electronics
    Replies: 1
    Last Post: 04-19-2008, 06:38 PM
  5. Router Speed Control + Mach3 + Breakout Board
    By Dingo745 in forum CNC Machine Related Electronics
    Replies: 7
    Last Post: 06-20-2007, 02:58 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •