Limit Switches to Interrupt Z-axis

Hi all. I’m working through an upgrade to a C-beam z-axis and I’m trying to figure out how to protect it from destroying itself if I goof up a z move in CAM one day.

My first though is that I could use a shear pin or nylon set screw so that part fails first, but I’ve read that some people with this C-beam setup have a tough time getting the required grip on the lead screw with even a metal set screw.

Limit switches have been talked about in a number of other posts, but the conversation seems to always center around using one of the aux pins for this (not implemented). Would it be possible to put a couple of NC limit switches in line with the motor power (or maybe encoder) wires to interrupt the z-axis? Perhaps the motor current it too high?

I can see two different scenarios to accomplish your goal:

  1. you could put a wire pigtail on the end of the Z axis cable before it connects to the z axis motor and put a limit switch on the top end of z axis movement to break the power connection when it gets too high. The problem would be how to reset it without unplugging it. Maybe a manual toggle that will power the motor in the direction to drive down and out of the top position. Each time it is hit, the z axis would need to be rezeroed.

  2. Add functionality to the conductive zero aux pins already in use for zeroing, but that are dormant the remainder of operational time. It would work like normal when zeroing the axis, but when not zeroing, could be clipped to a make/break sensor at the top of the z axis and coded to alarm and stop the z axis if it goes that high. Code in the firmware would need to be added and the arduino reflashed.

I use a c beam also and am hoping we can have a software solution. When you zero your bit it would be easy to take a tape measure and quickly see what you want your max z height to be restricted to and enter that on the screen.

Thanks guys. Coding is something I’m certainly no good at, so a hardware solution is what I would be going for.

A toggle switch is a good idea, but depending on what my the actuator for the limit switch looks like, I could just move it if it’s actively pressing the switch. Ultimately, if the switch trips I’d be OK disassembling things. It’s meant to be a safety net in the event that I’m being an idiot in CAM, so hopefully this rarely trips.

Adding a new max z would likely be more difficult than simply changing the safe travel height to be a safety feature.

I don’t think the coding a new max height would be terribly difficult, but it may require a new communication command set between the arduino and control software. Set max z, and get max Z, then actually testing each movement to ensure it doesn’t go above that. if you have to reset it each time, then it almost seems it is doing what the max safe travel height setting is doing.

To me it makes more sense that the safe travel height should be used as the number and that it is already built in with access to change it in Maslow Settings in webcontrol. if your gcode calls for anything greater than max safe travel height it should stop and warn you. Most of that is already in there, so that would be a minor code change… I have not looked at the firmware in a while so this is speculative, but sounds reasonable thinking outloud.

the problem with trying to set the safe height in software is the question of
how you find out what the safe height is.

when you set the zero, the actual height of the router will vary depending on ho
long your bit is and how much of it sticks out of the chuck.

without a hardware switch/contact, the machine has no way of knowing.

David Lang

I would also prefer a hardware solution, but we already have the safe height coded in. It works now by raising to that height before traversing, so we know it works. it isn’t an absolute height and changes relative to the zero position, but if the gcode tells it to exceed that travel height, then throw an error. That would be an easy stop gap before a hardware solution is rolled out… if there ever is one. It still won’t catch a binding problem if your zero is too high to start with though.

Sound perfect. Can just set this every time a new bit is installed. Really if I set it around 1/2”, most of the time that would work. Thanks.

safe travel right now is the height the router lifts after every cut. if you set it to 1/2", your cut time will dramatically increase as you stand around and wait for it to lift and drop at the standard z axis pitch for each plunge and retract. I’m using 1/8" (3 mm).

This isn’t set in the gcode? Normally I set this lower (0.1 or 0.2”). I thought this setting was just a maximum?

it is set in the g-code, but there is also a setting in the GC/WC settings that
is used for when you do a home action.

setting an alarm when you exceed this height will cause problems if the CAM
software happens to use a higher value.

David Lang

Thanks for all the conversation here guys. I did not realize there is a limit in GC, so I will definitely use that in the meantime.

I’ve got a couple limit switches kicking around and access to a 3D printer at work, so I’ll have to do some tinkering once I’m done building the new sled setup.

1 Like