Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved mains inlet cover for S_300_12 PSU #62

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
187 changes: 148 additions & 39 deletions scad/mains_inlet.scad
Original file line number Diff line number Diff line change
Expand Up @@ -29,67 +29,176 @@ function mains_inlet_top_width() = mains_inlet_width() - 2 * tab;
function mains_inlet_inset() = tab + thickness;
function mains_inlet_depth() = depth - terminal_depth;

module mains_inlet_stl() {
height = mains_inlet_height();
width = mains_inlet_width();
$fn=360;
length=115-6;
width=50;
height=50-9.5;
hole_d=8.25;
hole_spacing=10;
access_hole_d=6.5;
mount_hole_d=3;


module block()
//big block chevy
{
difference()
{
cube([length,width,height]);
translate([length*.04, width*.1, height]) cube([length-length*.08,width,height]);
}
}
module wire_holes()
//holes for wires and perhaps terminal clips/sockets/adapters
//depending on what you have at the end of your wires, i use prongs
{
// #translate([length*.08, width+1, height*.8]) rotate([90,0,0]) cylinder(h=width+2, r=hole_d/2);
// #translate([length*.17, width+1, height*.8]) rotate([90,0,0]) cylinder(h=width+2, r=hole_d/2);
// #translate([length*.26, width+1, height*.8]) rotate([90,0,0]) cylinder(h=width+2, r=hole_d/2);
#translate([length*.35, width+1, height*.8]) rotate([90,0,0]) cylinder(h=width+2, r=hole_d/2);
#translate([length*.44, width+1, height*.8]) rotate([90,0,0]) cylinder(h=width+2, r=hole_d/2);
#translate([length*.53, width+1, height*.8]) rotate([90,0,0]) cylinder(h=width+2, r=hole_d/2);
#translate([length*.62, width+1, height*.8]) rotate([90,0,0]) cylinder(h=width+2, r=hole_d/2);
// #translate([length*.71, width+1, height*.8]) rotate([90,0,0]) cylinder(h=width+2, r=hole_d/2);
// #translate([length*.80, width+1, height*.8]) rotate([90,0,0]) cylinder(h=width+2, r=hole_d/2);
}
module access_holes()
//holes at the top allow you to access the terminals
//with a screwdriver without removing the cover
{
// #translate([length*.08, width*.5, -1]) cylinder(h=width+2, r=access_hole_d/2);

translate([50, 3, -1]) cube([49, 26, 22.5]);

// translate([52.5, 4.5, -1]) cube([49, 26, 22.5]);
// {
// cube([27.5, 20, 4]);
// rotate([90,0,0]) cylinder(h=55,r=1.2);
// }
// #translate([length*.17, width*.5, -1]) cylinder(h=width+2, r=access_hole_d/2);
// #translate([length*.26, width*.5, -1]) cylinder(h=width+2, r=access_hole_d/2);
// #translate([length*.35, width*.5, -1]) cylinder(h=width+2, r=access_hole_d/2);
// #translate([length*.44, width*.5, -1]) cylinder(h=width+2, r=access_hole_d/2);
// #translate([length*.53, width*.5, -1]) cylinder(h=width+2, r=access_hole_d/2);
// #translate([length*.62, width*.5, -1]) cylinder(h=width+2, r=access_hole_d/2);
// #translate([length*.71, width*.5, -1]) cylinder(h=width+2, r=access_hole_d/2);
// #translate([length*.80, width*.5, -1]) cylinder(h=width+2, r=access_hole_d/2);
}

stl("mains_inlet");
module mount_holes()
//optional, could just use wood screws and make your own holes for mounting
{

translate([-1,width*.2,29.3]) rotate([0,90,0]) cylinder(h=length+2, r=mount_hole_d/2);
translate([-1,width*.6,29.3]) rotate([0,90,0]) cylinder(h=length+2, r=mount_hole_d/2);

}

difference() {
translate([0, 0, depth / 2]) // main body
cube([width, height, depth], center = true);
module circles()
//curved lip along the bottom makes for easy install and it's pretty too...
{
translate([-1,width*1.2,height+width*.5]) rotate([0,90,0]) cylinder(h=length+2, r=width*.8);
}

difference() {
translate([0, -thickness, depth / 2])
cube([width - 2 * tab - 2 * thickness, height, depth - 2 * thickness], center = true); // hollow inside
for(side = [-1, 1])
translate([side * hole_pitch / 2, height / 2 - thickness - cut_out_width / 2, 0])
cylinder(r = washer_diameter(M3_washer) / 2, h = 10);
}
module extras()
//leaves some extra material along the edges for strength
{
translate([length*.018,height*.055,height*.1]) cube([length-length*0.036,width,height]);
translate([length*.04,width*.4, height*.05]) cube([length-length*0.08,width,height*.1]);
}

translate([-thickness - tab, - height / 2 + eta, depth])
cube([width, terminal_height * 2, terminal_depth * 2], true); // cut out for terminal strip
module beef()
//thicken up some areas
{
difference()
{
translate([length*.97, width*.1, height*.33]) cube([length*.030, width*.65, height*.43]);
translate([length*.94, width*.2, height*.2]) rotate([0,0,65]) cube([length*.1, width*.5, height*.6]);
}
}

translate([0, height / 2 - cut_out_width / 2 - thickness, 0])
cube([cut_out_length, cut_out_width, 2 * thickness + 1], center = true); // connector apperture
module cover()
//the basic cover with wire/access holes
{
difference()
{
block();
wire_holes();
access_holes();
led_hole();
extras();
circles();
}
}

for(side = [-1, 1]) {
//
// mounting screw holes
//
for(z = side > 0 ? [depth - holes, holes] : [depth - terminal_depth - holes])
translate([side * (width / 2 - tab / 2), - height / 2, z])
rotate([90, 0, 0]) teardrop_plus(r = screw_clearance_radius(base_screw), h = foot * 2 + 1, center = true);
module cover_beefy()
//add material to minimize warping and for mounting screw holes
{
cover();
beef();
//translate([length*.4,0,0-height*.2236]) scale([.5,1,1]) beef();

translate([side * width / 2, foot, 1])
cube([tab * 2, height, depth * 2], center = true); // cut outs for lugs
#scale([1,1,1]) translate([length, 0, 0]) mirror([1,0,0]) beef();
//#scale([.6,1,1]) translate([length, 0, 0-height*.25]) mirror([1,0,0]) beef();
}

translate([side * hole_pitch / 2, height / 2 - thickness - cut_out_width / 2, 0])
poly_cylinder(r = M3_tap_radius, h = depth, center = true);
}
module grill()
{
union()
{
//horizontal bars
translate([4.848, 0, height*.76]) cube([hole_d*1.925, 1.75, .8]);
translate([4.848, 0, height*.835]) cube([hole_d*1.925, 1.75, .8]);
translate([4.848, 0, height*.91]) cube([hole_d*1.925, 1.75, .8]);

//vertical bars
//translate([length*.875, 0, height*.7]) cube([.8, 1.75, hole_d*1.7]);
//translate([length*.9125, 0, height*.7]) cube([.8, 1.75, hole_d*1.7]);
//translate([length*.95, 0, height*.7]) cube([.8, 1.75, hole_d*1.7]);
}
}

module led_hole()
//big rounded square for easy viewing of the power led from wide angles
{
translate([6.937, width+1, height*.78]) minkowski()
{
cube([hole_d*.438, width+1, hole_d*.63]);
rotate([90,0,0]) cylinder(h=55,r=1.2);
}
}
module printable()
//make mounting holes go all the way through
{
grill();
difference()
{
cover_beefy();
mount_holes();
}
}



module mains_inlet_stl() {
//rotated and centered
translate([(-50+9.5+18),-3,50]) rotate([270,0,270])printable();
}


module mains_inlet_holes()
for(side = [-1, 1])
for(z = side > 0 ? [depth - holes, holes] : [depth - terminal_depth - holes])
translate([side * (mains_inlet_width() / 2 - tab / 2), -mains_inlet_height() / 2 + foot, z])
rotate([-90, 0, 0])
child();



module mains_inlet_assembly() {
assembly("mains_inlet_assembly");
translate([-mains_inlet_depth(), -mains_inlet_width() / 2 + mains_inlet_inset(), mains_inlet_height() / 2]) rotate([90, 0, 90]) {
{

color(plastic_part_color("lime")) render() mains_inlet_stl();
//
// Mounting screws and washers
//
mains_inlet_holes()
frame_screw(foot);

}
end("mains_inlet_assembly");
}
Expand Down
16 changes: 11 additions & 5 deletions scad/x-carriage.scad
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
include <conf/config.scad>
use <bearing-holder.scad>
use <wade.scad>
use <fan-guard.scad>

hole = 36;
width = hole + 2 * bearing_holder_width(X_bearings);
Expand Down Expand Up @@ -257,8 +258,9 @@ front_nut_y = - width / 2 + wall;

gap = 6;
taper_angle = 30;
duct_height = 12;
nozzle_height = 6;
duct_height = 20;
throat_nozzle_height = max(duct_height - 14, duct_wall);
ir = hot_end_duct_radius(hot_end);
or = ir + duct_wall + gap + duct_wall;
skew = nozzle_height * tan(taper_angle);
Expand All @@ -273,8 +275,8 @@ fan_y_duct = -fan_y + hot_end_duct_offset(hot_end)[1];
module throat(inner) {
y = or + skew - duct_wall;
if(inner)
translate([-throat_width / 2 + duct_wall, y, nozzle_height])
cube([throat_width - 2 * duct_wall, 2 * eta, (duct_height - nozzle_height) - top_thickness]);
translate([-throat_width / 2 + duct_wall, y, throat_nozzle_height])
cube([throat_width - 2 * duct_wall, 2 * eta, (duct_height - throat_nozzle_height) - top_thickness]);
else
translate([-throat_width / 2, y - duct_wall, 0])
cube([throat_width, 2 * eta, duct_height]);
Expand Down Expand Up @@ -453,6 +455,7 @@ module x_carriage_fan_bracket_stl() {
poly_cylinder(r = screw_clearance_radius(fan_screw), h = 100, center = true);
}
}
fan_guard(part_fan);
}

bearing_gap = 5;
Expand Down Expand Up @@ -621,7 +624,7 @@ module x_carriage_fan_assembly() {
rotate([180, 0, 0]) {
for(x = [-1, 1])
for(y = [-1,1])
translate([x * fan_hole_pitch(part_fan), y * fan_hole_pitch(part_fan), fan_depth(part_fan) / 2 + (y < 0 ? fan_bracket_thickness : 0)])
translate([x * fan_hole_pitch(part_fan), y * fan_hole_pitch(part_fan), fan_depth(part_fan) / 2 + (y < 0 ? fan_bracket_thickness : /*fan_guard_thickness*/ 2)])
screw_and_washer(fan_screw, fan_screw_length);
fan_hole_positions(part_fan) group() {
rotate([180, 0, 0])
Expand Down Expand Up @@ -757,4 +760,7 @@ if(0)
else
x_carriage_parts_stl();
else
x_carriage_assembly(true);
x_carriage_fan_bracket_stl();
// x_carriage_assembly(true);