IR Probe improvements (e.g. selectable sensitivity ) ?
-
So next try was some polyimide film which I had lying arounda and which I believe to be 50um thick.
It increased the distance of detection to about 1.7mm instead of my usual 0.2-0.3.
But it also made the measurement much less precise than with glass…
I get this kind of inconsitent results post multiple successive calibrations....
1:41:02 AMBed probe heights: 0.383 -0.061 0.017 -0.372 0.852 -0.571 -0.044 0.050 -0.401 0.492, mean 0.034, deviation from mean 0.417
1:37:40 AMCalibrated 6 factors using 10 points, deviation before 0.382 after 0.107
firmware bed probe heights:
Bed probe heights: 0.383 -0.061 0.017 -0.372 0.852 -0.571 -0.044 0.050 -0.401 0.492 0.000 0.000 0.000 0.000 0.000 0.00I then turned the glass over and immediately got this on the matt black paper:
1:56:54 AM Calibrated 6 factors using 10 points, deviation before 0.041 after 0.039
1:55:00 AM G32 Calibrated 6 factors using 10 points, deviation before 10.495 after 0.046but of course the distance was again ~0.2mm only
I checked leds and sensor alignement and can also confirm that any solid surface desk or white paper would give a trigger at a distance of 2.5-3mm.
Are you positive that when used on the 3mm glass you mention for calibration it's not in fact picking the bottom internal reflection or a combination of both, that would explain a lot.
I tried it on my scanner glass (don't know its thickness but lower than 5mm) and I get about 2mm distance so it makes perfect sense.. and the sensor does seem to work as intended...almost...
I haven't yet tried to sketch the reflections with the leds positions and angles but that could explain why on my bed 5mm glass I get a trig about 2mm lower than expected.
Some old memories of total internal reflection and frustrated internal reflections....Maybe I shall play with the led's power and see if I could get another higher trig from the top surface instead of the backsurface or be able to output the ADC signal somehow to know what response the sensor gets during the approach.
I suppose that would mean lowering the resistors value somehow what value would you recommend?Thank you for all your work again and sorry for writting so much everytime...
tldr: I believe with some elements of proof that the mini IR sensor does actually pick the bottom side of the glass instead of the topside which explains why it works on 3 mm glass and not 5mm with an acceptable working distance.
-
Hi sga,
All the IR sensors I ship directly are tested using a target of 3mm float glass backed with black paper, and are verified to have a trigger height of not less than. 2.6mm. The trigger height with opaque targets is a fraction of a mm higher because the reflection from the back of the glass does have some effect. I have also used these sensors with 4mm glass on top of black aluminum - but 4mm glass on top of bright aluminium gave a very low trigger height. I am surprised that you are having trouble when using 5mm glass on a black backing, but perhaps there is something going on that I haven't thought of. I don't have any 5mm glass to test with at present.
-
I think I will increase the current in the leds by halving the resistors and see if I can get the top surface detected without saturating the sensor and report back.
-
I really don't think increasing the current will make any difference, because the firmware is designed to be insensitive to the signal level, within limits. Be careful, with higher LED current you may exceed the safe exposure limit if someone looks directly into the LEDs.
Do you have any 3mm glass that you can test the sensor against? I'll get a piece of 5mm glass to test with when I can, but it is unlikely to be very soon.
btw if you are planning to use a PEI surface in future, then the thickness of the glass won't matter if you spray the back of the PEI sheet matt black as I recommend in the fitting instructions.
-
Yes, as written earlier (in the too long posts) the sensor works fine as is on 2 different scanner glass flatbeds, without any modification and properly triggers at a distance of about 2.5mm
So:- either it needs the combined reflection of the both interfaces air-glass + glass-air to work fine
- or it is mainly picking the second interface. which explains why the 5mm glass triggers at about 0.2mm
- and that one single layer reflection is not sufficient for my sensor to trigger (this would require a 2-3cm thick piece of glass to prove
The angles are so close to the brewster at 45° (first interface) and ~28°(second interface) respectively and the reflection is so weak at these angles a few percents at most. That it's not really surprising that it behaves so sensitively to the glass material and thickness.
Figures somewhere in the middle of :https://en.wikipedia.org/wiki/Fresnel_equations
I'll order some PEI I guess but first I have an experiment to do…
Thanks for the recomendations and I'll be carefull.
-
What I suspect is happening is that with 5mm thick glass, the spots form the IR LEDs become too defocussed by the time the reflection from the back of the glass reaches the phototransistor. A weak reflection from the top surface is all that's needed - the sensor works with dark grey BuildTak as the target too. The trouble is interference from the reflection off the back of the glass. I suspect that black glass would work well. The angle of incidence isn't that close to the Brewster angle (about 56 degrees for air/glass), and in any case there is a reflection even at the Brewster angle because the light emitted by the IR diodes is not polarised.
-
So I soldered 511 and 422 resistors in place. I saw no difference on white paper or dark plastics they still work good and it's still impossible to saturate them.
Still working on scanner flatbed too. ~2mm glass
Saturating but still "working" on aluminium though…
no improvement on my 5mm glass alone...
BUT does trigger perfectly when I put the 5mm glass on the aluminium with 1.9mm trigger distance.
Just checked the stddev and it's around 50um I think my alu back plate is not as flat and homogenous in reflection as the glass thickness is; so the part of the back side contribution is introducing some error but I would think it is useable at least. (what do you think of the values below?)My modest understanding and it's going back to the original subject of this post is that reflections at 45° (unpolarised) is about 10% R= 1/2 (Rs+Rp) of the led power 20 % if you add the backside contribution Rtot=2R/(1+R) whereas on alu you are more likely around 90-95%. And that is not even approaching the surface roughness/specularity differences or alignment problem.
Without a gain or sensitivity adjustment, it is indeed not too easy to have a single trigger level work for these extreme setups.
Trigging correctly on one and not saturating on the other.
Looking at the schematic I guess the nres pin (PB5) is the only place where a switch could be added for a 2-3 gains selection as it is currently floating.
the pin is also ADC0 so it would probably be possible to add a 10k smd pot to define a trigger level 0-1024.
Placing the sensor at 2.5 mm of the plate and then adjuting the trigger level would probably work fine IMHO.Last question after a calibration the values are reverted to the M666 and M665 in the config, which is probably safe and sound.
If I switch beds adding or removing 1-2 mm would you recommend setting up several "bed selection" macros with different M666 and M665 values which should be use before the bed calibration or is there a better way?sorry again for the long post!!!
1:26:36 AMCalibrated 6 factors using 10 points, deviation before 0.062 after 0.051
1:23:19 AMBed probe heights: -0.010 -0.029 -0.087 0.050 0.043 -0.049 0.090 -0.072 -0.131 0.012, mean -0.018, deviation from mean 0.065
1:21:05 AMCalibrated 6 factors using 10 points, deviation before 12.497 after 0.053
1:20:14 AMConnection established!
1:20:04 AMEmergency Stop!
1:19:33 AMM665
Diagonal 509.50, delta radius 246.43, homed height 787.38, bed radius 120.0, X 0.59°, Y 1.18°, Z 0.00°
1:19:27 AMM666
Endstop adjustments X-1.56 Y1.99 Z-0.43
12:50:45 AMBed probe heights: -0.053 -0.050 -0.001 0.021 0.049 -0.032 0.109 -0.004 -0.141 -0.011, mean -0.011, deviation from mean 0.063
12:45:54 AMCalibrated 6 factors using 10 points, deviation before 0.064 after 0.061 -
The sensor has a dynamic range of about 30:1 so a sensitivity adjustment isn't really needed. I have a new version coming out with the range increased to 100:1.
To handle different thickness beds, you could just increase the dive height in the M558 command so that probing always starts from a sufficient height.
-
Thanks again for your reply,
I appreciate the fact that having a large dynamic range is quite important.
but if the default threshold value is too high for the surface to be detect (as I do suspect it was for my glass, before I increased the leds current) it won't help, or am I missing sth?Looking forward for the new version !!!
-
What you are missing is that the sensor isn't just looking for the IR to exceed a particular threshold. It is looking for the reflected light reaching the phototransistor from the two IR diodes to have equal intensities,
-
Thanks that's what I missed indeed… Now I have to think about it .....
-
Dear David,
I got my oscilloscope to monitor sig after returning to the original values of the resistors.
with white paper under the glass both signals increase at the about same rate until I am about 1mm away and it takes another 0.7 mm for near to catch on, only to equate when I am close to contact ~0.3mm. Finally near overtakes far only at contact
It is about the same with black paper although with lower intensity.I checked the leds alignement and the photodiode and they are as coplanar, parallel and as close to 45° as a binocular and my eyes could see.
Also all the other materials I have checked (wood, black smooth, black matt, 2mm glass) give close to 2.5mm trigger distance and would be usable as beds… but this damn piece of 5mm glass doesn't want to collaborate. I just ordered some buildtak so it won't be a problem anymore soon.I understand now that the 2 spots are supposed to be of equal intensities (because the difference in resistor values compensate for spot size due to the increased distance of the far led) and that the trigger zone is when the overlapped area of these 2 spots align with the photodiode detection cone.
I think I have been unlucky with my choice of glass thickness as the back reflection must cause the total reflected far led intensity to be larger than intended in the overlapped area. Not sure what happens with the paper but I suspect it is not affecting the 2nd reflection too much as black paint would.I guess that's all the feedback I can give you and hope it could be as much help to design/debug next gen as the number of characters in my posts...
-
I agree with your diagnosis. As the target gets closer, the received intensity of the near beam should rise faster than the received intensity of the far beam. I suspect that as the surface reflection of the near beam reaches maximum intensity at the phototransistor, so does the back reflection of the far beam, with that particular thickness of glass. I'll do the sums when I get some spare time.
-
Tried to draw this to scale in geometrical optics and yes the far back reflection alignes almost 1to 1 with the near led.
-
Hope you don't mind me jumping in here but just wanted to say that I've started commissioning my printer, complete with David's probe. I have 6mm glass on top of black painted aluminium but the glass is sandblasted. This is the first time I've used the probe so I just followed David's instructions and it's worked "straight out of the box". I'm getting a trigger height of 1.47mm which seems to be repeatable (but it's early days yet). Maybe the sandblasting is doing the trick?
-
Yes this would surely help; you mean the backside only is sandblasted. Not the front side.
I received my Buildtak yesterday applied it to the glass and it works like a charm it's black and works at about 2.2 mm. Perfect adhesion right from the start. The Duetwifi and sensor are so easy to learn. I am having a lot of pleasure using it!!!Since it is my first printer. I am going through the learning process right now. I am getting 5 perfect PLA layers but I think I need blowers because after that the whole top surface gets so soft (heat from the underlayers). I tried with a handheld blower but then I had hadened curled corners on overhangs and my head crased into them….. Not sure what to do next.. (sry it's out of topic)
-
Hi sga,
Nope, it's the top side that's sand blasted (and also "Brite Guard" coated). It's experimental and I haven't yet tried it but if it works, I may be able to print directly on to the (heated) glass without any tape, glue, paste, or other sticky stuff. The surface finish is almost smooth - a bit like the very finest abrasive paper that one can buy - the sort of stuff used between coats of varnish is that means anything to you. The glass just looks opaque like it's been etched but not rough.
If it doesn't work, I can always resort to some other method and/or turn the glass over. I've got 3 pieces of glass so I could potentially have 6 different pre-prepared print surfaces.
It is normal to use print cooling fans with pla but I've found it only necessary with small objects. Larger objects seem to have enough time to set before the next layer gets printed. You could try printing more slowly. I have my Slicer set so that the minimum layer time is 20 seconds. What then happens is that if a layer would normally take say 10 seconds, then the printer will slow down by about 50% so that it always takes 20 seconds to print. If you have no fan, you could experiment with that setting,
Sorry we've gone off topic.
Ian
-
Interesting, I guess that you won t have adhesion problems. Or maybe too much of it… let us know, it would be very intersting to know how well it works.
Yes small part-no fans is certainly the problem I think. The layer to layer is too quick to properly set. Plus they get a lot of convection/radiation from the hotend... -
Some time go I tried 4mm glass that was ground on one side. With the ground side up, adhesion was terrible, whereas I often print PLA on plain glass with no problems. With the ground side down, the IR sensor wouldn't work.
-
Some people swear by it (sandblasted glass that is) I'll let you know how I get on. I haven't tried printing on plain glass - it's just that the instructions for my original RRP Mendel recommended Kapton tape and I've become fairly proficient at fitting it, so I've carried on. That's with a 200mm square bed and as the new one is 400mm square, I think I'll need to do something different.
I tried your probe with ground side up and ground side down. The trigger height is different but it works OK for me. Maybe it's the extra thickness (mine is 6mm)??