# Auto bed probing and compensation with G29 Development

**URL:** https://forum.lulzbot.com/t/auto-bed-probing-and-compensation-with-g29-development/162
**Category:** Hardware
**Created:** [June 26, 2013, 6:59pm UTC](https://forum.lulzbot.com/t/auto-bed-probing-and-compensation-with-g29-development/162 "2013-06-26T18:59:05Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![1013](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@1013](https://forum.lulzbot.com/u/1013)
#### Post date: [June 26, 2013, 6:59pm UTC](https://forum.lulzbot.com/t/auto-bed-probing-and-compensation-with-g29-development/162/1 "2013-06-26T18:59:05Z")

</div>

The marlin firmware has G29 to G32 built in, and I want to try and use it. This will require adding a probe (preferable stowable), and some extra G-code.

> G29-G32: Bed probing  
> G29 Detailed Z-Probe  
> probes the bed at 3 points.  
> G30 Single Z Probe  
> probes bed at current XY location.  
> G31 Report Current Probe status  
> reports whether Z probe is triggered.  
> G32 Probe Z and calibrate with FPU  
> probes the bed at 3 points and updates transformation matrix for bed leveling compensation.

G32 would be the code to use, and apparently the probe is just hooked up in parallel to the Z end stop.  
Not sure where the probing positions are stored, but it can probably be set to whatever.

Now how do we get it mounted to the TAZ? it would have to be stowable after probing is done.

EDIT: should be G29, not G32

EDIT:  
FIles are going up on thingiverse.  
Anti-backlash Z-nut and motor to M6 couplers (needed to make the Z-probing compensation accurate):

> **[Lulzbot TAZ anti-backlash Z-nut and motor to M6 mount mod by 1013user](https://www.thingiverse.com/thing:117950)**
>
> The stock TAZ has some Z hysterisis, often called backlash. These parts remove a large amount of it, and make things like a software compensated bed-level probe possible.

Bed probing parts:

> **[Lulzbot TAZ retractable Z-probe auto bed level compensation with G29 Mod by...](https://www.thingiverse.com/thing:117957)**
>
> This mod makes manually leveling the build bed a thing of the past.This is for Advanced users only, Firmware and hardware modification is required and likely will affect any warranty on the machine. This also reduces your X printable area by about...

G-code for bed probing (use as the custom G-code in Slic3r at the beginning of each program). You may need to adjust the X positions for the deploy and retract positions since every machines X limit switch may be in a different position.  
[bed\_level\_W\_probe.gcode](https://forum.lulzbot.com/uploads/short-url/8sugVoE7aKIs3wj8FfLAkgCSRYe.gcode) (534 Bytes)

```plaintext
M203 X192 Y208 Z4 ; set max rapid rates mm per sec
G91; set to incremental motion
G1 Z10.0 F11520; raise Z
G90; set to absolute motion
G28 X0 Y0; home X and Y axes
G1 X276 F11520; go to probe deployment position
G1 X288 F350; deploy probe
G1 X250 F11520; go to safe place
G28 Z0; Home Z axes
G29; probe bed
G1 Z12.0 F240; raise probe off bed
G1 X14 F11520; go to probe retract position
G1 X0.5 F350; retract probe
G1 X1 F350; move away from limit switch 
M206 X0.0 Y0.0 Z0.0; offset home position for fine tuning

```

and the Configuration.h file for the TAZ with the probing. You will have to adjust the “probe offset from extruder” position settings when you calibrate your own probe, but this should get you close.  
[Configuration.h](https://forum.lulzbot.com/uploads/short-url/okLLacTcOKDvm3gvcfgqbehqbiD.h) (16.8 KB)  
and the other firmware files you need to get probing working are found here: [https://github.com/larsbrubaker/Marlin/tree/Auto\_Bed\_Level](https://github.com/larsbrubaker/Marlin/tree/Auto_Bed_Level)

Also Geneb found the following things that need to be changed in the firmware too:

> 1. You’ll need to change the Z axis micro-steps to 4 in Configuration\_adv.h.  
> Look for the #define of MICROSTEP\_MODES and change it like so:  
> #define MICROSTEP\_MODES {16,16,4,16,16}
> 
> 2. In Configuration.h, you’ll need to make sure that you’ve got the extruder steps set correctly. If you’ve got a “Factory” built TAZ, the steps per MM for the extruder will be shown on the calibration sheet that came with the printer. For mine, it was 860, so I modified DEFAULT\_AXIS\_STEPS\_PER\_UNIT to use that value, as shown:  
> #define DEFAULT\_AXIS\_STEPS\_PER\_UNIT {100.5,100.5,800,860,800}
> 
> I’m pretty sure these are the only two “gotchas” in the process.

And he even put together this nice videos of the install process.

[![](https://us1.discourse-cdn.com/flex020/uploads/lulzbot/original/2X/0/08028b777a410f7cb9fccbbb9bcd71e446eb7859.jpeg "Installing the Auto-Level mod on the LulzBot TAZ") ](https://www.youtube.com/watch?v=dNqr_FqxrYs)

[![](https://us1.discourse-cdn.com/flex020/uploads/lulzbot/original/2X/0/08028b777a410f7cb9fccbbb9bcd71e446eb7859.jpeg "Installing the Auto-Level mod on the LulzBot TAZ") ](https://www.youtube.com/watch?v=dNqr_FqxrYs)

---

_[View the full topic](https://forum.lulzbot.com/t/auto-bed-probing-and-compensation-with-g29-development/162)._
