Created
December 16, 2025 22:21
-
-
Save ednisley/795498758d216e6a65b4f57e9c9984ea to your computer and use it in GitHub Desktop.
OpenSCAD source code: 24 V power supply mounting brackets & drill template
This file contains hidden or 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
| // Mount for 24 V laser power supply | |
| // Ed Nisley - KE4ZNU | |
| // 2025-12-07 | |
| include <BOSL2/std.scad> | |
| Layout = "Show"; // [Show,Build,Guide,Block] | |
| /* [Hidden] */ | |
| ID = 0; | |
| OD = 1; | |
| LENGTH = 2; | |
| HoleWindage = 0.2; | |
| Protrusion = 0.1; | |
| NumSides = 2*3*4; | |
| $fn=NumSides; | |
| Gap = 5.0; | |
| Rivnut = [4.0,6.0,9.0]; // body + head OD | |
| RivnutHead = [6.0,10.0,1.0]; // flat head | |
| WallThick = 6.0; // a bit more than half rivnut head OD | |
| SupplyCase = [50.0,215.0,112.0]; // power supply case size | |
| SupplyOC = [25.0,150.0,0]; // power supply mounting screw centers | |
| SupplyOffset = -1.0; // the screws are not centered on the case! | |
| SupplyScrew = [4.0,9.0,4.0]; // … LENGTH outside supply case | |
| MountOC = SupplyCase.x + 2*WallThick; | |
| MountScrewLength = 8.0; // … head-to-baseplate | |
| MountRadius = 0.5; | |
| BlockOA = [MountOC + 2*WallThick, 2*WallThick, MountScrewLength]; | |
| GuideOD = 2.0; | |
| //----- | |
| // Single mounting block | |
| module MountBlock() { | |
| difference() { | |
| cuboid(BlockOA,chamfer=MountRadius,except=BOTTOM,anchor=BOTTOM); | |
| for (i = [-1,1]) { | |
| right(i*MountOC/2) { | |
| cyl(2*RivnutHead[LENGTH],d=RivnutHead[OD],circum=true,anchor=CENTER); | |
| cyl(2*BlockOA.z,d=Rivnut[ID] + HoleWindage,circum=true,anchor=BOTTOM); | |
| } | |
| right(i*SupplyOC.x/2 + SupplyOffset) { | |
| down(SupplyScrew[LENGTH]) | |
| cyl(BlockOA.z,d=SupplyScrew[OD] + HoleWindage,circum=true,anchor=BOTTOM); | |
| cyl(2*BlockOA.z,d=SupplyScrew[ID] + HoleWindage,circum=true,anchor=BOTTOM); | |
| } | |
| } | |
| } | |
| } | |
| //----- | |
| // Guide holes in a 2D layout | |
| module DrillGuide() { | |
| difference() { | |
| square([BlockOA.x,SupplyOC.y + BlockOA.y],center=true); | |
| for (j=[-1,1]) | |
| fwd(j*SupplyOC.y/2) | |
| for (i = [-1,1]) { | |
| right(i*MountOC/2) { | |
| circle(d=GuideOD); | |
| } | |
| } | |
| } | |
| } | |
| //----- | |
| // Build things | |
| if (Layout == "Block") | |
| MountBlock(); | |
| if (Layout == "Guide") | |
| DrillGuide(); | |
| if (Layout == "Show") { | |
| for (j=[-1,1]) | |
| fwd(j*SupplyOC.y/2) | |
| MountBlock(); | |
| color("Gray",0.5) | |
| up(BlockOA.z) | |
| cuboid(SupplyCase,anchor=BOTTOM); | |
| } | |
| if (Layout == "Build") { | |
| for (j=[-1,1]) | |
| fwd(j*(BlockOA.y/2 + Gap/2)) | |
| up(BlockOA.z) zflip() | |
| MountBlock(); | |
| } | |
Author
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://softsolder.com/2025/12/17/laser-cutter-new-24-v-power-supply/