MakerBot Print is our newest print-prepration software, which supports native CAD files and STL assemblies,
allows you to interact with all your printers via the Cloud, and many other exciting new features.

Download Now


Compact Opto Servo Probe - auto bed leveling

by atsnailpace Dec 21, 2018
Download All Files

Thing Apps Enabled

Please Login to Comment

I connect all that's described, and marlin is instaled for bltouch. When i hit home Axis z run 10mm up and i get on octoprint Error and info about m999

Unfortunately it does not work with bltouch firmware setup.
You have to declare it as custom probe.

See the reply to Frankoo comment below.

Thanks! Custom_Probe makes the job!
M48 : 0.001312

Can you say what's dimension i need from bed/nozzle of this sensor ?

servo arm is to big for my Eflite servo

you can cut the original servo arm to fit or if you tell me the diameter of the servo motor shaft, I can modify the servo arm accordingly.

The issue is that the servo arm is too big in diameter for the type of servo that i had laying around.

Servo Type: E-Flight(EFLRDS75H) // Diameter: 3.8mm // Shaft Length: 2.6mm. Thank you very much.

Here are 3 servo arms.
Be careful your servo is a little bit smaller than SG90 so you have to center the servo to have aprox. 7mm between servo arm axis and the flag.

Thank you ill try this out.

you have to sadly mount this very accurately using washers to use it. because the difference between the trigger position and the pulled up position is barely 1-2mm

Yes, the trigger distance is 1.5mm. If you want to increase it, shorten a little the upper part of the flag.

oh no I want it to trigger ealier. from the deployed state. that way i can set it to be lower so it goes up more when it's retracted.

also my servo arm can't push the pin all the way up ;c which sucks

wait the sizes are only like 0.2mm longer. mine has quiet a bit more distance. tho i can try :)

Aww thanks for designing these for me :) I was about to ask for the cad files :) very nice of you!

You're welcome. The CAD file is attached with the STL files.
The servo arm is designed to push the flag up but if the angle is greater than 90 degree the servo arm won't be blocked by the flag. The servo arm will continue the rotation and the flag will remain up, sliding along the edge of the servo arm.

Would you be able to post the CAD files (.step or .iges) for this? Very interesting, going to swap out my BLTouch with this to see if there is a marked improvement. At the very least, I won't need to wait for the probe to stow and redeploy every single time its checking a point.

I am using Designspark free which does not export in stp or iges format. The cad design in rsdoc format is attached below in answer to reefwarrior.

I already had a servo so I just bought an optical endstop and wow... omfg...... the range is almost 0! this is insane. can't beleive I was sad over not being able to afford the BLTouch. my clone's range was 0.2mm which amade it useless. this is one of the best designs :) I just think the servo arm's top needs to be a LITTLE longer! thanks a lot :)

I'm a happiye bun now

damn I wish you could 3d print the pin :P or use a long 3m screw

Impossible not to find something like a smooth rod. An old screwdriver, welding rod https://www.thingiverse.com/thing:3329661, an allen key even. There are 2mm smooth rods for RC models also.

Remix to use 1.58mm or 0.064" welding rod

Hi, i made one, it works but it doesnt do auto bed leveling as it stops because the self test isn't succesfull, do I have to set it up as a custom probe? Can anyona share configuration.h with the correct settings? Im using anet a8 1.0 optiboot.

You have to set it as custom probe. The files attached are for Th3d Firmware for Anet 1.0 board. All commands related to servo are:


define SERVO0_PIN 29



define NUM_SERVOS 1

define Z_SERVO_ANGLES {10,90}

define SERVO_DELAY { 300 }


It is an Anet A9 and I suppose it is only bed dimension different.
Also the pin used for servo should be 27 for Anet A8. I used pin 29 due to the different LCD screen (12864).

Hi, thank you very much for the quick reply, i'm going to have a look, I forgot to mention that I'm on marlin 1.1.9. But i reckon it should be pretty much the same.

Very nice design. Please add a description of the different file versions.

Nothing special flag2 = flag for 2mm diameter rod, base3= base for 3mm rod.

Outstanding work. Thank You. Standard deviation is less than 10 microns with opto endswich, on my crappy BLTouch clone standard deviation was more than 100 microns !!!
For people looking for metal rod, just an idea, hss drill bit (broken if you have, or new one) cost less than few bucks. Put it in cordless drill and grind on bench grinder to make desired point tip.

How did You add LCD menuitem "Run M48 test" ?

Comment DISABLED(SLIM_1284P) in Marlin_main.cpp as in picture (pay attention to line number)

Wow, THANK YOU! That was fast!

Well thought out design. I advise, if possible, to replace the optocoupler. Instead of the TCST2103 usually installed in these sensors, it is better to use the TCST2300. Or at least TCST2202. The smaller the aperture of the receiver, the greater the accuracy of the sensor.


Thank you for the great project. Is there perhaps any possibility to share the source files?

I'm working on a similar idea with the servo higher up on top. Designed to fit in an 18mm round mount to replace a proximity. Yours is great, very compact. Love it. Great work.

Thank You!

Initially I did use the same configuration with a 40 mm rod without any degradation of accuracy. So in retracted position the total height was about 61mm. An adapted frame with a mount point below the actual frame could solve the problem.