525,473 active members*
2,943 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
Page 1 of 2 12
Results 1 to 20 of 29
  1. #1
    Registered
    Join Date
    Feb 2018
    Posts
    21

    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
    Member
    Join Date
    Jan 2005
    Posts
    11275

    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
    Registered
    Join Date
    Feb 2018
    Posts
    21

    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
    Member
    Join Date
    Jan 2005
    Posts
    11275

    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
    Registered
    Join Date
    Feb 2018
    Posts
    21

    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
    Member
    Join Date
    Jan 2005
    Posts
    11275

    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
    Registered
    Join Date
    Feb 2018
    Posts
    21

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

    Quote Originally Posted by mactec54 View Post
    Correct
    Awesome. Gonna give that a go.

    Another question here. In my VFD manual, I can only see:

    P03 motor rating (maximum frequency) which I believe I should set to 400Hz.
    P26 Upper limit set of output frequency which should also be at 400Hz
    P45 Analog Low end frequency 120Hz

    I do not see where I can set a Base Frequency and Main Frequency.

    Are the above correct?

  8. #8
    Member
    Join Date
    Jan 2005
    Posts
    11275

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

    Quote Originally Posted by buffedupboy View Post
    Awesome. Gonna give that a go.

    Another question here. In my VFD manual, I can only see:

    P03 motor rating (maximum frequency) which I believe I should set to 400Hz.
    P26 Upper limit set of output frequency which should also be at 400Hz
    P45 Analog Low end frequency 120Hz

    I do not see where I can set a Base Frequency and Main Frequency.

    Are the above correct?
    P45 is not used so incorrect here is some you have to set

    What is your main Power supply voltage ????

    RJ101 VFD

    P03-400

    P04=220

    P05=140

    P06=77

    P07=20

    P07=11

    P26=400

    P27=120

    P43=400

    P52= ( Motor rated Current Amps )

    P56=110

    P58=230

    P59=120

    P60=110

    P61=110
    Mactec54

  9. #9
    Registered
    Join Date
    Feb 2018
    Posts
    21

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

    I'm in Singapore, the main power supply voltage is 240V but the spindle/ inverters are 220V as they come from China. A couple of questions regarding the settings that you suggested:

    P05=140. Isn't this value used to calculate the VF curve and not changed in the suggested values you proposed for the Huangyang VFD?
    P06= 77 Same as above.
    P07=20/ 11. You gave two values so I'm not sure which you suggest. Either ways if this value is changed shouldn't P08 also be changed correspondingly?
    Quote Originally Posted by mactec54 View Post
    P45 is not used so incorrect here is some you have to set
    P27= 120. Is this setting assumed to be the minimum frequency?
    P43= 400. Can you explain what setting frequency is? It is not present in the Huangyang VFD
    P52= 4A
    P58=230. Should this be increased to 240 instead?

    I assume that since I am connecting to my computer and using PWM to control the speed that I would need to set the analog frequency range?

    Regards,
    Sean

    What is your main Power supply voltage ????

    RJ101 VFD

    P03-400

    P04=220

    P05=140

    P06=77

    P07=20

    P07=11

    P26=400

    P27=120

    P43=400

    P52= ( Motor rated Current Amps )

    P56=110

    P58=230

    P59=120

    P60=110

    P61=110

  10. #10
    Member
    Join Date
    Jan 2005
    Posts
    11275

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

    Quote Originally Posted by buffedupboy View Post
    I'm in Singapore, the main power supply voltage is 240V but the spindle/ inverters are 220V as they come from China. A couple of questions regarding the settings that you suggested:

    P05=140. Isn't this value used to calculate the VF curve and not changed in the suggested values you proposed for the Huangyang VFD?
    P06= 77 Same as above.
    P07=20/ 11. You gave two values so I'm not sure which you suggest. Either ways if this value is changed shouldn't P08 also be changed correspondingly?
    That should of been P08=11 not to difficult to see that it had the wrong Parameter number posted

    You don't have a Huanyang VFD Drive but yes I do supply those setting for the Huanyang VFD Drive also, the default setting in most VFD Drives are for 50Hz and 60Hz Drives

    So now that I know your supply voltage 240v some of those Parameters that I posted will change also

    P05=140
    P06=84
    P07=20
    P08=12
    Mactec54

  11. #11
    Registered
    Join Date
    Feb 2018
    Posts
    21

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

    Sorry it took so long for me to get back here, just been too busy and never managed to test it out. Today I finally got my act together, and followed your instructions and settings. After resetting to defaults, here is what happened:

    1) P07 refused to go up to 20Hz, it stopped at 10Hz.
    2) Switching on with Mach 3 did not result in any change to the spindle. The relay switched on as it should, and the panel showed 400Hz. Which meant that the computer was communicating with the inverter? But spindle did not spin, changing speed on Mach3 did not change the frequency shown on the panel, it remained at 400Hz. switching spindle off on mach3 resulted in the panel frequency going back to 0. Changing P00 from 0 to 2 did not have any effect.
    3) Changing to panel control allowed the spindle to start up, however frequency remained at 30Hz and was not able to be changed.

    Regards,

    Quote Originally Posted by mactec54 View Post
    That should of been P08=11 not to difficult to see that it had the wrong Parameter number posted

    You don't have a Huanyang VFD Drive but yes I do supply those setting for the Huanyang VFD Drive also, the default setting in most VFD Drives are for 50Hz and 60Hz Drives

    So now that I know your supply voltage 240v some of those Parameters that I posted will change also

    P05=140
    P06=84
    P07=20
    P08=12

  12. #12
    Member
    Join Date
    Jan 2005
    Posts
    11275

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

    Quote Originally Posted by buffedupboy View Post
    Sorry it took so long for me to get back here, just been too busy and never managed to test it out. Today I finally got my act together, and followed your instructions and settings. After resetting to defaults, here is what happened:

    1) P07 refused to go up to 20Hz, it stopped at 10Hz.
    2) Switching on with Mach 3 did not result in any change to the spindle. The relay switched on as it should, and the panel showed 400Hz. Which meant that the computer was communicating with the inverter? But spindle did not spin, changing speed on Mach3 did not change the frequency shown on the panel, it remained at 400Hz. switching spindle off on mach3 resulted in the panel frequency going back to 0. Changing P00 from 0 to 2 did not have any effect.
    3) Changing to panel control allowed the spindle to start up, however frequency remained at 30Hz and was not able to be changed.

    Regards,
    First you have to get the VFD Drive running your spindle correctly before you connect Mach3 to it then you will know that that part is working correctly

    It sounds like there are more parameters to set or some need to changed the VFD Drive you have is not very good and not sure why people buy junk like this

    If you only see 30Hz do not run it with the spindle attached or you could damage the spindle disconnect the spindle and just get the VFD Drive running correctly then attach the spindle then after testing connect to Mach3
    Mactec54

  13. #13
    Registered
    Join Date
    Feb 2018
    Posts
    21

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

    Ok I will do that. Any idea where we went wrong?

    Quote Originally Posted by mactec54 View Post
    First you have to get the VFD Drive running your spindle correctly before you connect Mach3 to it then you will know that that part is working correctly

    It sounds like there are more parameters to set or some need to changed the VFD Drive you have is not very good and not sure why people buy junk like this

    If you only see 30Hz do not run it with the spindle attached or you could damage the spindle disconnect the spindle and just get the VFD Drive running correctly then attach the spindle then after testing connect to Mach3

  14. #14
    Registered
    Join Date
    Feb 2018
    Posts
    21

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

    Furthermore, I assume these settings are not for a PWM control? Is PWM even possible here? Sorry for so many questions I'm just trying to understand more of it

  15. #15
    Registered
    Join Date
    Feb 2018
    Posts
    21

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

    Quote Originally Posted by mactec54 View Post
    First you have to get the VFD Drive running your spindle correctly before you connect Mach3 to it then you will know that that part is working correctly

    It sounds like there are more parameters to set or some need to changed the VFD Drive you have is not very good and not sure why people buy junk like this

    If you only see 30Hz do not run it with the spindle attached or you could damage the spindle disconnect the spindle and just get the VFD Drive running correctly then attach the spindle then after testing connect to Mach3
    An update. I reset and input the values again. Now running it with the panel seems fine. Frequency can be controlled, from 0-400Hz. However changing the frequency does not slow/ speed up the spindle.

  16. #16
    Member
    Join Date
    Jan 2005
    Posts
    11275

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

    Quote Originally Posted by buffedupboy View Post
    An update. I reset and input the values again. Now running it with the panel seems fine. Frequency can be controlled, from 0-400Hz. However changing the frequency does not slow/ speed up the spindle.
    If you have the Parameters set correct you can not run it from 0-400Hz should not be able to go below 120Hz

    I'm not sure why you keep talking about PWM because you can not use PWM

    If you can't control the spindle with the Control Pad then you don't have something set correct
    Mactec54

  17. #17
    Registered
    Join Date
    Feb 2018
    Posts
    21

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

    Here is where it is at right now.

    1) I have followed all the parameters correctly. I have triple checked this.
    2) Running it from the inv panel allows me to control the frequency from 0-400Hz BUT the spindle itself does not actually change in speed when I do this.

    Regards,
    Sean

    Quote Originally Posted by mactec54 View Post
    If you have the Parameters set correct you can not run it from 0-400Hz should not be able to go below 120Hz

    I'm not sure why you keep talking about PWM because you can not use PWM

    If you can't control the spindle with the Control Pad then you don't have something set correct

  18. #18
    Registered
    Join Date
    Feb 2018
    Posts
    21

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

    So spent much time again today and FINALLY I am able to switch the spindle on with mach3. The frequency can be controlled with mach3 as well. However the speed of the spindle does not change with the change of frequency. Turning the spindle on with the panel or mach 3 results in the spindle accelerating to a very high speed and remaining at that speed regardless of what frequency is shown on the panel or on mach 3.

    The only two differences I can identify are:

    1) P07 refused to go up to 20Hz, it stopped at 10Hz.
    2) I am also unsure whether P43: Setting Frequency should be set to 400Hz. Can you explain to me what Setting Frequency is and why it should be at 400Hz?

    Any other setting you can point out that will cause the above problem?

  19. #19
    Member
    Join Date
    Jan 2005
    Posts
    11275

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

    Quote Originally Posted by buffedupboy View Post
    So spent much time again today and FINALLY I am able to switch the spindle on with mach3. The frequency can be controlled with mach3 as well. However the speed of the spindle does not change with the change of frequency. Turning the spindle on with the panel or mach 3 results in the spindle accelerating to a very high speed and remaining at that speed regardless of what frequency is shown on the panel or on mach 3.

    The only two differences I can identify are:

    1) P07 refused to go up to 20Hz, it stopped at 10Hz.
    2) I am also unsure whether P43: Setting Frequency should be set to 400Hz. Can you explain to me what Setting Frequency is and why it should be at 400Hz?

    Any other setting you can point out that will cause the above problem?
    Not being able to set to 20Hz won't affect much that is just the starting frequency the voltage though will have to be adjusted P08=6 to 10

    P43=400 this is correct

    P45=120

    You will have to play with the P00 Parameter to get the pot to work ( Change Speeds ) try P00=01 or P00=02 which ever one works

    Do the Up / Down Arrow Keys work to change the Frequency if so then this is just the P00 Parameter to change for Pot use
    Mactec54

  20. #20
    Registered
    Join Date
    Feb 2018
    Posts
    21

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

    Thank you again for the help. Here are the observations:

    1) Setting P00=01 or 02 has not changed anything. The pot still is able to change the frequency display although the speed of the spindle will not change.
    2) Setting P00=0 pushes the frequency to 400Hz and pot does not work.

    I must also add that I don't think it is due to the P00 setting because I have finally managed to connect mach3 to the machine and when I use Mach3 to switch on the spindle I have the same issue. The spindle will spin, the panel will show a corresponding frequency to mach3 but the speed will not change.

    Regards

    Quote Originally Posted by mactec54 View Post
    Not being able to set to 20Hz won't affect much that is just the starting frequency the voltage though will have to be adjusted P08=6 to 10

    P43=400 this is correct

    P45=120

    You will have to play with the P00 Parameter to get the pot to work ( Change Speeds ) try P00=01 or P00=02 which ever one works

    Do the Up / Down Arrow Keys work to change the Frequency if so then this is just the P00 Parameter to change for Pot use

Page 1 of 2 12

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 General 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 General 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 General 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
  •