Skip to content

Instantly share code, notes, and snippets.

@ednisley
Created October 23, 2016 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ednisley/1d6fedfd2f729755e681d5dcd6f24b54 to your computer and use it in GitHub Desktop.
Save ednisley/1d6fedfd2f729755e681d5dcd6f24b54 to your computer and use it in GitHub Desktop.
OpenSCAD source code: Base for ceramic Mogul lamp socket
//----------------------
// Base for Mogul ceramic socket
module MogulBase() {
Insert = [5.0,7.0,10.5]; // 10-32 brass insert, used for socket and chassis mounting
PCB =
[45,18,7.5] // Arduino Nano
;
BaseOD = 57.0;
BaseOAH = Insert[LENGTH] + 3*ThreadThick + PCB[2];
ScrewOC = 1.5 * inch;
difference() {
cylinder(d=BaseOD,h=BaseOAH,$fn=16*4); // overall shape
translate([0,0,-Protrusion]) // central mounting insert
PolyCyl(Insert[OD],Insert[LENGTH] + Protrusion,6);
for (a=[90,-90]) // socket studs
rotate(a)
translate([ScrewOC/2,0,-Protrusion]) {
PolyCyl(Insert[OD],Insert[LENGTH] + Protrusion,6);
PolyCyl(Insert[ID],2*BaseOAH,6);
}
translate([(BaseOD - PCB[0])/2,0,BaseOAH - PCB[2]/2 + Protrusion/2])
cube(PCB + [0,0,Protrusion],center=true); // Arduino PCB
rotate(45)
translate([0,0,BaseOAH - Ferrule[ID]/2 + Protrusion/2])
rotate([0,90,0]) rotate(180/6)
PolyCyl(Ferrule[ID],BaseOD,6);
}
}
@ednisley
Copy link
Author

More details on my blog at http://wp.me/poZKh-6fW

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment