using this Arduino Library: https://github.com/CMB27/ModbusRTUSlave
Library Mirror, in case original breaks: https://github.com/travis-farmer/ModbusRTUSlave
GitHub Repo of my WIP demo code (likely non-functioning, yet): https://github.com/travis-farmer/modbus_slave_lcnc_changer
Project intentions: for my LinuxCNC powered CNC router table, a tool changer magazine that is automated using an Arduino MEGA2560, with ModBus control.
Initial testing remarks: the base level test was a success! using MB2HAL, a LinuxCNC component, i was able to attach a HAL pin to the Arduino LED (pin 13) that followed the machine enable/disable control. also i was able, in HAL Watch, to view the values from the Arduino's 16 ADC channels.
my first thought was to build a Matrix tool magazine. it would be like a CNC router table, turned up on it's side so that Y was still forward and back, X is up and down, and Z picks and places the tool holders. the 3 axis could be controlled via an Arduino running GRBL. this system, while it would be fun to build, would be complex to program. i would need to either have a lookup table of each tool location (may be very possible), or i would need to calculate the location of the tool based on the location of the first tool. both have their merits, but i think the lookup table sounds the best, as i can populate the table using calculations, but i would be able to make adjustments for each tool pocket, in case something was a little off.
the next thought was to build a tool pocket chain, though this was soon realized to be costly, for just a little bit of storage.
then there is the tool carousel method. this may be the end result, though the tool disk would require a lot of space.
so what one would be the best to build? i think the Matrix would be the most fun, and could have a lot of tool storage. it could be made to fit along side, and only project high enough above the table to allow the transfer arm to clear the table and work-piece.
whatever design i work on, i will need to make sure i have as much Z-axis height o my machine as i can get, so the changing of the tools is not in the way of the work-piece. currently i have more Z-axis travel than i can use. so i need to lift the Z-axis up, and lower the spindle mount on it. this will need to be adjusted with a tool-holder and my shortest tool installed. that way, when the Z-axis is lifted to machine zero, it is way up in height, and i can use this extra clearance for the tool change location, and the max material thickness clearance will be much thicker than i need.
on the Matrix magazine, i had thought of having the stepper motors drive a timing belt pulley, on the Axis, with the belt attached at both ends, but as time goes on, the belt could stretch and change the tool pocket coordinates. a ball screw would be too slow for any good response, so the best option is a rack and pinion drive. there won't be any heavy duty work done, so the magazine could be made from sealed plywood. as well as the gantry. the gantry will be a long triangle, with the drive at the top. rather than slides, i could really use roller-blade wheels. 6 at the top, 3 at the bottom. they will be mounted with two on the top of the gantry to support the weight, and two on the front and back faces to keep the top wheels from rolling off the edge. the bottom will be similar, but with just one set of wheels. the upper wheels will maintain square alignment. that will constitute the Y-axis.
the X-axis, on the gantry, will be similar, but with either some good slides, or 12 roller-blade wheels. Y-axis could use slides, but may be expensive for a long axis.
the Z-axis only needs enough travel to grab the tool-holder, and back out for moving to the change location, without hitting any other tool-holders.
now, to grab the tool-holder, i could have some 3d-printed jaws on a grabber, grab the BT30/ISO30 cone, and slide the tool-holder out of the fork. another option, if the tool-holder is upside-down in the fork, the grabber could just be a ring that moves in under the tool-holder, and then slips up around the cone, and pulls it out. then it moves up to the change location, where the transfer arm has a fork, pulls the tool-holder up out of the ring, flips the tool-holder right-side up, and transfers to the router table change location. the ring idea seems easier...
the transfer arm will have two sides. but how to move without interfering with the router table movements... perhaps it only needs one... if the tool magazine Z-axis had dual Z-axis, one to pick, and one to return... when it moved to the change location, it would move first the return grabber into position to take the returned tool-holder, then move the next tool into position to be transferred to the machine. once the tool-holder is taken, the magazine returns the returned tool-holder to it's pocket. for this to work, i would have to figure out the offsets between the two Z-axis. so for every return, it uses the offsets, and for every pick, it uses the actual locations.
Library Mirror, in case original breaks: https://github.com/travis-farmer/ModbusRTUSlave
GitHub Repo of my WIP demo code (likely non-functioning, yet): https://github.com/travis-farmer/modbus_slave_lcnc_changer
Project intentions: for my LinuxCNC powered CNC router table, a tool changer magazine that is automated using an Arduino MEGA2560, with ModBus control.
Initial testing remarks: the base level test was a success! using MB2HAL, a LinuxCNC component, i was able to attach a HAL pin to the Arduino LED (pin 13) that followed the machine enable/disable control. also i was able, in HAL Watch, to view the values from the Arduino's 16 ADC channels.
my first thought was to build a Matrix tool magazine. it would be like a CNC router table, turned up on it's side so that Y was still forward and back, X is up and down, and Z picks and places the tool holders. the 3 axis could be controlled via an Arduino running GRBL. this system, while it would be fun to build, would be complex to program. i would need to either have a lookup table of each tool location (may be very possible), or i would need to calculate the location of the tool based on the location of the first tool. both have their merits, but i think the lookup table sounds the best, as i can populate the table using calculations, but i would be able to make adjustments for each tool pocket, in case something was a little off.
the next thought was to build a tool pocket chain, though this was soon realized to be costly, for just a little bit of storage.
then there is the tool carousel method. this may be the end result, though the tool disk would require a lot of space.
so what one would be the best to build? i think the Matrix would be the most fun, and could have a lot of tool storage. it could be made to fit along side, and only project high enough above the table to allow the transfer arm to clear the table and work-piece.
whatever design i work on, i will need to make sure i have as much Z-axis height o my machine as i can get, so the changing of the tools is not in the way of the work-piece. currently i have more Z-axis travel than i can use. so i need to lift the Z-axis up, and lower the spindle mount on it. this will need to be adjusted with a tool-holder and my shortest tool installed. that way, when the Z-axis is lifted to machine zero, it is way up in height, and i can use this extra clearance for the tool change location, and the max material thickness clearance will be much thicker than i need.
on the Matrix magazine, i had thought of having the stepper motors drive a timing belt pulley, on the Axis, with the belt attached at both ends, but as time goes on, the belt could stretch and change the tool pocket coordinates. a ball screw would be too slow for any good response, so the best option is a rack and pinion drive. there won't be any heavy duty work done, so the magazine could be made from sealed plywood. as well as the gantry. the gantry will be a long triangle, with the drive at the top. rather than slides, i could really use roller-blade wheels. 6 at the top, 3 at the bottom. they will be mounted with two on the top of the gantry to support the weight, and two on the front and back faces to keep the top wheels from rolling off the edge. the bottom will be similar, but with just one set of wheels. the upper wheels will maintain square alignment. that will constitute the Y-axis.
the X-axis, on the gantry, will be similar, but with either some good slides, or 12 roller-blade wheels. Y-axis could use slides, but may be expensive for a long axis.
the Z-axis only needs enough travel to grab the tool-holder, and back out for moving to the change location, without hitting any other tool-holders.
now, to grab the tool-holder, i could have some 3d-printed jaws on a grabber, grab the BT30/ISO30 cone, and slide the tool-holder out of the fork. another option, if the tool-holder is upside-down in the fork, the grabber could just be a ring that moves in under the tool-holder, and then slips up around the cone, and pulls it out. then it moves up to the change location, where the transfer arm has a fork, pulls the tool-holder up out of the ring, flips the tool-holder right-side up, and transfers to the router table change location. the ring idea seems easier...
the transfer arm will have two sides. but how to move without interfering with the router table movements... perhaps it only needs one... if the tool magazine Z-axis had dual Z-axis, one to pick, and one to return... when it moved to the change location, it would move first the return grabber into position to take the returned tool-holder, then move the next tool into position to be transferred to the machine. once the tool-holder is taken, the magazine returns the returned tool-holder to it's pocket. for this to work, i would have to figure out the offsets between the two Z-axis. so for every return, it uses the offsets, and for every pick, it uses the actual locations.