Welcome! Log In Create A New Profile

Advanced

Homing vs. end-stop sensors

Posted by PCLoadPLA 
Homing vs. end-stop sensors
June 04, 2024 05:18PM
I've been 3D printing for years, but only just started paying attention to printer design, since I'm designing a custom printer.

I'm having a hard time understanding homing sensors vs. end-stops.

I work for a semiconductor equipment company, and our machines always have a distinction between homing sensors and end-stops. For example, a motion axis will have end-stop switches at each end of travel...these are normally never triggered, they are for "emergency" use, and often they are normally-closed mechanical switches. The purpose of these is to prevent the machine from over-traveling into a space it should never travel to (even with these end-stop switches, usually there's a burly mechanical "just in case" bumper stop as well, to avoid the axis physically smashing the switch and breaking it). There's no need for these to be extremely precise.

Homing switches are different, and are used by the machine to determine the axis position and coordinate system. These are usually optical sensors triggered by flags, so they are precise and never wear out. And there's usually only one of them, typically at one end of the travel, not one at both ends. It's not a problem if these are "triggered" during normal machine operation because the software doesn't necessarily monitor them except when actually homing (it does monitor the endstops).

OK, so my current printer (Sidewinder X1), and most of the 3D printers I see, have a single switch on the Z axis, that triggers with the nozzle somewhere close to the bed. It's used for homing, but it also seems to be used as an end-stop. But that's sort of a problem, because if I set it so that it triggers right when the nozzle hits the bed, then well, the nozzle hits the bed! But if I set it up a little bit, so it triggers with the nozzle like a mm away, then the firmware won't let the nozzle close enough to the bed...except firmwares like Marlin seem to let you actually move the axis PAST the trigger point with babystepping (that's crazy!) by a couple hundred microns or something, but no more, so I guess the idea built into the firmware is that you can have the switch trigger with the nozzle very close to the bed, and then by software adjustment (i.e. M206 "home offset" or M290 "babystep", or M428 "home offset"...but which one???), the firmware can still drive the nozzle a little bit PAST the switch all the way to the bed, but not too far, relying on the ability of the axis to push on the switch some amount past the trigger point without damaging it, which seems like playing with fire, and not much slack there, especially if you are using a mechanical switch with the lever removed.

Using the home offset commands (still not sure which one is the correct one to use) would make sense if you could set the end-stop PAST the maximum axis travel, and use software to set a soft-stop before the end-stop, but if you did that, you could never actually trigger the switch, because the nozzle would hit the bed before it ever hit the switch, so it seems a paradox to place the switch beyond the home position too...

I understand the reason for using 1 switch is because of cost. But if I want to set up a machine PROPERLY...with end-stop switches at both ends of the motion, and a separate homing sensor to establish the software axis position...should I do that? How would you set it up in firmware, and is that type of operation supported at all? Am I just having a gross conceptual failure (GCF) altogether?
Re: Homing vs. end-stop sensors
June 04, 2024 08:10PM
Update: I read through a lot of the Marlin slow-reference guide on endstops. It turns out 3D printers basically have what I would call a homing sensor, and don't have proper axis end stops at all, although sometimes the homing sensor performs some of the functions of an endstop.

It seems that Marlin, at least, does not have any provision for endstops as distinct from "homing sensor". Nor does it have any provision for dual endstops...the assumption is that you will use exactly one sensor, and it will be used primarily as a homing sensor and ignored most of the time (more on bed probing later). This is "bad" machine design but seems to be status quo for printers.

Marlin does have "software endstops", which is what normally protects the ends of the axis against some failures. A software endstop does NOT protect against all failures, though. There is no support for a second hardware endstop by default. You could hack Marlin to add one, and consume another controller pin, or you could implement a second endstop simply by installing it and wiring it "normally closed" in series with the primary. But, since the firmware ignores the harware endstops most of the time, even a second hardware endstop would simply be ignored anyway.

There are a bunch of home offsets in the firmware, including bed-mesh offsets, and ultimately most of them depend on the ability to move the axis PAST the endstop/home sensor trigger point. This requires both a switch that can be "over-pressed", and requires IGNORING the sensor during printing...relying on some software endstop PAST the hardware endstop, and making the switch then worthless as an actual endstop. There does exist an option in Marlin to continuously monitor the hardware endstop, but if you enable it, you will not be able to utilize any modes that result in over-driving the axis past the home position...such as bed leveling that drives into "dips" in the bed, and it forces you of course to set your home position at or below your first-layer height of any print you might make; there is no way to leave any "safe margin" then.

Assuming you ignore the endstops in the let us call it "default" way of running, it is necessary to have a switch that can be over-pressed somewhat. The worst-case scenario would seem to be a microswitch with no lever, which probably has an "over-press" tolerance of a couple hundred microns at most. If you set one of these to trigger at Z=0 (nozzle on bed), even a slightly warped bed (my X1 is almost 1/2mm low in the middle) might result in triggering (in the case of endstop monitoring) or even physically smashing the switch in the course of normal printing, since the firmware allows driving the axis past the endstop.

Since the endstop is normally ignored during printing anyway, it doesn't really matter where it is...it could be several mm up, just as long as it could be over-driven that same several mm. So an endstop with a decent large amount of "over-travel" tolerance would be best here, allowing you to set a home position with a couple mm of safe margin, and still drive past it to do all of your printing. The best would be a flag through an optical sensor, which would have infinite (as wide as your flag) "over-press" tolerance (the downside here is these are accurate but not considered as reliable as mechanical microswitches for ensuring machine safety). IWorst would be a bare microswitch with probably a fraction of a mm of over-press tolerance. In between, would be microswitches with levers, and inductive sensors, both of which might have a couple mm of "over-press" tolerance (you could imagine mounting a bare microswitch to a flexible or spring-loaded mount with a higher spring constant than the switch itself but that might be silly). So if you are going to use the default operation of ignoring the "endstop" during printing, the endstop becomes the homing sensor, and there effectively is no endstop, you might as well set your home position a couple mm over the bed and use a sensor that can be over-driven, because over-driving is assumed and endstop is ignored during printing anyway.

Enter toolhead probes: Marlin allows you to either use the toolhead probe AS the combined endstop/sensor, or in addition to it. When using a toolhead probe AS an endstop, its performance as an endstop proper is nearly zero, since the signal is systematically ignored during printing -- the option to keep endstops enabled is not possible because an inductive probe is nearly always triggered during first-layer printing, and a servo probe must be stowed, so these cannot protect from a crash. The plus side is these sensors intrinsically have a large "over press" tolerance by their nature...there's no chance of damaging them by driving the axis too low. As a homing sensor, their performance is probably fine, with the benefit of course of triggering of the bed itself. Minus that advantage, they are basically endstops with an infinite over-press tolerance and no ability for continuous monitoring. Since most people probably didn't use endstop monitoring anyway, they might consider this an improvement.

Instead of using the toolhead probe AS the endstop, Marlin will let you have both. In that case, the printer homes off the fixed endstop. Then, the toolhead probe is used to update offsets for printing and leveling. All the previously mentioned limitations of endstops apply, such as the need to have over-press tolerance if the axis will ever need to move further than the home switch (such as in the case of a dipped bed or a thinner installed bed), the inability to constantly monitor the endstop, thus uselessness as an actual endstop if over-press is used as part of normal operation. I would say using a tool head probe allows you to gain some protection from changing nozzle height and bed thickness, but you permanently forfeit ability to have an operating endstop. Since most people probably didn't use endstop monitoring anyway, again, they might consider this an improvement.

Where does that leave me designing a printer? Well, aside from something like TAP, it seems there's no technology out there that will actually protect the nozzle from hitting the bed. I don't want to hack Marlin to add real endstops or dual endstops, and I don't have plans for a toolhead probe at the moment. What I will probably do is use a microswitch with a lever, because these have generous over-travel tolerance, and wire it in series with another switch on the other side so I at least have dual hardware end-stops. If my bed happens to be mechanically level to within 0.1mm (very unlikely), then I will enable endstop monitoring, but if any leveling correction beyond that, I will have to disable it and just run blind.
Re: Homing vs. end-stop sensors
June 06, 2024 04:22AM
A few points at random.

Quite a few contributors on this and other forums use the terms "Z probe" and "Endstop" more or less interchangeably. As the output signal of the sensor or probe is often fed into Zmin this is understandable.

Sensors that sense the bed using some physical method, whether a switch contact, magnetic inductance, capacitance, optical or acoustic reflection, or whatever, need a parameter known as "Z Offset" which is typically supplied by the user taking a measurement and entering it into the software.

Nozzle contact sensors have many advantages, but one problem is that there can be damage to the bed if the contact pressure is too high. Figures of 3 grams to 50 grams are typical, with the speed at which the nozzle makes contact with the bed being somewhere from 2 to 20 mm per second. Generally, 10 grams and 5mm per second should cause no damage to a bed surface.

My personal preference is to use a nozzle contact probe probing directly over a single sensor mounted under the bed to establish a local datum. Alongside this, I use a contact probe to map the height contour of the bed - known as the "Bed Mesh" 

Examples of this in action can be seen at:-

[www.youtube.com]
  and
[www.youtube.com]

The latter uses a "Dockable Probe" to perform the bed mesh.

In both cases, the sensor technology is based on piezoelectric disks for the underbed nozzle contact sensor and the touch sensor. The ultimate contact pressure is about 3 grams and Z speed about 2mm per second.

Mike 
Re: Homing vs. end-stop sensors
June 06, 2024 12:20PM
Your semiconductor fab machines are typically moving much more weight, and driven by high torque steppers or servomotors and something very expensive may get damaged if the controller loses track of whatever is moving.

3D printers typically use low torque steppers and when properly set up, the controller always knows where the nozzle is, after the initial homing. With the low torque motors used in most 3D printers, if something goes wrong and the controller loses track of the nozzle, it doesn't usually result in anything getting damaged or broken except the print. That said, a lot of 3D printer controller boards are used in other types of machines and many have provisions for endstops at the ends of both axes.

I'm partial to optical homing sensors and use them in all 3 axes of my printer. Even the $3 units I use (they include a comparator circuit) are much more precise than the snap switches that are commonly used. I tested the precision in the XY axes by running two identical prints- one the normal way in which the machine gets homed at the start of the print and one in which the machine's X and Y axes got homed at each layer change. Any imprecision in the homing at each layer would result in a poor quality Z axis because the layers would all be shifted slightly. The result was the prints were essentially identical. That leaves the door open to detecting layers shifts and automatically shutting down the printer if one is detected. The rehoming of X and Y at each layer change can slow a print down, so rehoming every 10th layer might be better for checking for layer shifts, unless you're printing with really expensive material or making a very large print.

I had a problem with one of the optical sensors once- direct sunlight was falling on the detector and triggering it. I fixed that by closing the curtains. It should be possible to print a shield that fits over the thing to prevent the false triggering.


Ultra MegaMax Dominator 3D printer: [drmrehorst.blogspot.com]
Re: Homing vs. end-stop sensors
June 06, 2024 02:18PM
Now that I know the Z "endstop" is not monitored at all during printing, thus it's not doing anything to protect my bed or printer, I'm definitely leaning towards using a breakbeam homing sensor and placing it arbitrarily far from the bed (with a flag long enough to prevent the axis starting out past the sensor without triggering it). Then use the various software Z offsets to adjust the coordinate system...this is in fact what's always done anyway, so the only reason for trying to get the switch actuation close to the actual Z zero point is limited travel range of microswitches, which doesn't apply to breakbeam sensors.


Since we have started talking about bed probing, I'll add the most thorough system I've seen is the voron sexbolt system, which presses the nozzle against the static sensor, and then presses the bed probe against the same sensor, thereby calibrating the nozzle-to-probe distance at every print, meaning you can install a different nozzle, or have different thermal expansion, and it won't matter. Aside from direct nozzle probing like the Tap system, this seems like best system, because one of my main hassles is having to recalibrate Z after changing a nozzle, and normal bed probes don't help with that problem at all. This is hard to do with bedslinger printers, though.

I've wondered why at this point, rather than mapping the bed at the first layer, we don't "live scan" the bed distance with a distance sensor while actually printing the first layer... effectively running the Z axis as a closed loop PID-type contour follower. Furthermore, it would be straightforward to use a camera and machine vision to measure the width of deposited filament on a first layer, and tune the Z height that way... effectively an automated and real-time version of what I do when I run my "mesh validation" print and visually look at the lines with the naked eye.
Re: Homing vs. end-stop sensors
June 07, 2024 09:00AM
I don't bother mapping the bed at all. I just used a flat bed (cast tooling plate) with a same-size heater, and put it on a kinematic mount. The last time I leveled and zeroed it was over a year ago. When I do eventually relevel it, maybe in another year or two, it will take all of 1 minute to adjust two screws.

Printers don't have to be made of cardboard and duct tape...


Ultra MegaMax Dominator 3D printer: [drmrehorst.blogspot.com]
Re: Homing vs. end-stop sensors
June 07, 2024 11:46AM
You said that right!

But a flat and stable surface cannot always be achieved, and the larger the printer gets, the more true this becomes. For bedslinger printers, a heavy cast aluminum plate can be a disadvantage or even impossible, and there is still a variety of printer types where getting the entire bed flat to +/- 0.05 is not technically possible, so mesh bed leveling is definitely a valuable and enabling technology.

And there is still the matter of nozzle changes. I may be odd for frequently changing nozzles, but absent newer systems like Revo, ability to automatically calibrate Z height is a great feature. Even with such nozzle systems, there's still different thermal expansions, and sometimes people like to swap different bed plates, and sometimes a fleck of plastic ends up underneath my bed plate causing a high spot, etc.
Re: Homing vs. end-stop sensors
June 07, 2024 07:57PM
All true. I just don't do any of it.

I've been using a 1mm nozzle for a couple years and I'm getting tired of struggling to get good print quality from it - retraction and drooling are problems with large nozzles. It's great for large vases, etc., but doesn't do small parts or detailed parts well.

I'm thinking I'll build another printer that will use a small nozzle for detailed work and smaller prints that require higher print quality.


Ultra MegaMax Dominator 3D printer: [drmrehorst.blogspot.com]
Sorry, only registered users may post in this forum.

Click here to login