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

Moderators: PK, Moderators

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 » Tue Jun 07, 2011 9:25 pm

:-) Wait 'till you have it running and those brackets start to flex.....


PK

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 Jun 11, 2011 8:08 am

Moving on
So now you’ve got a bunch of wiring up to do.

First step is to get the power supply in a box. Just about any box will do, although I’m a bit of a fan of 19” rack cases.
Here’s one I did for a mate:
Image

You need to get the 4 wires from the stepper motors to the driver. I use stranded cat 5 networking cable (Patch leads) for this. I treat each twisted pair as a single core and use 4 pin microphone connectors like these
Image
http://www.jaycar.com.au/productView.as ... rm=KEYWORD
They can handle prodigious amounts of current.

You need to get power to your drives. Read the manuals to see if they recommend a fuse.

Finally you need to get the step, direction, and ground signals from pins 2,3,4,5 and a 18(gnd) of your parallel port.
In more complex installations (such as the one pictured above) you do this via a breakout board which provides some power and other signals.
For this build, we can just use the opto isolators in the Gecko drives.

After that, it's load and configure the software then you're into tuning.
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 Jun 11, 2011 7:17 pm

Hi All

Z-axis complete and motor closed up.
1.JPG
1.JPG (54.04 KiB) Viewed 1710 times


So, it was on to the controller box. A trip to Jaycar and an afternoon on the solder bench...
3.JPG
3.JPG (47.82 KiB) Viewed 1710 times


Nice and simple...
2.jpg
2.jpg (19.52 KiB) Viewed 1710 times


Still need to do the computer inputs, but too full of Bundy for that now :)
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 » Sat Jun 11, 2011 8:05 pm

Neat!
It won't be an issue for this build. But on a larger machine you'll need to replace the plywood with aluminium to suck some heat out of the drives.

Oh and you won't believe me when I say this, I'm only posting it so I can say I told you so later, but that box is about 1/3rd the size of the one you'll end up with on this lathe.. :-)

All good for now, drink up and press on!

:-)

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 Jun 12, 2011 10:30 am

Looking at the parallel port setup this morning. This is all new to me, but it looks like the IEEE 1284 standard states that the port has several outputs, several inputs and a few common grounds. From what I can make out it would mean I need to wire up the port as follows:

Pin 1 -
Pin 2 - z-axis disable (output from PC)
Pin 3 - z-axis direction (output from PC)
Pin 4 - z-axis step (output from PC)
Pin 5 - x-axis disable (output from PC)
Pin 6 - x-axis direction (output from PC)
Pin 7 - x-axis step (output from PC)
Pin 8 -
Pin 9 -
Pin 10 - z-axis limit switches (input to PC)
Pin 11 -
Pin 12 -
Pin 13 -
Pin 14 -
Pin 15 -
Pin 16 -
Pin 17 -
Pin 18 - z & x-axis common (& limit switches ground?)
Pin 19 -
Pin 20 -
Pin 21 -
Pin 22 -
Pin 23 -
Pin 24 -
Pin 25 -

I think the z-axis limit switches needs a 5V signal (with what I guess is a current limiting resistor). This would be easy enough to do with an LM7805 regulator drawing from one of the 18V coils on the transformer (with bridge rectifier and big-ish cap), but I'm unsure what this will end up doing to the opto-isolation we hold so dear. Why not just from the main PSU? I don't think the LM7805 can take the 54V I'm currently reading on the post-rectifier-and-caps outputs of the power supply, even though I think this will drop to the 36V you would expect once you start drawing some current. Not sure about this last part...

PK & others, does this all look OK and please give some advice on the source of the 5V signal for the limit switches.

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

strud
Engineer
Engineer
Posts: 917
Joined: Thu Oct 02, 2008 7:37 am
Location: Central Tablelands, NSW

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

Postby strud » Sun Jun 12, 2011 11:00 am

How about the USB port ?

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 Jun 12, 2011 11:03 am

cryoscum wrote:Looking at the parallel port setup this morning. This is all new to me, but it looks like the IEEE 1284 standard states that the port has several outputs, several inputs and a few common grounds. From what I can make out it would mean I need to wire up the port as follows:

Pin 1 -
Pin 2 - z-axis disable (output from PC)
Pin 3 - z-axis direction (output from PC)
Pin 4 - z-axis step (output from PC)
Pin 5 - x-axis disable (output from PC)
Pin 6 - x-axis direction (output from PC)
Pin 7 - x-axis step (output from PC)
Pin 8 -
Pin 9 -
Pin 10 - z-axis limit switches (input to PC)
Pin 11 -
Pin 12 -
Pin 13 -
Pin 14 -
Pin 15 -
Pin 16 -
Pin 17 -
Pin 18 - z & x-axis common (& limit switches ground?)
Pin 19 -
Pin 20 -
Pin 21 -
Pin 22 -
Pin 23 -
Pin 24 -
Pin 25 -


Leave the limit switches for now and leave the disable input on the drive disconnected.
You would normally wire the switches to the disables on the drive and to input pins on the parallel port. Yes you'll need 5V to do that, where you get it from is important though, we'll cover that later.

Pins 1,2,3,4,5,6,7,8,9,14,16,17 are outputs
Pins 10,11,12,13 and 15 are inputs
Pins 18 through 25 are ground.


PK

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 Jun 12, 2011 11:09 am

strud wrote:How about the USB port ?


Not a great choice. You end up wrapping your PC's 5V and ground rails around your machine with the limit switch wiring. Those little lathes have nasty PWM'ed DC drives with cause significant grief with high impaedence wiring. Then there's the stepper drives..

Best bet is an 8V winding on the transformer and a little reg with some additional isolators. Then you can put a 50 ohm pull up on wiring and a couple of bypass caps. That usually sorts out most issues.
But then you get into spindle spead measurement and speed control and a breakout board with these features makes a lot of sense.
Let's cross those bridges when we come to them.

PK

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 Jun 12, 2011 11:12 am

Oh, on the topic of fuses:

From the manual:
"INTERNAL FUSE: The G203V uses a socketed, user-replaceable internally mounted fuse (Littlefuse Inc. part # 0251005.MXL).
Reversing the power supply polarity or a power supply voltage over 114VDC will cause the internal fuse to blow."

So you can ditch the ones you have, not good to have multiple fuses in series..

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 Jun 12, 2011 7:42 pm

Corrected pins are as follows:
Pin 1 -
Pin 2 - z-axis step (output from PC)
Pin 3 - z-axis direction (output from PC)
Pin 4 - x-axis step (output from PC)
Pin 5 - x-axis direction (output from PC)
Pin 6 -
Pin 7 -
Pin 8 -
Pin 9 -
Pin 10 -
Pin 11 -
Pin 12 -
Pin 13 -
Pin 14 -
Pin 15 -
Pin 16 -
Pin 17 -
Pin 18 - z-axis common
Pin 19 - x-axis common
Pin 20 -
Pin 21 -
Pin 22 -
Pin 23 -
Pin 24 -
Pin 25 -

Installed the 10" touch screen I had for some time and set up the software.
2.jpg
2.jpg (30.08 KiB) Viewed 1656 times

Haven't figured out the NEMA34 wiring diagram yet, but got to test the x-axis NEMA23 motor. Needed to limit the current as it was running hot, but all good...
1.JPG
1.JPG (59.86 KiB) Viewed 1656 times

Just need to do the z-axis tomorrow and then the tuning, which I understand can take a lot of time...

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 Jun 12, 2011 7:56 pm

The only thing I see wrong is that glass of orange juice!

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 Jun 12, 2011 8:00 pm

I'm out of coke, so Bundy and OJ it is...
Doesn't suck too badly :?
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

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 » Tue Jun 14, 2011 8:43 pm

Got it all working now.
PK, also found the hassle with the driver cutting out - dry joint on the driver circuit board (common pin)



Now to learn the software properly and then GCode...
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

User avatar
kopius
Elle3
Elle3
Posts: 2846
Joined: Mon Apr 23, 2007 4:30 pm
Location: Gold Coast, Queensland
Contact:

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

Postby kopius » Tue Jun 14, 2011 9:29 pm

Very nice cryoscum! Now just need to upsize ;-) hehe

Will have to come around some time and have a play with it (oh and will bring some coke too)
QRS Secretary

AMRS #3 L3 ACO
Life member of QRS

NAR L2 #98260

MDRA Member #0241

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 » Tue Jun 14, 2011 9:49 pm

Great Stuff!
So now we're just about ready to tune the system.
First step is to tell Mach3 how many steps constitute one mm of travel for each axis:
Config->Select Native units
Change to mm (unless you are over 60)

Config -> Motor tuning
Image
This screen is gonna be burned into your retina in a few days!

What we care about here is [Steps per] for the z and x axis.

You can calculate this value as

(200 (steps per rev on a stepper motor) X 10 (microsteps per step on the drive))/Lead screw pitch.

Remember to click <Save Axis Settings> before you select another axis.

When you've done this, copy this text into notepad and load it as a GCode program

g94 g21
g01 g91 z10 F50
M01
m47

This will move the Z axis 10mm away from the headstock each time you press the start button. Don't stress if the direction is reversed, you just need to swap some wires...

In any case run the code and check that the saddle moves 10mm, change the [Steps per] setting in motor tuning to get it right.

PK


Return to “Whooshtronics”

Who is online

Users browsing this forum: No registered users and 1 guest