BLTouch working

Avatar

By Jdn-za 4 January 2017 21:53

Member · 5 comments

Seems I just had the wrong value in my retract macro... awkward :-p

Last edited by Jdn-za (4 January 2017 21:53)

Avatar

By (In)Sanity 5 January 2017 02:12

Member · 279 comments

First post to the forum.

I have the BLtouch working with my Duet Wifi,   well somewhat.  It homes fine and has consistent heights.   The problem I'm having is with the new Grid compensation.   I fire off the deployprobe.g in the bed.g followed by G29 and the machine goes to the first probe point , probes and then moves to the next.   The 2nd point gets the following error :

G32
Error: Z probe already triggered before probing move started

This of course is because the probe doesn't get deployed again once triggered by the first probe point.

Hopefully someone can tell me where my error in logic is.    It seams to me like the deploy is just not being called between points,  possible flag to allow that ?

Thanks,

Jeff


Duet WiFi Powered FFCP with E3D legends hotend system.  BLTouch grid leveling.

Avatar

By Sniffle 5 January 2017 05:07

Member · 73 comments

M558 P4 X0 Y0 Z1 H4 F400 T500

http://reprap.org/wiki/G-code#M558:_Set_Z_probe_type

On M558 you need to set an H parameter so that the bed(or X axis) will move away from the probe(giving the probe room to allow the pin to fall back into the deployed position) so that it will not error(blinking probe will cause the endstop to be considered triggered always)  you may also need to increase your F parameter to increase the speed of movement on the Z axis so that also doesnt cause the probe to error. 

The probe should not be retracted between probing.   It should trigger and drop back down each time.  If you deploy the probe manually using M280 with plenty of clearance from the bed and use your finger to push the pin up it should pull away from your finger flash red and then drop back down when operating correctly.  the retract probe command should only be done after finishing the probing.

Last edited by Sniffle (5 January 2017 05:08)

Avatar

By (In)Sanity 5 January 2017 13:41

Member · 279 comments

I must be doing something wrong when I deploy the probe.   No matter what the pin always gets sucked back up instantly.   The probe isn't going into error mode at all,  it just never stays deployed after being triggered.   

This is what I'm doing with the deployprobe.g file.  (M401)

M280 P3 S10 I1  ;Deploy probe
G4 P75        ;Wait 75ms
M280 P3 S60 I1  ;Test mode
G4 P125        ;Wait 75ms

This triggers as expected however it always sucks the probe up the instant it's triggered and doesn't try to drop it.    If I don't include the "test mode" it just slams into the bed and then eventually triggers and goes into alarm.   The bed doesn't even try to retreat until well into a crash.    Even on a home without the test mode it just crashes into the bed.   

I would have expected the trigger to occur the moment the pin reaches a certain level like it does while in the Test Mode.

BTW I'm running a Flashforge Creator Pro with the Duet WiFi ,  New Steppers,  new carriage and the E3D Legends Pack.  All new wiring with a 24 pin Molex MicroFit 3.0 on the back so I can swap out carriages.  Prints like a champ with an inductive sensor,  the IR sensor I just didn't have much consistency with.

Jeff


Duet WiFi Powered FFCP with E3D legends hotend system.  BLTouch grid leveling.

Avatar

By (In)Sanity 5 January 2017 13:59

Member · 279 comments

Playing around over here.   I changed the deploy to

M280 P3 S160 I1    ;Clear any alarm
G4 P450        ;Wait 75ms
M280 P3 S10 I1  ;Deploy probe
G4 P75        ;Wait 75ms

I went from H 3 to H 5  and F 120 to 320,  now it just crashes faster and never tried to retreat.   The probe still goes into alarm mode.   It's as if the trigger is delayed,   I don't see this problem if I put the probe in Test Mode.  I'm using the Z-Probe into for the trigger,  I can't imagine that would matter.   I can toss a scope on the pin to see what it's doing I guess.   

Jeff


Duet WiFi Powered FFCP with E3D legends hotend system.  BLTouch grid leveling.

Avatar

By (In)Sanity 5 January 2017 14:14

Member · 279 comments

Ok I'm starting to think it is a problem with the Z-Probe not responding fast enough for the 50ms pulse.   I'm going to try the Z Endstop.  The Z-Probe input does have a 10k resistor and a small cap,  I can't imagine that would take too long to reach a good logic level.   We shall see.

Jeff


Duet WiFi Powered FFCP with E3D legends hotend system.  BLTouch grid leveling.

Avatar

By (In)Sanity 5 January 2017 14:34

Member · 279 comments

I meant to say E0 in my last random thought.   In any event I'm seeing the exact same behavior.   The bed crashes, the trigger is not seen unless I put the probe in test mode.   I'm running 1.17a firmware.

Jeff


Duet WiFi Powered FFCP with E3D legends hotend system.  BLTouch grid leveling.

Avatar

By Sniffle 5 January 2017 14:35

Member · 73 comments

according to the bltouch people, to work with 3.3v logic electronics you only need a 240ohm resistor in line with the 2-wire endstop.  that could be where your not gettign a response.  I will say that the web browser doesnt always refresh the probe trigger value fast enough for the trigger to show and I also have my z-probe trigger value set obscenely low to something like 25 since the pulse is so short.

G31 X-30 Y35 Z1.1 P25

as to the deploy this is all my macro is(on H3) M280 P3 S10 I1

I clear alarms separately as i feel that is just a safety check.

Avatar

By (In)Sanity 5 January 2017 14:40

Member · 279 comments

The resistor is in place.   It trigger's just fine if I put the probe in test mode.   I've tried the Z-Probe input and now E0 input.   The web interface does show they trigger with the probe in test mode.   The problem is without that test mode during a home (or probe) the bed just crashes and doesn't stop until the probe goes into alarm which forces the trigger.   It's still acting as if the Duet Wifi just can't see that short pulse,   which I find hard to believe.   The logic levels are clearly ok as it's working while the probe is in test mode.    I'm only clearing the errors in the deploy for now as I'm tired of doing so manually during this debug phase.

Any ideas ?

Jeff


Duet WiFi Powered FFCP with E3D legends hotend system.  BLTouch grid leveling.

Avatar

By (In)Sanity 5 January 2017 14:48

Member · 279 comments

I just love how helpful people are,   much thanks.   

The problem is my config override still had G31 P500,  I changed that to P25 as suggested.  It just never crossed my mind to look at this.   Sniffle,  your a life savor!

Now to switch back to the Z-Probe input.

Thanks,

Jeff


Duet WiFi Powered FFCP with E3D legends hotend system.  BLTouch grid leveling.

Avatar

By Sniffle 5 January 2017 14:48

Member · 73 comments

hmm... if you manually deploy the pin, and the press it up with your finger as if ti were probing does it display the trigger in the web interface?  the default action in test mode and alarm is to send a constant signal instead of a pulse.  When manually testing mine it doesnt always line up with a web interface value refresh but i could occasionally get it to show.

Avatar

By (In)Sanity 5 January 2017 15:27

Member · 279 comments

Everything is working perfectly now.   

I can confirm the BLTouch works perfect with the Z-Probe input as well as E0 or E1.  In either case be sure to use the 240 (or 220) ohm resistor from signal to gnd.   

I can also confirm you must have a low value for G31 P parameter.  I'm now using P1 and it works perfect,  P25 is a safe value it would appear. 

On a side note and certainly not for everyone I'm using a 47k resistor a 100k resistor and a green LED on the Z-Probe input to act as a zener diode limiting the voltage to around 2.7v even if I go as high as 24v on the Z-Probe.   I have two harnesses that I can quickly swap out for all this testing.   The 100k resistor acts to pull the signal back down.   The 47k is a current limit and the LED is between gnd and signal.   I've tested this on a 300 Mhz scope and even trying to cause spikes with 24v I never had anything go above 2.7v.   Plus it lights up when triggered 😁

Jeff


Duet WiFi Powered FFCP with E3D legends hotend system.  BLTouch grid leveling.

Avatar

By dc42 5 January 2017 16:55

Administrator · 2,617 comments

Perhaps one of you who has a BLTouch working would like to add a section on how you did it to the wiki page on connecting a Z probe?


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

Avatar

By (In)Sanity 5 January 2017 17:10

Member · 279 comments
dc42 wrote

Perhaps one of you who has a BLTouch working would like to add a section on how you did it to the wiki page on connecting a Z probe?

I was thinking the same thing.   Be happy to work on that,  perhaps combining knowledge first and then compiling it together.

Jeff


Duet WiFi Powered FFCP with E3D legends hotend system.  BLTouch grid leveling.

Avatar

By Sniffle 5 January 2017 17:26

Member · 73 comments

I'll be happy to help with anything but for the most part i pulled everything from W3's work.

Avatar

By Sniffle 5 January 2017 17:41

Member · 73 comments

This is pretty much what I did.  Bur I also made macro's for the deploy, retract, reset and self test functions of the probe.

W3DRK wrote

  • 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(Sniffle used 25)
  • 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...


Also as far as commissioning the probe, and notes of interest from experience

the probe should be deployed and manually triggered until a value is seen in the web interface(the web interface doesnt update fast enough to always show a triggered state so it may take a few/several triggers until you see the value in the web interface to know that it works)

you should know or confirm your offsets for X and Y in G31 move the probe to the first probe position and deploy the probe, if it is off the bed and the bed is too high it WILL destroy the probe(ask me how i know...) when probing, and adjustments must be made.

to finally verify that the probe is working properly using the machine itself use the following macro(replace xxx on X and Y to a safe value to be on the bed on your printer)

G28 X Y ;home x&y
G91 ;relative mode
G1 Z10 ;move Z up 10 mm to ensure clearance
G90 ;absolute mode
G1 Xxxx Yxxx ;move to a safe probing point on the bed modify xxx to your liking
M98 Pdeployprobe.g ;deploy the probe
G30 S-1 ;probe Z until the probe triggers
M98 Pretractprobe.g ;retract the probe after triggering and stop.

Other Useful Macros

************
Deploy Probe
************

M280 P3 S10 I1

**************
Restract Probe
**************

M280 P3 S90 I1

***************
Self Test Probe
***************

M280 P3 S120 I1

***********************
Reset Probe Error State
***********************

M280 P3 S160 I1

*******************
G29 - Mesh Leveling
*******************

G28
G91
G1 Z4 F200
G90
M98 Pdeployprobe.g
G29 S2
G29
M98 Pretractprobe.g
G1 X10 Y10 F5000 

Last edited by Sniffle (5 January 2017 17:47)

Avatar

By (In)Sanity 5 January 2017 19:44

Member · 279 comments

After having to solder in a new SAM4E 144 pin processor I now have a 27k resistor coming from HEATER3.  My probe wiring harness has 24v and 5v supplied so I can use an inductive probe at any time...if I desire.   The BLTouch fits in the hole for the inductive probe with an adapter.   Well one slip with a meter probe and poof she went.  In any event I'm not sure if this safety catch matters for most people but I have to say I sleep a bit better knowing I'm not going to smoke the second processor as easy.  Lucky for me I have years of SMD soldering experience...but still..who needs fried components.   Also fuses on power feeds is not such a bad idea either.   The 5V rail if somehow sent back down that HEATER3, etc. line could easily damage the processor.   

Jeff


Duet WiFi Powered FFCP with E3D legends hotend system.  BLTouch grid leveling.

Avatar

By (In)Sanity 5 January 2017 19:47

Member · 279 comments

M98 Pdeployprobe.g can be M401
M98 Pretractprobe.g can be M402

What does G29 S2 do ?  I just use G29.

This is what I run on bed.g

G1 Z20 F6000  ;  Making sure we're not going to hit the side of glass
M400    ;Wait for move to finish
M401    ;Deploy probe
G29            ;probe grid
M402    ;Retract probe

Thanks,

Jeff


Duet WiFi Powered FFCP with E3D legends hotend system.  BLTouch grid leveling.

Avatar

By Sniffle 5 January 2017 20:12

Member · 73 comments

G29 S2 clears the current heightmap in case you are trying to probe with the heightmap already loaded.  also your start Gcode needs to have G29 S1 to load the heightmap or it wont compensate at all.

Avatar

By (In)Sanity 5 January 2017 20:17

Member · 279 comments
Sniffle wrote

G29 S2 clears the current heightmap in case you are trying to probe with the heightmap already loaded.  also your start Gcode needs to have G29 S1 to load the heightmap or it wont compensate at all.

Wow,  ok this is news.  I've been under the impression G29 does a new probe,  creates a new map and uses it.   Looking at the code seams to support that theory.   Perhaps we can have some kind words from the coder ?   In the mean time I'll change my bed.g to use the extra commands.

Thanks,

Jeff


Duet WiFi Powered FFCP with E3D legends hotend system.  BLTouch grid leveling.

Avatar

By CaLviNx 5 January 2017 20:28

Member · 41 comments
deckingman wrote
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


And again apologies  about hijacking the thread.

But with regards to the black tape.  I too use an IR sensor with a few differing surfaces from plain glass to glass with tape to a sheet of Pei stuck to my glass and what I found was to use a Matt black cheap car wrapping vinyl  stuck to the lower surface of the glass combinations the one I use lists as being good upto 150c (less than the bed temp will really get to)  but I have tested the vinyl to 250c with no visible damage of loss of adhesion.  1.5m by 500mm cost me around £5.00.

This works really well with the ir sensor it actually even works quite well as a print surface but degrades quite quickly unless you use a plastic scraper and allow parts to cool to help them pop off.

Last edited by CaLviNx (5 January 2017 20:28)

Avatar

By (In)Sanity 5 January 2017 20:43

Member · 279 comments

I ended up with the BLTouch because the gantry on my HackenForge Creator Pro bows in the middle from a past life of having dual extruders on it.   Using an 8mm sense inductive sensor worked well with the grid mode through glass to the aluminum bed,   it however weighed more then I wanted.  I've done soo much to reduce weight and get a solid 120mm/s print speed and far more accuracy that I wasn't willing to keep the weight on.   The BLTouch and the IR sensor are good options.    I liked the IR...it just wasn't the right fit for me as I swap from Blue to Black to Glass to Glue to Spray..etc..etc.   The BLTouch just works..and works well.   

Ohh if anyone cares you can run a short NEMA 17 motor on the X Axis of the Creator Pro to cut down on weight.   Granted it runs pretty warm at 1 amp...but who cares.   It cuts off the ounces.  I'll have to post some pics of the Hackenforge.

Ok I hijacked it back 😁

Jeff


Duet WiFi Powered FFCP with E3D legends hotend system.  BLTouch grid leveling.

Avatar

By ElmoC 12 January 2017 22:29

Member · 17 comments

I am working on adding a BLTouch to my printer.  I have the Duet 0.8.5 and see where you can set the probe type to use either the E0, E1, or the Probe header.  Since I will be using +5  and a PWM from the expansion header, I was hoping I could map the BL Touch to one of the end stops on there so I can get all the connections from the expansion header.  This would allow me to create a board I could plug in that the BL Touch could connect to.

Last edited by ElmoC (13 January 2017 05:09)

Avatar

By Syko_Symatic 13 January 2017 12:38

Member · 45 comments

Do I have to have a Duet 2/5 in order for the BLTouch to work?

Avatar

By (In)Sanity 13 January 2017 13:49

Member · 279 comments
Syko_Symatic wrote

Do I have to have a Duet 2/5 in order for the BLTouch to work?

For the Duet WiFi the BLTouch works without any expansion board and with the Z-Probe pin already on the board.  The 5 volts can come from the expansion header and control signal comes from the Heater 3 pin on the 50 pin expansion connector.  The z-probe can be feed via the BLTouch with a 240 (or 220) ohm resistor in parallel with the output from the BLTouch,  this drops the voltage down from the 5 volts from the BLTouch to something a bit more friendly for the 3.3v logic levels the processor expects.   We'll have to get a wiring diagram together for the various models of Duet boards.   It's a pretty easy install and it works great.   

Jeff


Duet WiFi Powered FFCP with E3D legends hotend system.  BLTouch grid leveling.