Wanhao D6 Induction Probe Mount

by 1bigpig, published

Wanhao D6 Induction Probe Mount by 1bigpig Feb 3, 2017

Liked By

View All

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag.

Print Thing Tag


Thing Statistics

9452Views 1648Downloads Found in 3D Printer Accessories


Updated 2-28-2017 Updated the hookup photo to help better illustrator how to wire the probe and LM7805 to the controller board.

Updated 2-18-2017 Mathieu Fabris converted the "Marlin_firmware_How2Flash" manual to French. Available on his website:
Updated 2-9-2017 to include "Probe_Calibration.PDF" manual.

This project includes just about all the information you need to add auto-bed leveling (mesh bed leveling) to a Wanhao D6 (Monoprice Maker Select Ultimate) printer. It relies on a very recent build of Marlin 1.1.0RC-8 and an induction probe that you can wire yourself.

First off, you will need the firmware and none of this would be possible without the hardwork of Rob Mendon! He went above and beyond the call of duty on this firmware. Also, this firmware has been tested and screened for bugs as best as we could. There are many features that target the D6 specifically in this firmware, so this is not a plain vanilla Marlin port.
The souce code and how to build and install it can be found here:

You may also need information on how to build the latest version of Marlin firmware on your machine. The instructions are in the "Marlin_firmware_How2Update.pdf" file.

If you do not have a probe, I highly recommend sticking with a 12mm induction probe. A 12mm probe with the probe mount included in this project will not hit any part of the machine, you will loose NO build volume. Here is the one I used in this project:
12mm NPN NO 3-wire 4mm Tubular Inductive Proximity Sensor Switch LJ12A3-4-Z-BX

I have included an 18mm probe mount as well. You WILL lose about 10mm of build volume on both the X and Y axis, but only at the extreme upper right corner. I only recommend this size probe if you have a glass buildplate or other thicker build plate materials. I used a capacitive sense probe. These probes are not as near as repeatable as the induction probe but they do work with thick glass. Here is a probe that I have tested:

18mm Approach Sensor Cylindrical Capacitive Proximity Switch PNP NO, 1-10 mm

Upon assembling your 12mm probe, you will see a picture of a probe with a 21mm measurement indicated. You want the probe to be mounted with 21mm past the base of the mount. This will put your probe within 1mm of the build plate. You can then fine tune the exact probe offset in the firmware under Z-Offset.

Once you build your mount, you will need to wire it up. Look at the enclosed pictures of using a 7805 voltage regulator to limit the voltage going to the Z_MIN pin.

Now that you have your probe all wired up, you need to install it on your machine. Follow the "Self_Made_Probe_Mounting.pdf" on how to install the probe on your machine and which pins you can get power for your probe and where to plug in the probe connector.

Lastly, when configuring your Marlin build for auto-bed leveling, you will need to know the probe offsets. You use the front side mount with a 12mm probe. If you have a 18mm probe, you will use the back side mount. Here are the offset for those two mounts:

// Front side Mount -- 12mm Probe offsets
;#define X_PROBE_OFFSET_FROM_EXTRUDER 35 // X offset: -left +right [of the nozzle]
;#define Y_PROBE_OFFSET_FROM_EXTRUDER -15 // Y offset: -front +behind [the nozzle]
;#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]
// Back side Mount -- 18mm Probe offsets
;#define X_PROBE_OFFSET_FROM_EXTRUDER 35 // X offset: -left +right [of the nozzle]
;#define Y_PROBE_OFFSET_FROM_EXTRUDER 52 // Y offset: -front +behind [the nozzle]
;#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]

If you need any information on Marlin configuration, it is hard to beat this source which explains everything and what each setting does/means:

After you install the probe, now you need to calibrate the probe height to the build plate. This is covered step by step in the Probe_Calibration_Updated.PDF. It also included the required G-code that needs to be added to your existing slicer starting script.

Print Settings


Wanhao Duplicator 6










I print my mounts in ABS. You might be able to use PETG as well, but PLA will sag as the probe mount is very close to the heater block.

I only recommend ABS. Print at 66% or higher infill. I printed some at 75% infill and other at 66% infill. The more solid the mount, the better.

When printing ABS, I recommend 101% scale. This will counter act the ABS shrinkage. The tolerances on this part are pretty tight, so it WILL make a difference!


Check fit before installing!

The overhand, even though it is small, needs to be near perfect. It is a tight fit, so if there is not exactly 8mm between the lip and the base, you need to sand/file until there is. Especially if the support left any nubs or plastic behind when removed.

How I Designed This

Mount modifications are possible!

I have included the 123d Design files, though if you change any part of this design, the offsets and/or the pre-calibration distance will no longer be valid.

More from 3D Printer Accessories

view more

All Apps

Auto-magically prepare your 3D models for 3D printing. A cloud based 3D models Preparing and Healing solution for 3D Printing, MakePrintable provides features for model repairing, wall thickness...

App Info Launch App

Kiri:Moto is an integrated cloud-based slicer and tool-path generator for 3D Printing, CAM / CNC and Laser cutting. *** 3D printing mode provides model slicing and GCode output using built-in...

App Info Launch App
KiriMoto Thing App

With 3D Slash, you can edit 3d models like a stonecutter. A unique interface: as fun as a building game! The perfect tool for non-designers and children to create in 3D.

App Info Launch App

I finally found the right firmware for it, found out over a dozen ways to make it not work, though.

Has anyone managed to get the second probe (18mm Approach Sensor Cylindrical Capacitive Proximity Switch PNP NO, 1-10 mm
https://www.amazon.com/gp/product/B008MU0CCG) working completely?

The probe is fine. It has a faint red light and gets bright when close to my glass plate. When the probe is activated, I measured ~5V to the Zstop connection. Unfortunately, it seems like dot-bob's firmware with the probe implemented are too old and hard to find. I've been playing with configuration.h in marlin but can't get the printer to recognize the probe. It crashes right into the nozzle when I try to home Z axis.
Any help would be appreciated!

Read all the tutorials but alittle confused as to where you add the offsets?

// Front side Mount -- 12mm Probe offsets
;#define X_PROBE_OFFSET_FROM_EXTRUDER 35 // X offset: -left +right [of the nozzle]
;#define Y_PROBE_OFFSET_FROM_EXTRUDER -15 // Y offset: -front +behind [the nozzle]
;#define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]

You change the offsets to match where you mount the probe, relative to the heat nozzle and then you recompile the entire firmware. If you follow the links provided in the description, it will link you to the Github where you can download the entire source code. The project can be built in the Arduino IDE. Hope that helps.

BTW, there are 4 prebuild firmwares depending on what type of probe (PNP, NPN) and where located (front or back mount) to let you skip building the firmware on your own.

I am looking for the pre-builts and have had no luck in finding them. I used an NPN inductive sensor. Your comments seem to indicate that this is OK, but the wiring diagram image included in the file download shows a pnp part while the purchase link shows an NPN part (which I bought). I do not find examples on Github. So, I am confused more that normal.
I found the offsets, but not the polarity reversal.

A drawing showing both wiring diagrams would be very helpful, as would line numbers and changes that need to be made in the config for each of the two different parts;

Possibly. You need to go from 24v to 5v. IF this module will let you adjust down to 5v, then it should work. Still, a LM7805 is cheaper and pretty much bullet proof when wired correctly. If you go ahead with this module and it works for you, please let me know.

OK! Thanks! I didn't see the 5v explicitly stated anywhere, so I was hoping that was the goal. I will report back!

So the step down buck circuit does do the job fine of changing the 24v to 5v! Buuuut, I'm confused on how to actually wire the Z-stop plug. On the pdf it shows only the one wire going to the non-keyed (no V above it) pin. On the last picture showing how to wire it all wiring the LM7805 it shows both a ground and data wire going to the Z-stop plug with the data in the keyed pin. Which is correct?

Any answer on this yet?

it's perfect, all is ok

I hooked mine up last night, but instead of using the 24V supply, there was a port open on the bottom near all the endstop sensor ports for a 5V fan. I plugged it in there and it works no problem! I avoided having to have a voltage regulator in the process too.

Edit: Please don't do this. It is not in spec of the sensor 6-36V. Results in poor performance of the sensor after testing. Once the bed is hot, the sensor no longer accurately detects and will crash.

What I'm going to do, since the sensor is NPN OC, is I'm going to throw a GP diode or perhaps a shottky diode such that the sensor is isolated when it's not active, and when it's active, it just connects the pin to ground.

For this, you must connect make sure the pull-up resistor is enabled on the z-min pin and make sure you have the logic inverted flags set. If you happen to have a NPN NC, don't invert the logic.

Yea, I was never able to get any of my probes to work with 5v. Let me know how the diode voltage blocker works. I saw a video by Tech2C using that technique but if you accidently put the diode the wrong direction, you will blow out your controller board's Atmel chip. Good luck!

Yeah, I'm out of town this weekend starting today, but I expect I'll probably do it either Monday morning at like 1 am when I get back, or Tuesday night.

Also, I don't think you can blow up your board with the NPN since when the sensor is active it sinks the "output" wire to ground. When the sensor is not active, it's essentially high impedance (disconnected wire). Only difference is that there is actually the LED in the sensor which connects to output. Since there's a pull up resistor on the output (the microcontroller pin) we get a differential voltage across the LED at all times. 24V to 5V, or 19V on the LED (with whatever currently limiting resistor I'm sure). Basically, 24Vs would never be applied to the output wire, so no damage should be possible. Worst case it wouldn't work, and you turn around the diode. I'll risk my own board for the test and report back ;) (I went to school for Electrical Engineering and Computer Engineering)

Well the diode worked well, I used a IN4148.

The 4mm distance is just not enough though for use with my PEI sheet. Once the bed is hot, it crashes. Works flawless cold, but not hot.

Going to order a 8mm one and hope that works

Just set up the 8mm probe, works great! Might have to look into investing in one of the 12mm diameter 8mm probes so I don't lose build volume though...

I'm trying to set up auto bed leveling. I've updated to the latest D6 Marlin. I've replaced the configuration.h file with the one in the examples for the NPN proximity sensor. What I notice immediately is that the encoder skips some "ticks" when turning the knob. For example, in the Z-offset setting.. if it's set at 1.00 and I turn it one tick at a time, I get 1,2,3,4,6,7,8,9,11,12.. I can feel the tick on the knob, but it doesn't register in the screen. Ideas? If I go back to the stock configuration.h it works fine

It is probably the encoder speed setting. In Configuration.h file, change this/these settings:
// This option overrides the default number of encoder pulses needed to
// produce one step. Should be increased for high-resolution encoders.


// Use this option to override the number of step signals required to
// move between next/prev menu items.


Changing ENCODER_PULSES_PER_STEP from 2 to 4 with half your encoder speed allowing more control but requiring more turning of the dial.

Hope this help.

What size mini jst connector do you use to connect the voltage regulator to the motherboard?
Most of my investigations have led me to 1.5 or 2mm connectors
Did you put the connector straight onto the regulator or are there a couple of wires underneath the heat shrink tubing?

The connector is a JST-XHP. I got them from Amazon but they are 0.1 INCH (2.54mm) spacing.

As seen in the photo, the black wire of the probe goes to PIN 1 which I put heat shrink tubing on an then bend 180' degrees towards the back. The connector pins were soldered directly to the 7805. This is then ALL shrunk wrapped again to protect the 7805 heatsink or pins from shorting out against the main board.

Hope this helps!

Comments deleted.

Maybe. Depends on how thick your glass is, what type of probe you are using and what the probe's sensor range is. An 8mm sensor range induction probe will work with glass up to about 3mm thick--provided you are not using anything else between the glass and the bed. A 4mm probe cannot use glass. A capacitive probe can use any thickness glass, as it senses the top of the glass and not the aluminum build plate. Hope this helps!

I tried the y and x offset with following code but even after I upload the machine has the y home off by 15mm and therefore the probe cannot contact the bed. Any help?

What kind of probe?

I fixed the issue. I had to do the following.

Marlin code changes

Uncomment Configuration.h 809


Uncomment Configuration.h 896


Add Configuration.h 595

define X_PROBE_OFFSET_FROM_EXTRUDER 35 // X offset: -left +right [of the nozzle]

define Y_PROBE_OFFSET_FROM_EXTRUDER -15 // Y offset: -front +behind [the nozzle]

define Z_PROBE_OFFSET_FROM_EXTRUDER 0 // Z offset: -below +above [the nozzle]

Add Configuration.h 898


define Z_SAFE_HOMING_X_POINT ((X_MIN_POS + X_MAX_POS) / 2) // X point for Z homing when homing all axis (G28).

define Z_SAFE_HOMING_Y_POINT ((Y_MIN_POS + Y_MAX_POS) / 2) // Y point for Z homing when homing all axis (G28).

Thanks so much for the great info. I don't understand how the shown circuit with the 7805 possibly could work with an NPN sensor open or closed. Upon triggering an NPN would change connection between black and brown (+). There will be no signal on the 7805 input. PNP will work as the the connection will be between black and blue (-) and you get a signal and 5V out. This is how my Omron NPN NO sensor 653-(E2BM12KN08WPC12M) behaves and it doesn't work of course. I tried the Omron E2BM12KS08WPB1 2M which is PNP and it works flawlessly indeed with the 7805 wiring shown and the PNP Configuration.h. This probe has a working distance of 8mm in a M12 form factor.

Comments deleted.

Does your printer nozzle move "close" to the bed before lowering the build plate 5mm? The autolevel routine built into Marlin does a small retract after it "finds Z 0.0" to prevent the nozzle from dragging across the build plate. You can disable this "feature" if you build your own version of Marlin. It is found in the Configuration.h file. Search for "Safe Z" and the setting should be under this section.

Now, to VERIFY that the probe + offset really is at Z 0.0, under the main menu --> Prepare --> MOVE Axis --> Z --> 0.1mm and then turn the dial until Z=0. You should have the nozzle just touching the build plate. If not, then you need to adjust your Z Offset. That is explained in the setup pdf, but a quick reminder. Main Menu --> Control --> Z-Offset. You want the the offset range to be between 1.0mm and 0.4mm. Any less than that, and you need to physically raise the probe in the mount. Anything more than that, you need to lower the probe. Adjust the Z-offset until the nozzle is just touching a sheet of paper resting on the bed. Save the value, exit out of Z-offset and store the Eeprom setting under Control --> Store Settings. Rehome and verify that the nozzle has moved to Z0 following the Move Axis procedure above. Once set and stored, this number should not change and so you will only have to do this again IF you change nozzles, move the probe or somehow disturb your printer build plate.

Hope this help! If not, there is a great Facebook D6 user group that can help out as well:

No. When z home starts the head moves just back in X to the middle of the bed and moves down. I cannot change the z offset ( z-bed) or move the bed up, only down. Where ever the bed is that position is recognized as 0.000. So weird. It must be the probe as all homes fine with standard config and limit switch. I checked wiring, probe triggers fine. normal open vs normal closed ? Please clarify the used M12 probe. The listed one is NPN and NO ( normally open), In the NPN configuration.h it says NC (normally closed) is advised and the default? My probe is NPN and NO to match the one you used.

Were you ever able to figure out the probe/wiring situation? I have been away from my "work" computer.

Yes the wiring shown here for the 7805 can only work with an PNP probe not an NPN. All is fine and working brilliantly with an PNP. I posted the explanation in a post above. Thank you for the detail on the callibration, worked a charm. Also found a probe in a M12 form factor that has a 8mm sensing range. My set up is detailed here http://www.thingiverse.com/thing:2235389

Cooling Fan/Shroud with 5cm Blower and Sensor for Wanhao D6/Ultimate

Nice fan/probe mount! I disagree about the NPN and a 7805--only because it is how my probe is wired and it works. Yes, you have to adjust for NC or NO in the configuration.h file but that is pretty straight forward.

What #define do use to configure NO/NC? I don't see anything.

Great if it works. Maybe all these probes have heterogeneous designs? Saw a lot of discussion on this on the reprap forum too.The Omron probes have output reverse and power source circuit polarity protection, reverse polarity protection and Short-circuit protection. So on the NPN version there is 0 volt between minus (blue) and the black when triggered as it should be. Contact instead is made between plus (brown) and sensor (black). Changing NC to NO can't do anything about that as on NPN contact is open or closed between plus and sensor output never to minus which you would need to get any signal to the 7805. Anyway the autoleveling is just a pleasure to finally have.

Thanks a lot!

works perfectly, very easy to set up, better instructions than came with the printer.
a couple notes from my install, for anyone on the fence.

you may want to test your probe before you go digging into the printer. i got three regular 4mm probes off amazon before i got a working one. this was the biggest pain of the whole procedure for me. i put it all together removed the z-stop and was ready to go before i realized the first probe was bad.

the only thing i noticed left out of the instructions really is pretty simple, (or i missed it)
there are configuration files for the various probes in the example_configurations folder of the firmware. before you open marlin.io with the arduino ide you probably want to overwrite configuration.h in the main folder with one of those. pick the one that suits your setup.
(i chose the Configuration_PNP_FrontProbe_mount because i was using a pnp probe mounted to the front. simple.)

also because i didnt have connectors to plug this stuff in, i used the z-stop cable and plugged the ends that plug into the switch onto the legs of the lm7805.and i used an old pc motherboard power button header (i chose that just because it was red black almost any would do), for the power connection to the probe at j19.

all went off without a hitch, no real reason not to do this, all the complicated and hard stuff has already been done for you(THANKS! BRUCE, ROB, everyone else), yet there is still enough where you get a sense of accomplishment when you pull it off.

When you say the capacitive probes aren't nearly as repeatable, do you mean that it won't be as accurate when leveling, and if that's the case would it even be worth doing? I'd really like to set this up on my D6, but I really like using a glass plate. It makes removing prints a whole lot easier, and I don't have to worry about having to replace the buildtak.

Also, why PNP rather than NPN for the capacitive probe? Wouldn't it be easier to reference an NPN probe, so that the wiring would be the same?


The wiring is the same for both PNP and NPN sensors. The only difference is how the main board sees the signal. There are configuration files on the Github for both PNP front and back mounted sensors as well and NPN front and back mounted sensors. Also the configuration file is well documents if you need to change anything sensor probe related. I was using a PNP because that is what was available and less expensive when I was looking.

As for repeat-ability, I am currently using a LJC12A3-53Z/BY capacitive sensor probe and it has been working well. While it is not as "repeatable" as my 12mm inductive probe, it is proven to be good enough for ME. I say for me, as a few other people have reported back that they are having a hard time keeping the Z offset consistent. With that said, my probe reported this after an M48:
(M48 --> LJC-12A3-5-Z/BY):
Mean: 1.273721 Min: 1.271 Max: 1.278 Range: 0.007
Standard Deviation: 0.002607
X:65.00 Y:115.00 Z:6.32 E:0.00 Count X: 5203 Y:9205 Z:2531

One thing I have noticed, you will still have to recalibrate your Z offset as different materials have different capacitance. I went from a 3mm piece of glass to a 4mm ceramic plate and had to recalibrate. Also it seems changes in weather also effect the Z offset.

With all that said, I would still recommend an inductive probe first, but if you are using glass, by all means, get a capacitive sensor probe! Hope this helps.

Thanks for clearing it up for me, it did help. I went ahead and ordered an inductive probe first, but I'll go ahead and order the capacitive sensor as well. I need to see which works better for me. I've always like printing on glass. It's flatter and I can remove it from the printer to remove parts, so I'll have to see how it goes just printing on the bed with maybe painters tape, no glass.

Can you please post a full image of the wiring diagram? The image is cutoff and leaves a lot to be figured out and messed up by electrical novices like me.

Will draw a simple diagram and try to get it posted up tonight.

Awesome! Thanks so much!

Sorry it took longer than I had planned. Anyways, a new wiring diagram image is up. Hope that helps and let me know if you need more information.

Very cool! I've already upgraded firmware on my Ultimate but hadn't gotten around to inductive probing yet. Thanks for the part!

How's your upgraded firmware working?

Pretty awesome!!! I love the display and the fact that I can speed override during a print if needed. I use Octoprint and this lets me still have a little control over the machine or at least be able to walk by and see what percentage of the print is done--not able with the original firmware that just displays "Printing over USB...".

Here's the big question - does it print any better than it did? Does the firmware crash less often?

I have not had the firmware crash on me once. As far as printing better, this is what an early tester reported back to me: "Also an interesting side effect with this firmware. My gcode that i'm mass printing with on my printer took 6.5hr prior and now takes 5hr. I had a feeling that the original firmware was limiting printer speed (my cura settings were 150/sec) and I guess this now confirms it. Nice speed up! "

So, yea, I think that is pretty significant! Try it out, as you can always revert back to factor firmware if you do not like it.

So I'm clear, this replaces the use of the microswitch in the rear for finding Z0? Does the updated firmware also use it for automatic platform calibration; no more diddling with the three thumb screws?

Yes, the probe takes the place of the Z-MIN limit switch. The new Marlin firmware DOES support auto-bed leveling--no more messing with leveling the bed (within reason)--but as of right now, you have to build a version of Marlin with the auto-bed leveling turned on. Once that is done, you run a start script that includes a G28 to home your machine and then G29 to auto-bed level. Then your part file. This will compensate for any irregularities in the bed leveling as it prints.