Accuracy of micro switches

I see a lot of people doing all kinds of upgrades on their 3D printers, but not many are doing one of the simplest things to get better accuracy and repeatability on their micro switches… Let’s have a look where the most common problem is.

As an example I will use my Ender 3. Out of the box it is a pretty good printer, but the endstop switch for the Z axis can destroy your print bed, by not hitting the same point every time. Here is a (bad) picture of the endstop as it is out of the box. It consist of a injection molded plastic piece to hold it to the extrusion, a pcb with a connector, and a micro switch on.

The problem here is the lever on the switch. But why is that?

The lever on the switch actually act as a gear ratio, so with a little force, but longer movement, you can press the switch down. And it might sound nice to only use a very low force to press the switch down, but the problem here is the longer movement needed to also press the switch down.

This picture is taken from the DB2C-C1LB datasheet. Here you can see the short distance between the mount point for the lever, and the button on the switch. To press the button down the lever needs to move a long distance, and that distance will also multiply the error in the trigger of the switch. So if there is a 0.01mm deviation for each trigger in the switch, if the ratio is 10:1, that error would be multiplied and instead be 0.1mm where the Z axis is touching the lever. This is exactly what we DON’T want.

Here I have simply removed the lever, and made a new mount for the switch so the button on the switch will be pressed down directly by the Z axis.

Before this change I had problems with PLA sticking to the bed, and after just a few prints the hotend was suddenly in the bed, and fused the PLA to the surface on the bed.

After removing the lever and touching directly on the switch, the first layer is perfect every time.

STL for my Z endstop switch mount:


A friend got a still stock Ender 3, so I borrowed it to do some comparison tests.

Here is the setup I used. I could probably have used the printer to do it too, but I like to do it this way.

And the results are in

-0,01 mm-0,01 mm
0,0 mm-0,01 mm
0,0 mm-0,02 mm
0,0 mm-0,01 mm
0,0 mm-0,03 mm
-0,005 mm-0,05 mm
0,0 mm0,01 mm
0,0 mm-0,01 mm
0,0 mm-0,02 mm
0,0 mm-0,01 mm

Overall the original switch with the lever on didn’t do that bad, but looking at the lowest and highest measurement, there is still a 0.06 mm difference, compared to 0.01 mm with the lever removed.

Leave a Comment