585,758 active members*
4,562 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > CNC Machine Related Electronics > CNC Controlled Spindle motor speed control
Results 1 to 14 of 14
  1. #1
    Join Date
    Jun 2004
    Posts
    131

    CNC Controlled Spindle motor speed control

    I thought I would let anyone interested know about a project I am workin on for my CNC wood router. The problem I am trying to solve is two fold, first an attempt to maintain a constant cutting bit speed under varying load conditions, and second to generate a fault to the CNC if the spindle motor stalls. When cutting wood the bit can not be too fast or the chips produced are too small and do not carry away the heat generated and the wood burns. If the bit is turning too slow the router stalls. It is a bit of a balancing act to get the feed rate and the spindle speed just right. The problem I have is that when I get it just right, it doesn't stay just right.

    So, I am designing a circuit that interfaces to my CNC machine and provides a constant speed control. The inputs to the system from my CNC are:

    1.) Spindle On
    2.) Spindle Desired speed

    There is an output from my system that indicates a motor stall.

    I use a magnet mounted on my router shaft and a hall sensor to provide actual speed feedback to my circuit. I have a small microcontroller that takes all this info and controls a triac that controls the power to the spindle motor.

    Just for grins I also added a circuit that provides an LCD readout of the spindle speed.

    Right now the circuit is a bunch of breadboards spread over my work bench. I use TurboCNC to drive my machine and am working out how do define the desired spindle speed.

    I'll get some pictures taken of the breadboards. I just wanted to see if anyone is interestted in this project or has had similiar problems.

    Greg

  2. #2
    Join Date
    Dec 2003
    Posts
    24220
    What is the nature of the signal from the CNC to the spindle for speed control? Does TurboCNC allow the normal S value for spindle speed? If so would it not be just a question of calibrating the (S)speed command to output.
    I assume your motor is a Universal type series motor, if so Have you tried using a Triac control with speed regulation built it?
    Al
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  3. #3
    Join Date
    Jun 2004
    Posts
    131
    TurboCNC uses the parallel port to control the CNC machine. It uses the various inputs and outputs signals of the parallel port to create digital signals such as x-axis motor step and x-axis motor direction. You can use individual pins as general purpuse IO, but I don't know what it might do with a S spindle speed command, or how it would wiggle one of the outputs. This is one of my primary stumbling blocks--how does the computer communicate the desired speed to the CNC machine?

    I have tried using Triac control with speed regulation built in, as a matter of fact that is what I now use. The problem is that it is open loop. The circuit delivers a varing amount of power to the universal A/C motor. So as the load increases, the bit slows down. I want to close the loop on the bit speed by using actual spindle speed feed back. When the spindle loads down, give it more juice.

  4. #4
    Join Date
    Dec 2003
    Posts
    24220
    In a normal CNC system, the control outputs an analogue or digital signal to the Spindle controller the value of which is entered in the S value and the M3 M4 determines the direction. In your case, I assume you just need one direction so the M function can be eliminated. But if you have 4 output lines available this would give 16 possibilities for speeds to your triac controller, which would then monitor and control the speed. But I assume the problem is going to be the ability of TurboCNC to interpret the S value and translate that to the port, unless TurboCNC has some kind of logic programming or parametric programming.
    The way it is done in a full-blown CNC system, regardless of make, is that there is a CNC control side (processor) that takes care of the axis motion and a co-processor that looks after the Mcode Spindle &Tool functions as well as all the mundane machine functions. When a S,M,T function is seen in the program it is passed over to the co-processor for implementation.
    It would also be usefull I guess if Turbocnc allowed the use of auxilliary cards, either digital or analogue.
    Al
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  5. #5
    Join Date
    Mar 2004
    Posts
    1804
    I know that TurboCnc is being outfitted to handle the DigiSpeed control and would think following this procedure should allow another controller.

    I have not yet gotten into the programming necessary, but it should be "simple" to configure that programming to accept other controllers.

    From memory, there are three pins need for this controller.

    I look forward to seeing this thread continue as I have a VFD on my mill that will accept either a 0-5 or 0-10V analogue input to control the speed..
    Art
    AKA Country Bubba (Older Than Dirt)

  6. #6
    Join Date
    Jun 2004
    Posts
    131
    Thanks,

    I will look into the digispeed control. I would like to follow a standard protocol.

    Greg

  7. #7
    Join Date
    Feb 2004
    Posts
    93
    I'm using Mach2 software, it send pulse and dir signal to a small board thant convert it to 0-10V signal depending of the frequency of the pulse signal!!

    The board is wired to a vfd.
    Alex
    www.ebfcnc.com

  8. #8
    Join Date
    Jun 2004
    Posts
    131
    The digispeed interface is a good one to use as a standard, they support three different interfaces though. I am thinking of using the step, diection approach and define each step to be a certain number of RPM. the g-code to shut the spindle down would stop it right away.

    Cheers,

    Greg
    Attached Thumbnails Attached Thumbnails speed.JPG  

  9. #9
    Join Date
    Jun 2004
    Posts
    131
    I am finalizing the specification for the speed control. I will have a four wire interface for the CNC controller:

    inputs to the CNC controller: Step, Direction, Panic stop
    outputs from the speed controller: Fault.

    These input/outputs will be optoisolated since the speed controller will be using line voltage.

    There will be an optional input for the actual speed of the spindle.

    The only other two connections will be Line in, Line out and Netral. The line in and netral come from the power plug and the netral and line out go to the spindle motor.

  10. #10
    Join Date
    Mar 2004
    Posts
    1804
    Greg,
    Looking forward to seeing the results of your efforts! Hope you will share the necessary diagrams, coding etc.
    Art
    AKA Country Bubba (Older Than Dirt)

  11. #11
    Join Date
    Jan 2005
    Posts
    1880
    has there been any progress on your spindle controler gregmary?

    just now starting the research on the electronics for my nc.

  12. #12
    Join Date
    Jun 2004
    Posts
    131
    I have finished with the schematic but have gotten side tracked on getting it breadboarded.

  13. #13
    Join Date
    Mar 2008
    Posts
    40

    Feedback for spindle and positioners, is that it?

    Quote Originally Posted by gregmary View Post
    [CLIP!]... attempt to maintain a constant cutting bit speed under varying load conditions, and second to generate a fault to the CNC if the spindle motor stalls. When cutting wood the bit can not be too fast or the chips produced are too small and do not carry away the heat generated and the wood burns. If the bit is turning too slow the router stalls. It is a bit of a balancing act to get the feed rate and the spindle speed just right. ...[CLIP!]
    Greg
    So you're using feedback to get a cruise control for your spindle, and wanting to send a "slow down" command to your positioners once you're pushing as fast as you can into the cut. Both parameters should have a little leeway in them, in case you hit something in the wood, am I guessing pretty close?

    DIY-Guy "Trying to gain enough knowledge to get past 'newbie' status."

  14. #14
    Join Date
    Feb 2009
    Posts
    1
    Hello every ones I am from Serbia end my English is not good enough

Similar Threads

  1. CNC Glossary
    By cncadmin in forum Community Club House
    Replies: 17
    Last Post: 03-09-2008, 09:08 PM
  2. Augh. Too many choices in CNC control software
    By MadMax in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 4
    Last Post: 07-08-2005, 07:00 PM
  3. HobbyCNC controller spindle control?
    By PranksterO in forum CNC Machine Related Electronics
    Replies: 6
    Last Post: 07-27-2004, 12:40 AM
  4. Tutorial for Spindle Control
    By teilhardo in forum Xylotex
    Replies: 29
    Last Post: 06-23-2004, 04:43 AM
  5. CNC spindle and fluid control
    By replicapro in forum CNC Machine Related Electronics
    Replies: 0
    Last Post: 06-22-2004, 07:37 PM

Posting Permissions

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