Advertisements

MPCNC: Z Axis Upward Homing with Opto Proximity Sensor

Homing the MPCNC’s Z axis at the bottom end of its travel made no sense, but the Z stage lacks a convenient spot to mount / trigger a switch at the top of its travel, so this sufficed for initial tests & fiddling:

MPCNC - Z min endstop

MPCNC – Z min endstop

The EMT rail carrying the switch moves downward, tripping the lever when it hits the MPCNC’s central assembly.

Somewhat to my surprise, a¬†TRCT5000-based optical proximity sensor (harvested from the Kenmore 158 Crash Test Dummy’s corpse) and a strip of black electrical tape work perfectly:

MPCNC - Z Axis Opto Proximity Endstop

MPCNC – Z Axis Opto Proximity Endstop

The PCB wears a shiny new epoxy coat:

MPCNC - Epoxy-coated Endstop - Opto Prox Sensor

MPCNC – Epoxy-coated Endstop – Opto Prox Sensor

I soldered the wires (harvested from the previous endstop) directly to the PCB, because the pinout isn’t the same and fewer connectors should be better.

The mount uses black PETG, rather than translucent orange, in hope of IR opacity, and wraps around the EMT rail at (roughly) the 2 mm standoff producing the peak response:

IR Reflective Sensor module - TCRT5000 - response vs distance

IR Reflective Sensor module – TCRT5000 – response vs distance

In truth, I set the gap by eyeballometric guesstimation to make the entire mount arc sit equidistant from the EMT:

MPCNC - Z Opto Prox Endstop - top view

MPCNC – Z Opto Prox Endstop – top view

The mount includes the 2 mm spacing around the EMT OD and puts the sensor tip flush with the arc OD, so it should be pretty close:

TCRT5000 Z Axis Endstop Mount - solid model

TCRT5000 Z Axis Endstop Mount – solid model

A strip of 3M permanent tape, cut to clear the 608 bearings, affixes the mount to the MPCNC’s central assembly. The solid model now includes a midline reference notch, with a height rounded up to the next-highest multiple of 2.0 mm. It needs a loop to anchor the cable.

The blue twiddlepot sets the comparator threshold midway between the response over black tape (incorrectly on = too low) and bare EMT (incorrectly off = too high), in the hope of noise immunity. The range spanned nearly half of the pot rotation, so I think it’s all good.

The sensor doesn’t trip when the edge of the tape exactly meets its midline, which meant I had to trim a strip of tape to suit. As part of setting the twiddlepot, I shut off the Z axis motor and laid some test strips on the EMT:

MPCNC - Z Axis Opto Prox Endstop - Test Tape

MPCNC – Z Axis Opto Prox Endstop – Test Tape

I spun the leadscrew with one hand, held the sensor with the other, twiddled the trimpot, trimmed the upper and lower ends of the tape, and generally had a fine time. The sensor responds equally well to a half-wide strip of tape (in the upper picture), with the distinct advantage of not encroaching on the 608 bearing tracks.

The GRBL setup now homes Y and Z toward the positive end of their travel, with X still toward the negative end while a set of extension cables remains in transit around the planet.

The OpenSCAD source code as a GitHub Gist:

The original doodles, including a bunch of ideas left on the cutting room floor:

MPCNC Z Opto Proximity Sensor Endstop - doodles

MPCNC Z Opto Proximity Sensor Endstop – doodles

Advertisements

, ,