DIY Tool Changer

More
25 Apr 2019 13:51 #131851 by michaelrommel
Dear all,

I have just started with LinuxCNC, using a Mesa 7i76e card and I want to build a carousel style tool changer for my spindle, using an Arduino / ESP32 as the controller for the carousel.

Now I tried to get my head around the netting of the signals and if I understand it correctly, I could net the tool−number iocontrol.0.tool−prep−number => to a pin on the Mesa Card. This would then spit out 32bits containing the number of the pockt for the tool.

Is that assumption correct? I have no idea, how that serial communication is configured, like baud rate etc.Or am I completely on the wrong track. I was unable to find really anything out there, where someone build an ATC. All threads here I could find are mainly on how to connect an existing ATC to LinuxCNC, but also I could not find any further in-depth HW info, how these work.

The closest I could find, was someone writing a python program that talks to LinuxCNC and then uses USBSerial to talk to the Arduino (github.com/mardini1974/ATCduino).

Has anyone some pointers, that could help me proceed?

Thanks in advance!

Michael.

Please Log in or Create an account to join the conversation.

More
25 Apr 2019 14:03 #131852 by pl7i92
Replied by pl7i92 on topic DIY Tool Changer
Linuxcnc has a Carosell comp and a M6 remap that does all the stuff for you
no need for arduino
Direct wire to the 7i76
linuxcnc.org/docs/html/man/man9/carousel.9.html
The following user(s) said Thank You: michaelrommel

Please Log in or Create an account to join the conversation.

More
25 Apr 2019 21:09 #131890 by tommylight
Replied by tommylight on topic DIY Tool Changer
Since you have the 7i76 is it has any stepgens free you can drive the tool changer that way, and it has plenty of IO's
As PL7i92 said, you can do all that in Linuxcnc, and even if you use an Arduino or ESP32, do not use the serial interface. Use pins wired to Mesa IO's. For an 8 pocket tool changer you would need 3 in and 3 out plus the change tool and tool changed signals.
The following user(s) said Thank You: michaelrommel

Please Log in or Create an account to join the conversation.

More
26 Apr 2019 09:04 - 26 Apr 2019 10:38 #131935 by michaelrommel
Replied by michaelrommel on topic DIY Tool Changer
Hey there,

first of all thanks very much for the quick replies!

Reading through the carousel documentation, I now understand this a bit better, let me summarize my understanding and let's say I am building a 16 slot toolchanger.

loadrt carousel pockets=16 encoding=gray num_sense=4 bidirectional=2

I would then build the toolchanger by using either an Arduine to control the stepper motor to forward/reverse the pockets and generate the gray code for the current position on Arduino pins, which are hooked up to the 7i76 and are configured as carousel.0.sense-0..3 Or I could build it without an Arduino, by hardwiring the pockets to deliver the gray code for that pocket directly.

When the gcode specifies a M6 command, it has been remapped to execute the toolchange.ngc gcode. There the M64 P0 command activates the digital line mapped with:

net <7i76 pin> motion.digital-out-00 carousel.0.enable

and the other lines for active and motor-fwd/rev.

Then the carousel hardware starts the motor in the appropriate direction and reports continuously the gray code position. It stops, when motor control is set to 0.

So my misunderstanding was, that the desired position is not transmitted directly in an encoded format to the toolchanger hardware, but instead just a motor is started and stopped, when the reported position matches.

It is now a lot clearer, thanks to you!

Michael.
Last edit: 26 Apr 2019 10:38 by michaelrommel.

Please Log in or Create an account to join the conversation.

More
26 Apr 2019 13:43 - 26 Apr 2019 13:43 #131953 by andypugh
Replied by andypugh on topic DIY Tool Changer
The latest version of carousel.comp has velocity as well as bit outputs
linuxcnc.org/docs/devel/html/man/man9/carousel.9.html

You can set up a velocity-mode step generator and link that directly to carousel.
Last edit: 26 Apr 2019 13:43 by andypugh.
The following user(s) said Thank You: TimGow

Please Log in or Create an account to join the conversation.

More
02 Jun 2019 16:47 #135645 by gmarconi2
Replied by gmarconi2 on topic DIY Tool Changer
I did exactly what you want to do, with arduino, look at my posts
The following user(s) said Thank You: akb1212

Please Log in or Create an account to join the conversation.

Time to create page: 0.077 seconds
Powered by Kunena Forum