I have seen mechanical (micro switch), optical and magnetic(magnet + hall sensor) end stops.
Are there any differences in how exact they switch at the right location? If so which are the most precise?
3D Printing Stack Exchange is a question and answer site for 3D printing enthusiasts. It only takes a minute to sign up.
Sign up to join this communityThere are some different criteria that we should use to select a switch type:
It's important to ask, how much switch precision do we actually need? A typical 3d printer drivetrain using a microstepping stepper motor can only accurately position the moving load within +/- one 1/16th microstep (even if using finer microstepping than that) due to error-inducing effects like friction torque and magnetic detent angle error. That's around +/-0.01mm for most printers. The homing switch only needs to be as precise as the motor's positioning! Nothing is gained by having, say, 0.001mm precision endstops.
This precision of +/-0.01mm is achievable for all types of endstop switches, with proper switch selection and configuration.
Then there are three "standard" switching types in use in consumer/hobbyist 3d printers:
Mechanical Switches
Precision/repeatability depends on the switch quality, length of lever arm attached (longer increases contact distance but is worse for precision), and impact speed of the carriage with the switch. It's possible to have a good mechanical switch or a bad mechanical switch. This is typically a reasonable default choice because it is simple and cheap.
A small mechanical switch with a short lever arm (or the lever arm removed) will generally achieve the required +/-0.01mm switching precision. Very cheap switches, high contact speeds, and long lever arms may provide inadequate resolution for Z homing or probing, but will still be adequate for low-precision X and Y homing purposes.
Where mechanical switches tend to cause issues is in noise rejection. Different controller boards use different ways of wiring the switch: some use two wires and only send a signal when triggered. When not triggered, the signal wire is left floating or weakly pulled up by the microcontroller, while attached to a long wire that acts as an antenna to pick up EM noise. It is VERY common for heater or stepper wiring to emit nasty EMR due to the PWM current control. Two-wire endstop cables should always be run away from stepper and heater wiring. Shielding and twisting the conductors is a good idea too.
A more robust approach is to use three-wire switches that actively pull the signal line high or low depending on the switch position. These will tend to reject noise better.
Very cheap mechanical switches may fail within the life of the printer. However, most limit switches are rated for millions of cycles, which is unlikely to occur over any normal printer's lifespan.
Mechanical switches are easy to align and easy to trigger by hand during troubleshooting.
Optical Switches
These rely on a flag blocking a window between a light emitter and a detector. This is non-contact and can be quite reliable, but introduces some challenges. The exact trigger position (and thus precision) may depend on ambient light levels in the room, because the sensor is monitoring for light to decrease below a specific intensity. So it may be very repeatable/precise in the short term but have some drift if the sensor moves in and out of the sun through the day.
Switching tends to be more consistent and reliable if the flag enters the window from the side, rather than the top.
Optical switches will actively pull the signal line high or low, and thus have good electrical noise rejection.
Hall Effect Switches
These measure the intensity of the nearby magnetic field and trigger when it exceeds a certain amount in a certain polarity. This is highly precise/repeatable (better than +/-0.01mm) and extremely resistant to noise and environmental conditions. (Unless your printer is next to something that emits large magnetic fields, anyway.)
The hall switches I've seen have an adjustable trim pot to tune the trigger distance. That's a nice feature when trying to manually calibrate a Delta or a Z-bed for first layer height.
The primary downside to hall switches is that they need a magnet to trigger the switch. This can be difficult to trigger by hand during troubleshooting, and requires attaching a magnet somewhere on the moving carriage. Glue works fine... but don't glue the magnet in place backwards!
Thomas Sanladerer performed exactly the comparison you ask. Check the whole video.
The result is that inductive sensors are the most accurate, but they are highly dependent on the bed material chosen.
Mechanical switches (bare, no metallic arm) are about as accurate and keep the same accuracy with every bed material (however you need a mechanism to retract them, which may or may not decrease the accuracy).
Other sensors are less accurate.
In any case, most of them are already far better than required, since anything below 50 microns is fine and basically all of them reach that accuracy.
Choose based on other factors such as weight, installation, price. Inductive, after a calibration based on your specific bed, may be the easiest since they need no retraction, but they are bulky. BLtouch is probably the second choice, mechanical microswitches the third one.
I don't think there is a simple answer.
In my opinion, for a home sensor accuracy doesn't matter. Firmware usually allows setting an offset between the indicated position and the actual position. What really matters is repeatability. Every time the sensor indicates position, the position is the same.
Mechanical Switches
I have found through testing several mechanical switches that the "make" event is less repeatable than the "break" event. For best results, I move toward the position that closes the switch, then move in the opposite direction until the switch opens. If I remember correctly, I got "make" repeatability of about 0.02" (0.5 mm), and "break" repeatability of about 0.005" (0.13 mm).
Optical Switches
For a delta 3D printer, I use optical sensors. Optical sensors have a built-in illumination and sensor, usually on opposite sides of a forked structure. The sensor side has a slot which masks the light being received, helping to shroud it from ambient light. The slot is along an axis which is either aligned with the fork or normal to it. The flag you use for the interrupter should completely cover the slot, and for good repeatability edge of the flag must be parallel with the slot. In other words, some sensors expect the flag to enter from the side while other expect the flag to enter from the top. Either will work, but you need to choose the right sensor for the configuration of your machine.
Ambient Light with Optical Switches
Perhaps ambient light could be a problem. If so, it could be addressed by shading the sensor.
Let's assume that the LEDs in the sensor are the same efficiency as the ambient LED lights. For reference, here is a spec sheet for a typical optical interrupter used in optical sensors: http://www.isocom.com/images/stories/isocom/isocom_new_pdfs/H21A.pdf The package of the optical sensor is designed to reduce susceptibility to ambient light.
Light intensity falls off as distance^2, and the illuminators in the sensor are very close. How much effect does room light have on the sensor?
In my shop, I use 8-foot LED replacement bulbs for the fluorescent bulbs. With this, I have 72 watts of LED lighting, which, let's say, illuminate evenly the semi-sphere below the ceiling. A full sphere is 12.56 sr (steradians, or stereo-radians), so the half sphere is 6.28 steradians, for a power of 11.46 W/sr. At the sensor, this must be divided by the square of the distance, let's say 8 feet. This gives us (11.46 W/sr)/(96in^2) = 0.119 W/area.
The illuminating LED has a power (typically) of 1.2 V * 0.05 A, or 0.06 W. The light cone from a typical LED is about 30 degrees, which is 1 sr, for a power of 0.06 W/sr. Scaled for an estimate of the distance between the emitter and sensor of 4 mm or 0.157", is (0.06 W/sr)/(0.157in^2) = 2.43 W/area.
It seems unlikely that general ambient light will be a problem. If it were, the sensor mounting could be designed to shield the sensor from direct exposure to ambient light.
It is important with optical sensors to be sure the interrupting flag is actually opaque to the illuminator light. As I found, red PLA is not especially opaque to infrared light, so I needed to paint the flags with a black pigmented paint.
Hall Effect Switches
I have no experience with Hall effect magnetic limit switches. Other answers here have praised them because they have an adjustment which can be used to set the precise detection point. I don' t like adjustments because they drift. Pots are subject to wear, oxidation, and both slow and fast variation in their resistance. I would prefer to have something unadjustable and repeatable in hardware and use software to hold the calibration.
Example of Hybrid Choice
On a 6-axis delta architecture CNC machine I build, I use a hybrid approach to sensing home position. Mechanical switches indicate a position that is close to home, and the index pulse of a rotary encoder defines the precise home position. The homing firmware moves toward home until the mechanical switch closes, then away until it opens, then back toward home until it detects the index pulse. As there are six axes, there are six sets of these switches and encoders. Using a mechanical switch for the rough homing made sense for this machine because the index sensor is hit once per revolution, so it is not a unique indicator of home, and this machine creates a lot of dust and chips, which could block an optical sensor.
So, without an absolute answer, my preference is for optical switches for repeatability.
I think there are several factors involved in which sensors are best, but the general ordering for me would be Hall, Optical followed by mechanical. All of the types will be subject to some drift due to vibrations and changes in the printer over usage. Therefore it's the ease of adjustment as well as the accuracy of the stop which counts in the assessment.
In my experience the hall effect sensors are the most accurate and easiest. They don't rely on physical switching (as with the mechanical) meaning there is no "wear and tear" on the component and the point of switching will remain fixed. They have a potentiometer which can be adjusted to make the position of the stop change without any mechanical intervention allowing very fine tuning. They can be very accurate.
Optical are similarly accurate but usually have a fixed component that cuts the beam to switch on/off the sensor. The adjustment of the stop will usually be mechanical because the mount points will need to be adjusted - this reduces their accuracy. There are various adjustable mounts to alleviate this on thingyverse or the like.
Mechanical switches are similar to optical in terms of adjustment with the added inaccuracy of the actual switch mechanism which may degrade over time.
If you take a look at the RepRap Wiki, they briefly explain these three switches:
"Mechanical Endstops are the most basic form of endstops, made of an ordinary switch, two wires. Changing the switch state signals the electronics.
"These Optical Endstops observe the light level and reacts to sudden changes."
"These endstops; Hall effect sensors is a transducer that varies its output voltage in response to a magnetic field. Hall effect sensors are used for proximity switching, positioning, speed detection, and current sensing applications."
In regards to your question, it's dependent upon your circumstance. However, most of the time a good 'ol Mechanical Switch is repeatable and serves its purpose well.
I, personally, would place both optical and magnetic switches in the category of a multifunction component. Meaning, both of these types of switches (generally) provide a valuable range for object detection. This can potentially lead (depending on your machine) to a pushed command that tells your machine to slow down when it comes close to the soft stop.
Again, personally, I would be wary of using an optical endstop with potential white light noise from ambient room lighting or other sources. I could be wrong in my concern for some modules that address these kind of issues.
So, if we narrow down between mechanical and magnetic: - Magnetic would provide a gentler approach, reducing (potentially) the amount of wear - However, I'm assuming, magnetic switches require "dialing in" depending on the components used in the sensor. This could lead to an undesired range that the sensor is triggered. - Mechanical switches are simple. They're either touching or not touching (on or off) - A possible pro (or con) is the ability to manipulate the trigger manually, more easily. I've run into a situation a few times where I needed to manually trigger the endstop as part of a troubleshooting step. But, if you accidentally bump your endstop while the machine is running, no good.
A separate issue not addressed in other answers is that the end stops for X/Y axes have different requirements than those for the Z axis.
When the printer offers XYZ calibration (like Prusa i3 MK2), the properties of the X and Y switches play a role, since for the Z probing the probe should be centered above the fiducials (copper circles) in the bed. The XY part of the calibration measures the position of the fiducials relative to the end-stop trigger point. Then the Z calibration measures the height of each fiducial.
When the XYZ calibration is not offered, there's usually no need for very repeatable positioning relative to the X and Y travel ends, and on most printers you could simply move the motors until they start skipping steps and call that a day - it will be accurate to within a few steps.
The Z axis always has a high requirement on accuracy and repeatability, and there are two general approaches to determining its position:
No end-stops on the Z-axis drive system, a probe is mounted on the print head and is used to detect when the head is a certain distance above the print bed. This can be used for 9-point calibration of the bed shape and thus removes the need for bed levelling.
End-stops used on the Z-axis drive system. No sensor on the print head. The bed needs to be separately leveled in reference to the nozzle - thus the bed leveling screws.
For Delta, you essentially have three Z axis drivers, and similar to the Cartesian XYZ drive, you don't need any end-stops if you have a probe on the print head. You can also perform multi-point bed leveling with such a probe.
X and Y endstops become unnecessary once you use closed-loop stepper control, such as Mechaduino or linear digital position sensors (e.g. as used in CNC machines).
The Z probe is still useful if you don't want to perform bed leveling manually.