CNC'ing a small lathe - pimping the unpimpable...

Moderators: PK, Moderators

User avatar
cryoscum
STOP... Hammer Time The Prodigy
STOP... Hammer Time    The Prodigy
Posts: 1802
Joined: Wed Oct 06, 2010 2:54 pm
Location: QLD, NSW & VIC

CNC'ing a small lathe - pimping the unpimpable...

Postby cryoscum » Tue Apr 19, 2011 8:05 pm

Hi All

As sure as the sun rises in the east, it was only a matter of time before my attention was drawn to automated machining. I expect I'll struggle through most of this as it's something completely outside my field of experience, but luckily PK offered a helping hand. I hope he knows what he's in for! It's not so much pimping the unpimpable as teaching the unteachable!

This is the lathe in question. It's a small CarbaTec C3 I've had for a few months. The idea is that the intended new CNC hardware could be transplanted to a larger lathe at a later stage.

1.JPG
1.JPG (53.11 KiB) Viewed 6854 times

2.JPG
2.JPG (54.97 KiB) Viewed 6854 times

3.JPG
3.JPG (57.05 KiB) Viewed 6854 times
AMRS L3 | NAR L3 | QRS 089 | MDRA 224
AMRS Technical Advisory Group

Total impulse for 2016: 32,458 Ns (thus far)
Total impulse for 2015: 84,231 Ns
Total impulse for 2014: 40,757 Ns
Total impulse for 2013: 62,927 Ns

Andrew Burns
Rocket Crew
Rocket Crew
Posts: 283
Joined: Fri Apr 25, 2008 1:14 pm
Contact:

Re: CNC'ing a small lathe - pimping the unpimpable...

Postby Andrew Burns » Tue Apr 19, 2011 8:43 pm

Looking forward to reading about it!

Unless you're Craig and are making a large, nearly professional CNC machine ( :wink: ) I don't think it's actually too hard to make a good automated machine. I made a CNC foam cutter which has twice the number of axes that you have and the hardest part was making the machine, not the automation.

If I were to do it again or do a lathe of your size I'd buy some Geko drives, couple up some beefy stepper motors and put a tacho on your spindle somehow and voila, CNC lathe.

Space Mark
Juicy Fruit
Juicy Fruit
Posts: 400
Joined: Mon Apr 18, 2011 11:57 am
Location: Perth, WA
Contact:

Re: CNC'ing a small lathe - pimping the unpimpable...

Postby Space Mark » Wed Apr 20, 2011 3:15 pm

Looks like it should be pretty easy mod really, should just need to switch the handles over the pulleys and strap on some steppers (nice custom made bracket?). You might also want some end stop switches.

Should be a really nice machine when done, thats a very nice base to start with!
TRA 13845 - Level 3

PK
...
...
Posts: 1710
Joined: Sun Jun 01, 2008 5:07 pm
Location: Perth
Contact:

Re: CNC'ing a small lathe - pimping the unpimpable...

Postby PK » Sat Apr 23, 2011 8:41 am

OK, Lets get into this:

The goal here is your first CNC conversion of a small/tiny lathe.
To achieve this we're going to keep it simple and minimise the amount of machining required.
We're not going to worry about speed power or longevity, we just want the thing moving so we can learn about this CNC stuff. If you want to see some (very dated) pictures of "one I prepared earlier", check out my CNC site http://www.cncathome.com




A CNC machine consists of:

1.The bits that move. In this case that's going to be the lathe saddle and cross slide

2.The bits that make the bits that move move. ie the leadscrew and cross slide screw.

3.The bits that turn the bits that make the bits that move move. Here we will be using stepper motors

4.The bits that drive the stepper motors.

5. The software that commands the drives.

Since we already have 1 and 2, we now need to work out what stepper motors we are going to buy.
In the context of this project, there's only one characteristic of a stepper motor we care about, that's it's rated torque.

For the cross slide it almost doesn't matter because the feed screw is so fine that almost any motor will turn the thing, we'll just use a best guess and specify a 1.5Nm motor as being excessive and hence appropriate.

For driving the saddle via the lead screw we have a LOT of friction to deal with so we need to be a bit more scientific.

Nic, pull the back cover of and take the gears out. Grab some vice grips (or superglue a ruler to a gear) and put them on the leadscrew. Now engage the half nuts on the saddle, take up the slack and hang a few hundred grams (I like using 2l milk bottles with some water in them) off the grips/ruler. Adjust the position and weight until you generate enough torque to reliably move the saddle.
Image

Take some pics and let us know how much torque you come up with. We'll use that figure to select a motor and drive combination.

PK

User avatar
cryoscum
STOP... Hammer Time The Prodigy
STOP... Hammer Time    The Prodigy
Posts: 1802
Joined: Wed Oct 06, 2010 2:54 pm
Location: QLD, NSW & VIC

Re: CNC'ing a small lathe - pimping the unpimpable...

Postby cryoscum » Sat Apr 23, 2011 4:07 pm

Hi PK (& All)

OK, easy as pie, took the cover off. Gears are just Allen screwed to the shafts, so easy to take off.

1.JPG
1.JPG (64.92 KiB) Viewed 6742 times


I took the gear in question off, drilled two 6mm holes through the parts that don't matter and bolted an alu pipe to it. Loading it up with a bottle of water at known (and marked) distances from the shaft and this was tweaked several times and it seems that 200g at 300mm distance gave a reliable and easy rotation.

2.jpg
2.jpg (83.25 KiB) Viewed 6742 times


OK, all done. We should probably not forget about the pipe itself, so it weighed in at 60g. Ignoring the 30mm back-span of the pipe, my guess is the calc would thus look like this...

3.jpg
3.jpg (38.52 KiB) Viewed 6742 times


Paul, please see if you agree? Then picking some stepper motors...

Cheers
Nic
AMRS L3 | NAR L3 | QRS 089 | MDRA 224
AMRS Technical Advisory Group

Total impulse for 2016: 32,458 Ns (thus far)
Total impulse for 2015: 84,231 Ns
Total impulse for 2014: 40,757 Ns
Total impulse for 2013: 62,927 Ns

PK
...
...
Posts: 1710
Joined: Sun Jun 01, 2008 5:07 pm
Location: Perth
Contact:

Re: CNC'ing a small lathe - pimping the unpimpable...

Postby PK » Sun Apr 24, 2011 10:01 am

A little on stepper motors


For those not afraid of sin(theta) a reasonable primer on steppers can be found here:
http://www.solarbotics.net/library/pdfl ... torbas.pdf

For the RC aero guys, you know how a brushless motor ‘cogs’ between 3-6 distinct positions when you turn it by hand? Well a stepper is basically an inrunner with 200 ‘cog’ positions.

Steppers we care about come in two standard frame sizes:
NEMA 23 (about 58mm square)
And
NEMA 34 (about 86mm square)

Someone kinkly posted the mounting drawings in this thread
http://www.cnczone.com/forums/linear_ro ... ttern.html
BTW cnczone is by far the best CNC resource/forum on the web.

Important concept
A stepper motor looks like an electric motor (It has a body and a shaft that turns), its even got ‘motor’ in it’s name! But it doesn’t behave like the motors you are used to dealing with. The most important aspect of this is the torque vs speed behavior!


A ‘normal’ electric motor has a torque vs speed curve that looks like this
Image
Ie the torque remains fairly constant with speed across it’s rated range of speeds.


A stepper motor is a constant power device and has a torque vs speed curve that looks like this:
Image


Clever motor drives apply multiples of the motors rated voltage (like 20x) and limit the current to the motor to flatten out the first part of the curve, but there’s no getting away from the physics of the situation. Note also the low speeds that stepper motors operate efficiently at. Above 5 or 6 hundred RPM, your stepper isn’t producing much torque. Again clever drives can help. Here’s one I prepared earlier!


But don’t get too excited. If a butterfly flapped its wings in Brazil that motor would stall well before it got going that fast. The little pulley was also acting as a flywheel.


Picking a stepper for the long axis
Steppers are available in a bewildering number of configurations, but another rule of thumb for steppers is: For a given physical size, the more torque you get, the slower she goes.

Now I said at the beginning that we weren’t going to worry about speed, and we wont. But we can’t be sitting around all day waiting for the thing either!

The leadscrew on that lathe will be about 2mm pitch. This means that at 500RPM, we can expect the motor to move the saddle 1000mm/minute (or about 16mm/sec). This is pretty slow!


What we’ll do is pick a motor with more than double the required torque so we can go faster than 500rpm and still have enough torque to keep things moving. Then later, I’ll show you a neat trick with steppers to get things really moving..


Here we go
So, after a quick measurement and a lot of waffle, we now know we are looking for :

A 2ish Nm motor for the cross slide

And

A 5ish Nm motor for the saddle.

There are plenty of NEMA 23 motors in the 1-2Nm range so we’ll use that frame size for the first one.


Whilst you can get NEMA 23’s that produce nearly 5Nm, remember the rule of thumb. We’re MUCH better off going for a NEMA 34.

So, where to get them?
Stay away from the 'conversion kit' offerings. Those guys aren't moving enough stock to get prices a whole lot better than you can get, you may also end up with some design compromises you're not happy with.

If you are buying a few, then MS-Motors in China is a good source.
http://www.ms-motor.com/Stepper_motor/s ... motor.html
Shipping from them can be expensive though.

If you’re not buying a few then just got to ebay.


Grab one of these NEMA 34’s
http://cgi.ebay.com.au/640-Oz-in-Nema-3 ... 4aa0a4b127

and one of these NEMA 23’s
http://cgi.ebay.com.au/NEMA23-175Oz-in- ... 41581f0cab

And you’ll be on your way.
PK

User avatar
cryoscum
STOP... Hammer Time The Prodigy
STOP... Hammer Time    The Prodigy
Posts: 1802
Joined: Wed Oct 06, 2010 2:54 pm
Location: QLD, NSW & VIC

Re: CNC'ing a small lathe - pimping the unpimpable...

Postby cryoscum » Sun Apr 24, 2011 11:17 am

Thanks PK, will do some reading on the subject. Have ordered the motors in question. Strangely enough the one coming from China had known postage costs while the one from NSW did not. Go figure!
AMRS L3 | NAR L3 | QRS 089 | MDRA 224
AMRS Technical Advisory Group

Total impulse for 2016: 32,458 Ns (thus far)
Total impulse for 2015: 84,231 Ns
Total impulse for 2014: 40,757 Ns
Total impulse for 2013: 62,927 Ns

PK
...
...
Posts: 1710
Joined: Sun Jun 01, 2008 5:07 pm
Location: Perth
Contact:

Re: CNC'ing a small lathe - pimping the unpimpable...

Postby PK » Fri Apr 29, 2011 5:33 pm

The Drives
I'll start by saying that there will be some product bias in this post. In reality there are many fine stepper drives available to the hobbyist these days, unfortunately there are a lot of parameters and features of stepper drives that may or may not be important for your application, and this can make choosing from the available cheaper drives quite challenging.

I'll briefly cover some of the more important criteria:

Maximum voltage. Generally speaking, the higher the voltage, the faster your motor will be able to go. There are some absolute limits, but most motors will run from 40V and a lot of drives will only handle 24V. Remember, the voltage rating of the drive is the absolute maximum voltage the drive can handle without smoking, so you will ALLWAYS run about 10V below that number.

Micro stepping. A "normal" stepper moves 1/200th of a rev with each step. Micro stepping breaks these steps up into 1/2, 1/4, ... 1/32 steps. Nb you don't really get any more resolution with micro stepping, what it does is make the motor turn more smoothly at lower speeds and thus helps prevent it resonating.

Idle current reduction. A really nice to have feature that reduced the current supplied to a motor when it isn't moving. This can dramatically reduce heating.

There are many more features, and you'll notice that drive current didn't crack a mention. It really isn't that important..





So how do you pick a set of features that suit your app? Don't bother. Just buy a drive that has all these features (and some really smart additional ones like short circuit, over current, over voltage, bad day protection. plus built in opto isolaton)

Go to Peter Homanns site http://www.ho an designs.com and buy 2 gecko 203v drives. Total cost is almost $300 which is a lot for a small machine, but these drives will run just about any stepper you'll ever see, they are made by a guy who's devoted decades to getting them right (see http://www.gecko drive.com).

Pete is a top bloke based in Melbourne, and those drives represent the best value for money in the market as they have all of the features I listed above and a heap more.
At a pinch, you could do it for half that money, but you'll spend that much again when you do another machine, or blow up a cheap drive.


PK

User avatar
cryoscum
STOP... Hammer Time The Prodigy
STOP... Hammer Time    The Prodigy
Posts: 1802
Joined: Wed Oct 06, 2010 2:54 pm
Location: QLD, NSW & VIC

Re: CNC'ing a small lathe - pimping the unpimpable...

Postby cryoscum » Fri Apr 29, 2011 6:07 pm

Thanks PK

They're on their way by Express Post. Will keep you posted...

Thanks
Nic
AMRS L3 | NAR L3 | QRS 089 | MDRA 224
AMRS Technical Advisory Group

Total impulse for 2016: 32,458 Ns (thus far)
Total impulse for 2015: 84,231 Ns
Total impulse for 2014: 40,757 Ns
Total impulse for 2013: 62,927 Ns

Andrew Burns
Rocket Crew
Rocket Crew
Posts: 283
Joined: Fri Apr 25, 2008 1:14 pm
Contact:

Re: CNC'ing a small lathe - pimping the unpimpable...

Postby Andrew Burns » Fri Apr 29, 2011 6:53 pm

When I started my undefined CNC project (which eventually turned into a foam cutter) years ago I tried to save money and thought one of the 4-axis stepper boards from China on ebay looked like a good deal.

Well it does work fine but it came with a few down-sides:

- Terrible documentation, what little of it was in english
- Optoisolation that isn't really isolated
- Fixed chopper current that was too high for what I wanted (had to change some parts)
- Rated to 36V but I had to replace a blown cap and mount a regulator on a large heatsink to make it work at 24V

Of course it works without a hitch now but if I were to CNC anything again I'd likely buy gecko drives.

PK
...
...
Posts: 1710
Joined: Sun Jun 01, 2008 5:07 pm
Location: Perth
Contact:

Re: CNC'ing a small lathe - pimping the unpimpable...

Postby PK » Fri Apr 29, 2011 7:21 pm

Yeah it's a tricky issue. There's no doubt that the ultra tech-cnc-savvy can save some bucks on drives. My machines use a mix of gecko, Chinese, and my own drives and the are about as fast and accurate as anyone seems to be able to get small machines to be. But, for the less experienced, the cost penalty of just buying the best drives you can get is relatively small. As such it's generally the best way to go.
PK

User avatar
OverTheTop
It's only money...
It's only money...
Posts: 2623
Joined: Sat Jul 21, 2007 2:20 pm
Location: Melbourne, Australia

Re: CNC'ing a small lathe - pimping the unpimpable...

Postby OverTheTop » Fri Apr 29, 2011 8:24 pm

Extra voltage on the motors can really make them zing. A spectrometer I designed about 10 years ago had 1.9V motors being driven by a full bridge from 24V (so 48V peak to peak!). Acceleration is fantastic. We can move, stop, take a reading, and move on to another wavelength 30 times per second. Current was provided by a switching amplifier, and controlled by a microcontroller which modeled the system dynamics. Each step was divided into 128 microsteps, giving 25600 microsteps per revolution.

Time constant for motors is L/R (you can get these values from the data sheet for the motor used), so the extra voltage applied helps drive the current into the windings more quickly, resulting in more torque and faster drive rate.
TRA #13430
L3
"Everybody's simulation model is guilty until proven innocent" (Thomas H. Lawrence 1994)

User avatar
cryoscum
STOP... Hammer Time The Prodigy
STOP... Hammer Time    The Prodigy
Posts: 1802
Joined: Wed Oct 06, 2010 2:54 pm
Location: QLD, NSW & VIC

Re: CNC'ing a small lathe - pimping the unpimpable...

Postby cryoscum » Sat May 07, 2011 2:20 pm

Hi Gents

All the Stepper motors and Gecko Drives have arrived and I started mounting them.
Some custom brackets cut from bent 25x3 mild steel flat bar, etch primer and charcoal hammer tone paint.

1.JPG
1.JPG (24.19 KiB) Viewed 6566 times


Had to drill some holes and tap M6 thread into the saddle the saddle for fixing.

2.JPG
2.JPG (81.99 KiB) Viewed 6566 times


Also had to extend the half-nut engagement lever to stand proud of where the drive belt will be. Quite a tight fit but the motor doesn't hit anything anywhere as you move the saddle to its 2 extremes.

3.jpg
3.jpg (67.45 KiB) Viewed 6566 times


Now for the other one...
AMRS L3 | NAR L3 | QRS 089 | MDRA 224
AMRS Technical Advisory Group

Total impulse for 2016: 32,458 Ns (thus far)
Total impulse for 2015: 84,231 Ns
Total impulse for 2014: 40,757 Ns
Total impulse for 2013: 62,927 Ns

PK
...
...
Posts: 1710
Joined: Sun Jun 01, 2008 5:07 pm
Location: Perth
Contact:

Re: CNC'ing a small lathe - pimping the unpimpable...

Postby PK » Sun May 08, 2011 11:00 am

Also had to extend the half-nut engagement lever to stand proud of where the drive belt will be. Quite a tight fit but the motor doesn't hit anything anywhere as you move the saddle to its 2 extremes.

It's one of the reasons I suggested that motor. It has two sets of coils in it (sometimes referred to as a "double stack"). You can get more mechanical power out of a triple stack motor but there was no chance you were going to mount it under the saddle.

Overall your mounting arrangement looks good. How do you plan to adjust belt tension?

I've ordered your power supply parts, unfortunately they got caught up with a heap of bits on back order and I've spent a few days haggling with altronics who wanted to charge me 50% more to magically not have the item on back order...


On the topic of power supplies
As discussed previously, we're going to run these motors at about 50V. You'll find lots of advice on the net that says that the next step is to add up the total maximum current of the motors, in this case (6.3A+2.8A=9.1A) and then build a 50V 9.1A power supply......This advice is wrong!

50V x 9.1A = 450W (or just under half a kilowatt) . Just take a look at those motors and ask yourself if you can see them generating that much power.

So what gives?

Well, it turns out that the combination of the stepper drive and the coils in the motors form a kind of step down power supply. When 50V is initially applied to the coil, it only draws a fraction of it's rated current because the coil is a big inductor.
In fact the inductance of the coil is an important spec and will be listed in the motor data sheet. As the current ramps up, the drive will reduce the voltage applied to the coil to maintain the correct maximum current.

So the way you design the power supply is based on the power rating of the motors, in this case, the rated currents x the nominal voltages:

For the NEMA23 motor these are:
1.96V x 2.8A = 5.5W

and for the NEMA34:
2.27V x 6.3A = 14.3W

So a 20W power supply would do the job. In practice, the drive/motor combination makes a pretty low efficiency power supply, so I usually double that.
In this case we're going for 50W because that's the closest power rated transformer I could find..

By far the best kind of power supply to run a stepper motor drive from is a good old fashioned transformer+rectifier+big cap, unregulated jobbie.
Image
This is because the drives have all sorts of weird peak current and back EMF requirements and regulated supplies tend to get very confused by this.

To give an example: Consider a stepper driving the table on a big milling machine. It gets the axis moving and then gets told to stop it. As it decelerates the table, the stepper motor becomes a generator and the drive dumps this energy back into the power supply causing the voltage to rise.
Your average switch mode regulator just has no idea why the output voltage could possibly go up and will often shut itself down.
For this reason, drives and power supplies on larger CNC machines will usually have a big 200-1000W resistor that they can connect across the power supply if the voltage rises beyond a certain point

PK

User avatar
cryoscum
STOP... Hammer Time The Prodigy
STOP... Hammer Time    The Prodigy
Posts: 1802
Joined: Wed Oct 06, 2010 2:54 pm
Location: QLD, NSW & VIC

Re: CNC'ing a small lathe - pimping the unpimpable...

Postby cryoscum » Sun May 08, 2011 11:26 am

Hi PK

I understand that tooth belts are somewhat less tension sensitive than regular drive belts, but I was waiting to get the belt before deciding what to do. I intend to get 2m of the 10mm tooth belt, join the correct length and see what tension it'll have with the current configuration. We may get lucky, but if tensioning is required I thought I could slot the 4 holes in the mounting brackets to give maybe 5mm movement.

Any suggestions for the pulleys? Both the same size, maybe about 25mm dia? No need for gear ratios here I would assume?

Thanks
Nic
AMRS L3 | NAR L3 | QRS 089 | MDRA 224
AMRS Technical Advisory Group

Total impulse for 2016: 32,458 Ns (thus far)
Total impulse for 2015: 84,231 Ns
Total impulse for 2014: 40,757 Ns
Total impulse for 2013: 62,927 Ns


Return to “Whooshtronics”

Who is online

Users browsing this forum: No registered users and 0 guests