Sunday 4 November 2018

Bed levelling, attempt #1

The one remaining annoyance on my printer is that it's not level. Over time, one Z axis goes a bit higher, which eventually makes enough of a difference that the print head will go too high and print into thin air - better than crashing into the bed, but still not good. Until now, I have started each printing session with manually measuring what the Z offset should be, occasionally adjusting one Z axis enough that the two sides are at the same height (the bed itself bulges by about 0.1mm). But I have printed a holder for a proximity sensor, and it's time to mount it!

I have an LJ12a3-4-Z/BX sensor, which will sense up to 4mm away. Trying it out with a voltage regulator (7805CT) gives me a nice constant voltage - of 2.5V. Wut? I see a number of people have problems with some probes, but also that not all probes are created equal. I also see that there is such a thing as an 8mm-sensing probe, and a probe that runs on 5V (LJ18A3-8-Z/BX 5V), but the latter might just be an underpowered 6-36V-capable sensor.

I was getting quite confused about this, until I read this article of somebody else being confused. They go into a goodly amount of detail of how they figured out the resistance setup and what they did to deal with a floating pin. This comment on another similar thread also makes sense: The output is either 0V (when something is close) or floating (otherwise).

Mine does have a nice little diagram on it, showing that Brown is +, Black is out, and Blue is Ground, with the sensor switch being between Brown and Black. It's also an NPN. The resistance between black and blue in mine was not a standard 10K, but a constantly changing amount in the mOhm range. There's no connection between the other wires. Also noteworthy is that my sensor has an orange tip, where most of the ones talked about have a blue one.

Feeding in 16V (because that's how much the 12V power supply I grabbed actually gives, unless my multimeter is borken), I see 13.6V on the sensor output when the sensor is open. If I add a 10K resistor between output and ground, it drops to 8V, with 20K it drops to 5.5V, so a 22K resistor ought to do it. Unfortunately, the sensor doesn't sense anything anymore, the LED doesn't light up, and the voltage doesn't drop. Only if I wire it wrongly does the LED light up, and then permanently.

Wait... now the voltage supply is giving nearly 18V. And the multimeter is showing a little battery sign. Maybe the battery... let's try the battery tester... shows nothing at all. Surely a battery can't be that dead, no, then the multimeter would have done nothing. Testing with some other batteries, yes, the battery tester is also dead. Why is everything broken?!? Oh, I can scavenge one from the smoke alarm in the kitchen (we recently got fancy smoke alarms in all rooms for free anyway) - nope, that one is also dead.

Total body count from today's exercise:

1 proximity sensor
2 9V batteries
1 cheap battery tester
Any progress today on getting the proximity sensor installed
1 12V power supply possibly injured
1 multimeter temporarily out

I suppose if I get an 8mm one as a replacement, I could put the copper tape I got from Ric under the glass. I'm doubtful that a 4mm sensor would do well enough there. Then I could even have a full grid level. OTOH, that would not measure the actual glass surface. I should also an NC probe though, for failsafe.

I'm not going to replace the mechanical endstop with the probe, for one thing they're at opposite ends, for another I don't really trust the probe as much.

All in all, I give today's results a big