2 // Copyright (c) 2014 "gregington"
3 // CC BY-SA 3.0, http://www.thingiverse.com/thing:216951
5 // Customized by Clinton Ebadi <clinton@unknownlamer.org> for the
6 // SE-600 power supply. Copyright (c) 2016.
10 // - powerSocket, powerSwitch, screwHoles, ... might be cleaner if
11 // placement were done separately. Should be possible to add
12 // modules for placing parts (lying flat, centered on the origin)
13 // on each surface of the psu cover, fine tuning positions using
16 // - add powerpole mount option
18 // new todo: - recheck dimensions -- screw holes are fixed offset from
19 // cover_depth... cover_depth needs to be rechecked/recalculated as
20 // wall + clearance needed for power socket + screw y offset
22 // or: optimal case depth is buffer + screw hole distance from edge of
23 // case + whatever space is needed inside the case + back wall
27 // case depth = back wall thickness + cavity size + mounting hole offset + extra behind mounting hole
29 // cavity size is usually just enough for the plug or terminals + some extra
34 PSU_WIDTH = 127 + PSU_CLEARANCE;
35 PSU_HEIGHT = 63.5 + PSU_CLEARANCE;
38 COVER_WIDTH = PSU_WIDTH + (2 * WALL);
39 COVER_HEIGHT = PSU_HEIGHT + (2 * WALL);
41 COVER_DEPTH = 11 + 6 + 2*(25.4+2) + WALL; // ac
42 //COVER_DEPTH = 11 + 6 + 30 + WALL; // dc
44 //COVER_SUPPORT_WIDTH = 20; // ??
46 VENT_HEIGHT = PSU_HEIGHT - PSU_CLEARANCE - WALL - 1;
48 VENT_DISTANCE = 5; // was 4
50 CABLE_SLOT_WIDTH = 18;
51 CABLE_SLOT_HEIGHT = 50;
52 CABLE_SLOT_Y_OFFSET = 40;
54 //CABLE_SLOT_VENT_DISTANCE = 2; // ???
56 POWER_SOCKET_OFFSET = WALL*2 + 43/2;
57 POWER_SWITCH_OFFSET = 20;
59 SCREW_HOLE_HEIGHT = 12;
61 SCREW_HOLE_Z_OFFSET = 30; // offset from top of PSU
62 SCREW_HOLE_GAP = 20; // distance between screw holes
63 SCREW_HOLE_Y_OFFSET = COVER_DEPTH - 6; // offset from back of case
69 cube([COVER_WIDTH, COVER_DEPTH, COVER_HEIGHT]);
72 translate([WALL, WALL, WALL]) {
73 # cube([PSU_WIDTH, PSU_DEPTH, PSU_HEIGHT]);
78 module vents(offset = 0, limit = COVER_WIDTH - WALL) {
79 for (x = [ WALL + VENT_DISTANCE + offset : VENT_DISTANCE : limit ]) {
80 translate([x, WALL, (COVER_HEIGHT - VENT_HEIGHT) / 2]) {
81 rotate([0, -90, 90]) {
82 slot(VENT_WIDTH, VENT_HEIGHT, 2 * WALL);
89 module slot(width, height, depth, center = false) {
90 translate([width / 2, 0, 0]) {
92 cube([height - width, width, depth]);
93 translate([0, width / 2, 0]) {
94 cylinder(h = depth, r = width / 2);
96 translate([height - width, width / 2, 0]) {
97 cylinder(h = depth, r = width / 2);
103 module cslot(width, height, depth) {
104 translate ([-height/2, -width/2, -depth/2])
105 slot (width, height, depth);
109 // defaults for https://www.digikey.com/product-detail/en/1-1609112-2/CCM1916-ND/2292077
110 //module powerSocket(width = 27, height = 38, screw_distance = 35, side=0) {
111 module powerSocket(width = 1.06*25.4, height = 1.56*25.4, screw_distance = 1.42*25.4, side=0) {
112 translate([WALL*(side ? 2 : 1) + 2 + (side ? PSU_WIDTH : 0), POWER_SOCKET_OFFSET, (COVER_HEIGHT/2+height)/2]) {
114 translate([0,screw_distance/2,-5]) { rotate ([0, 0, 90]) cslot (3, 5, 22); }
115 translate([0,-screw_distance/2,-5]) { rotate ([0, 0, 90]) cslot (3, 5, 22); }
116 translate([0,0,-5.5 - 1.5])
118 #cube([height-8,width-8,11], center=true);
119 cylinder(r=4.5,h=0.1);
125 module powerSwitch() {
126 translate([COVER_WIDTH / 2, POWER_SWITCH_OFFSET, COVER_HEIGHT + 2]) {
127 rotate([0, 0, -90]) {
128 cube([14.8,20.8,2], center=true);
129 translate([0,0,-7-1]) cube([13,19.8,14], center=true);
135 translate([(PSU_WIDTH - CABLE_SLOT_HEIGHT) / 2, WALL, (COVER_HEIGHT - VENT_HEIGHT) / 2]) {
137 slot(CABLE_SLOT_WIDTH, CABLE_SLOT_HEIGHT, WALL * 2);
142 module cableSlotOutline() {
144 translate([(PSU_WIDTH - CABLE_SLOT_HEIGHT - border) / 2, WALL, (COVER_HEIGHT - VENT_HEIGHT - border) / 2]) {
146 slot(CABLE_SLOT_WIDTH + border, CABLE_SLOT_HEIGHT + border, WALL * 2);
151 module screwHoles() {
152 translate ([-2.5, SCREW_HOLE_Y_OFFSET + WALL - SCREW_HOLE_HEIGHT, -SCREW_HOLE_WIDTH/2 + WALL + + PSU_CLEARANCE/2 + SCREW_HOLE_Z_OFFSET]) {
153 rotate([90, 0, 90]) {
154 #slot(SCREW_HOLE_WIDTH, SCREW_HOLE_HEIGHT, COVER_WIDTH + 5);
155 translate ([0, SCREW_HOLE_GAP, 0])
156 slot(SCREW_HOLE_WIDTH, SCREW_HOLE_HEIGHT, COVER_WIDTH + 5);
162 translate([0, COVER_HEIGHT, 0]) rotate([90, 0, 0]) {
165 vents(offset = PSU_WIDTH/2 );
173 translate([0, COVER_HEIGHT, 0]) rotate([90, 0, 0]) {
177 vents(limit = PSU_WIDTH);
189 // translate ([115, -10, -1]) #cube ([50, 100, 100]);
193 //translate ([200,0,0]) dc_cover ();
195 // power socket mockups
197 /* difference () { */
198 /* cube ([5,45,50]); */
199 /* #translate ([0, 0, -10]) powerSocket (); */
202 /* translate ([100, 0, 0]) */
203 /* difference () { */
204 /* cube ([5, 40,50]); */
205 /* translate ([0, -30, -20]) #screwHoles(); */