Introduction: DIY Automatic Tool Changer for MPCNC

This automatic tool changer is specific to the Mostly Printed CNC, or MPCNC and unlike most tool changers, the mechanism replaces the entire router rather than attempting to switch out only the cutting bit. It is mechanically much simpler to swap the entire router than to develop a system that can exchange the bit within a collet that was not designed for automated changing.

Swapping routers incurs some additional cost, since multiple routers must be purchased, but multiple inexpensive spindles are still cheaper than a professional tool-changing solution. In addition, it allows switching between vastly different tools. In theory it would be possible to have a router, solder paste extruder, vacuum pick and place, and heat gun all in one machine.

This design is made to fit the latest MPCNC Primo of the "J" variety which uses 1" (25.4 mm) OD tubes. This Instructable assumes you already have a working Primo "J" machine and wish to add an automatic tool changer.

This tool changer uses a similar concept as the E3D tool changer system, which is also used in the Jubilee tool changing 3D platform. The primary difference is that two cleats are used instead of one, and stiffer preload springs allow a stronger grip on the tool. Another major design goal is to require no odd small hardware from McMaster-Carr, instead using only parts that can be found locally (in the US) or inexpensively from Amazon.

This is an advanced project that is likely to require substantial problem-solving to get working. There are probably many failure modes that I am not aware of, and that this guide does not anticipate.

As a matter of safety, never leave your DIY CNC machine unattended. Fires can start extremely quickly. What's the point of an automatic tool changer if you have to babysit the machine anyway? Automatic tool changes are still easier than manual ones, even if it is not unattended.

All 3D printable STL files are available on GitHub here, together with the OpenSCAD source files for the parts that I created: https://github.com/vector76/mpcnc-tool-changer

A note on licensing: The MPCNC is released with a NC (noncommercial) license that restricts the sale of printed parts but does not restrict other commercial use. Some of the parts in this design are derived from those parts and therefore inherit the NC restriction. All parts that are not derived from MPCNC parts shall have a CC-BY-SA license.

Supplies

You must have a working Primo "J" CNC machine.

You will need a 3D printer and less than one kg of PLA filament, or a friend with a 3D printer.

For the tool changer you will need:

  • 5mm metal rod
  • 3mm metal rod
  • 8mm balls
  • #6-32 machine screws and #6-32 nylon nuts
  • #6 x 1/2" sheet metal screws
  • Piano wire, 0.032" (used for preload springs)
  • Piano wire, 0.047" (used for making servo pushrods)
  • Fishing line, Dyneema 50 lb tes
  • Loctite "blue"
  • CA glue
  • Hot glue
  • 1" OD tube, 7.75 inches or 197 mm

You will also need these items below which are extra copies of parts that are already necessary for the MPCNC Primo build, so if you are building from scratch, you can buy extras to be prepared for the tool changer build.

  • 5/16" bolts, 1.5" long and nylon-insert lock nuts
  • 608RS bearings
  • M5 x 30mm bolts and nylon-insert lock nuts
  • M3 x 10mm bolts
  • 1x NEMA 17 motor

Also, not necessary but strongly recommended is to build an entire separate Z axis that can be swapped out, rather than cannibalizing your existing Z axis. This will require:

  • 1x NEMA 17 motor
  • 1x Lead screw
  • Lead screw coupler
  • 2x extra Z rail, 16 inches long or 406 mm
  • Extra copies of parts from MPCNC Primo: "z motor" and "z coupler"

You will need some plywood from which to cut the carousel plate, which has a diameter of just under 16 inches, or 406 mm.

The 3D printed parts you will need are:

  • motor_mount.stl 1x
  • dw660_hanger.stl 2x (one for each tool)
  • tool_hanger.stl (not required, used for test fitting hangers onto hooks)
  • tool_parking.stl 2x (one for each tool)
  • base_roller.stl 3x
  • base_roller_cap.stl 3x
  • cap_bearing_holder.stl 1x
  • cap_bearing_struts.stl 1x
  • carousel_corner_post.stl 1x
  • carousel_gear_motor.stl 1x
  • carousel_gear_wheel.stl 1x
  • universal_tool_plate.stl 2x (one for each tool)
  • core_addon_short.stl (not reqiured, potentially handy to convert back to "short" center assembly without flipping it over again)
  • core_addon.stl 1x
  • back_plate.stl 1x
  • servo_bracket.stl 1x
  • pulley.stl 2x
  • tool_plate.stl 1x (used for test-fitting)
  • plate_b.stl 1x
  • plate_a.stl 1x
  • drill_guide.stl (not required but potentially handy for drilling 3mm hole in 5mm rod)
  • wire_string_link.stl 2x

You will also need some extra MPCNC parts of the previous version:

Step 1: Build MPCNC Primo "J"

If you haven't already, you must complete the MPCNC before proceeding with the tool changer build. You do not want to be struggling with the tool changer and the underlying machine at the same time.

To build the MPCNC you can source your own electronics and hardware and print your own plastic parts, or you can buy some or all of the machines from V1 Engineering. Either way, instructions are fairly easy to follow and help is available on the V1 Engineering forums.

To reiterate, for the tool changer to be compatible, you must build the Primo (not the earlier variants) and it must be the "J" variant that uses tubes with 1" (25.4 mm) outside diameter.

Also it is recommended, and this Instructable assumes, that you build a second separate Z axis to replace the standard Z axis, rather than cannibalizing the Z axis for the tool changer. This provides the option of switching back to standard tool mounts for non-tool-changing jobs.

Step 2: Adjust Firmware and Re-flash

Using the standard V1 CNC firmware (as of version 504) only two changes need to be made to support the tool changer:

  1. Enable at least one servo. This near the bottom of Configuration.h set NUM_SERVOS to 1 or more.
  2. Define Extruder steps per unit to 177.777. This can also be achieved via gcode M92 E177.777. Save with M500. (If you are using 1/16th microstepping then use 88.888 steps per unit (degrees) via M92 E88.888.)

To minimize strain on the carousel, set E acceleration to 30 degrees per second per second. Use the gcode command M201 E30. Save with M500.

Assuming you are not using an unusual stepper, most NEMA17 steppers have 200 steps per revolution, which at 1/32 microstepping yields 1/6400 microsteps per revolution. At 360 degrees / 6400 steps, the resolution is 17.777 steps per degree of rotation of the motor. The large wheel has exactly 10 times the teeth of the small wheel, so steps per degree of the carousel plate is 177.777.

Step 3: Cut Carousel Plate

Cut out plywood wooden carousel plate from carousel_plate.dxf. This does not need to be high precision, and it could be done with a printed paper template and hand tools, but since you have a CNC machine, you might as well use it to cut this piece. If the machine is partly disassembled, it may not be feasible to cut out this part later, so it’s recommended to cut it out first.

Step 4: Build Cleats and Bushings

Cut two 5mm rods to 26mm length.

Cut two 3mm rods to 13mm length.

Drill a 3mm hole in the 5mm rod that is 4mm from one end and 22 mm from the other end.

It can be rather tricky to drill a hole that is centered and perpendicular. The printed part drill_guide.stl is intended to help. Plastic makes a poor drill guide because it cannot support the lateral forces of the drill bit wandering to the side. To properly use the drill guide, use some other material like wood, aluminum, or steel. Steel is shown. Drill a 3mm hole in the steel. Then align the hole in the steel with the hole in the drill guide. Once aligned, secure the steel to the plastic drill guide. Then drill from the metal side (not the plastic side) so that the metal supports the drill bit from wandering laterally.

Fit the 3mm rod in the 3mm hole. Center it with equal length sticking out each side. Apply blue Loctite and twist / move the 3mm rod gently to allow it to wick into the gap. Wipe away excess Loctite and set aside to harden.

The bushing/pulley (pulley.stl) must accept the 5mm rod but depending on the printer, it may be a tight fit. It might be necessary to ream the hole to be 5mm in size.

It is fairly simple to make a "reamer" for plastic using some extra 5mm rod. Using an angle grinder or a hacksaw, cut one or two notches in the side at the end of the rod. This need not be a sharp cutting edge, but when used in a power drill it is effective at scraping the inside bore until the hole is 5mm in diameter. This homemade reamer is also used in a later step.

Step 5: Tie String Onto Pulley

Cut four lengths of string at least 425 mm each. (Excess length will be cut off later.) Thread each string through the pulleys and tie as shown.

  1. Thread from outside to inside and out the ‘back’ (the back is the side without the protrusion).

  2. Then thread through the hole from back to front.

  3. Then thread through the other hole from front to back.

  4. Tie a figure-8 stopper knot near the free the end of the string.

  5. Pull the stopper knot tight.

  6. Tie an overhand knot around the loop. This effectively produces a slipknot through the two holes in the pulley.

  7. Pull firmly on the opposite end to tighten the loop. The slipknot will tighten around the holes in the pulley.

  8. Pull very hard on the string and the overhand knot will slip toward the free end of the string. It will slip until it reaches the stopper knot and it won't move any further.

Repeat three more times for three other strings such that both pulleys each have two strings attached.

After the pulleys have strings attached, place 608 bearings on the bushing and insert the 5mm/3mm metal cleat into the central bore.

Step 6: Assemble Tool Changer Plate and Test Blank

Cut six pieces of spring wire (0.032" diameter) to length of approximately 61 mm. Install into holes in "plate_b.stl" as shown.

Use a thin layer of CA glue to glue the flat side of "plate_a.stl" to the flat side of "plate_b.stl".

Install 6 balls into "tool_plate.stl". Squeeze tightly with pliers or hit firmly with a hammer to ensure the balls are fully seated. If the part is printed properly, the balls should remain in place without glue. The side opposite the ball bearings has the ramp feature for testing the ability to grab.

Step 7: Set Tension (Preload) by Setting Length

Install cleat/bushing assembly into plate (without back).

Place test blank onto plate. Adjust rod axially within bushing until cleat depth is ‘just right’ to engage the ramp at approximately a 30-degree angle when turned gently with your fingers.

This would be the final position if no preload were applied. The desired preload is 3mm from this position. This means the cleat should be glued into the bushing retracted by 3mm from this position. Even though it is effectively "too short", it will be pressed forward to the correct depth by an adjustment screw in a later step, and this is what produces the preload.

Remove cleat+bushing assembly from plate. Measure depth. Retract by 3mm and mark position. Then use CA glue to secure permanently in place at the marked position.

Repeat for the other cleat assembly.

Step 8: Install Cleat Assemblies Into Plate and Plate Into Z Axis

Install cleat/bushing assemblies into plate and thread cords around pulley and through the openings. Tape string in place to prevent it from coming off of the pulleys.

Install plate onto Z axis rails using #6-32 hardware. This requires the “Burly” nut traps which accommodate #6-32 nuts. The standard Primo method uses M5 nuts and bolts, but the screw heads are too large.

Step 9: Install Back Plate and Adjust Depth

Install plate back using four #6 sheet metal screws.

Install two M3 adjustment screws in the center two holes, which are directly behind the cleats. By adjusting these M3 screws, the cleats are pressed forward.

Adjust the depth using the M3 screws and turn the cleats by pulling on the string. The depth is set correctly when the cleat begins to engage the ramp at approximately a 30 degree angle. Due to the friction from the M3 screw pressing on the back of the metal rod, it will require a bit of force to turn the cleats, but it should still be apparent where the cleats engage the test plate.

Step 10: Create Pushrods, Attach to Servo, and Install Servo Into Z Axis

With a servo enabled in the firmware and wired properly, move to 0 and 120 using commands "M280 P0 S0" and "M280 P0 S120" to confirm the range of motion.

If necessary, adjust servo horn such that it is nearly parallel to the body of the servo when in position "M280 P0 S0". Note: it should rotate counter-clockwise when moving from S0 to S120, and clockwise when moving from S120 to S0.

Create pushrods by cutting pushrod wire (thick wire of 0.047” diameter) to approx. 115mm in length and bending as shown. The “Z” shaped end will attach to the servo horn and the “L” shaped end will attach to the part "wire_string_link.stl". Note that the L-shaped bend is not quite 90 degrees. This is intentional. The length of the "L" part must be between 8 and 10mm.

Install L-shaped bend in the wire into the wire-string link and press into the channel. If necessary, use a screwdriver to press the wire into the channel. It should positively snap into place without any play. Install the ‘cap’ by sliding over the Z-bend and snapping into place on the end of the wire-string link. This may be overkill but is intended to prevent the wire from coming out of the channel.

Install Z-bends of pushrods into servo horn.

Install servo into servo bracket.

Attach servo bracket onto Z axis using #6-32 screws and nuts.

Step 11: Attach Pulley Strings to Wires (via Wire-String Link)

Orient cleats horizontally. This is the ‘disengaged’ position. Move the servo to the “10” position using command M280 P0 S10. Carefully thread the string through the hole in the end of the wire-string link. Feed through twice for a bit of extra security.

Then feed through the hole in the side, and then wrap around the "pincher cleats". These are similar in spirit to the old, familiar notches in spools for holding thread in place (shown for reference), except that by having multiple narrow v-shaped grooves and multiple wraps, it can hold very securely, and no knots are necessary. Wrap around at least twice through each notch.

Repeat for the other three strings to secure both strings for both pulleys. Visualize the direction that the servo will turn when rotating from "disengaged" to "engaged", and ensure that the strings are attached so that the cleats will turn the same direction.

Ensure strings are tight. If strings are not tight, or if cleats are not at the same angle when in the unlocked position, unwrap and re-wrap so that they are. This may require 3 or 4 attempts to get right.

Move servo in small increments using M280 P0 S<position> to determine the ideal locked and unlocked positions. Write down these positions for reference.

Test locking and unlocking using the test plate. This uses the same plate that was used in setting the depth. Confirm that the servo can grab the test plate and release it.

Step 12: Flip Core and Install Z Axis

Installing the Z axis into the MPCNC requires a modified core that is taller than the standard Primo core. The reason for this is so the Z axis can reach extra high. Without this extra height, it is problematic for the tool carousel to reach the tool changer mechanism while still clearing the side rails.

The modified core is achieved by flipping the standard core upside-down and then adding an extender on top. The standard core is mostly symmetrical but has a flange with holes for mounting extra things along the bottom. When flipped, these mounting holes are used to secure the extension.

After removing the standard Z axis, remove the leadscrew nut from the top of the standard core. Loosen the gantry rails and slide them out axially to free the core.

Swap the location of the Y-axis clamp to the proper location. This is optional but without this you will lose a bit of workspace in the Y direction. Reinstall core upside-down.

Install six bearings into the core extension in the same way that bearings were installed on the standard core. Leave the outside bolts loose for now. Install extension on top of the standard core. Use M5 bolts and nuts to loosely attach the extension.

Install the Z axis through all the bearings in the core and extension. Once the Z axis is in place, tighten down the Z axis bearings of the extension. Then tighten down the M5 bolts attaching the flanges together.

Step 13: Mount Tools Into Tool Holders

(Currently only mounting parts for the DW660 have been created.)

Print the generic tool mount "universal_tool_plate.stl". Install six ball bearings into the sockets and squeeze firmly with pliers or pound with a hammer to ensure they are fully seated. Print the Burly mount for the DW660 parts, 660_Low_Mount_V1.stl and 660_Upper_Mount_V1.stl. (The “lock” pieces of the standard DW660 mount are not necessary.)

IMPORTANT: the tip of the locking cleat, specifically the tip of the 5mm rod, may collide with the DW660 mounts and prevent engagement to the proper depth. If this happens, the mechanism can jam when it attempts to rotate, which can break things. To prevent this from happening, drill 1/4" holes into the DW660 mounts directly between the attachment screws. You may drill 3/8” holes if you want to be extra safe.

After the holes are drilled, attach these parts to the universal tool plate.

The "dw660_hanger.stl" part takes the place of the “Lock” pieces of the DW660 mount and also includes features for hanging the tool in its parking spot. Print this piece and use it to secure the DW660 in place. Unfortunately, this piece requires a lot of support to print properly.

Step 14: Replace Corner Top With Carousel Holder Post

Loosen both belt holders on front-left corner and remove X belt holder from corner. Remove corner top and replace with carousel_corner_post.stl. Reinstall belt holders and retighten belts.

Install 25.4mm tube into corner post and install one #6 sheet metal screw to secure. This does not need to be extremely tight; it just needs to remove play (if any).

Install large gear wheel (carousel_gear_wheel.stl) onto corner post and use three #6 sheet metal screws to attach to the corner post. Be sure that the screws enter first through the hole in the gear wheel and then secure into the holes in the corner post. (The gear wheel holes are oversized so as to not engage the threads, and the corner post holes are smaller, so they do engage the threads.)

Install cap_bearing_holder.stl onto the top of the tube and install a bearing onto the bearing holder.

Step 15: Assemble and Install Carousel Plate

Attach the “rocket” piece (cap_bearing_struts.stl) to the carousel plate, attempting to get it approximately centered. Use six #6 sheet metal screws to attach the rocket to the carousel plate.

Place assembled carousel plate and rocket onto the carousel post. The bearing at the top of the carousel post should fit snugly within the tapered ‘nose’ of the rocket.

Install a bearing into each of the small base_roller.stl pieces and use a #6 screw and a base_roller_cap.stl piece (basically a washer) to firmly secure. Use #6 screws to attach these rollers around the base of the rocket to roll against the metal tube and hold the carousel plate horizontal. Adjust as necessary until the plate is horizontal and the bearings are tight against the tube so there is no play. It may be helpful to firmly tap the rollers toward the center tube to get a tight fit. I used a wrench as shown because it's heavy enough and it's flat.

Step 16: Install Carousel Stepper

Install the carousel_gear_motor.stl onto the stepper motor. Use two #6 screws to tighten the gear onto the stepper shaft. Avoid cracking the plastic if possible.

Place the stepper into the motor_rigid_mount.stl bracket with the gear pointing down. Use one #6 screw to gently tighten the strap around the motor and slide the motor downward until it is at the proper height to engage the larger wheel gear.

Holding the gear so that it engages with the wheel gear, mark the location of the mount holes. Drill pilot holes into the wood and secure the motor mount to the carousel plate. Spin the carousel all the way around to confirm that the motor engages the wheel gear properly all the way around.

Attach extension wires if necessary and connect the stepper to the E0 extruder stepper port on the control board.

Assuming you have flashed the firmware as described in the earlier step, check that the carousel rotates by the proper amount by entering G1 E90 F300 and check that it rotates by 90 degrees at a reasonable speed.

Step 17: Install Tool Parking Spots

Print one tool_parking.stl for each tool and cut three segments of 5mm rod, with a length of 20mm each. The segments of rod will act as hooks for the tool to hang on.

The rods may have difficulty fitting within the printed part, since printed parts tend to have inaccurate hole sizes. If necessary, use the 5mm reamer to enlarge the hole for the 5mm rod to fit. Bevel the ends of the rods to make it somewhat more tolerant of misalignment, and then glue the rods in place using CA glue.

Arrange the parking hook such that it hangs slightly off the edge of the disc. Drill pilot holes and use four #6 screws to secure the parking hook to the carousel plate.

Place the tool on the parking hook and gradually move the tool change mechanism up to the interface to check if it is aligned properly and perpendicular. Shim the corners of the parking spot as necessary to align the tool change mechanism with the tool.

Repeat this step for each tool.

Step 18: Manually "Home" Machine and Measure Offsets

Jog machine to the position to engage the first tool (while parked
in the first parking spot). Perform G92 X0 Y0 Z0 E0 to set this as the zero position to measure other offsets relative to this position.

(Do not engage servo to grab tool. We’re just measuring position offsets.)

Disengage tool by moving in +X and +Y direction with G1 X50 Y50 F300.

Slowly rotate tool with G1 E F20 until the second tool is approximately lined up with the tool mount. Slowly move tool mount toward the tool and adjust the rotation to engage the tool mount with the second tool. Some Z adjustment might be necessary depending on the physical alignment.

Once the second tool is seated, determine the offset from the first tool by issuing the command M114 and recording the position. Repeat for any additional tools, recording for each tool the position relative to the first tool.

In my case the X offset was 4, the Y offset was -2, the Z offset was -1, and the E offset was -69.18.

Also record the angle (E value) required to rotate the empty section of the carousel wheel into position. This maximizes the working space and reduces the chance of collision with other parked tools. In my case this offset was +70 (or close enough).

To use a workspace relative to the workpiece while also
having the ability to pick up and drop off tools, use two workspaces, one for tools and one for changing tools:

  • G54 is the workspace for mounting and unmounting tools, with X=0 Y=0 Z=0 E=0 corresponding to engaging the first tool
  • G55 is the workspace relative to the workpiece

Note: this is a simplified method that does not account for offsets between tools when mounted.

Define these scripts for parking and unparking each tool:

Pick up tool 0:

G54
G1 X100 Y100 Z0 F1200     ; move tool mount diagonal from parking spot
G1 E0 F300                ; rotate tool into place
G1 X8 Y8 F1200            ; move close to picking up the tool
G1 X-0.5 Y-0.5 F300       ; slowly insert locking cleats into tool
G4 S0                     ; do not engage servo before movement finishes
M280 P0 S110              ; engage cleat using servo
G4 S3                     ; wait for servo to finish movement
G1 X7 Y7 Z10 F200         ; raise up and out diagonally at 45-degree angle
G1 X100 Y100 Z0 F1200     ; move away from tool parking spot
G1 E70                    ; rotate disc out of the way
G55

Drop off tool 0:

G54
G1 X100 Y100 Z0 F1200     ; move tool mount diagonal from parking spot
G1 E0 F300                ; rotate tool into place
G1 X7 Y7 Z10 F1200        ; move back (no offset needed)
G1 X0 Y0 Z0 F100          ; slowly place back onto pins
G4 S0                     ; don't move servo until prior movement finishes
M280 P0 S0                ; disengage servo
G4 S3                     ; wait for servo to finish disengaging
G1 X100 Y100 Z0 F1200     ; go back out

Pick up tool N (includes offsets measured above)

G54
G1 X<100+offset> Y<100+offset> Z<0+offset> F1200
G1 E F300         
G1 X<8+offset> Y<8+offset> F1200
G1 X<-0.5+offset> Y<-0.5+offset> F300
G4 S0               
M280 P0 S110        
G4 S3               
G1 X<7+offset> Y<7+offset> Z<10+offset> F200 
G1 X<100+offset> Y<100+offset> Z<0+offset> F1200
G1 E70
G55

Drop off tool N:

G54
G1 X<100+offset> Y<100+offset> Z F1200
G1 E F300           
G1 X<7+offset> Y<7+offset> Z<10+offset> F1200   
G1 X Y Z F100     
G4 S0                
M280 P0 S0           
G4 S3                
G1 X<100+offset> Y<100+offset> Z<0+offset> F1200

Enter these commands one by one on the console, checking after each one that the behavior is correct. Be particularly careful when engaging the lock mechanism M280 P0 S because if the tool is not fully engaged it can jam the mechanism and break some parts which will have to be disassembled, re-printed, and re-assembled.

Step 19: Insert Scripts Into Job at Tool Changes

The overall workflow to cut a job would work as follows:

  1. Using Fusion or EstlCAM or your favorite CAM program, generate toolpath containing T0, T1, TN commands to switch between tools.
  2. At the first tool change command, replace Tx with the command to pick up the appropriate tool.
  3. At every subsequent tool change, replace the Tx command with the command to drop off the previous tool and pick up the new tool. (Ideally this would be automated with a postprocessing script, but I haven’t implemented this yet.)
  4. At the end of the gcode, insert the script to drop off the last tool that was used.
  5. Before executing the job, “Home” the machine by jogging the tool changer in X, Y, Z, and E so that it engages the first tool, like was done in the previous step. Perform G54 and then G92 X0 Y0 Z0 E0 to set this as the zero location of the G54 workspace.
  6. Pick up the first tool by executing the “pick up tool 0” script.
  7. Jog to the origin of the workpiece.
  8. Perform G55 and then G92 X0 Y0 Z0 to set this as the zero location of the G55 workspace.
  9. Drop off the first tool by executing the “drop off tool 0” script.
  10. Execute the gcode.

Unfortunately there is currently no mechanism to home the carousel. Homing the machine is possible and absolute coordinates would simplify the time-consuming and error-prone manual alignment of the tool changer and carousel. I haven't yet installed endstops for homing so I can't yet do this on my machine.

Step 20: Measure Mounted Per-tool Offsets

The above methodology assumes the tool location is identical regardless of which tool is mounted. This is roughly but not exactly true for multiple tools of the same type, like the DW660. For dissimilar tools like swapping between a pen, a router, and a Dremel, the position may vary a lot between tools.

To compensate for the distinct tool positions, first measure the positions relative to the first tool. This measurement can be accomplished using the G55 workspace. Mount the first tool and jog to a reference point. Perform G92 X0 Y0 Z0 to set this as the zero location of the G55 workspace.

Then park tool 0 and mount tool 1. Jog the new tool to the same reference point. The position might not be X=0 Y=0 Z=0 like it was for tool 0. Perform M114 to determine the relative position between tool 1 and tool 0.

Repeat for any other tools, and you have a table of offsets for the individual tools. These numbers are used as an example to illustrate the process. You must use your own offsets as measured.

            X offset Y offset Z offset
Tool 0 (G55)	 0	 0        0
Tool 1 (G56)	-5	-6      -11
Tool 2 (G57)	-1	 2       -5

Note that positive numbers mean that the gantry must be shifted in the positive X, Y, or Z direction to achieve the same effective location. Negative numbers mean that the gantry must be shifted in the negative X, Y, or Z direction to achieve the same location as tool 0.

Now instead of simply doing G92 X0 Y0 Z0 to assign workspace coordinates relative to the workpiece, use a script that sets all workspaces:

G92 X0 Y0 Z0    ; set origin of tool 0 workspace
G56             ; switch to tool 1 workspace
G92 X5 Y6 Z11   ; set coordinates of tool 1 workspace
G57             ; switch to tool 2 workspace
G92 X1 Y-2 Z5   ; set coordinates of tool 2 workspace
G55             ; switch back to tool 0 workspace

Note that the G92 commands use the negated values from the table above. It can be thought of as a hypothetical question: if the gantry were in the same location but another tool were loaded, where would the tool tip be relative to the origin?

Finally, the tool pickup scripts must be modified to switch to the appropriate workspace instead of always switching to G55 (the last step of the tool pickup script). Tool 0 switches to G55, tool 1 switches to G56, tool 2 switches to G57, etc.

Step 21: Future Direction

These are additional features that would add value but haven't yet been implemented:

  • Automatic homing. In particular, somehow homing the carousel would be important.
  • Switching power to the tools. A physical switch mounted in the parking spaces together with M3/M5 could automatically turn on the appropriate tool.
  • Electrical connection to the tools. For a probe it would be nice to have an electrical connection through the tool mount rather than running an extra wire.
  • Detect tool mounting and halt if mounting fails. Currently if the physical connection is not made properly, there is no way for the machine to recognize it.
  • Extruders. Currently the carousel uses the E axis and sharing the E axis with an extruder would lead to problems. Perhaps the E axis respects workspaces and this is a non-issue but it would need to be verified before this is used as multi-material printer.
CNC Contest 2020

Second Prize in the
CNC Contest 2020