Tuesday, 27 December 2016

Testing an inductive proximity sensor

Let's take at the sensor I got from +Richard Jørgensen. As I mentioned, it's a LJ12A3-4-Z/BX, and came with this little extra print board to pull it down to 5V:

Now I don't have all my normal stuff with me, but I found a 12.6V battery in a drawer, which should be enough to power it. Plus it has an LED in it to show when it's detecting something. So if I just wire it up right (maybe reusing part of that board), I should be able to get it to light up.

According to this video, the wiring is: Brown = Vin, Black = Signal, Blue = Gnd, and I can just use a 9V battery with Brown on + and Blue on -. Didn't work with the 12.6V battery, but I don't know the state of that. With a fresh 9V, it works! It detects the copper tape at about 2mm distance, nice. I guess the '4' in the name is the maximum sensor distance (at full voltage?), which is nice for keeping it somewhat away from the bed.

There's an Instructable on how to enable auto-leveling with Marlin. I don't think I want the full auto-leveling to adjust for the shape of my bed just yet, just getting the height right is the important part. Plus I think I would rather work to get a level bed than have the print adjust, I expect a properly flat bed gives a better result than adjusting the Z axis during printing.

I'll clearly need a mount. I've been pondering various sneaky magnetic ways to raise and lower the sensor, though with the measurement distance being so long, I can probably just mount it close to the nozzle and still avoid crashes. There's this one by DanielBull which is just an add-on, or he has a full X carriage with a built-in probe mount. I'm not about to change out my carriage, that's a larger operation, though it might eventually be useful in order to properly mount an E3D and bed fan and probe. My one concern is that the probe would come loose enough during printing that it starts to offset itself. We'll see.

This video goes through the process very nicely. He warns against using PLA, since it melts at fairly low temperature. Maybe that's a good time to use that sample of PETG I got.

Marlin only supports three-point and grid levelling (tramming). Given that I need to put copper tape on the bed to measure it (unless I switch to an aluminium bed instead of glass), I can't have the points be on the middle of the bed. 

Do I want to replace the normal Z-endstop, or use the option to have them both on one input? I'm thinking the latter is more complex and prone to weird interactions. Some talk on how to connect to a Melzi here and here. Since this is an NPN, I shouldn't need extra components, which is nice (though I do like the PNP feature of a failed sensor counting as being triggered).

No comments:

Post a Comment