BLTouch working

Avatar

By W3DRK 15 November 2016 12:23

Member · 116 comments

I finally had a chance to get everything mounted and connected for a first test.  This machine is fitted with a Duet 0.8.5 and BLTouch...

Avatar

By T3P3Tony 15 November 2016 12:41

Administrator · 688 comments

Nice! Did you need to do anything not covered in the documentation to get it working (I realise you needed the latest firmware version)? If so can you let me know so I can update it. Also is it ok for me to link the first video as an example?


Duet Wifi Hardware Designer
www.duet3d.com
www.think3dprint3d.com

Avatar

By W3DRK 15 November 2016 14:16

Member · 116 comments

Sure feel free to use the video.  I should have tidied up my workbench!  I haven't seen any documentation related to using a BLTouch with RepRapFirmware, but it's pretty straight forward to get going... 

  • BLTouch 5V leads are connected to expansion header pins 1-2, and the servo lead is connected to pin 21 (PWM for heater 3)
  • BLTouch endstop leads are paralleled with a 240ohm resistor as documented by Antclabs to make it safe for 3.3v logic and connected to E0 endstop header
  • M307 H3 A-1 C-1 D-1 is added to config.g to reserve pin 21 for M42 or servo use
  • M558 is set to probe type 4 and G31 is set for a very low trigger value since the BLTouch only triggers the endstop for 5ms
  • Deployprobe.g macro contains the line M280 P3 S10 I1 to deploy the BLTouch probe
  • Retractprobe.g macro contains the line M280 P3 S90 I1 to retract the BLTouch probe
  • Deploy and Retract macros are added to bed.g and homing macros

And I think that's about it...

The only issue I've run into so far is the very first probe deployment can take a few seconds before the BLTouch responds and actually pushes the probe down.  I'm not sure if it's because the Duet take a little while to setup the PWM or maybe the BLTouch isn't truly 3.3v tolerant and requires a buffer after all, but I need to examine it further.  After the first probe deployment it continues to respond quickly like I'd expect, so as a workaround I just deploy the probe at the very top of my homeall.g macro and by the time it gets around to homing Z, the probe has been deployed and everything works fine.

Last edited by W3DRK (15 November 2016 15:07)

Avatar

By dc42 15 November 2016 17:42

Administrator · 2,256 comments

There appears to be a bug along the lines you describe when using heater 3 as a servo. It's on my list to fix in 1.17. The other expansion heater channels don't have the problem.


Duet WiFi hardware designer and firmware engineer
http://www.escher3d.com
https://miscsolutions.wordpress.com

Avatar

By W3DRK 15 November 2016 18:22

Member · 116 comments

Ok thanks for mentioning that!  Certainly saves me some troubleshooting...

dc42 wrote

There appears to be a bug along the lines you describe when using heater 3 as a servo. It's on my list to fix in 1.17. The other expansion heater channels don't have the problem.

Avatar

By dc42 18 November 2016 08:26

Administrator · 2,256 comments

This bug is fixed in the 1.17dev4 build. It turned out to be an undocumented chip-level bug in the PWM subsystem and it took me hours to find a workaround.


Duet WiFi hardware designer and firmware engineer
http://www.escher3d.com
https://miscsolutions.wordpress.com

Avatar

By W3DRK 18 November 2016 14:07

Member · 116 comments

David, I can't thank you enough for all the hard work and dedication you contribute to this firmware!  I'll install your 1.17 dev build this weekend and let you know how it works out.

Avatar

By Alex9779 19 November 2016 15:05

Member · 64 comments

I was curious so I ordered one too.
I set all up so far for testing and but stumbled over something.
The BLTouch is 5V powered from the servo input so its output signal is also 5V.
I know, and it is described, the resistor is also provided, that I can use the 240ohms resistor between the output and ground to reduce the voltage.
But I am a proud beta tester of the Duex2 and it provides endstop ports where I can select the operating voltage...
All I need now would be a remapping possibility that a probe of type 4 (M558 P4) would not use E0 endstop but E2 or E3.
@dc42 would that be possible or is this outa reach? I just wanna be safe and a resistor crimped into the plug or soldered in somehow might break and then I have a problem. With the Duex now allowing 5V endstops I could omit the resistor and just use one of those native ports.

Last edited by Alex9779 (19 November 2016 15:05)

Avatar

By dc42 19 November 2016 15:26

Administrator · 2,256 comments

That could be done, but it is not likely to happen soon because my priority is to finish the grid bed compensation code.

I think it is very unlikely that that 5V applied to an endstop input on the Duet WiFi would damage the microcontroller, because the endstop input includes a series resistor. The Z probe input is even better protected. So I suggest you use the resistor, connect it to the Z probe input, and select probe type 4.


Duet WiFi hardware designer and firmware engineer
http://www.escher3d.com
https://miscsolutions.wordpress.com

Avatar

By Alex9779 19 November 2016 15:38

Member · 64 comments

Hmmm but the manual states that type 4 uses E0, so how can I connect it to Z probe input?
Or are they the same?

Edit: reading between the lines of the documentation I assume yes... But I found no definite statement....

Last edited by Alex9779 (19 November 2016 15:42)

Avatar

By dc42 19 November 2016 19:09

Administrator · 2,256 comments

Sorry, I meant type 5.


Duet WiFi hardware designer and firmware engineer
http://www.escher3d.com
https://miscsolutions.wordpress.com

Avatar

By W3DRK 22 November 2016 16:58

Member · 116 comments

David, I forgot to update that 1.17 dev4 does indeed fix the delay with heater 3 as a servo on a wired Duet.  Everything is working absolutely perfectly and I'm extremely pleased with how well the BLTouch works.  Thanks!

Avatar

By W3DRK 22 November 2016 19:27

Member · 116 comments
Alex9779 wrote

I just wanna be safe and a resistor crimped into the plug or soldered in somehow might break and then I have a problem. With the Duex now allowing 5V endstops I could omit the resistor and just use one of those native ports.

For what it's worth I soldered and crimped the resistor in my end-stop connector just to make absolutely sure it's well connected.

Avatar

By deckingman 23 November 2016 10:03

Member · 702 comments

Just curious as to how accurate this BL touch thing is for homing. I currently use DC42s excellent probe which works fine but the slight issue I have is that I have 3 pieces of glass with different surface coatings that I swap between. So if I go from say, plain glass with 3DLAC to glass with blue tape, I have to edit my config.g to change the Z offset for that particular surface. It occurs to me that the BL touch might negate the need to do that. Is that reasonably assumption?

BTW, I've managed to build my machine such that the bed is both flat and level and stays that way, so I have no need to compensate for level or flatness (although it is nice to use the probe to check from time to time). It's just Z homing with different surface materials that I'm interested in.


Avatar

By T3P3Tony 23 November 2016 10:31

Administrator · 688 comments

Ian

How about a black sticker at the corner of each bed plate - be out of the way for nearly every print and should give the same result?

(sorry to hijack the bl touch thread!)


Duet Wifi Hardware Designer
www.duet3d.com
www.think3dprint3d.com

Avatar

By deckingman 23 November 2016 13:30

Member · 702 comments
T3P3Tony wrote

Ian

How about a black sticker at the corner of each bed plate - be out of the way for nearly every print and should give the same result?

(sorry to hijack the bl touch thread!)

Tony - that's a damned good idea - so simple! My initial reaction was that it wouldn't work with blue tape due to the thickness of the tape itself, but as long as the black sticker is on top of the tape (or any other material) then of course it will work. Brilliant! Thanks


Avatar

By W3DRK 23 November 2016 13:38

Member · 116 comments
deckingman wrote

Just curious as to how accurate this BL touch thing is for homing.

Antclabs claims a standard deviation of at least 0.01mm--apparently dependent on the probing speed due to the way hall-effect sensors work.  I haven't had time to do more than about a dozen prints on this machine since fitting it with the BLTouch, but so far it's been working great and I haven't needed to adjust the Z offset since the initial setup.  Perfect first layers every time.

Last edited by W3DRK (23 November 2016 15:27)

Avatar

By StephenRC 23 November 2016 19:09

Member · 132 comments
deckingman wrote

I currently use DC42s excellent probe which works fine but the slight issue I have is that I have 3 pieces of glass with different surface coatings that I swap between. So if I go from say, plain glass with 3DLAC to glass with blue tape, I have to edit my config.g to change the Z offset for that particular surface.

Use a macro to set the z offset.  I have one for pla and another for petg.  The two different filaments need a different z0 setting to get it to stick properly.

Avatar

By Treito 26 November 2016 15:05

Member · 1 comments

Did you directly connect the Servo to Pin21? Does this PIN provide 5 volts or would I need some sort of diode?

Avatar

By Jdn-za 27 November 2016 17:28

Member · 5 comments

Just ordered myself a bltouch and will be adding it to my duet 0.8.5, thanks for documenting the install mate

Avatar

By Sniffle 22 December 2016 05:52

Member · 71 comments

W3DRK, just curious, does each successful probe actually reflect in the web interface for you?  I have mine setup nd everything is working but to test before i have a bed crash i deployed the probe and manually actuated the pin maybe 1 in 10 seems to actually register in the interface though.

just to make sure i slowed my manual testing speed way down but still had several swipes that werent displayed on the interface.

on my meter my resistor came out to 241ohms so it "should" signal ok...

Avatar

By Jdn-za 4 January 2017 21:00

Member · 5 comments

W3DRK, So I have wired up my bltouch int he way that have described but cant seem to get my duet to deploy or retract using macros or gcode.

I have the following defined in my config.g

; BLTouch
M307 H3 A-1 C-1 D-1
M558 P4 X0 Y0 Z1 H3 F200 T5000    	
G31 P200 X-4 Y40 Z2

I am running the latest stable dc42 fork of the Duet 0.8.5 firmware

Firmware Version:	1.17a (2017-01-02)
Web Interface Version:	1.14-RC1

Any ideas what to look at?

Avatar

By tomwang256 4 January 2017 21:23

Member · 6 comments

Are you on duet 0.8.5 or duet wifi? I have BLTouch wired up with my wifi working well.
it's mostly the same instruction that W3DRK but the expansion header is not the same on the wifi so you would have to use pin 8 for Heater 3 pwm output instead.
see documentation here : https://duet3d.com/wiki/Duet_WiFi_wiring_diagrams

Avatar

By Jdn-za 4 January 2017 21:27

Member · 5 comments
tomwang256 wrote

Are you on duet 0.8.5 or duet wifi? I have BLTouch wired up with my wifi working well.
it's mostly the same instruction that W3DRK but the expansion header is not the same on the wifi so you would have to use pin 8 for Heater 3 pwm output instead.
see documentation here : https://duet3d.com/wiki/Duet_WiFi_wiring_diagrams


I am using the Duet 0.8.5

Avatar

By Jdn-za 4 January 2017 21:40

Member · 5 comments

Ha! seems my signal wire was busted :-p

My deploy marco works though the retract doesn't

deploy

M280 P3 S10 I1

retract

M280 P3 S90 I1

If I home Z it deploys, lowers and reads the height then deploys and flashes