I'd like to make my CNC router workpiece and tool changes less cumbersome

I already have the OpenBuilds XYZ TouchProbe Plus. This works well for setting the X, Y, and Z to zero for the work piece and the bit. But when I need to do a tool change I have 2 problems:

  1. I have no way to make the spindle stay in one place while I loosen the bit, take it out, and then put the next one in.

  2. Once it is in, I have to manually reset the Z-axis for the new bit’s length.

Energizing the motors with some kind of feedhold command would help with 1 but not with 2. So I end up rehoming all after changing the bit, and then manually setting the Z-axis.

I’ve seen some other CNC routers, like the Shapeoko Pro 5.1, use a fixed pressure sensitive probe handle item 2.

I found this automatic tool setting sensor and would like to add it:

However, I know I will need to create a custom G-code macro to handle it. I can handle simple g-code, but I’m hitting a wall googling around trying to figure out how I would set this up.

Any pointers or suggestions would be greatly appreciated.

Thanks!

1 Like

I’m not sure any of this will help but here it is:

If you change the $1 setting to 255. That will keep the motors locked when you do a tool change. This assuming you have a GRBL powered controller. Enter $$ to get to machine settings in your command line. Then enter $1=255 to make the change. There is also a dip switch setting that you might need to change, at least on the X controllers. Openbuilds controllers don’t have that I think I read. That may help with your first issue.

This is a macro that I found on the web and used myself. The numbers for distances are unique to my machine. I use UGS and have saved this on that. My 3d probe is one of those machined one with a hole in it.

Having a new machine, I have been using the paper method due to laziness on my part

.

(PUCK PROBE )

G20;G91;G38.2 Z -.500 F1; G92 Z .589; G0 Z .50

(1/8 BIT AND 3D PROBE)

Z AXIS

G20;G91;G38.2 Z-.500 F1;G92 Z.201;G0 Z.50

X AXIS

G20;G91;G1X -.750 F5;G01Z-.1875F5;G38.2X.750 G92 X.394;G0 Z.50

Y AXIS

G20;G91;G1Y-.750 F5;G01Z-.1875F5;G38.2Y.750 G92 Y.394;G0Z .50

2 Likes

I’ve been using the paper method, too. I’m trying to be more precise with my technique to make things more repeatable.

I’ll try out the GRBL settings you mentioned to help hold the position steady while changing the bit. If that works I may be able to just use the simpler touch probe I have without needing to re-home everything.

My BlackBox X32 runs GrblHal, so I think this (or similar?) should work.

Thanks! :folded_hands:

The “puck probe” is obvious–I have one. Is this “3D probe” similar to my XYZ probe?

Yeah that’s the one that sits over the corner of the work and then moves up and over it for X and Y. Those numbers are specific to the one I got off aliexpress

XYZ Touch Probe Precise Plug and Play CNC Processing GRBL Mach3 Tool Sensor for Ultimate Bee QueenBee Machine 3D Printer - AliExpress 202216001

1 Like

OpenBuilds Control software has built-in probe tools for both the puck and the XYZ probe, so they are dead simple for me to use.

The one thing I intend to change on both of them is to use a heavy duty crocodile clip instead of the magnet (XYZ probe) or simple alligator clip like the one you have.

It is much better for attaching to the cylindrical shank.

2 Likes

Rats. That doesn’t seem to work. On my machine, this was the starting value of $1:

[ $$ ] $1=25 ;Step idle delay, milliseconds

Did you change it to 255?

$1 - Step idle delay, milliseconds

Every time your steppers complete a motion and come to a stop, Grbl will delay disabling the steppers by this value. OR, you can always keep your axes enabled (powered so as to hold position) by setting this value to the maximum 255 milliseconds. Again, just to repeat, you can keep all axes always enabled by setting $1=255.

The stepper idle lock time is the time length Grbl will keep the steppers locked before disabling. Depending on the system, you can set this to zero and disable it. On others, you may need 25-50 milliseconds to make sure your axes come to a complete stop before disabling. This is to help account for machine motors that do not like to be left on for long periods of time without doing something. Also, keep in mind that some stepper drivers don’t remember which micro step they stopped on, so when you re-enable, you may witness some ‘lost’ steps due to this. In this case, just keep your steppers enabled via $1=255.

This is AI if you have dip switches on your drivers, you may do this like the X controller

To lock OpenBuilds stepper motors for tool changes or to hold position, configure the motor drivers by setting the #4 DIP switch to OFF (disabling idle current reduction) and set Grbl parameter $1=255 in the Machine Inspector to keep motors energized. Note that leaving motors locked constantly may cause them to run hot.

[image]OpenBuilds +2

  • DIP Switch Configuration: The #4 switch on many stepper drivers (like DM542s) controls Idle Current Reduction. Setting this to OFF ensures the motor receives full power even when idle, providing maximum holding torque.
  • Grbl Setting ($1): The $1 parameter determines how long the motors stay powered after motion stops. Setting $1=255 ensures they remain permanently enabled.
  • Alternative Method: If using a machine that supports it, ensuring the 24V power supply is active will lock the motors.
  • Warning: Keeping motors constantly locked (

[image]

) generates significant heat.

[image]OpenBuilds +4

Ensure the 24V power supply is connected to your driver board and working correctly.

[image]OpenBuilds

AI Overview

To lock motors on an

OpenBuilds BlackBox controller, you must ensure the stepper drivers are energized, which happens automatically when the system is powered on and not in an alarm state. The motors lock when the controller is idle (holding current) and unlock when powered off or when in an alarm state.

[image]OpenBuilds +1

Steps to Lock/Hold Motors:

  1. Power On: Ensure the BlackBox is powered on.
  2. Connect in Software: Open OpenBuilds CONTROL software and connect to the BlackBox.
  3. Clear Alarms: If the machine is in an “Alarm” state (e.g., after homing or a limit switch hit), click the “Unlock” button in the software. The motors will lock immediately upon unlocking the controller.
  4. Hold Current: As long as the controller is powered and not in an error/alarm state, the motors will remain locked (holding torque).

[image]OpenBuilds +4

This video demonstrates the initial setup of the OpenBuilds BlackBox, including powering on the controller:

[image]

1m


[image]
[image]
OpenBuilds
YouTube • May 13, 2019

Troubleshooting Motor Locking:

  • No Power: If the power supply is off, motors will not lock.
  • Alarm/Emergency Stop: If the Emergency Stop is pressed or a limit switch is triggered, the motor drivers disable, and the motors will unlock.
  • Current Settings: If motors are locking but still turning too easily, adjust the current potentiometer (pot) on the BlackBox for each axis to increase torque, but do not set it too high to avoid overheating.
  • Disable Timeout: Check your Grbl settings ($RST or similar) to ensure the idle timeout is not disabling the motors too quickly.

[image]OpenBuilds +2

I have the Blackbox Motion Control System X32. I do not see any DIP switches (unless they are inside the case, which I do not want to open). However, DuckAI gave me this answer, which I am going to try as soon as the current job is over:

In grblHAL, the

$37 Stepper De-energize Mask setting identifies which specific stepper motors should be automatically powered down (de-energized) when a motion command is complete.

Function and Usage

The $37 setting acts as a bitmask to control the idle behavior of individual axes independently. While standard Grbl uses the $1 setting (Step idle delay) to globally determine how long to wait before disabling all steppers, grblHAL’s $37 allows you to choose which axes follow that behavior.

  • Axis Selection: You specify the axes by entering a value based on bit flags. For example, setting $37=15 is often used to keep all motors energized at all times to maintain position.

  • Preventing Sag: This is particularly useful for the Z-axis. On many machines, if the Z-axis motor de-energizes while idle, the weight of the spindle may cause it to “creep” or drop due to gravity. By excluding the Z-axis from the de-energize mask, you can ensure it stays locked in place even when not moving.

  • 32-bit Compatibility: This parameter is typically found on newer 32-bit controllers (like the Blackbox X32 or MKS DLC32) which can handle 6 or more axes, such as X, Y, Z, A, B, and C.

So it looks like I would want to set it to $37=7 (I only have 3 axes, X/Y/Z)

Sounds like a plan. The X controller dip switches are on the inside and you just access them by taking the top of the box off. I haven’t had any experience with Grbl Hal but it sounds a little similar to regular GRBL. Good Luck and let us know if it works.

I am wondering if you want $37=0 based on this:
$37 Stepper De-energize Mask Values

The value is a bitmask, meaning you add the numbers together to enable/disable specific axes:

  • 0: All motors remain energized (default/recommended to prevent axis drop).
  • 1: Disable X-axis driver when idle.
  • 2: Disable Y-axis driver when idle.
  • 4: Disable Z-axis driver when idle.
  • 8: Disable A-axis driver when idle.
  • 15: Disable all axes (1+2+4+8).

[image]OpenBuilds +2

Typical Use Cases

You have the bitmask values backwards–the correct bitmask values are:

bit flag set to 0 = de-energize

bit flag set to 1 = energize

I created 2 macros using this that work perfectly:

Lock Motors. Energizes and locks x(1), y(2), and z(4) axis motors when not being driven by g-code.

$37=7

Unlock Motors. DE-energizes and UN-locks ALL motors when not being driven by g-code.

$37=0

I used my Lock Motors macro yesterday to successfully change the tool bit without losing position, and the Unlock macro lets me move the head around when the machine is on but not running a job.


That being said…

I left the lock macro on while running a job that I have run many times, and it went astray near the end of the job. The only things I had changed from previous runs of this exact same g-code was this $37=7 value and I was cutting OSB instead of pine or oak.

Total guess: Either the $37=7 made the motors get hot and lose steps, or some part of the OSB acted like a tough wood knot that gave too much resistance. Or maybe a little of both. I’m going to try again sometime today to see if unlocking the motors before running the job makes a difference (and I’m going to babysit it this time and touch the motors to see if they are warm–they were not warm when I looked for this early on).

Total guess #2: Just realized while typing this that $37=7 may be insufficient because my 4th-axis (A-axis) stepper driver is used to drive the 2nd Y-axis motor! So I probably need to use $37=15 to lock all 4 motors.

EDIT: Nope. $37=15 throws an error when I try to set it:

error: 52 - Setting value is out of range. [ $37 = 15 ]

I may tweak the current on the motors a bit too, as I originally set them somewhat arbitrarily when I was figuring out that my old power supply had been the cause of previous nightmare quasi-inevitable intermittent job failures, so they might be running a bit weakly on insufficient current. (I may try just cranking them to max and then checking for warmth to see if they run hot.)

(Unrelated aside: I had been complaining in other posts recently about needing to run my Ox too slowly to get things done, but I found the bottom wheel on my z-axis was turning freely and there was obvious play/slop. I adjusted the eccentric and it has been running noticeably better, which only makes this more confusing. Aside2: I had a loose limit switch too, which caused some weird repeatability problems after homing but is also fixed now.)

1 Like

That was just AI produced stuff that I found. Are you using openbuilds nema 23 motors? I’m running my current machine with the X controller set to whatever they tell you to set it at during assembly. I haven’t found any motor issues. I’m just wrapping up a GRBL controller for nema 23 motors that is all point to point with no proprietary parts from a big company except the arduino and gshield. I’m waiting for the Estop to get here today…LOL. I’m surprised nobody has come up with a plug and play nema23 controller for under 200 dollars.

1 Like

Yes, I am pretty sure I am using OpenBuilds NEMA 23 stepper motors. I got them as part of the OpenBuilds Large Ox CNC kit I purchased from SMW3D.

Isn’t an Arduino Uno with a GrblShield and stepper drivers easily under $200?

Yes, but it’s not plug and play. 4 tb6600 drivers, arduino, gshield, case, Estop, Jacks, plugs, power supply, terminals, and an on off switch, numerous conductors, and a fan.

1 Like

Total guess #3: my Z-axis limit had failed–it had a wire off it and the switch and mount looked pretty ragged and worn. :man_facepalming: Put a new limit switch and a new mount on. Verified triggering works properly. Homing works again–yay! Now to try that job again. I’m cautiously optimistic that I’ve ironed out ALL the kinks (and I hope I didn’t just jinx it).

1 Like

True. Oh well. Maybe that’s an opportunity for a build log where someone clearly explains how to do it? :slight_smile:

I’ve been wondering if beefier motors/drivers/power supply/spindle might make my Ox perform better. I’d been holding off because the mystery gremlins haunting my Ox. But I’m thinking that if the rigidity isn’t a real issue, then maybe the upgrade would be worth it. I may go that route if I start getting it to work more reliably. But I think if I do, then I’ll use DM556 drivers instead of TB6600 (it looks like they can handle more amperage). Not sure yet if I’ll bother. (Yet another aside: I have more than enough pieces of 1/8” thick, 2” square aluminum tubing–like 4+ 8’ pieces–that I could slap some linear guide rails on to build a bigger, beefier CNC frame. Again, not sure if that’ll ever happen).