* Disclaimer: This mod has you working with a high wattage power supply. If you damage yourself or your printer I am not responsible! *


Nov 29 2016

Description: This mod will enable auto-bed leveling / tramming on your printer. The leveling only does single-plane best-fit offsets. It might not be able to compensate for warped beds and rods or a very unsquared printer.

Before you start:

*There are some issues with Thomas’ directions but it does mostly a good job explaining what you’ll be doing.

Step 1: Hardware Mod

Shopping List:

· LJ12A3-4-Z/BX Inductive Proximity Sensor Switch NPN DC6-36V

· Inductive printing surface

- - - Black Wanhao buildtak mat on metal bed

- - - 3mm (or thinner) glass directly on metal bed

- - - 3mm (or thinner) glass with aluminum foil squares glued on underside at sensing points. Start with a full foil underside surface until you know where the sensing points are. Then cut down the foil into smaller squares and glue.

· Two 1/4W resistors (Pick one of the these pairs. They’ll all work.)

- - - 390K and 100K

- - - 39K and 10K

- - - 3.9K and 1k

· (2 pieces) 6in of insulated braided wire

· Heat shrink tubing 4/5 AWG

· Solder, soldering iron, ect

· Misc. wire cutting tools

· Electrical tape

· 40PCS Dupont 10 CM Male to Female Jumper Wire Ribbon Cable

· 3D printed mount for sensor https://www.thingiverse.com/thing:1924458


1. Print and attach a sensor mount for your printer.

2. Solder together a voltage divider and connector plugs to the sensor. Don’t take shortcuts! You’re dealing with high voltage. Heat shrink then tape everything up. See diagram and photos.

- a. 5V out is a female dupont

- b. Gnd from voltage divider is female dupont

- c. Blue Gnd wire is male dupont

- d. Brown 24V Input wire is male dupont

3. Solder together your braided wire and connectors for power

- a. V+ 24V from power supply is female dupont

- b. V- Gnd from power supply is female dupont

4. Turn off your printer.

** Update the firmware on your printer before connecting the sensor wires.**

5. Flip over your printer and screw down braided ends of power wires to V+ 24V and V- Gnd. Draw out the other ends through the printer’s side opening.

6. Mount your sensor’s blue end so it’s about 1mm above the tip of the hotend. Tighten the screws firmly. Train the wire up through the clip in the top of the base and down the side of your printer. Give enough cable slack so it’s not pulling on the sensor at any hotend position.

7. Remove the z-stop button and mount from your printer.

Step 2: Firmware Mod:

1. Download zip file of firmware with auto-leveling enabled: https://github.com/JoelWise/Wanhao-I3-Plus-w--Auto-Level

2. Download and install Arduino IDE 1.0.6: https://www.arduino.cc/en/Main/OldSoftwareReleases

3. Unzip firmware into folder and open Marlin.ino

- a. On the Configuration.h tab there is a “Bed Auto Leveling” section with configurable options. You can use the firmware as-is to start.

4. Under Tools > Board > select “Arduino Mega 2560 or Mega ADK”

5. Connect your PC to your printer using a printer cable.

6. Under Tools > Serial Port select the correct COM port.

7. Click the Upload button and wait until the IDE says the upload is complete

Step 3: Hardware Mod (Continued)

1. Turn off your printer.

2. Plug in the sensor into the z-stop input and power to the sensor.

3. Turn on your printer and touch something metal to the blue sensor tip. The red LED should light.

4. To test your sensor, send an M119 command to your printer. When the sensor is not triggered (LED off) you should read “Recv: z_min: open”. Touch something metal to your sensor and send M119 again. You should read “Recv: z_min: TRIGGERED”.

4.5. Manually move the hotend around the bed to all corners and make sure the sensor is able to light without the nozzle or fan duct touching your bed.

5. If your trigger is working, try sending a G28 homing command. Have your finger on your printer’s emergency stop button just in case the z-stop doesn’t work. If the probe z-stop works then try sending a G29 command to read the leveling matrix.

6. Now, if you want, you can use a G30 command to get an offset readout at any point of your bed. Use this to get your bed mostly level.

Step 4: Firmware Mod (Continued)

Now you’ll need to figure out your sensor and hotend offset…

0.5. Get your hotend and bed to printing temperatures. Eg. ...

- - Gcode "M104 S190" to set hotend to 190

- - Gcode "M140 S60" to set bed to 60

1. Send a G28 command to your printer. The hotend should end at bed center and zero z-stop.

2. Send a G92 Z10 command. This tells your printer that your Z is at 10mm but it actually sits at the probe’s zero.

3. Put a piece of paper under the hotend nozzle tip.

4. Send G1 Z9.9 command to move the hotend down 0.1mm. Continue moving the tip down in 0.1mm increments until you feel the nozzle touching the paper:

- a. G1 Z9.9

- b. G1 Z9.8

- c. G1 Z9.7

- d. …

5. Your offset will be Z value minus 10 minus 0.1. E.g. if the nozzle touched at Z9.7 then your offset is 9.7 - 10 – 0.1 = -0.4

- a. Note: You might be OK without the extra 0.1 but I found this helps get the correct offset.

- b. Note: If you often print at ~0.10 layer heights you might need to tune the offset further in 0.025 increments.

6. Open Configuration.h in the Arduino IDE and update the following line with your offset:



7. Save and upload the firmware to your printer.

Step 5: Slicer Software Setup

In your slicing software make sure to set up your starting gcode to run the G28 then G29 commands to home then read your auto level matrix.

That’s it! You’re done.

<p>Why don't you use the z-probe connector? I just saw it labled on the board.</p>
<p>The z-probe connector is connected to an atmega pin but was never setup in the firmware to be used. It might have been useful with Marlin-RC but they went with Marlin 1.0.x and didn't populate the connector for whatever reason.</p>
<p>So you mean we cant use it because of marlin 1.0.X? I made a custom firmware for the i3 and updated the marlin base to 1.1.2 (https://github.com/Silverquark/i3PlusPlus). Would the zprobe pins work on 1.1.2?</p>
<p>I wrote this almost a year ago. I can't remember for sure how marlin 1.1 was different. I think the software lets you keep your button z-stop and also install a prox sensor for auto leveling. This 1.0 tutorial removes the z-stop and uses the prox sensor for auto leveling and stop sensing. The bigger issue with upgrading to 1.1 is that the LCD touch panel won't work.</p>
Take a look at the Link I posted. It's a custom firmware I wrote with the help of a few other people and it's based on marlin 1.1.2. The lcd is working Perfect fine, even got a completely modified menu and extra Features
<p>Ok I studied your post and the video and now understood how this is supposed to work. <br>Now I wait for my sensor to give this a try. :)</p>
<p>Im running the I3+ and had the problem that after G28 and G29 command my Z values was on Z13.01, meaning when i started a print the Z axis wanted to lower itself lower than the printbed. Just to clarify G29 command did detect Z without problem.</p><p>How i solved this was to manually offset my Z value in Gcode with setting G92 Z{NozzleOffset} (my nozzle offset was -0.83, so G92 Z0.83) and the sending move command G1 Z0 for it to move to its absolute end position.</p>
<p>Setting offsets was always a headache. I got so tired of it that I actually rolled back to the original firmware and re-installed my adjustable z-stop. I still use the prox. sensor to manually level the bed using the light indicator then I adjust the z-offset with the set screw.</p>
So I am getting started here. Using the modded firmware and the original Z home sensor to first ensure that the software is working ok. <br>G29 seems to work fine, but G28 runs the X Axis with full speed to the center of the bed after homing.<br>This speed is waaaay too high.<br>As this seems to be an early Marlin bug and a newer version is no option - has anyone found a fix for that?<br><br>Btw. LCD is still working.
<p>Send gcode command M503 and take a look at your Maximum feedrates (mm/s).</p><p>I never push my printer faster than 60mm/s in my slicer settings so I have:</p><p>M203 X60.00 Y60.00</p><p>This should cap max speed and prevent the fast movement you're seeing. Don't forget to send M500 command to save your new settings.</p>
<p>Can someone confirm this is working?</p><p>Will the I3+ LCD still work with auto bed leveling enabled?</p>
<p>I tried the sw update but apparently without success. I did the update withing the arduino ide and without errors. No I cannot command the my i3 plus. Do I have to upgrade the lcd as well. I can connect to the printer using repetier host but when I try to command it nothing happens??</p>
<p>Yea. Updating the LCD firmware might be needed. Here are instructions on how to update the firmware. When I setup the SD card I had to format it and copy the files using only linux. Otherwise the lcd doesn't recognize the card. </p><p><a href="http://www.wanhao3dprinter.com/FAQ/ShowArticle.asp?ArticleID=79" rel="nofollow">http://www.wanhao3dprinter.com/FAQ/ShowArticle.asp...</a></p>
<p>Isn't that only required to get the LCD working? I thought that the controllerboard should work without updating the lcd?? Anything else to look for?? </p>
<p>I'm really looking forward to trying this. Thanks for posting. What is your firmware based on? The official release from Wanhao?</p><p>https://github.com/garychen99/Duplicator-i3-plus</p>
<p>Nice post :)<br><br>May i ask why such an old version of the Arduino tool?</p>
<p>It wouldn't compile with the newer IDE. Maybe I did something wrong but from experience I know to try the older IDE if something won't compile in the newer.</p>
<p>I've not tried it personally yet but there was an update recently that I have heard may have corrected this, still need to see it myself though.</p>
Ahh good point, thanks :)

About This Instructable




More by intr3ou:Wanhao I3 Plus Bed Auto Leveling w/ Inductive Sensor 
Add instructable to: