Auto Bed Leveling Sensor Guide – Installation, Setup & Test on Creality CR-10S running Marlin firmware

Looking on the web I wasn’t able to find any detailed guide that well explain what I have to do to mount an ABL Sensor on my printer so I’ve decided to write my own guide.
If you want to understand what you’re doing on your printer and why, this is the guide for you.

For extra safety I’ve dedided to maintain the original mechanical switch connected in parallel with the ABL sensor.

What do you need?

  • Capacitive Proximity Sensor: LJC18A3-H-Z/BX
  • Optoisolator Circuit
  • Soldering iron and some solder
  • Shrink Tube
  • Cutters and pliers
  • Some wiring cables

So let’s start!!

Step 0: Make or buy the needed optoisolator circuit

I’ve made a guide to make your owm circuit or you can just go to the bottom of that page to send me an email to directly get it preassembled.

Step 1: Endstop Connection Mods

In order to maintain both the proximity sensor and the standard endstop we need to make some mods to the original harness.
The default connection of the creality endstops, besides of what is written on the swicth, provides the following pinout:

  • 1, S: COM Pin of the switch, connected to GND
  • 2, G: NO Pin of the switch, not connected to the printer
  • 3, V: NC Pin of the switch, connected to the Z-Endstop pin of the motherboard

The signal pin that triggers the mcu has an internal pull-up.
The switch is connected between ground and Z-Endstop pin in NC mode so when the switch is pressed it opens the circuit and the sgl pin goes from low to high.
In order to get it working in parallel with the proximity sensor we have to modify the wiring and invert the behaviour of the switch between NC and NO modes.
We need to have the Z-Endstop pin normally high and then when a switch triggers it goes low. This can be achieved by swapping the sgl cable (full black) from pin 3 to pin 2.

Stock Creality endstop connection

Modified endstop connection

Step 2: Optoisolator Circuit Connection

The inductive sensor that I’ve buyed has internally an NPN transistor, it means that when it sense the bed surface it pull the SGL pin from 12V to GND.

In order to get it working with the motherboard voltage level we need to isolate the two circuit and this is why I’ve added the optoisolator.
This is the circuit diagram of the connection that I’ve made:

Here are showed the mods to the harness in order to add the circuit with the optoisolator that now act as an usual mechanical switch.

Z-Endstop connections

Green and black wires coming from left are connected to the transistor inside the optoisolator.
From the inductive sensor we have 3 wires:

Inductive Sensor connections

  • BLACK: SGL Pin, connected to the cathode of the led of the optoisolator
  • BROWN: +12V connected to the power supply and goes also to the anode of the led of the optoisolator (trough a resistor to limit the current).
  • BLUE: GND Pin connected to the ground of the power supply

Step 3: Firmware changes

I’ve uploaded the configuration.h file with the needed changes in this github repo.
I’m using the Bullseye fan duct, if you’re using a different mount for the ABL sensor then you need to adjust X and Y offset values.
Depending on how far from the bed you mount the sensor you also have to adjust the Z offset.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: