TCRT5000 Proximity Sensor Mount

Having a few TCRT5000 proximity sensors lying around, I used one for the Color Mixer so folks could just wave a finger to flip the LED colors, rather than pound relentlessly on the top plate:

Color mixer - controls
Color mixer – controls

The stem fits into a slot made with a 3/8 inch end mill:

Prox Sensor Bezel - Slic3r preview
Prox Sensor Bezel – Slic3r preview

You move the cutter by the length of the sensor (10.0 mm will work) to make the slot. In practical terms, drill a hole at the midpoint, insert the cutter, then move ±5.0 mm from the center:

Prox sensor panel cut
Prox sensor panel cut

A bead of epoxy around the stem on the bottom of the panel should hold it in place forevermore.

The rectangular inner hole came out a tight push fit for the TCRT5000 sensor, so I didn’t bother gluing it in place and, surprisingly, it survived the day unscathed!

The OpenSCAD source code as a GitHub Gist:

// TCRT5000 Proximity switch sensor mount
// Ed Nisley KE4ZNU - October 2016
Layout = "Build"; // Show Build
//- Extrusion parameters must match reality!
ThreadThick = 0.25;
ThreadWidth = 0.40;
HoleWindage = 0.2;
Protrusion = 0.1; // make holes end cleanly
inch = 25.4;
function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit);
//----------------------
// Dimensions
Sensor = [5.9,10.0,7.0];
SensorHoleCutter = 3/8 * inch;
echo(str("Cutter dia: ",SensorHoleCutter," mm"));
echo(str("Cutter motion: ",Sensor[1]," mm"));
PanelThick = 5.0;
StemLength = PanelThick + 6*ThreadThick;
FlangeThick = 3 * ThreadThick;
//----------------------
// Flange model
module ProxFlange() {
difference() {
union() {
linear_extrude(height=FlangeThick)
hull()
for (i=[-1,1], j=[-1,1])
translate([i*Sensor[0],j*Sensor[1]])
circle(r=Sensor[0]/2,$fn=8*4);
translate([0,0,-StemLength])
linear_extrude(height=StemLength)
hull()
for (j=[-1,1])
translate([0,j*Sensor[1]/2])
circle(d=SensorHoleCutter,$fn=8*4);
}
translate([0,0,-Protrusion])
cube(Sensor + [HoleWindage,HoleWindage,2*(PanelThick + Protrusion)],center=true);
}
}
//----------------------
// Build it
if (Layout == "Show")
ProxFlange();
if (Layout == "Build")
translate([0,0,FlangeThick])
rotate([180,0,0])
ProxFlange();