# Mach3 and the spindle control



## MTBcrazy

All the info I have gathered regarding mill conversions, lathe conversions, building a home CNC machine etc.. All describes controlling 3 or 4 axes using Mach 3 or similar software driving stepper motors and ball screws. I am really not finding answers about the detail on the spindle itself, which I would assume is the most important aspect of any machine. Videos on YouTube all demonstrate the steppers for x, y, and a axes, but nothing for the spindle.
initially I was of the impression that one could use a stepper motor for a spindle drive...although now I am no longer convinced.( I am talking for a milling machine or lathe specifically) engravers or routers is definitely not a consideration.
now I am trying to decide whether it is better to use a DC motor with controller or an AC motor with a VFD. If going for the AC option then does one still control the spindle speed with Mach 3 or manually on the VFD?
I have ordered a Nema34 stepper from China which I will use to try and drive a spindle with, but will change to AC with VFD if this is really unsuccessful. Once I have a spindle built I will carry on with the rest of the machine.
i guess I am going to build a machine around the spindle arrangement.

just waiting for the Chinese New Year to be over then hopefully I will get my first few goodies to start playing with.

i would appreciate comments on this....
thanks
Rob


----------



## cjsamples

Your spindle can certainly be controlled by Mach. The choice in spindle motor would be more dependant on machine size and what your work will be. DC motor with a speed control is one option, 3 phase motor with VFD is another. I don't think you will have much luck using a stepper for a spindle motor as it looses it torque at higher speeds. It's primary job is to position and then reposition.
 Treadmill motors have been the latest fad for spindle motors, plenty of information out there on them. They can be had pretty cheap and torque is not an issue. Any speed control that can accept 0-10 Volt input can be controlled via Mach.
 If you can provide us with more machine information I am sure someone will be able to suggest a path to follow based on experience and help get it running too. Most of the hobby machines have been modified to increase rpm and decrease noise using a belt drive replacing the built in gear heads.

Chris


----------



## Rbeckett

Steve (Jumps5) may be able to help you get this figgered out.  He has converted a couple of machines to CNC and uses Mach 3,  Give him a shout and explain the issue you are having and he may be able to help you fix it right quick and pretty easilly.  Hope this jelps get you going.
Bob


----------



## Dr.Fiero

If you're doing a conversion on a G0704 (BF20, etc etc) - the motor controller in that is very easy to convert to Mach control.

You can get a board from (really hope I'm not violating rules by dropping company names!) CNC4PC. 
I've got the C6 board,and it ties right onto the existing speed control. It interfaces with Mach, and you have direct control.

They have other similar solutions for different applications too.


----------



## fretsman

Dr.Fiero said:


> If you're doing a conversion on a G0704 (BF20, etc etc) - the motor controller in that is very easy to convert to Mach control.
> 
> You can get a board from (really hope I'm not violating rules by dropping company names!) CNC4PC.
> I've got the C6 board,and it ties right onto the existing speed control. It interfaces with Mach, and you have direct control.
> 
> They have other similar solutions for different applications too.



Hi, any chance you could be a little more specific with the connection of the C6 board to the existing controller? I have a G0704 that I will be eventually CNC'ing and would love to know the details on this.

Thanks for your time and info-
Dave


----------



## MTBcrazy

Thanks for the input so far.....essentially I want to build a machine to get some experience with computer control. The machine to be built will compliment my existing lathe, an optimum 280 x 700 vario. This is driven with a 1.5kW motor with a VFD. If I get the mill right then I will possibly look into upgrading the lathe as well to CNC. I will look out for a treadmill motor on eBay. Although not many of the sellers ship to South Africa, and to buy something here is going to be quite expensive. I'm sure I will find something soon.


----------



## Dr.Fiero

fretsman said:


> Hi, any chance you could be a little more specific with the connection of the C6 board to the existing controller? -
> Dave



While trying not to hijack the thread...   

http://cnc4pc.com/Tech_Docs/C6R6_User_Manual.pdf

It's pretty easy when you see the drawing -- and you know how a picture says a thousand words.


----------



## fretsman

Ok, thanks for the info-

Dave


----------



## MTBcrazy

After watching ebay for a few days I ended up buying this..
http://www.ebay.com/itm/360596501176?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649
It is only 660W but might be more in line with what I have in mind and it was only $9.99 plus $60 for postage. Now I have to figure out what I need to drive the motor, and whether I can get something reasonably cheaply off ebay as well.))
I see there is a web site http://www.automationtechnologiesinc.com that deals in these motors for CNC and offer a motor controller, if I can't find something slightly more affordable.
I will possibly use the Nema 34 stepper to drive the z-axis. this motor is quite heavy at 4 kg's
Any suggestions on an alternative speed controller... thanks


----------



## Dr.Fiero

You weren't planning on using this motor as a spindle drive were you?

It's a stepper.


----------



## MTBcrazy

Thanks, I see that now...I will have to see what I can find along the lines of an AC motor with VFD, like the treadmill motors suggested earlier. I guess a 2 Hp at least. I see these treadmill motors come with flywheels. I guess it would be best to run the spindle without the flywheel.


----------



## Dr.Fiero

The flywheel is for rotational mass.  Helps the motor stay at a steady speed as the user picks up and puts down their feet, and pushes along.
I think you'd tend to get dizzy otherwise from the constant speed change!

This: 
http://www.ebay.ca/itm/CNC-0-3KW-Sp...5?pt=BI_Tool_Work_Holding&hash=item3cccfd81ef
is a motor I was looking at.  DC, 3K-12K speed.  Even comes with a bracket!  Guy has a much larger one too.

Then check CNC4PC.com for an appropriate controller to let MACH do the speed.


----------



## MTBcrazy

That motor looks great although I'm looking for something to use to mill mild steel and not quite so fine. This includes facing and making keyways and boring. I don't think I need such high speed and such fine tooling. My spindle should have an Er25 or even Er32 collet. I am thinking of using a belt drive to increase the torque and reduce the spindle speed. I think with mild steel the max speed should be 1000 rpm or even less? Turning mild steel on the lathe is never at more than 450 - 500 rpm.
i guess the treadmill motor is still the best option.


----------



## MTBcrazy

Have a look at this thread,http://m.youtube.com/#/watch?feature=g-user-u&v=b2-Kdud7eiA
Here Simpsons36 is using a stepper motor to drive his 4 th axis, see how we'll the stepper motor works turning the spindle at a reasonably high speed.
This is where I initially got the idea to use a stepper to drive the spindle. Mine arrived today from china. I will try hook it up and drive a similar spindle as simpsons36.
I guess it is a better option as a 4th axis as the stepper function is primarily for indexing.
it will be interesting to find out how to have the drive and indexing options as in the video. This is where I think it will become difficult to control in Mach 3.


----------



## cjsamples

MTBcrazy said:


> HHere Simpsons36 is using a stepper motor to drive his 4 th axis



Simpson uses a servo motor for his 4th axis. A servo is much different in this application and I don't think a stepper would perform well. I have been watching Simpson and his wokr over the years.

Chris


----------



## cuseguy

Dr.Fiero said:


> If you're doing a conversion on a G0704 (BF20, etc etc) - the motor controller in that is very easy to convert to Mach control.
> 
> You can get a board from (really hope I'm not violating rules by dropping company names!) CNC4PC.
> I've got the C6 board,and it ties right onto the existing speed control. It interfaces with Mach, and you have direct control.
> 
> They have other similar solutions for different applications too.


I know this is an old thread, but I have run into a brick wall wiring a C6 board to my G0704 control board and don't want magic smoke to escape! I know to use a separate 12v wall wart for the c6 but I need specifics on the wiring.
Everyone keeps saying how easy it is and says to follow the schematic in the C6 manual! But there is no specific G0704/BF20 diagram. Is the G0704/BF20 board the same as the KBIC? I have googled this topic up and down but no one ever actually gives the specifics of the wiring. Someone please help?


----------



## JimDawson

The C6 board specifications are a bit lacking.  There is no specification for the input terminals, so I would assume that they are ''dry contact'', in other words they require only a contact closure, so hook those to the NO and COM terminals on the spindle relay on your Mach3 control board to turn on the relay.  You can check this by connecting the wall wart to the C6 board, and jumping the relay input terminals.  If the relay clicks, then you should be good to go.

It looks like in the G0704 electrical system, you can put the C6 relay in series with the wire 13 (terminal N) as shown in the current manual.  This should put the C6 relay in series with the E-Stop switch.  It looks like the E-stop switch cuts all power to the motor circuit.


----------



## cuseguy

Thanks Jim, I'll play around with your suggestions. I have a Keling KL-DB25 breakout board with 4 KL5056 drivers running my 4 axis mill setup with a rotary table. I see no provisions on the bb for what I'm trying to do. Its been awhile since I built that Controller box and I wonder if I need to upgrade the breakout board to do this. It is 6 axis capable but doesn't have spindle control. I thought Mach would allow me to just configure the C6 board as my 5th axis and control the spindle as it would with a stepper, from what other people say. Maybe I'm mistaken on that.
This is the DB25 bb page
http://www.automationtechnologiesinc.com/products-page/breakout-boards/kl-db25-breakout-board

Sent from my Samsung Galaxy Note 3.


----------



## John Hasler

JimDawson said:


> The C6 board specifications are a bit lacking.  There is no specification for the input terminals, so I would assume that they are ''dry contact'', in other words they require only a contact closure



"Dry contact" means contacts designed to switch low voltages and currents (such as 5VDC at 1ma).  They are usually plated with silver or gold so that they will not form an insulating layer of oxide.  That's not a problem with contacts rated for, say, 100VAC at 20A because the voltage will easily break down the thin oxide film and the current will burn it off.


----------



## JimDawson

John Hasler said:


> "Dry contact" means contacts designed to switch low voltages and currents (such as 5VDC at 1ma).  They are usually plated with silver or gold so that they will not form an insulating layer of oxide.  That's not a problem with contacts rated for, say, 100VAC at 20A because the voltage will easily break down the thin oxide film and the current will burn it off.



John, do you have a better nomenclature for an input that requires only a contact closure for operation?



cuseguy said:


> Thanks Jim, I'll play around with your suggestions. I have a Keling KL-DB25 breakout board with 4 KL5056 drivers running my 4 axis mill setup with a rotary table. I see no provisions on the bb for what I'm trying to do. Its been awhile since I built that Controller box and I wonder if I need to upgrade the breakout board to do this. It is 6 axis capable but doesn't have spindle control. I thought Mach would allow me to just configure the C6 board as my 5th axis and control the spindle as it would with a stepper, from what other people say.
> This is the DB25 bb page
> http://www.automationtechnologiesinc.com/products-page/breakout-boards/kl-db25-breakout-board
> 
> Sent from my Samsung Galaxy Note 3.



If the C6 board does require only a contact closure for operation, then the KL-DB25 will not work.  There are some other breakout boards that have relays for spindle and coolant.

On the other hand if the C6 board will accept a 5V input from the KL-DB25 then you should be good to go.  The data for the relay input on the C6 board is not stated so I have no idea on that one.


----------



## John Hasler

JimDawson said:


> John, do you have a better nomenclature for an input that requires only a contact closure for operation?



Normally open contact.  "Dry" is implied by the fact that it's a control input to a circuit board.  Any low-voltage, low current switch or relay such as a microswitch or control relay will work.

If the external device was expected to supply voltage the documentation would say something like "+5V active high".


----------



## Codered741

Fun fact!

I once asked my electronics professor why these so called "dry" contacts were called as such, and if there were "Wet" contacts.  I was informed that there in fact used to be "wet" contacts!  The contacts were wetted with mercury, to increase conductivity and sensitivity.  Obviously these were phased out due to toxicity, as well as "dry" contact technology improving drastically.  

Now a days,  a dry contact is any type of contact closure, normally closed or open.  While most often referring to control components, the term is used colloquially for many uses.  

As for the topic at hand, spindle control with mach 3, this can be done many ways.  Most often is with a board that has an analog output, linked to a VFD.  I have also seen it done with an RS-232 interface.  Either a DC motor or 3 phase motor with VFD is the way to go, a stepper would be inappropriate for a spindle.  

-Cody


----------



## cuseguy

Not using a stepper, it's the stock 1.5hp DC motor. But it is treated like a stepper in Mach. 

Sent from my Samsung Galaxy Note 3.


----------



## Dr.Fiero

cuseguy said:


> Everyone keeps saying how easy it is and says to follow the schematic in the C6 manual! But there is no specific G0704/BF20 diagram. Is the G0704/BF20 board the same as the KBIC? I have googled this topic up and down but no one ever actually gives the specifics of the wiring. Someone please help?



Look on the board in your mill - SHOULD be a KBIC 120 (maybe 240).

There's diagrams of the KBIC all over the net which really helps.  
If you're running the stock "G0704" motor, remember that it's NOT the shunt variety of DC motor.  Just two wires go to it.


----------



## cuseguy

That's exactly what I needed. It is a KBIC 120! That makes it alot easier!

Sent from my Samsung Galaxy Note 3.


----------

