User Tools

Site Tools


Automatic Z-Probe Bed Leveling with Hall-Effect

Calibrate the surface printing bed can be really frustrating :(
Johann in the last commit of the Marlin firmware for Delta Machine has introduced a self-calibration of the bed. N points are measured and interpolated for automatic Z adjustment.
Requires adding a sensor that is able to probe the bed, this is my solution: a Z-Probe Hall-Effect Sensor with autorectraction.


The probe is based on a metal small rod with a cubic magnet on the tip. When the rod is in contact with the bed, the magnet approaches to the Hall-Sensor.

On the Bottom another magnet is present for automatic probe retraction :

Finally the complete probe with the sensor:

I used a Hall-Θ endstop which provides a precise adjustable comparator.
If you like to assemble the PCB,is possible to buy only the Hall-Θ PCB.
Here you can find my solution for assembly the PCB with paste stencil created with the RepRap printers.

Bill of materials

Preview Qty. Description
1x z-probe_holder.stl
2x M3x10mm screw
2x 5x5x5mm cubic neodymium magnet
1x metal rod with 66.5mm length and 2.75mm diameter 1)
1x Hall-Θ end-stop

1) cut a long sewing needle


, 2013/07/03 23:21

Great idea! How is the rod fixed to the magnet? And how is the calibration started with marlinß I don't find anything about it on his site. Kind regards Michael Kutscer

, 2013/07/03 23:33

The rod is simply attracted by the magnet, a good grip is guaranteed. I'm using a Johann Marlin branch it has introduced the G29 command for automatic bed leveling.

, 2013/07/05 02:06

I don't know if you saw my method. If not, you might be interested in the deployment bar to drop the probe. I haven't finished it yet, but I wanted a way to automatically drop the probe before each print.

BTW, Please excuse the poorly formatted wiki page. It wasn't great to begin with and then recent changes must have mangled the formatting even more. I'll fix it after the holiday weekend.

Now that there is marlin code for probing, I'll make a new mount with a hall switch and give it a try. If anyone in the USA wants 5x5x5 magnets, you can find me on #reprap chat under the most obvious name.

, 2014/08/28 12:09

great project :)

, 2014/05/19 12:24

Salve Marco, complimenti per il progetto, ho autocostruito una mini kossel e siccome mi pare che tu usi come scheda una megatronics, ti chiedevo dove va collegata la Hall 0 dello z.probe, in quanto ho provato in mille modi ma nulla e non ci salto fuori e se ci sono da apportare modifiche in Marlin. Grazie in anticipo

, 2014/08/28 12:13

Ciao Paolo,

scusa per la lunga attesa, Il sensore va collegato nel connettore end-stop Z-min.

, 2014/07/05 05:08

What is causing the hall effect? The electricity in the build plate?

, 2014/08/28 12:16

the magnet positioned on the rod triggers the hall sensor.

, 2014/07/28 03:23

How you deploy it at first time? It seems after probing the sensor came up and stays there because of the bottom magnet

, 2014/08/28 12:17

The deploy is manual, the retraction is automatic.

, 2014/09/06 14:39


1. Can you tell me please where do I connect the 3 wires on the RAMPS 1.4 board?

2. Do I have to make special modification in repetier firmware?

Thank you!

, 2014/09/14 13:05

Hi Ovid,

The probe is connected to Z-min end-stop:

  • Probe Signal to Ramps Z-min end-stop
  • Probe Vcc to Ramps 5V
  • Probe GND to Ramps GND

No special modification for repetier, work with native repetier firmware, you must enable :

#define FEATURE_Z_PROBE true
#define Z_PROBE_PULLUP true

and in


you can put a GCODE script for automatic retraction.

, 2014/09/28 15:31


I tried this with Rich Cattells firmware. Problem is it seems to sample while retracting. This causes output which increases as the probe retracts “between samples” causing the wrong result. Any ideas?

ie : -1.858 0.130 2.117 4.105 6.092

Basically it's taking a reading while retracting between samples.

, 2014/10/13 17:24

Great project !

I did print the parts and got the assembled PCB. Now I want to assemble the probe to the hotend platform but I have some questions for the metal rod. Mine is 82mm long and has a 3mm diameter (from old CD-Rom drive. I filed the printed part so that the rod fits nicely and moves freely.

How did you caluclate the length of the metal rod ? Needs this to be adjusted in the firmware ? Can I cut it to a length that it is still longer then the hotend's tip but not 66.5 mm ??

Enter your comment. Wiki syntax is allowed:
  ____      __ __  __  ____   ____   _      __   ___ 
 / __ \ __ / / \ \/ / / __ \ / __ \ | | /| / /  / _ \
/ /_/ // // /   \  / / /_/ // /_/ / | |/ |/ /  / , _/
\____/ \___/    /_/  \___\_\\____/  |__/|__/  /_/|_|
reprap/rostock/bed_level.txt · Last modified: 2013/07/08 16:43 by marcoantonini