Help with IR Probe on LPC Port please
-
I am trying to setup my IR Probe on the LPC port of RRF 2.05. I also cross-posted on reprap.org forum, but figured there would be more traffic here.
I can only seem to get the probe to work in analog mode. I suspect its might be because I have not defined the modulation in board.txt but I am not sure. I have not found much on the modulation or its pin definition yet, I need to go deeper into the rabbit hole I suspect.
I tried this per the reprap configurator
M558 P1 H5 F120 T6000 ; DID NOT WORK set Z probe type to modulated and the dive height + speeds
but I could not see any change in DWC when I triggered the probe. then I changed it to this and it works- but appearetly only as a NO-NC switch.
M558 P4 C2 F360 T6000 H3 R0.5 ; SET IR PROBE AS AN ON-OFF SWITCH G31 P500 X0 Y31.5 Z1.5 ; set Z probe trigger value, offset and trigger height
from my board.txt file-
//RRF equiv X Y Z E0 E1 E2 //RRF C Index 0 1 2 3 4 5 // Xmin Ymin Zmin Xmax Ymax Zmax endstop.pins = {1.24, 1.26, 1.29, 1.25, 1.27, 1.28}; // Z Probe pin // Probe pin can be NoPin and select from an "EndStop Pin" // (which are digital input) // using the C parameter of M558. // Note: Expected to be an ADC pin for certain modes, // if needed then a spare A/D capable pin should be used and set zProbe.pin below. Beware that pins configured for // ADC are **NOT** 5V tolerant zProbe.pin = 1.29; zProbe.modulationPin = NoPin;
(I know that we only use 3 of the endstops as defined and the nMAX is redundant, but I left them as originally written for clarity)
I looked at both dc42's blog page and the Duet docs- https://duet3d.dozuki.com/Wiki/Connecting_a_Z_probe
I tried Modes 1, 2, 4 and 8. Same results: I don't get a status change in DWC or from M119 when I manually trigger the probe with a piece of paper.
What might I be missing? Any suggestions?
tia
-
@sinned6915 said in Help with IR Probe on LPC Port please:
I am trying to setup my IR Probe on the LPC port of RRF 2.05. I also cross-posted on reprap.org forum, but figured there would be more traffic here.
Do you mean the mini IR sensor sold by Duet3D and our distributors, or a different sort of IR probe? If you do mean the mini IR sensor, does the LED flash twice or four times at power up? Twice means it detected a pullup resistor and is in digital mode. Four times means it detected no pullup resistor and is in analog mode.
I can only seem to get the probe to work in analog mode. I suspect its might be because I have not defined the modulation in board.txt but I am not sure. I have not found much on the modulation or its pin definition yet, I need to go deeper into the rabbit hole I suspect.
The only IR probe I know of that needs the modulation signal is the one sold by RepRapPro around 2013-2015 with their Ormerod and Huxley Duo printer kits. M558 P2 (mode 2) is for this sensor.
I tried this per the reprap configurator
M558 P1 H5 F120 T6000 ; DID NOT WORK set Z probe type to modulated and the dive height + speeds
but I could not see any change in DWC when I triggered the probe. then I changed it to this and it works- but appearetly only as a NO-NC switch.
M558 P4 C2 F360 T6000 H3 R0.5 ; SET IR PROBE AS AN ON-OFF SWITCH G31 P500 X0 Y31.5 Z1.5 ; set Z probe trigger value, offset and trigger height
I don't know how the LPC port uses the pins, but on the Duet it goes like this:
Mode 1 - IN pin on the dedicated Z probe connector, analog mode
Mode 4 - E0 pin, digital modeSo I presume you have the sensor connected to Zmin, which is why it works in mode 4. To use it in analog mode, you will need to allocate a spare analog pin as indicated by this part of your config file, and connect it to that pin:
// Z Probe pin
// Probe pin can be NoPin and select from an "EndStop Pin"
// (which are digital input)
// using the C parameter of M558.
// Note: Expected to be an ADC pin for certain modes,
// if needed then a spare A/D capable pin should be used and set zProbe.pin below. Beware that pins configured for
// ADC are NOT 5V tolerant
zProbe.pin = 1.29;
zProbe.modulationPin = NoPin;HTH David
-
dc42-
I am using the Duet Mini IR Probe I got from Filastruder.
It flashes twice when starting up, so that is why I assumed it is in digital mode, hence my confusion.
Question- Can you clarify that Digital Mode is more desirable over Analog node?
Right now, I have it connected to Zmin, on C2 per the assignement.
It flashes twice when starting up, so that is why I assumed it is in digital mode, hence my confusion.
Reading you explanation for the Modes above, are you suggesting that I move and reassign the connector on the board to be on the E0 connector instead of Zmin?
M558 P4 C3 F360 T6000 H3 R0.5
and
//RRF equiv X Y Z E0 E1 E2 //RRF C Index 0 1 2 3 4 5 // Xmin Ymin Zmin Xmax Ymax Zmax endstop.pins = {1.24, 1.26, 1.29, 1.25, 1.27, 1.28};
zProbe.pin = 1.25;
Should I be using Mode 5 instead of 4? Are Modes 4 & 5 the same, only differing in the pins that gets triggered?
Suggestion/Requet- maybe add the IR probe distinction to the dozuki page and maybe to the tooltips on the configurator?
https://i.imgur.com/7lV89ti.png -
@sinned6915 said in Help with IR Probe on LPC Port please:
Question- Can you clarify that Digital Mode is more desirable over Analog node?
Analog mode has one small advantage: when the firmware senses that the probe is getting close to triggering, it slows down the probing speed. However, for simple G30 probe moves such as used to home Z, you can achieve the same by probing once, then using M558 Fxx to reduce probing speed, then probing again.
It's likely that in RRF3 I will drop the feature to slow down probing when the sensor is getting close, and replace it by automatic 2-speed probing if M558 is configured for multi-touch probing and two F values are specified.
-
@dc42 said in Help with IR Probe on LPC Port please:
Analog mode has one small advantage: when the firmware senses that the probe is getting close to triggering, it slows down the probing speed.
Do you mean Digital senses when the probe is getting close?
I don't understand how digital might do that. The readings I see in analog mode are either 0 or 1000.
EDIT: what is confusing about modulation is that the description of the sensor on the miscsolutions blog page is
"A differential modulated IR height sensor. "
-
@sinned6915 no analog shows down when the analog level gets above a certain value between 0 and the triggered value.
-
ok, i think the issues is the pin that i am connected to is not analogue capable, its digital only.
i need to read the LPC docs more closely.
-
I got the probe connected to an analog pin. It seems to be working, but I am not getting consistent readings.
I see the probe readings changing and it correlates to change in probing speed at the bed gets closer.
-
I get a false trigger at ~8.5mm away. I tweaked my Z movements in homing and probing and the H param in the probe config to try and get it in the general area to successfully trigger.
-
now i seem to be fluctuating between trigger values- here are my config lines-
M558 P1 I0 H3 F600 T6000 ; Analog probe, 5mm dive height,
G31 P500 X0 Y-31.5 Z3.1 ; set Z probe trigger value, offset and trigger height
;if I have Z3.1 and home Z, I am too close to the bed. Using a 0.1mm feeler, I have to jog up ~0.4mm to get it to clear.
Set G31 Z2.8 but then when I print, I am dragging the nozzle on the bed. I have to baby step 0.4 to get a uniform first layer to lay down.
I am wondering about maybe increasing the threshold value for the probe trigger to see if it triggers differently.
My bed surface is 0.03" PEI with 0.08 matt black anodized aluminum 3m adhesive bonded together. There are some small areas on the layup that are ever so slightly different in appearance due to the glue, but it pretty uniform otherwise. I will try moving the Z probe spot and see if it matters. I also want to put a piece of paper on top and see how that probes.
-
-
@sinned6915 said in Help with IR Probe on LPC Port please:
I get a false trigger at ~8.5mm away. I tweaked my Z movements in homing and probing and the H param in the probe config to try and get it in the general area to successfully trigger.
Some IR sensors with older firmware do that in some mounting configurations. At power up, does your IR sensor give one short flash, then wait a few seconds before flashing 2 or 4 times to indicate digital or analog mode? If the short flash is missing, then it's running the old firmware. You can either ask your supplier to exchange it, or reprogram it if you have a compatible programmer such as AVRISP or USBISP.
I am wondering about maybe increasing the threshold value for the probe trigger to see if it triggers differently.
In analog mode the sensor should read about 0 when not triggered, about 465 when it is getting close to triggering, about 535 when triggered, and 1000 when the sensor is overloaded by bright sunlight. If you are getting those readings, leave the threshold at 500. It's deliberately between the 465 and 535 readings.
-
If lacking a programmer but having an Arduino or ESP8266 on hand then this will sort you out:
https://github.com/esp8266/Arduino/tree/master/libraries/ESP8266AVRISP
https://github.com/arduino/Arduino/blob/master/build/shared/examples/11.ArduinoISP/ArduinoISP/