BLTouch Tutorial For Repetier Firmware

BLTouch repetier repetier_firmware

Please Login to Comment

Comment has been deleted

Hello mate, I'm using a RADDS 1.5 mainboard in that printer (A lot like the RAMPS 1.4 but for 32bit processors), stock Melzi board should be able to take the BLTouch second board down

But it does share some header pins with the LCD, (the two power pins should not be a problem (as you can solder onto them and power both the BLTouch and LCD but I'm not 100% sure if the Melzi LCD uses the A4(D28) pin but apparently, you can also use RXD1(D10), A1(D25), A2(D26), A3(D27).

Thanks for the info!

After looking at the link you posted I took a look at the Marlin firmware to try to figure out if that pin (A4) was actually being used by the LCD and its interesting because the pinout listed in the Marlin comments for the Melzi (pins_SANGUINOLOLU_11.h) lists the pins with different values than the board I have or the schematics on the page you link. Marlin has them described like this:

Sorry for the lack of formatting, it strips the whitespace so they aren't lined up and look terrible!


  • Sanguinololu 1.4 AUX pins:
  • 12V 5V D12 D11 D10 D17 D16
  • GND GND D31 D30 D29 D28 D27
  • A4 A3 A2 A1 A0

So according to that comment in Marlin A4 is D31 and not D28? I am certainly not an Arduino/Sanguino expert though am I reading that correctly?

At any rate, the only reference I see to A4 (D31) is in the line:

define SDSS 31

I am unfamiliar with what SDSS is, does it perhaps have to do with an SD card reader if the LCD board has one? Not much comes back with googling unfortunately!

I am hoping that is the case and I can just disable that by commenting it out and safely use the A4 pin to control the BL touch, that would be great!

For the other option (removing C7), I am unfamiliar with what the purpose of that even is, it is some sort of bridge correct? Are they saying that if I remove C7 that the 4 pins underneath it are RXD1(D10), A1(D25), A2(D26), A3(D27)? Does that mean they are just connected to the same pins as in the expansion/lcd pins? If so, I assume I would need to use one of those pins that is not actually in use by the LCD right?

Sorry for all the questions, feel free to tell me to start a new thread :)

Thanks so much!

Just replying in case anyone comes across this I WAS able to get the BLtouch working on the original Melzi board! Long story short, the diagrams listing the Melzi expansion pins do not apply to the board in the Duplicator i3 they have been rearranged from the standard Melzi configuration!

The pin listed as A4 is actually D27! Took forever to figure that out but I believe what this pin goes to is the beeper/speaker in the control unit so if you use jumper pins instead of the standard LCD plug it comes with you can get the BLTouch working without losing your LCD!

I got this working on Marlin firmware 1.18 I believe. In order to do so you just wire the BlTouch the way listed for the Melzi board in the link peps1 provided ( but make sure to attach it to the pin on the board labeled A4, the position may not be the same as diagrams for other Melzi boards so make sure to find the label on your board.

Once that is hooked up you can enable it in the Marlin firmware following the standard guides but make sure you have this line:

#define SERVO0_PIN 27 //BLTouch orange wire

That will tell Marlin to use pin D27 (A4 on the i3 Melzi board) to control the servo for deploying/retracting the pin.

Important note! In order to enable the auto bed leveling in Marlin the firmware becomes too large for the Melzi board unfortunately, so to get around that you can disable the SD card support, which takes up a huuuge amount of space in Marlin.

To do so, find this line and comment it out with two forward slashes in front of it like this:

//#define SDSUPPORT

That should save enough room to get auto bed leveling working. Note that due to size constraints you will only be able to use Bilinear (#define AUTO_BED_LEVELING_BILINEAR) leveling and not the newer unified bed leveling.

I can confirm all the typical BLTouch functions are working as expected (self test, deploying, undeploying, alarm, etc)! The leveling mesh is created properly and the initial layer has the Z adjustments applied (can watch the z axis motors spinning on first layer)!

Hope that helps anyone who finds this post!

Wow, nice. I've been screwing around with Repetier. There is a long list of changes to get the stock version Repetier to work with the Wanhao default screen. Is that the case with Marlin? Or will simply changing the servo pins work? Is there an equivalent of configuration.h in Marlin you can upload? Thanks for the post!!

Sure thing! I am actually using the TH3D Unified Firmware Package ( They basically took Marlin and have presets that work for a bunch of popular printers (Creality, Wanhao, etc) and the latest version supports the i3.

First thing to do with the firmware is to find this line and uncomment it to set the firmware up for the i3:

#define WANHAO_I3

Then from there I just added the following lines to the configuration.h:

#define BLTOUCH 
#define Z_CLEARANCE_DEPLOY_PROBE 15 // set up at least 15
#define Z_CLEARANCE_BETWEEN_PROBES 10 // set up at least 10

// Home z axis in middle of the bed since we are using probe as z end stop now 

#define Z_MIN_POS = 0
#define Z_MAX_POS = 180



#define SERVO0_PIN 27 //BLTouch orange wire


In addition, like I mentioned previously I commented out SD card support in configuration_backend.h:

//#define SDSUPPORT

The offsets and probe bed positions you will have to adjust based on whatever mount you have for the BLTouch, I'm not super happy with the one I am using since it puts the probe so far away from the nozzle in 2 directions, might have to design my own.

This video has a lot of good information you can follow but since his is machine is the i3 plus the wiring has to be done as I described and not how he does it. Also he starts from a marlin fork for the i3 plus but the configuration is largely the same if you start from TH3D firmware.

Perhaps if I get some free time soon and there is enough interest I could do a write up with pictures and stuff.

Hope that helps!

Oh and by the way, I am sure it goes without saying but by disabling the SD card you will then only be able to print from the USB port using either a PC hooked in directly or something like Octoprint on a raspberry pi (which is what I do anyway, so much better!)

Does the Wanhao Duplicator i3 v2 require a new bootloader in order to upload repetier firemware?

Got mixed reports, seems some v2.0/2.1 do and some don't, should be a quite simple check, just download the Arduino IDE (link on video) and if you get

"avrdude: stk500v2_ReceiveMessage(): timeout" error messages you have no bootloader.

(working on a video tutorial on adding the bootloader to printers, so would be really interested in hearing if your i3 v2 does or doesn't have one)

one thing you will need to do is add the Sanguino boards to the arduino IDE, really simple download

Go to where ever you have installed Arduino, go to the hardware folder and unzip the file into it.......the Sanguino boards should all now show up in Arduino IDE, and you will want the Sanguino ATmega1284p (16MHz) I belive.

I do not receive the error message. When I click on board info it shows me a VID and PID. This suggest I do not need a boot loader. But I have another problem. I can't find a configuration.h file for my printer (Monoprice maker select v2). It is a Wanhao Duplicator i3v2 clone which also does not have configuration.h file :-(.

Here is the stock i3 Repetier-Firmware updated to the latest Repetier version 1.0.2 with a couple of their mistakes taken out, should be able to use it on the Repetier-Firmware configuration tool.

Good luck, and let us know how it goes!

If you can give me until tomorrow afternoon, I will make one for you that you can just add into the online tool and add the probe to.

I too did the same thing with my MakerSelect v2 and got this.

That is exactly what I received. I'm going to take a big swig of whisky, kiss my printer good by, and try and perform the update. I'll tell you what I find.

Yup. Got the SK500_RECV(): Programmer Not Responding. Looks like I will need to go the Arduino Uno route.

Thanks for the quick reply. I'll download this evening and post my results.

Comment has been deleted

No. During printing the probe retracts

Nice tutorial with enough information to understand the process. Thanks for sharing.