Radically different leveling results with two IR sensors

I just bought a mess of these Escher3D IR sensors after having fabulous results with them on my FT-5 build. I've installed one of these on an extra printer to workout the firmware before installing the whole lot of them… and it hasn't worked at all. However, the repeatability of the sensor checks out when tested, the trigger height is correct, endstoppullups are enabled per Escher3D's recommendation, and so on. Everything looks right on paper, but my end result is always wonky. Pictures below. I've tried a sheet of black glass, a piece of white paper, black buildtak, and masking tape. All the same result, despite these materials being officially supported by the sensor. After all this testing, I'm thinking this has to be a firmware issue. Right?

I'm open to suggestions, as I've tried everything I can think of. Post a reply and I'll get back to you as soon as I can try your suggestion.

I've tried swapping the IR sensor with another one from my order in case I got a dud. It turns out, the results with the new IR sensor are exactly the opposite of the original sensor. This time, the back left is too high and the front right is too low.

I'm sorry to hear you are having problems getting a consistent level. Please can you provide a little more information:

The FT-5 is a Cartesian printer. Is the printer you are testing on another FT-5, or a different architecture e.g. a delta?

How far away is the sensor from the nozzle?

How many calibration points are you probing?

Your photos appear to show a bed surface of white dots on a black background. I suspect the trigger height will vary somewhat depending on where the dots are in relation to the IR beams. This could account for 2 different sensors giving different results when used with that surface (because the bean position may be slightly different between the two sensors). You could check this by measuring the trigger height, then moving the head a tiny amount (e.g. half of the dot spacing) and measuring the trigger height again.

One issue that can be a problem is varying tilt of the print head. This is a common problem on delta printers, and happens in some Cartesian designs too. If the tilt of the print head varies with its XY position, this causes the relative heights of the nozzle and the Z probe to change, causing an apparent change in trigger height. However, this would not explain why 2 sensors give different results.

My printer is Cartesian. This is a test rig to work the kinks out of my configuration before I deploy these sensors to my small (but growing) print farm. All of the farm printers are also Cartesian.

Changing the leveling method in Marlin was the ticket. I enabled linear leveling instead of bilinear and I got a perfect first layer! I went back and enabled 9 and 16 point bilinear leveling and tried it once more after having some success with linear bed leveling. Unfortunately, as soon as I ask my printer to calculate a complex mesh, things get wonky. So, I think we've solved the mystery. It was never the sensor's fault. The board wasn't performing the calculations correctly in the more advanced bed leveling options. Taking away most of the math and using only four points has enabled it to pull through and create a proper plane.

Thanks very much for your assistance. I will continue to buy and recommend Duet electronics. I can't wait to get my Duet Wi-Fi for my larger printer!