Added printed SSR shrouds

This commit is contained in:
Chris Palmer 2019-06-22 12:36:07 +01:00
parent 9ccdf3c075
commit 13624eb9bd
8 changed files with 253 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 659 KiB

After

Width:  |  Height:  |  Size: 660 KiB

View File

@ -86,6 +86,7 @@ use <tests/ribbon_clamp.scad>
use <tests/screw_knob.scad>
use <tests/socket_box.scad>
use <tests/strap_handle.scad>
use <tests/ssr_shroud.scad>
x5 = 800;
@ -300,9 +301,12 @@ translate([x3 + 15, modules_y])
translate([x3 + 40, modules_y])
modules();
translate([x3, ssrs_y])
translate([x3, ssrs_y]) {
ssrs();
ssr_shrouds();
}
translate([x3, blowers_y])
blowers();

154
printed/ssr_shroud.scad Normal file
View File

@ -0,0 +1,154 @@
//
// NopSCADlib Copyright Chris Palmer 2018
// nop.head@gmail.com
// hydraraptor.blogspot.com
//
// This file is part of NopSCADlib.
//
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
// GNU General Public License as published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
//
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with NopSCADlib.
// If not, see <https://www.gnu.org/licenses/>.
//
//
//! A cover to go over the mains end of an SSR to make it safe to be touched.
//! The stl and assembly must be given a name and parameterless wrappers for the stl and assembly added to the project.
//
include <../core.scad>
include <../vitamins/screws.scad>
include <../vitamins/inserts.scad>
use <../vitamins/ssr.scad>
use <../utils/round.scad>
wall = 1.8;
top = 1.5;
screw = M3_cap_screw;
screw_length = 10;
insert = screw_insert(screw);
boss_r = wall + corrected_radius(insert_hole_radius(insert));
boss_h = insert_hole_length(insert);
counter_bore = 2;
boss_h2 = boss_h + counter_bore;
rad = 3;
clearance = layer_height;
function ssr_shroud_pitch(type) = ssr_width(type) + 2 * wall - 2 * boss_r - eps;
function ssr_shroud_screw(type) = screw; //! Screw used to fasten
function ssr_shroud_extent(type, cable_d) = 2 * boss_r + 1 + cable_d + rad; //! How far it extends beyond the SSR
function ssr_shroud_width(type) = ssr_width(type) + 2 * wall + clearance; //! Outside width of shroud
function ssr_shroud_height(type) = ssr_height(type) + top + clearance; //! Outside height
module ssr_shroud_hole_positions(type) //! Place children at the screw hole positions
for($side = [-1, 1])
translate([-ssr_length(type) / 2 -boss_r, $side * ssr_shroud_pitch(type) / 2])
vflip()
children();
module ssr_shroud_holes(type) //: Drill the screw holes
ssr_shroud_hole_positions(type)
drill(screw_clearance_radius(screw), 0);
module ssr_shroud(type, cable_d, name) { //! Generate the STL file for a specified ssr and cable
stl(str("ssr_shroud_", name));
width = ssr_shroud_width(type);
depth = ssr_length(type) / 3 + ssr_shroud_extent(type, cable_d);
height = ssr_shroud_height(type);
cable_x = -ssr_length(type) / 2 - 2 * boss_r - 1 - cable_d / 2;
center_x = -ssr_length(type) / 6 - depth / 2;
translate([center_x, 0]) {
rounded_rectangle([depth - eps, width - eps, top], rad, center = false);
linear_extrude(height = height) difference() {
round(or = wall / 2 - eps, ir = 0) difference() {
rounded_square([depth, width], rad);
rounded_square([depth - 2 * wall, width - 2 * wall], rad - wall);
translate([depth / 2, 0])
square([2 * rad, width], center = true);
}
translate([cable_x - center_x, 0])
square([cable_d, width + 1], center = true);
}
}
for(side = [-1, 1])
translate([cable_x, side * (width / 2 - wall / 2), height / 2])
rotate([90, 0, 0])
linear_extrude(height = wall, center = true)
difference() {
square([cable_d + eps, height], center = true);
translate([0, height / 2])
vertical_tearslot(h = 0, r = cable_d / 2, l = cable_d);
}
translate_z(height - boss_h)
linear_extrude(height = boss_h)
ssr_shroud_hole_positions(type)
difference() {
hull() {
circle(boss_r);
translate([0, -$side * (boss_r - 1)])
square([2 * boss_r, eps], center = true);
}
poly_circle(insert_hole_radius(insert));
}
translate_z(height - boss_h2)
linear_extrude(height = counter_bore + eps)
ssr_shroud_hole_positions(type)
difference() {
hull() {
circle(boss_r);
translate([0, -$side * (boss_r - 1)])
square([2 * boss_r, eps], center = true);
}
poly_circle(insert_screw_diameter(insert) / 2 + 0.1);
}
ssr_shroud_hole_positions(type)
hull() {
translate_z(-height + boss_h2) {
cylinder(h = eps, r = boss_r);
translate([0, -$side * (boss_r - 1)])
cube([2 * boss_r, eps, eps], center = true);
}
translate([0, -$side * (boss_r - wall), -height + boss_h2 + (2 * boss_r - wall)])
cube(eps);
}
}
module ssr_shroud_assembly(type, cable_d, name) //! The printed parts with inserts fitted
assembly(str("ssr_shroud_", name)) {
translate_z(ssr_height(type) + top)
vflip()
color(pp1_colour) ssr_shroud(type, cable_d, name);
ssr_shroud_hole_positions(type)
insert(insert);
}
module ssr_shroud_fastened_assembly(type, cable_d, thickness, name) //! Assembly with screws in place
{
ssr_shroud_assembly(type, cable_d, name);
translate_z(-thickness)
ssr_shroud_hole_positions(type)
screw_and_washer(screw, screw_length, true);
}

View File

@ -32,8 +32,8 @@ See [usage](docs/usage.md) for requirements, installation instructions and a usa
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Sealing_strip">Sealing_strip</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td> <a href = "#Rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Sheets">Sheets</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr>
<tr><td> <a href = "#Iecs">Iecs</a> </td><td> <a href = "#Spades">Spades</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
<tr><td> <a href = "#Inserts">Inserts</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
<tr><td> <a href = "#Jack">Jack</a> </td><td> <a href = "#Springs">Springs</a> </td><td></td><td></td><td></td></tr>
<tr><td> <a href = "#Inserts">Inserts</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Ssr_shroud">Ssr_shroud</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
<tr><td> <a href = "#Jack">Jack</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Leadnuts">Leadnuts</a> </td><td> <a href = "#Ssrs">Ssrs</a> </td><td></td><td></td><td></td></tr>
<tr><td> <a href = "#Leds">Leds</a> </td><td> <a href = "#Stepper_motors">Stepper_motors</a> </td><td></td><td></td><td></td></tr>
<tr><td> <a href = "#Light_strips">Light_strips</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td></td><td></td><td></td></tr>
@ -3587,6 +3587,58 @@ UK 13A socket and printed backbox with earth terminal for the panel it is mounte
| 1 | socket_box_MKLOGIC_assembly |
<a href="#top">Top</a>
---
<a name="Ssr_shroud"></a>
## Ssr_shroud
A cover to go over the mains end of an SSR to make it safe to be touched.
The stl and assembly must be given a name and parameterless wrappers for the stl and assembly added to the project.
[printed/ssr_shroud.scad](printed/ssr_shroud.scad) Implementation.
[tests/ssr_shroud.scad](tests/ssr_shroud.scad) Code for this example.
### Functions
| Function | Description |
|:--- |:--- |
| ```ssr_shroud_extent(type, cable_d)``` | How far it extends beyond the SSR |
| ```ssr_shroud_height(type)``` | Outside height |
| ```ssr_shroud_screw(type)``` | Screw used to fasten |
| ```ssr_shroud_width(type)``` | Outside width of shroud |
### Modules
| Module | Description |
|:--- |:--- |
| ```ssr_shroud(type, cable_d, name)``` | Generate the STL file for a specified ssr and cable |
| ```ssr_shroud_assembly(type, cable_d, name)``` | The printed parts with inserts fitted |
| ```ssr_shroud_fastened_assembly(type, cable_d, thickness, name)``` | Assembly with screws in place |
| ```ssr_shroud_hole_positions(type)``` | Place children at the screw hole positions |
![ssr_shroud](tests/png/ssr_shroud.png)
### Vitamins
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 4 | ```insert(F1BM3)``` | Heatfit insert M3 |
| 4 | ```screw(M3_cap_screw, 10)``` | Screw M3 cap x 10mm |
| 4 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
| 4 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm |
### Printed
| Qty | Filename |
| ---:|:--- |
| 1 | ssr_shroud_SSR10DA.stl |
| 1 | ssr_shroud_SSR25DA.stl |
### Assemblies
| Qty | Name |
| ---:|:--- |
| 1 | ssr_shroud_SSR10DA_assembly |
| 1 | ssr_shroud_SSR25DA_assembly |
<a href="#top">Top</a>
---

BIN
tests/png/ssr_shroud.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 62 KiB

37
tests/ssr_shroud.scad Normal file
View File

@ -0,0 +1,37 @@
//
// NopSCADlib Copyright Chris Palmer 2018
// nop.head@gmail.com
// hydraraptor.blogspot.com
//
// This file is part of NopSCADlib.
//
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
// GNU General Public License as published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
//
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with NopSCADlib.
// If not, see <https://www.gnu.org/licenses/>.
//
include <../core.scad>
use <../utils/layout.scad>
include <../vitamins/screws.scad>
include <../vitamins/ssrs.scad>
use <../printed/ssr_shroud.scad>
thickness = 3;
module ssr_shrouds()
layout([for(s = ssrs) ssr_width(s)], 15) let(ssr = ssrs[$i])
rotate(90) {
if($preview)
ssr_shroud_fastened_assembly(ssr, 6, thickness, ssr[0]);
else
ssr_shroud(ssrs[$i], 6, ssr[0]);
}
ssr_shrouds();

View File

@ -23,8 +23,9 @@ include <../vitamins/screws.scad>
include <../vitamins/ssrs.scad>
module ssrs()
layout([for(s = ssrs) ssr_length(s)], 15)
ssr_assembly(ssrs[$i], M4_cap_screw, 3);
layout([for(s = ssrs) ssr_width(s)], 15)
rotate(90)
ssr_assembly(ssrs[$i], M4_cap_screw, 3);
if($preview)
ssrs();