Sunday, December 06, 2015

3D Printer Auto Bed Leveling Geeetech Prusa i3 Pro X

I used a NPN inductive sensor model LJ12A3-4-Z/BX

It is specified to work on 6v to 36v power but mine worked on 5v off the GT2560 board so it was just perfect.

I wired it like below:

SENSOR               BOARD

GND(BLUE)------------------GND

V+(BROWN)------------------5v

OUT(BLACK)-----------------Zmin


Made the following changes to the Configuration.h file of the firmware, change the Z_MIN_ENDSTOP_INVERTING to true compiled and uploaded the firmware.

const bool Z_MIN_ENDSTOP_INVERTING = true;

Enabled bed auto leveling:

#define ENABLE_AUTO_BED_LEVELING

Set defaults on the leveling grid and sensor position:

    // set the rectangle in which to probe
    #define LEFT_PROBE_BED_POSITION 15
    #define RIGHT_PROBE_BED_POSITION 190
    #define BACK_PROBE_BED_POSITION 165
    #define FRONT_PROBE_BED_POSITION 20

Set the grid points to 3 so it will check 9 points in the bed.

    #define AUTO_BED_LEVELING_GRID_POINTS 3


Set the grid points to check:

      #define ABL_PROBE_PT_1_X 15
      #define ABL_PROBE_PT_1_Y 180
      #define ABL_PROBE_PT_2_X 15
      #define ABL_PROBE_PT_2_Y 20
      #define ABL_PROBE_PT_3_X 170
      #define ABL_PROBE_PT_3_Y 20


Compiled and uploaded the firmware.


The red light will always be turned on but will get brighter once it get nears a metal object.

The default Geeetech firmware can be downloaded from here: http://www.geeetech.com/forum/download/file.php?id=1589

You can buy the sensor here.

UPDATE 10/12/2016

I have replaced my sensor with a capacitive sensor and it works on glass or any surface:


For the one requesting the wiring here's an image of the Geeetech board. Power was taken from an unused fan port.