Author Topic: Automatic tool changer for the lathe  (Read 32498 times)

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1305
    • View Profile
Automatic tool changer for the lathe
« on: September 21, 2017, 12:17:52 pm »
   
   First Draft on a wireless bluetooth tool changer for my lathe
                                                     Dave Benson
                                       21/09/17

After building a CNC Lathe over the last two months, I've been thinking about
making a Automatic tool-changer.

I'm going to use a Arduino ATmega micro-controller with a Blue-Tooth Dongle so that there are no wires connected to the turret itself, It'll be totally self contained including a battery power pack with rechargeable batteries.

I've checked that Mach3 can communicate to the micro-controller through a tool change macro over a serial port and this is very easy to do.

I've looked at a few tool change macro's for automatic tool-changes on a mill and don't think there'll be any difficulty doing this for a Lathe.

It'll go something like this:

1. uncheck the Ignore tool-changes setting in Mach3
2. set the port eg. Com5 at 57600 baud
3. Before you run your G-code You'll have to Home the Tool-changer.
4. Then simply run your G-code and when a tool-change is called for the start and end macro's will be ran.
5. The start macro will simply send a request for a tool-change and a tool number  1 through 8 .
6. The controller will move to a defined G28 and engage the new tool position and send an acknowledgement that this has happened and that no errors were en-counted.
7. The end macro will either flag that an error has occurred  or restart mach3
to continue with the rest of the program.
   
Later on when the system works, I may save the tool number to the EEprom on the controller so that it doesn’t need to be homed.

I think I'm going to go with a Ratchet and Pawl system as this means that I only need one stepper motor and no breaking mechanism. This also means that the tool changer can only move in one direction but this won't mean much to me as this is not a production lathe.

The first pic is the bluetooth transceiver and the second is of a hub of a large ford front wheel assy which I'll take apart to see if it can be used as the turret body.

 Dave


Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4323
    • View Profile
Re: Automatic tool changer for the lathe
« Reply #1 on: September 21, 2017, 12:25:19 pm »
Dave,
Interesting !
If you are using s ratchet & pawl then a simple linear actuator would turn it
Made in England

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1305
    • View Profile
Re: Automatic tool changer for the lathe
« Reply #2 on: September 21, 2017, 12:38:22 pm »
HI Eddy
I'm not sure yet, I looked at a lot of you tube vids on various builds, horizontal and vertical, I think at this
stage I'm leaning towards a pulley or gear bolted around the periphery of the plattern.

It would be nice to keep all the swarf out of the works though so an inline vertical position where the motor is integral to the unit would do that, I'm busy cading up lots of alternatives, so I'm not sure yet as to which way to go.

Dave

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1305
    • View Profile
Re: Automatic tool changer for the lathe
« Reply #3 on: September 21, 2017, 22:26:52 pm »
HI Eddy

I did look into a linear actuator, a miniature one and will keep that in mind.

As this tool changer is going to be battery powered I'm going to great length's to save power, so an actuator that you can turn power off while not changing tools is the way to go, so even a solenoid might work.

I also looked at a Stepper motor with a gearbox that only drew 0.4 amps while on.

I also realised that a ratchet and pawl system is only workable for vertical tool changers.

The problem here, is finding the room to mount it vertically and still keep the working envelop of the machine the same.

Dave

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1305
    • View Profile
Re: Automatic tool changer for the lathe
« Reply #4 on: September 23, 2017, 00:53:29 am »
A small update on the tool changer.
I've written the code for the tool changer for the micro-controller.

I've connected the micro-controller to a bluetooth module and have it talking to the pc through a bluetooth dongle.

I've spotted on youtube this Mach3 tool change screenset https://www.youtube.com/watch?v=f0de3r-EKos&t=126s(which is very well done) and will soon write the tool change macro's for this tool changer.

I've dissembled the wheel hub and now I'm off to machine the tool change platen (six tools).

Dave 

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1305
    • View Profile
Re: Automatic tool changer for the lathe
« Reply #5 on: September 25, 2017, 08:45:08 am »
Another small update.
I've milled the hub to take the tools (6) and machined everything concentric.

Next I have to extend the shaft at the rear of the turret to take the pawl and attach the stepper motor.

The stepper I've ordered is a small Nema 17 with a 27 to one gearbox rated at 4 nm at 0.4 amps per phase.

I've ordered a shield for the Arduino compatible with blue-tooth.

I've discovered that the scripting language (Cyprus) has only a SendSerial function and not a receive, which would mean that in the marco I would send a tool change position and the wait a while, while the tool changer changes the tool rather that having some feedback that tell Mach3 that the tool was changed and everything was ok.

I've downloaded the SDK for Mach3 and am looking at doing the tool changing as a plugin that way, as you can get feedback from the tool-changer.

Dave

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1305
    • View Profile
Re: Automatic tool changer for the lathe
« Reply #6 on: September 28, 2017, 09:46:00 am »
A little more progress.

I've made the ratchet and pawl, and have tested it's accuracy to index and hold center height.
I can't do much now until the stepper motor and the tooling arrives, so I've started on a plugin for mach3 as (plan A)
and developed a plan (B) using two arduino's master and slave HC-o5 and HC-06 bluetooth units with one connected to the serial port in case plan A go'es amiss.

Dave

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1305
    • View Profile
Re: Automatic tool changer for the lathe
« Reply #7 on: September 30, 2017, 13:19:25 pm »
HI All

I've made some clamping wedges to hold the tools in the turret, and they work very well, once tightened up the tools are very rigidly held and I don't think the tools will work loose at all.

I've made progress on the plugin for Mach3, but still have a way to go yet.
I still have to write the tool change macro, but have been putting that off until the mach3 plugin is done and tested.

Dave
 

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 2915
    • View Profile
Re: Automatic tool changer for the lathe
« Reply #8 on: October 01, 2017, 17:48:13 pm »
It looks like you making good progress. I'm looking forward to short video to see how it all works when the project is completed.
My 2¢

Win 10 64 bit, CB [1.0} rc 1 64 bit, Mach3, ESS, G540

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4323
    • View Profile
Re: Automatic tool changer for the lathe
« Reply #9 on: October 01, 2017, 18:07:27 pm »
It looks like you making good progress. I'm looking forward to short video to see how it all works when the project is completed.

+1
Made in England

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1305
    • View Profile
Re: Automatic tool changer for the lathe
« Reply #10 on: October 07, 2017, 01:32:25 am »
Another small update
The stepper motor arrived yesterday (no motor shield or tools yet).

I've programmed the micro-controller for the Turret so I used a l298 stepper driver that I had on hand to test it out.
Because I want to battery power this turret, I had selected a 0.4 amps per phase motor and gearbox 3nm with a peak of 5nm.
I have set quite a bit of pre-load on the angular contact bearings and hoped the motor would drive it ok, and it does.

To give the motor a fighting chance I programmed a motion translator with a trapezoidal wave form, that is to say that it accelerates up to a preset velocity, motors along at that velocity  and then decelerates to a stop.

I've also used Full step "Alternate" mode to drive the motor (Both Phases on at all times).

I've also added to the code a Parking feature so that the pawl is tightened up against the ratchet after the move is complete and the backlash "from the couple-er" is compensated for.

I've uploaded a 30 second vid of the tools changing, Although the sound isn't very good, at the very end you can here the Acceleration/deceleration and parking feature happening.

Dave
https://youtu.be/Ktaylp2ilBY

Offline Bubba

  • CNC Jedi
  • *****
  • Posts: 2915
    • View Profile
Re: Automatic tool changer for the lathe
« Reply #11 on: October 07, 2017, 12:29:07 pm »
I like it!
My 2¢

Win 10 64 bit, CB [1.0} rc 1 64 bit, Mach3, ESS, G540

Offline EddyCurrent

  • CNC Jedi
  • *****
  • Posts: 4323
    • View Profile
Re: Automatic tool changer for the lathe
« Reply #12 on: October 07, 2017, 21:14:53 pm »
Nice job Dave !
Made in England

Offline dave benson

  • CNC Jedi
  • *****
  • Posts: 1305
    • View Profile
Re: Automatic tool changer for the lathe
« Reply #13 on: October 11, 2017, 05:13:45 am »
Another small update.
Two of the tool holders  turned up but not the rest (ordered the same day), so I've made the outer casing
and continued on with the plugin.
So now I can Start, Stop and Feed Hold Mach3 from the tool turret screen as well as home the turret and give it some manual commands like, home and move to tool and have finally got it to talk over the bluetooth module and able to pass commands back to Mach3 (I only wanted to do this to tell Mach3 that the tool was changed and it was ok to move on with the code or else halt and signal an error).

The two "threading tool holders" that turned up look nice, But I can see no way that left hand tool holder could work
as a threading tool holder, as the insert is pointing at the wrong orientation to cut effectively, so maybe you need to buy a different insert to suit.

Dave
 

Offline lloydsp

  • CNC Jedi
  • *****
  • Posts: 8228
    • View Profile
Re: Automatic tool changer for the lathe
« Reply #14 on: October 11, 2017, 11:26:40 am »
Dave,
The left-hand threading insert is often used for inside threading of tubular stock, and indeed, the inserts are defined as 'left hand', meaning the engagement angle is reversed from that of a right-handed tool.

LLoyd
"Pyro for Fun and Profit for More Than Fifty Years"