Automatic bed leveling on glass

Previously, the firmware has been customized to allow for this change. Its been a long time but I can try to track down what we did

You ordered the specific sensor you linked to with a 5mm sensing range? so the bracketry is optimized for the 5 mm range, right?

For others who might want some more information, these types of sensors have a lot of terms that are interchangable - so here are some more definitions you can search with

24vdc (that’s straight forward) as opposed to 24vac - a vac sensor often times does work on DC, but not the other way around.

NPN is also referred to as sinking output. This basically means the signal pin is 24vdc-. (technically not that exactly, but it’s how I always work with them).

Avoid PNP (also known as sourcing), which is 24v+ output. You can always add a small ice cube relay to reverse this.

Normally open is as it sounds, think of it like a light switch. In the normal position the switch is off - so the power doesn’t go through it and the circuit is broken. Normally closed is the opposite. you can again reverse this with a relay, but it’s just more effort and wires.

I actually saw where in the firmware source code it is supposed to allow for manually entering up to a 20mm offset via G-Code command, but some users reported that it didn’t work, and the adapter used here is in the 35-50 range depending on which version you go with, so I went ahead and just edited the current firmware source code (v1.15.20) to use my actual offsets as the defaults.

This is the sensor I ordered, and I set it in the adapter to have the same z-height offset as the stock probe (1mm above nozzle), and then adjusted its sensing height to be 1-2mm above that.

Thank you for the extra information

Last time i edited tthe firmware, someone gave me the figures to use. I didn’t quite understand what I was looking at to figure it out for myself. Can you share the values/lines you changed?

Much appreciated. I’m emailing my sensor guy to ask if he has anything in stock similar. I presume this is working because the sensing range exceeds the thickness of the glass and therefore picks up the heated bed. I had previously considered trying this myself but didn’t end up going for it.

Absolutely! Here you go…


The values shown are for the stock probe. There are also the values for the dual extruder just below that, though I do not know how they correspond to the two different nozzles, and I have not purchased the DE, so I won’t be able to test those.

I believe you are correct about the sensor’s height picking up the heated bed, but I did run into one problem with that while using glass: the sensor will see through the glass and register the “holes” from the heated bed’s screw countersinks if it’s over them, so that can really mess with your bed levelling mesh, especially if you are using the 11x11 grid, or if the probe offsets are not set correctly. I fixed that issue by installing a layer of thin metal HVAC/ducting tape to the entire bottom of my glass plate. Never thought to try that for the stock probe; wonder if it would work. :thinking:

I asked my sensor guy and he said that the capacitive type sensors aren’t really made to detect the metal. I had assumed it was like our sensors at work but these detect any object instead of ferrous metal. I wonder why the glass doesn’t get picked up sufficiently, unless infact the sensor you used is an inductive sensor which would explain it. The

I have added to my machine a layer of heat reflective insulation under heated bed. This doesn’t sound like it will help the screw holes, but I can add some thin sheet metal or something easily enough.

I know a little bit about sensors but am not familiar with the capactive type. He sent me a video to explain how they work. He said the video “has more information than you need but it does explain the technology.”

Thanks a lot

Well I do know not it’s not inductive, as it triggers from placing my finger under it, as well as other non-metal material, like plastic and paper, but it doesn’t trigger if I place just my glass right underneath it…maybe I need to turn up the sensitivity? Or maybe it is something about borosilicate glass that doesn’t trigger it? Hurray! More experimenting to be done. :crazy_face: I both love and hate how this machine is a hobby in itself; can really be a lot of fun to tinker with, but sometimes I also just really want to get back to making things. :laughing:

And thanks for the video; great stuff!

1 Like

So I can now confirm that the capacitive probe I installed can sense the glass without any backing. After adjusting, it’s doing exactly that without sensing the heated bed or screws underneath, and is also not affected by the magnets imbedded in the heated bed. Unless there is something I am missing, I do believe we have a winner! All credit to @TobIY for this fantastic mod to the single extruder. I can’t imagine it would be too difficult to re-engineer to work with the DE as well.

1 Like

II am meeting my guy tomorrow to get some sensors, im gona buy a few off of him. Then I will upgrade the 3d print module i got which was a redesign from the first snapmaker 2, it has better cooling i guess. not sure what else. then i will look at the dual extruder when it finally shows up

1 Like

That’s what I have, the v2 of the 2.0 print head. Let us know how it goes!

At the usual White Castle parking lot? :sunglasses:

Here is the comparison between a 5x5 manual level, and a 5x5 auto level using the capacitance sensor, both on a glass bed.
The manual calibration shows my bed level delta as 0.150, while the auto level shows 0.175. This overall difference of 0.025 and the greatest single-point difference of 0.035 is well within the accuracy tolerance of both the sensor (±0.038 as my testing showed) and the human ability to “feel” the tension on the calibration card (since that is how the manual levelling is done, haha), the combined accuracy tolerance of which is easily 0.08 to 0.1mm. Keep in mind that the graphic exaggerates differences in the delta by changing the scale, as seen on the right of each image.


1 Like

Thought I’d post it here for historical value - Beacon Probe Review and tutorial - YouTube

Unfortunately that video is not of much use since it does not apply to the Snapmaker or its Marlin firmware.

Hi,

  Very clever project. Do you have a step by step how to process or it's straitgh forward installation without any mod on firmware or something else to do?

Thank you!

Thanks.

The process is very self explaining.
Take cake of buying the exact right proximity switch type and wiring it like the original one.
(Matching color’s of the wires.)
Print and mount the part.
(You eventually need to adjust the proximity switch itself on the approximate distance to the glass in relation of the nozzle. )

Then start the leveling process with the touchscreen and keep finger’s on the power switch. :sunny:

Thanks! I’ll give it a try soon!

Cheers!

Hi,

 I got my  sensor ( Capacitive Proximity Sensor Switch LJC12A3-5-Z/BX ) and made the mod... But, when I tried to level, the nozzle hit the glass and push it down... 

I’m using GO 3D Borosilicate glass. My sensor is 1mm above the nozzle and I’m using print head V1. What I should do to make it working?

Thank you!

Did you adjust your sensor with the adjustment screw beforehand?

Hold a piece of plastic or glass under the sensor and check when the sensor turns red.
When the sensor lights up, adjust the position so that the trigger area is lower than the nozzle.
Test it all in the air (Z 100+) so you don’t crash.

If the sensor is working correctly but the Snapmaker controller isn’t responding, check your wiring.

Thank for your reply! It’s work after playing with the screw… But, the sensor seems not work when I’m heat the bed and try to take mesurement with Octoprint. I got false data and strange graph with Bed Visualizer!

Cheers!