How to Install an Inductive Sensor for Auto Bed Levelling on 3D Printers

Just acquired an Inductive Sensor for auto bed levelling? It's a good alternative to dynamic probe-style ABLs:

  1. It's cheaper.
  2. It has no moving parts - never worry about the probe drooping down and crashing into your prints.
  3. However, it's only compatible with metallic and (very-thin) plastic beds. On the bright side, the best consumer 3D printer bed currently (in our opinion) happens to be metallic!
  4. Instructions and discussions around this has also been scarce and/or abstract, but we're here to change that!

This is a guide focused on the Ender 3 V2, and our 12mm NPN Inductive Sensor. However, instructions should be easily transferable to other printers and similar probes since we are not using any niche ABL-specific hardware ports! Just look up the disassembly process on your own printer.

3D Printed Mounts

Before starting, you should have a printed mount on hand. ideagen3D has designed mounts for the Ender 3/Pro, Ender 3 V2, and Sapphire Plus.

Physical Installation

  1. Before starting the installation, please ensure that the bed corners as level (as much as possible) with the springs. Take care not to accidentally rotate the bed levelling springs during this process.
  2. Turn off the printer and disconnect the PSU.
  3. Push the Bed to the back, and unscrew this bolt.
  4. Remove all attachments (e.g.filament spool holder) from the top of the printer, turn the printer upside down and lean it against something.
  5. Unscrew these 3 bolts.
  6. Once inside, disconnect the Zmin stop (check the yellow tag). If you have an upgraded board (e.g. MKS or SKR), it might be preferable to use one of the unused sockets, such as Filament Runout Sensor 2.
  7. Insert the pre-terminated (black and blue wires) in its place. Polarity does not matter. A dab of hot glue or blue tack may be helpful to hold it in place as this terminal is not self-locking.
  8. Now, we need to splice power (12v or 24v) and ground from somewhere. If your board has spare sockets, go ahead and use those. However, the Ender 3 V2 does not, so we will splice into the main 24v power coming in from the PSU.

    Loosen the thick red wire from the PSU (red circle on the left, obscured by the black wires on top), and wrap or solder the unterminated (brown) wire around it. It may be helpful to strip a little more of the red jacket so there’s more length to intertwine, but remember to heatshrink/tape back that area to avoid shorting against the metal enclosure.

  9. When the wires are in good contact, insert them back into the original hole and tighten back down.
  10. Manage the wires to go out the back with the main loom, some zip ties may be helpful.
  11. Install the mounting bracket with the provided screws on the unused threads.
  12. Loosen the nuts on the sensor, and remove the washers. Then, with one nut in place, drop the sensor into the mounting bracket’s hole.
  13. The bottom of the sensor should be ~3mm above the nozzle. Adjust this with the top nut, then secure by counter-locking with the other nut from the bottom. We will fine-tune this later.
  14. Do some further cable management if necessary.

Firmware

Here, we will guide you through modifying your firmware to enable support. This guide assumes basic familiarity with modifying and flashing marlin-based firmware. If you are not already familiar with Firmware modifications and flashing, please watch these videos by Michael from Teaching Tech (1, 2), as well as at least a couple videos focused on your specific 3D printer model before proceeding.

ideagen3D customers can contact us for a pre-compiled firmware for printers we carry, assuming no other modifications.

Remember to make a back-up (or a clean base from the manufacturer's website). We are not responsible for any faults or damage caused by improper firmware.

  1. Start with a base of Marlin that has been validated to work. Check your printer, mainboard, BAUD rate, etc... are correctly designated.
  2. Check/Change these lines in Configuration.h
    1. Search "define Z_MIN_PROBE_ENDSTOP_INVERTING" around line 658, and set value to true. This is for NPN probes (that we carry). Leave as false if you have a PNP probe from elsewhere.
    2. Search "Z Probe Options", around line 832. 
      • If you have replaced the Z-min probe (as suggested for Ender 3 above), uncomment
        #define z_min_probe_uses_z_min_endstop_pin and
        #define use_probe_for_z_homing
      • If you have added the probe into another socket (suggested if you are using an upgrade board, e.g. MKS or SKR), uncomment #define z_min_probe_pin XXX and replace XXX with your selected socket. Consult your mainboard's pinout diagram for this.
    3. Search "define FIX_MOUNTED_PROBE" around line 882, and uncomment it.
    4. Search "define NOZZLE_TO_PROBE_OFFSET" around line 996, and change your nozzle offset values accordingly (shown here is for the Ender 3 V2 with our printed mount).
      #define NOZZLE_TO_PROBE_OFFSET { -43, -1, 0 }
    5. Search "define MULTIPLE_PROBING 2" around line 1006 (optional, recommended),
      uncomment and verify value of
      #define MULTIPLE_PROBING 2
    6.  And right below, around line 1065, verify these values
      #define Z_CLEARANCE_DEPLOY_PROBE 0 // Z Clearance for Deploy/Stow
      #define Z_CLEARANCE_BETWEEN_PROBES 10 // Z Clearance between probe points
      #define Z_CLEARANCE_MULTI_PROBE 3 // Z Clearance between multiple probes
      #define Z_AFTER_PROBING 5 // Z position after probing is done

      #define Z_PROBE_LOW_POINT -1 // Farthest distance below the trigger-point to go before stopping

      // For M851 give a range for adjusting the Z probe offset
      #define Z_PROBE_OFFSET_RANGE_MIN -10
      #define Z_PROBE_OFFSET_RANGE_MAX 10

      // Enable the M48 repeatability test to test probe accuracy
      #define Z_MIN_PROBE_REPEATABILITY_TEST
    7. Search "define AUTO_BED_LEVELING_BILINEAR" around line 1319, and uncomment it.
    8. And right below, around line 1328, uncomment
      #define RESTORE_LEVELING_AFTER_G28
    9. Search for "define GRID_MAX_POINTS_X" around line 1380
      Verify that it is uncommented, and set it to your preferred value. As a general rule of thumb, you want one point for every 60mm bed size, and it has to be an odd number so the center gets probed. This translates to 3 for the Ender 3, and 5 for Sapphire Plus.
    10. All done! Go ahead and re-compile and flash.

Calibration

  1. Turn on the printer, test the sensor with a metal object (screwdriver, scraper, etc). The LED should be OFF when not detecting anything, and ON when it detects metal. Otherwise stop here and revise your firmware, particularly "define Z_MIN_PROBE_ENDSTOP_INVERTING".
  2. Move the Nozzle/Inductor to approximately above the bed spring at the the front-right corner of the bed (nearest to LCD screen), either manually via Disable Steppers or through movements in the LCD.
  3. Leave a piece of paper on the bed at this.
  4. Turn on preheating to PLA temperatures (200 nozzle, 60 bed), and use the menu to decrease Z axis. Use finer resolutions as you approach the bottom, because you want to manually stop the very instant you hear the tactile “click” from the z-stop. The Z-stop is no longer electronically connected to the printer, and hence is not functional.
  5. Double check with the paper that the nozzle is approximately levelled on the bed (not too far, not physically colliding either, dragging the paper in swift motions should feel some “catch”).
  6. Remove the piece of paper.
  7. Carefully adjust the mount height of the inductive probe until it the LED *just* turns on. Be careful not to accidentally change Z height of the gantry during these adjustments (by leaning on it etc).

Slicer G-Code modification

There are 2 options here

  1. Level the bed and generate the mesh manually, once, through the LCD, then load it up every time a print starts
  2. Fresh levelling and mesh on every print. This takes slightly more time but gives better leveling, especially if the bed is moved between prints.

We prefer option 2 - fresh levelling before every print. Either way, first locate the G-Code settings in CURA.

  1. At the top left corner, select Settings > Printer > Manage Printers > Machine Settings
  2. On the bottom left, there is Start G-Code
  3. Look for the G28 line (should be around halfway).

Click here for Option 1 (level once)

add

M420 S1 Z2 ;Enable ABL using saved mesh

after G28 (on the same line)

Click here for Option 2 (level before every print)

add

G29 ;Fresh ABL

after G28 (on the same line)

New generated G-Code from now on should have ABL before printing. This will not affect old G-Code, such as Creality’s provided test prints or pre-sliced G-Codes downloaded from Thingiverse.