Created
December 11, 2017 16:22
-
-
Save ednisley/177978fc52c012b0134f0f7ab6373ea5 to your computer and use it in GitHub Desktop.
OpenSCAD source code: MPCNC Tool Length Probe Station with endstop switch PCB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MPCNC Tool Length Probe Station | |
// Ed Nisley KE4ZNU - 2017-12-08 | |
/* [Extrusion] */ | |
ThreadThick = 0.25; // [0.20, 0.25] | |
ThreadWidth = 0.40; // [0.40] | |
function IntegerMultiple(Size,Unit) = Unit * ceil(Size / Unit); | |
/* [Hidden] */ | |
Protrusion = 0.1; // [0.01, 0.1] | |
HoleWindage = 0.2; | |
/* [Sizes] */ | |
EndstopPCB = [40.0,16.5,1.6]; // endstop PCB | |
ComponentHeight = 6.0; // max component height above PCB | |
SwitchOffset = [35.0,21.0,4.75]; // touch point center from lower left PCB corner | |
SwitchTravel = 2.5; // first touch to switch actuation | |
TapeThick = 1.0; // foam mounting tape | |
WallThick = 4.0; // basic wall & floor thickness | |
BaseRadius = 5.0; | |
Base = [IntegerMultiple(EndstopPCB[0] + 2*BaseRadius,20), | |
IntegerMultiple(EndstopPCB[2] + TapeThick + WallThick + 2*BaseRadius,2*25), | |
2.0]; | |
NumSides = 8*4; | |
TextDepth = 2*ThreadThick; | |
//- Build it | |
union() { | |
difference() { | |
hull() | |
for (i=[-1,1], j=[-1,1]) | |
translate([i*(Base[0]/2 - BaseRadius),j*(Base[1]/2 - BaseRadius),0]) | |
resize([0,0,Base[2]]) | |
intersection() { | |
cylinder(r=BaseRadius,h=BaseRadius,$fn=NumSides); | |
sphere(r=BaseRadius,$fn=NumSides); | |
} | |
translate([0,0,Base[2] - TextDepth]) | |
linear_extrude(height=TextDepth + Protrusion) { | |
translate([0,-10,0]) | |
text(text="MPCNC",size=8,spacing=1.05,font="Arial:style=Bold",halign="center"); | |
translate([0,-18,0]) | |
text(text="Tool Probe",size=6,spacing=1.05,font="Arial:style=Regular",halign="center"); | |
} | |
} | |
translate([0, | |
WallThick/2 + TapeThick + SwitchOffset[2], | |
(EndstopPCB[1] - Protrusion)/2 + Base[2]]) | |
cube([EndstopPCB[0],WallThick,EndstopPCB[1] + Protrusion],center=true); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More details on my blog at https://wp.me/poZKh-7dt