Compare commits
47 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
da958fe112 | ||
|
61493eaa34 | ||
|
804c00bdcb | ||
|
11ea68681f | ||
|
ed97d226f8 | ||
|
4107a2c848 | ||
|
f7ef075434 | ||
|
6f93b6af9a | ||
|
53f416eef1 | ||
|
6354219627 | ||
|
56e2b71bda | ||
|
8f5503586d | ||
|
1cd9edfe87 | ||
|
a85fdaf176 | ||
|
18294b4b81 | ||
|
ad62ce362c | ||
|
9f27f26894 | ||
|
2eaa4bfc21 | ||
|
1944039f22 | ||
|
1c221ad612 | ||
|
85adf7b4f4 | ||
|
64bde2cb3a | ||
|
c34469e852 | ||
|
dbc3c36f44 | ||
|
8c51183ba6 | ||
|
a9c4e60cac | ||
|
d041b18025 | ||
|
e85887fec4 | ||
|
ededb514b8 | ||
|
d0d525b97a | ||
|
371d274906 | ||
|
7118e6eb03 | ||
|
46004381b7 | ||
|
cfdf759a49 | ||
|
aeded1b807 | ||
|
79f1c95136 | ||
|
9bb84593be | ||
|
ab91defcd2 | ||
|
7c1ff5ecd5 | ||
|
6f4859a4b5 | ||
|
e35fb695a2 | ||
|
61bec656d7 | ||
|
3a087be0e9 | ||
|
854adab665 | ||
|
77aa8fe44d | ||
|
6fe4548213 | ||
|
b7654f0384 |
BIN
gallery/FilamentDryBox.png
Normal file
After Width: | Height: | Size: 124 KiB |
BIN
gallery/SunBot.png
Normal file
After Width: | Height: | Size: 206 KiB |
@@ -6,6 +6,13 @@ Arduino thermostat to control a beer fridge to use it as an environmental chambe
|
||||

|
||||
|
||||
|
||||
<a name="TOP"></a>
|
||||
## FilamentDryBox
|
||||
A small fan oven with a spool holder to keep the filament warm and dry.
|
||||
|
||||

|
||||
|
||||
|
||||
<a name="TOP"></a>
|
||||
## HydraBot
|
||||
Current state of HydraRaptor after being modified for laser engraving.
|
||||
@@ -68,6 +75,13 @@ Mains isolated and variable supply with metering.
|
||||

|
||||
|
||||
|
||||
<a name="TOP"></a>
|
||||
## SunBot
|
||||
A solar tracker to keep solar powerbanks pointing at the sun.
|
||||
|
||||

|
||||
|
||||
|
||||
<a name="TOP"></a>
|
||||
## Turntable
|
||||
WiFi enabled remote control turntable for photography
|
||||
|
1
lib.scad
@@ -66,6 +66,7 @@ include <vitamins/geared_steppers.scad>
|
||||
use <vitamins/jack.scad>
|
||||
use <vitamins/meter.scad>
|
||||
use <vitamins/fuseholder.scad>
|
||||
use <vitamins/hygrometer.scad>
|
||||
|
||||
use <vitamins/opengrab.scad>
|
||||
use <vitamins/wire.scad>
|
||||
|
BIN
libtest.png
Before Width: | Height: | Size: 708 KiB After Width: | Height: | Size: 741 KiB |
@@ -91,6 +91,7 @@ use <tests/strap_handle.scad>
|
||||
use <tests/ssr_shroud.scad>
|
||||
use <tests/psu_shroud.scad>
|
||||
use <tests/flat_hinge.scad>
|
||||
use <tests/pcb_mount.scad>
|
||||
|
||||
x5 = 800;
|
||||
|
||||
@@ -304,6 +305,9 @@ translate([x3, veroboard_y])
|
||||
translate([x3 + 70, veroboard_y + 30])
|
||||
geared_steppers();
|
||||
|
||||
translate([x3 + 140, veroboard_y + 20])
|
||||
pcb_mounts();
|
||||
|
||||
translate([x3, d_connectors_y])
|
||||
d_connectors();
|
||||
|
||||
@@ -313,7 +317,10 @@ translate([x3, iecs_y])
|
||||
translate([x3 + 15, modules_y])
|
||||
microview();
|
||||
|
||||
translate([x3 + 40, modules_y])
|
||||
translate([x3 + 60, modules_y])
|
||||
hygrometer();
|
||||
|
||||
translate([x3 + 90, modules_y])
|
||||
modules();
|
||||
|
||||
translate([x3, ssrs_y]) {
|
||||
|
@@ -50,6 +50,10 @@ function bbox_name(type) = type[8] ? type[8] : "bbox"; //! Optional name i
|
||||
function bbox_skip_blocks(type)= type[9] ? type[9] : []; //! List of fixing blocks to skip, used to allow a hinged panel for example
|
||||
function star_washers(type) = type[10] ? type[10] : is_undef(type[10]); //! Set to false to remove star washers.
|
||||
|
||||
function bbox_volume(type) = bbox_width(type) * bbox_depth(type) * bbox_height(type) / 1000000; //! Internal volume in litres
|
||||
function bbox_area(type) = let(w = bbox_width(type), d = bbox_depth(type), h = bbox_height(type)) //! Internal surdface area in m^2
|
||||
2 * (w * d + w * h + d * h) / 1000000;
|
||||
|
||||
module bbox_shelf_blank(type) { //! 2D template for a shelf
|
||||
dxf(str(bbox_name(type), "_shelf"));
|
||||
|
||||
@@ -165,7 +169,7 @@ module bbox_right_blank(type, sheet = false) { //! 2D template for the right sid
|
||||
}
|
||||
}
|
||||
|
||||
module bbox_front_blank(type, sheet = false) { //! 2D template for the front
|
||||
module bbox_front_blank(type, sheet = false, width = 0) { //! 2D template for the front
|
||||
dxf(str(bbox_name(type), "_front"));
|
||||
|
||||
t = sheet_thickness(bbox_sheets(type));
|
||||
@@ -174,7 +178,7 @@ module bbox_front_blank(type, sheet = false) { //! 2D template for the front
|
||||
|
||||
difference() {
|
||||
translate([0, (bt - bb) / 2])
|
||||
sheet_2D(subst_sheet(type, sheet), bbox_width(type) + 2 * t, bbox_height(type) + bb + bt);
|
||||
sheet_2D(subst_sheet(type, sheet), max(bbox_width(type) + 2 * t, width), bbox_height(type) + bb + bt);
|
||||
|
||||
drill_holes(type, rotate([-90, 0, 0]) * translate([0, bbox_depth(type) / 2]));
|
||||
}
|
||||
@@ -205,7 +209,7 @@ module _bbox_assembly(type, top = true, base = true, left = true, right = true,
|
||||
width = bbox_width(type);
|
||||
depth = bbox_depth(type);
|
||||
height = bbox_height(type);
|
||||
echo("Box:", width, depth, height);
|
||||
echo("Box:", width, depth, height, volume = bbox_volume(type), area = bbox_area(type));
|
||||
|
||||
t = sheet_thickness(bbox_sheets(type));
|
||||
bt = sheet_thickness(bbox_base_sheet(type));
|
||||
|
@@ -195,12 +195,15 @@ module mouse_grommet_assembly(r, thickness)
|
||||
module ribbon_grommet_20_3_stl() ribbon_grommet(20, 3);
|
||||
module mouse_grommet_15_3_stl() mouse_grommet(1.5, 3);
|
||||
module mouse_grommet_20_3_stl() mouse_grommet(2, 3);
|
||||
module mouse_grommet_25_3_stl() mouse_grommet(2.5, 3);
|
||||
module mouse_grommet_30_3_stl() mouse_grommet(3, 3);
|
||||
|
||||
module round_grommet_bottom_30_stl() round_grommet_bottom(3);
|
||||
module round_grommet_bottom_40_stl() round_grommet_bottom(4);
|
||||
module round_grommet_bottom_50_stl() round_grommet_bottom(5);
|
||||
module round_grommet_bottom_60_stl() round_grommet_bottom(6);
|
||||
|
||||
module round_grommet_top_30_3_stl() round_grommet_top(3, 3);
|
||||
module round_grommet_top_40_3_stl() round_grommet_top(4, 3);
|
||||
module round_grommet_top_50_3_stl() round_grommet_top(5, 3);
|
||||
module round_grommet_top_60_3_stl() round_grommet_top(6, 3);
|
||||
|
124
printed/pcb_mount.scad
Normal file
@@ -0,0 +1,124 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2019
|
||||
// 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 frame to mount a PCB by its corners when it has no mounting holes.
|
||||
//! The stl must be given a parameterless wrapper in the project that uses it.
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
use <../vitamins/pcb.scad>
|
||||
|
||||
clearance = 0.2;
|
||||
min_wall = extrusion_width * 2;
|
||||
wall = 2;
|
||||
|
||||
overlap = 2;
|
||||
|
||||
screw = M3_cap_screw;
|
||||
screw_clearance_r = 3.1 / 2;
|
||||
pillar_r = corrected_radius(screw_clearance_r) + wall;
|
||||
|
||||
function pillar_x_pitch(pcb) = pcb_length(pcb) + 2 * clearance + 2 * (pillar_r - overlap) / sqrt(2); //! x pitch of screw pillars
|
||||
function pillar_y_pitch(pcb) = pcb_width(pcb) + 2 * clearance + 2 * (pillar_r - overlap) / sqrt(2); //! y pitch of screw pillars
|
||||
|
||||
function pcb_mount_length(pcb) = pillar_x_pitch(pcb) + 2 * pillar_r; //! Outside length of the mount
|
||||
function pcb_mount_width(pcb) = pillar_y_pitch(pcb) + 2 * pillar_r; //! Outside width of the mount
|
||||
|
||||
frame_w = 3;
|
||||
frame_t = 2;
|
||||
|
||||
washer_thickness = 1.25;
|
||||
|
||||
module pcb_mount_screw_positions(pcb) //! Positions of the screws and pillars
|
||||
for(x = [-1, 1], y = [-1, 1])
|
||||
translate([x * pillar_x_pitch(pcb) / 2, y * pillar_y_pitch(pcb) / 2])
|
||||
children();
|
||||
|
||||
module pcb_mount_holes(pcb, h = 0) //! Drill holes for PCB mount
|
||||
pcb_mount_screw_positions(pcb)
|
||||
drill(screw_clearance_radius(screw), h);
|
||||
|
||||
module pcb_mount_ring()
|
||||
difference() {
|
||||
circle(pillar_r);
|
||||
|
||||
poly_circle(screw_clearance_r);
|
||||
}
|
||||
|
||||
module pcb_mount_washer_stl() //! A plastic washer to clamp a PCB
|
||||
linear_extrude(height = washer_thickness)
|
||||
pcb_mount_ring();
|
||||
|
||||
module pcb_mount(pcb, height = 5, washers = true) { //! Make the STL of a pcb mount for the specified PCB.
|
||||
stl(str("pcb_mount_", pcb[0], "_", height));
|
||||
|
||||
y_pitch = pcb_width(pcb) > 4 * pillar_r + 4 ? pillar_r + 1
|
||||
: pcb_width(pcb) / 2 + frame_w + 1 + pillar_r;
|
||||
|
||||
if(washers)
|
||||
for(x = [-1, 1], y = [-1, 1])
|
||||
translate([x * (pillar_r + 1), y * y_pitch, 0])
|
||||
pcb_mount_washer_stl();
|
||||
|
||||
for(x = [-1, 1])
|
||||
translate([x * pillar_x_pitch(pcb) / 2, 0, frame_t / 2])
|
||||
cube([frame_w, pillar_y_pitch(pcb) - 2 * wall, frame_t], center = true);
|
||||
|
||||
for(y = [-1, 1])
|
||||
translate([0, y * pillar_y_pitch(pcb) / 2, frame_t / 2])
|
||||
cube([pillar_x_pitch(pcb) - 2 * wall, frame_w, frame_t], center = true);
|
||||
|
||||
pcb_mount_screw_positions(pcb)
|
||||
linear_extrude(height = height)
|
||||
pcb_mount_ring();
|
||||
|
||||
linear_extrude(height = height + pcb_thickness(pcb) - layer_height)
|
||||
difference() {
|
||||
pcb_mount_screw_positions(pcb)
|
||||
pcb_mount_ring();
|
||||
|
||||
square([pcb_length(pcb) + 2 * clearance, pcb_width(pcb) + 2 * clearance], center = true);
|
||||
}
|
||||
}
|
||||
|
||||
module pcb_mount_assembly(pcb, thickness, height = 5) { //! A PCB mount assembly with fasteners
|
||||
translate_z(height)
|
||||
pcb(pcb);
|
||||
|
||||
color(pp1_colour) pcb_mount(pcb, washers = false);
|
||||
|
||||
washer = screw_washer(screw);
|
||||
nut = screw_nut(screw);
|
||||
t = pcb_thickness(pcb);
|
||||
screw_length = screw_longer_than(height + t + washer_thickness + thickness + washer_thickness(washer) + nut_thickness(nut, true));
|
||||
|
||||
pcb_mount_screw_positions(pcb) {
|
||||
translate_z(height + t) {
|
||||
color(pp2_colour) pcb_mount_washer_stl();
|
||||
|
||||
translate_z(washer_thickness)
|
||||
screw(screw, screw_length);
|
||||
}
|
||||
|
||||
translate_z(-thickness)
|
||||
vflip()
|
||||
nut_and_washer(nut, true);
|
||||
}
|
||||
}
|
@@ -139,8 +139,8 @@ module psu_shroud(type, cable_d, name, cables = 1) { //! Generate the STL file f
|
||||
mirror([0, 1, 0])
|
||||
psu_shroud_hole_positions(type)
|
||||
translate_z(height)
|
||||
rotate(90)
|
||||
insert_lug(insert, wall, $side, counter_bore);
|
||||
rotate($side * 90)
|
||||
insert_lug(insert, wall, counter_bore);
|
||||
}
|
||||
|
||||
module psu_shroud_assembly(type, cable_d, name, cables = 1) //! The printed parts with inserts fitted
|
||||
|
@@ -103,8 +103,8 @@ module ssr_shroud(type, cable_d, name) { //! Generate the STL file for a spec
|
||||
ssr_shroud_hole_positions(type)
|
||||
vflip()
|
||||
translate_z(height)
|
||||
rotate(90)
|
||||
insert_lug(insert, wall, $side, counter_bore);
|
||||
rotate($side * 90)
|
||||
insert_lug(insert, wall, counter_bore);
|
||||
}
|
||||
|
||||
module ssr_shroud_assembly(type, cable_d, name) //! The printed parts with inserts fitted
|
||||
|
400
readme.md
@@ -17,22 +17,23 @@ See [usage](docs/usage.md) for requirements, installation instructions and a usa
|
||||
|
||||
## Table of Contents<a name="top"/>
|
||||
<table><tr>
|
||||
<th align="left"> Vitamins A-N </th><th align="left"> Vitamins O-Z </th><th align="left"> Printed </th><th align="left"> Utilities </th><th align="left"> Core Utilities </th></tr>
|
||||
<tr><td> <a href = "#Ball_bearings">Ball_bearings</a> </td><td> <a href = "#Opengrab">Opengrab</a> </td><td> <a href = "#Box">Box</a> </td><td> <a href = "#Annotation">Annotation</a> </td><td> <a href = "#Bom">Bom</a> </td></tr>
|
||||
<th align="left"> Vitamins A-M </th><th align="left"> Vitamins N-Z </th><th align="left"> Printed </th><th align="left"> Utilities </th><th align="left"> Core Utilities </th></tr>
|
||||
<tr><td> <a href = "#Ball_bearings">Ball_bearings</a> </td><td> <a href = "#Nuts">Nuts</a> </td><td> <a href = "#Box">Box</a> </td><td> <a href = "#Annotation">Annotation</a> </td><td> <a href = "#Bom">Bom</a> </td></tr>
|
||||
<tr><td> <a href = "#Batteries">Batteries</a> </td><td> <a href = "#O_ring">O_ring</a> </td><td> <a href = "#Butt_box">Butt_box</a> </td><td> <a href = "#Bezier">Bezier</a> </td><td> <a href = "#Clip">Clip</a> </td></tr>
|
||||
<tr><td> <a href = "#Belts">Belts</a> </td><td> <a href = "#Pcbs">Pcbs</a> </td><td> <a href = "#Cable_grommets">Cable_grommets</a> </td><td> <a href = "#Dogbones">Dogbones</a> </td><td> <a href = "#Global">Global</a> </td></tr>
|
||||
<tr><td> <a href = "#Blowers">Blowers</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Carriers">Carriers</a> </td><td> <a href = "#Fillet">Fillet</a> </td><td> <a href = "#Polyholes">Polyholes</a> </td></tr>
|
||||
<tr><td> <a href = "#Bulldogs">Bulldogs</a> </td><td> <a href = "#Pin_headers">Pin_headers</a> </td><td> <a href = "#Corner_block">Corner_block</a> </td><td> <a href = "#Hanging_hole">Hanging_hole</a> </td><td> <a href = "#Rounded_rectangle">Rounded_rectangle</a> </td></tr>
|
||||
<tr><td> <a href = "#Buttons">Buttons</a> </td><td> <a href = "#Psus">Psus</a> </td><td> <a href = "#Door_hinge">Door_hinge</a> </td><td> <a href = "#Layout">Layout</a> </td><td> <a href = "#Sphere">Sphere</a> </td></tr>
|
||||
<tr><td> <a href = "#Cable_strips">Cable_strips</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td> <a href = "#Door_latch">Door_latch</a> </td><td> <a href = "#Maths">Maths</a> </td><td> <a href = "#Teardrops">Teardrops</a> </td></tr>
|
||||
<tr><td> <a href = "#Components">Components</a> </td><td> <a href = "#Rails">Rails</a> </td><td> <a href = "#Fan_guard">Fan_guard</a> </td><td> <a href = "#Offset">Offset</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Displays">Displays</a> </td><td> <a href = "#Ring_terminals">Ring_terminals</a> </td><td> <a href = "#Fixing_block">Fixing_block</a> </td><td> <a href = "#Quadrant">Quadrant</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#D_connectors">D_connectors</a> </td><td> <a href = "#Rockers">Rockers</a> </td><td> <a href = "#Flat_hinge">Flat_hinge</a> </td><td> <a href = "#Round">Round</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fans">Fans</a> </td><td> <a href = "#Rod">Rod</a> </td><td> <a href = "#Foot">Foot</a> </td><td> <a href = "#Rounded_cylinder">Rounded_cylinder</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Screws">Screws</a> </td><td> <a href = "#Handle">Handle</a> </td><td> <a href = "#Rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#Sealing_strip">Sealing_strip</a> </td><td> <a href = "#Psu_shroud">Psu_shroud</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Sheets">Sheets</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Spades">Spades</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Belts">Belts</a> </td><td> <a href = "#Opengrab">Opengrab</a> </td><td> <a href = "#Cable_grommets">Cable_grommets</a> </td><td> <a href = "#Dogbones">Dogbones</a> </td><td> <a href = "#Global">Global</a> </td></tr>
|
||||
<tr><td> <a href = "#Blowers">Blowers</a> </td><td> <a href = "#Pcbs">Pcbs</a> </td><td> <a href = "#Carriers">Carriers</a> </td><td> <a href = "#Fillet">Fillet</a> </td><td> <a href = "#Polyholes">Polyholes</a> </td></tr>
|
||||
<tr><td> <a href = "#Bulldogs">Bulldogs</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Corner_block">Corner_block</a> </td><td> <a href = "#Hanging_hole">Hanging_hole</a> </td><td> <a href = "#Rounded_rectangle">Rounded_rectangle</a> </td></tr>
|
||||
<tr><td> <a href = "#Buttons">Buttons</a> </td><td> <a href = "#Pin_headers">Pin_headers</a> </td><td> <a href = "#Door_hinge">Door_hinge</a> </td><td> <a href = "#Layout">Layout</a> </td><td> <a href = "#Sphere">Sphere</a> </td></tr>
|
||||
<tr><td> <a href = "#Cable_strips">Cable_strips</a> </td><td> <a href = "#Psus">Psus</a> </td><td> <a href = "#Door_latch">Door_latch</a> </td><td> <a href = "#Maths">Maths</a> </td><td> <a href = "#Teardrops">Teardrops</a> </td></tr>
|
||||
<tr><td> <a href = "#Components">Components</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td> <a href = "#Fan_guard">Fan_guard</a> </td><td> <a href = "#Offset">Offset</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#D_connectors">D_connectors</a> </td><td> <a href = "#Rails">Rails</a> </td><td> <a href = "#Fixing_block">Fixing_block</a> </td><td> <a href = "#Quadrant">Quadrant</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Displays">Displays</a> </td><td> <a href = "#Ring_terminals">Ring_terminals</a> </td><td> <a href = "#Flat_hinge">Flat_hinge</a> </td><td> <a href = "#Round">Round</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fans">Fans</a> </td><td> <a href = "#Rockers">Rockers</a> </td><td> <a href = "#Foot">Foot</a> </td><td> <a href = "#Rounded_cylinder">Rounded_cylinder</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Rod">Rod</a> </td><td> <a href = "#Handle">Handle</a> </td><td> <a href = "#Rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#Screws">Screws</a> </td><td> <a href = "#Pcb_mount">Pcb_mount</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Sealing_strip">Sealing_strip</a> </td><td> <a href = "#Psu_shroud">Psu_shroud</a> </td><td> <a href = "#Sweep">Sweep</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 = "#Ribbon_clamp">Ribbon_clamp</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Spades">Spades</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Iecs">Iecs</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Inserts">Inserts</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#Ssr_shroud">Ssr_shroud</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Jack">Jack</a> </td><td> <a href = "#Ssrs">Ssrs</a> </td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
|
||||
@@ -46,7 +47,6 @@ See [usage](docs/usage.md) for requirements, installation instructions and a usa
|
||||
<tr><td> <a href = "#Microswitches">Microswitches</a> </td><td> <a href = "#Wire">Wire</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Microview">Microview</a> </td><td> <a href = "#Zipties">Zipties</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Modules">Modules</a> </td><td></td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Nuts">Nuts</a> </td><td></td><td></td><td></td><td></td></tr>
|
||||
</table>
|
||||
|
||||
---
|
||||
@@ -165,6 +165,8 @@ exposing enough information to make a battery box.
|
||||
Models timing belt running over toothed or smooth pulleys and calculates an accurate length.
|
||||
Only models 2D paths, so not core XY!
|
||||
|
||||
To make the back of the belt run against a smooth pulley on the outside of the loop specify a negative pitch radius.
|
||||
|
||||
By default the path is a closed loop but a gap length and position can be specified to make open loops.
|
||||
|
||||
Individual teeth are not drawn, instead they are represented by a lighter colour.
|
||||
@@ -258,7 +260,7 @@ Models of radial blowers.
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | ```blower(PE4020)``` | Blower Pengda Technology 4020 |
|
||||
| 1 | ```blower(RM5015)``` | Blower Runda RB5015 |
|
||||
| 1 | ```blower(RB5015)``` | Blower Runda RB5015 |
|
||||
| 3 | ```screw(M3_cap_screw, 20)``` | Screw M3 cap x 20mm |
|
||||
| 2 | ```screw(M4_cap_screw, 25)``` | Screw M4 cap x 25mm |
|
||||
| 3 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
|
||||
@@ -477,55 +479,6 @@ Various electronic components used in hot ends and heated beds.
|
||||
| 1 | ```resistor(Honewell)``` | Thermistor Honeywell 135-104LAC-J01 100K 1% |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="Displays"></a>
|
||||
## Displays
|
||||
LCD dispays.
|
||||
|
||||
|
||||
[vitamins/displays.scad](vitamins/displays.scad) Object definitions.
|
||||
|
||||
[vitamins/display.scad](vitamins/display.scad) Implementation.
|
||||
|
||||
[tests/displays.scad](tests/displays.scad) Code for this example.
|
||||
|
||||
### Properties
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```display_aperture(type)``` | Size of the aperture including its depth |
|
||||
| ```display_height(type)``` | Depth of the metal part |
|
||||
| ```display_pcb(type)``` | PCB mounted on the back |
|
||||
| ```display_pcb_offset(type)``` | 3D offset of the PCB centre |
|
||||
| ```display_ribbon(type)``` | Keep out region for ribbon cable |
|
||||
| ```display_thickness(type)``` | Height of the metal part |
|
||||
| ```display_threads(type)``` | Length that studs protrude from the PCB holes |
|
||||
| ```display_touch_screen(type)``` | Touch screen position and size |
|
||||
| ```display_width(type)``` | Width of the metal part |
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```display_depth(type)``` | Total thickness including touch screen and PCB |
|
||||
| ```display_ts_thickness(type)``` | Touch screen thickness or 0 |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```display(type)``` | Draw specified display |
|
||||
| ```display_aperture(type, clearance, clear_pcb = false)``` | Make aperture cutout |
|
||||
|
||||

|
||||
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | ```display(HDMI5)``` | HDMI display 5" |
|
||||
| 1 | ```display(LCD1602A)``` | LCD display 1602A |
|
||||
| 1 | ```display(SSD1963_4p3)``` | LCD display SSD1963 4.3" |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
@@ -582,6 +535,56 @@ D-connectors. Can be any number of ways, male or female, solder buckets, PCB mou
|
||||
| 6 | ```d_pillar()``` | D-type connector pillar |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="Displays"></a>
|
||||
## Displays
|
||||
LCD dispays.
|
||||
|
||||
|
||||
[vitamins/displays.scad](vitamins/displays.scad) Object definitions.
|
||||
|
||||
[vitamins/display.scad](vitamins/display.scad) Implementation.
|
||||
|
||||
[tests/displays.scad](tests/displays.scad) Code for this example.
|
||||
|
||||
### Properties
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```display_aperture(type)``` | Size of the aperture including its depth |
|
||||
| ```display_height(type)``` | Depth of the metal part |
|
||||
| ```display_pcb(type)``` | PCB mounted on the back |
|
||||
| ```display_pcb_offset(type)``` | 3D offset of the PCB centre |
|
||||
| ```display_ribbon(type)``` | Keep out region for ribbon cable |
|
||||
| ```display_thickness(type)``` | Height of the metal part |
|
||||
| ```display_threads(type)``` | Length that studs protrude from the PCB holes |
|
||||
| ```display_touch_screen(type)``` | Touch screen position and size |
|
||||
| ```display_width(type)``` | Width of the metal part |
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```display_depth(type)``` | Total thickness including touch screen and PCB |
|
||||
| ```display_ts_thickness(type)``` | Touch screen thickness or 0 |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```display(type)``` | Draw specified display |
|
||||
| ```display_aperture(type, clearance, clear_pcb = false)``` | Make aperture cutout |
|
||||
|
||||

|
||||
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | ```display(HDMI5)``` | HDMI display 5" |
|
||||
| 1 | ```display(LCD1602A)``` | LCD display 1602A |
|
||||
| 1 | ```display(LCDS7282B)``` | LCD display S-7282B |
|
||||
| 1 | ```display(SSD1963_4p3)``` | LCD display SSD1963 4.3" |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
@@ -613,16 +616,11 @@ Can draw three styles: solid, open frame and open frame with screw bosses.
|
||||
| ```fan_thickness(type)``` | Thickness of the frame |
|
||||
| ```fan_width(type)``` | Width of square |
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```fan_screw_length(type, thickness)``` | Screw length required |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```fan(type)``` | Draw specified fan, origin in the centre |
|
||||
| ```fan_assembly(type, thickness, include_fan = true, screw = false)``` | Fan with its fasteners |
|
||||
| ```fan_assembly(type, thickness, include_fan = true, screw = false, full_depth = false)``` | Fan with its fasteners |
|
||||
| ```fan_hole_positions(type, z = undef)``` | Position children at the screw hole positions |
|
||||
| ```fan_holes(type, poly = false, screws = true, h = 100)``` | Make all the holes for the fan, or just the aperture if ```screws``` is false. Set ```poly``` true for poly_holes. |
|
||||
|
||||
@@ -632,6 +630,7 @@ Can draw three styles: solid, open frame and open frame with screw bosses.
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | ```fan(fan120x25)``` | Fan 120mm x 25mm |
|
||||
| 1 | ```fan(fan17x8)``` | Fan 17mm x 8mm |
|
||||
| 1 | ```fan(fan25x10)``` | Fan 25mm x 10mm |
|
||||
| 1 | ```fan(fan30x10)``` | Fan 30mm x 10mm |
|
||||
| 1 | ```fan(fan40x11)``` | Fan 40mm x 11mm |
|
||||
@@ -641,17 +640,20 @@ Can draw three styles: solid, open frame and open frame with screw bosses.
|
||||
| 1 | ```fan(fan70x15)``` | Fan 70mm x 15mm |
|
||||
| 1 | ```fan(fan80x25)``` | Fan 80mm x 25mm |
|
||||
| 1 | ```fan(fan80x38)``` | Fan 80mm x 38mm |
|
||||
| 4 | ```nut(M2_nut, nyloc = true)``` | Nut M2 x 1.6mm nyloc |
|
||||
| 4 | ```nut(M2p5_nut, nyloc = true)``` | Nut M2.5 x 2.2mm nyloc |
|
||||
| 8 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc |
|
||||
| 28 | ```nut(M4_nut, nyloc = true)``` | Nut M4 x 3.2mm nyloc |
|
||||
| 4 | ```screw(M2_cap_screw, 16)``` | Screw M2 cap x 16mm |
|
||||
| 4 | ```screw(M2p5_pan_screw, 20)``` | Screw M2.5 pan x 20mm |
|
||||
| 8 | ```screw(M3_dome_screw, 20)``` | Screw M3 dome x 20mm |
|
||||
| 20 | ```screw(M4_dome_screw, 16)``` | Screw M4 dome x 16mm |
|
||||
| 4 | ```screw(M4_dome_screw, 25)``` | Screw M4 dome x 25mm |
|
||||
| 4 | ```screw(M4_dome_screw, 30)``` | Screw M4 dome x 30mm |
|
||||
| 4 | ```washer(M2p5_washer)``` | Washer M2.5 x 5.9mm x 0.5mm |
|
||||
| 8 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
|
||||
| 28 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm |
|
||||
| 8 | ```washer(M2_washer)``` | Washer M2 x 5mm x 0.3mm |
|
||||
| 8 | ```washer(M2p5_washer)``` | Washer M2.5 x 5.9mm x 0.5mm |
|
||||
| 12 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
|
||||
| 32 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -827,7 +829,7 @@ Needs updating as mostly obsolete versions.
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```hot_end(type, filament, naked = false)``` | Draw specified hot end |
|
||||
| ```hot_end(type, filament, naked = false, resistor_wire_rotate = [0,0,0])``` | Draw specified hot end |
|
||||
|
||||

|
||||
|
||||
@@ -846,7 +848,38 @@ Needs updating as mostly obsolete versions.
|
||||
| 1 | | Tape self amalgamating silicone 110mm x 25mm |
|
||||
| 1 | ```resistor(Epcos)``` | Thermistor Epcos B57560G104F 100K 1% |
|
||||
| 2 | | Wire Red PTFE 16/0.2mm strands, length 170mm |
|
||||
| 4 | ```ziptie(small_ziptie, 8)``` | Ziptie 100mm min length |
|
||||
| 4 | ```ziptie(small_ziptie, 8)``` | Ziptie 2.5mm x 100mm min length |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="Hygrometer"></a>
|
||||
## Hygrometer
|
||||
Mini LCD Celsius Digital Thermometer Hygrometer Temperature Humidity Meter Gauge on eBay
|
||||
|
||||
|
||||
[vitamins/hygrometer.scad](vitamins/hygrometer.scad) Implementation.
|
||||
|
||||
[tests/hygrometer.scad](tests/hygrometer.scad) Code for this example.
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```hygrometer_or()``` | The outside radius of a hygrometer |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```hygrometer()``` | Draw a hygrometer |
|
||||
| ```hygrometer_hole(h = 0)``` | Drill the hole for a hygrometer |
|
||||
|
||||

|
||||
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | ```hygrometer()``` | Mini LCD Digital Thermometer / Hygrometer |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -953,7 +986,7 @@ Heatfit threaded inserts. Can be pushed into thermoplastics using a soldering ir
|
||||
| ```insert(type)``` | Draw specified insert |
|
||||
| ```insert_boss(type, z, wall = 2 * extrusion_width)``` | Make a boss to take an insert |
|
||||
| ```insert_hole(type, counterbore = 0, horizontal = false)``` | Make a hole to take an insert, ```counterbore``` is the extra length for the screw |
|
||||
| ```insert_lug(insert, wall, side, counter_bore = 0)``` | Make a flying insert lug, see [ssr_shroud](#Ssr_shroud) |
|
||||
| ```insert_lug(insert, wall, counter_bore = 0, extension = 0, corner_r = 0, flying = true)``` | Make a flying insert lug, see [ssr_shroud](#Ssr_shroud) |
|
||||
|
||||

|
||||
|
||||
@@ -1542,6 +1575,34 @@ If a nut is given a child then it gets placed on its top surface.
|
||||
| 1 | ```wingnut(M4_wingnut)``` | Wingnut M4 |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="O_ring"></a>
|
||||
## O_ring
|
||||
Nitrile rubber O-rings.
|
||||
|
||||
Just a black torus specified by internal diameter, ```id``` and ```minor_d``` plus a BOM entry.
|
||||
Can be shown stretched by specifying the ```actual_id```.
|
||||
|
||||
|
||||
[vitamins/o_ring.scad](vitamins/o_ring.scad) Implementation.
|
||||
|
||||
[tests/o_ring.scad](tests/o_ring.scad) Code for this example.
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```O_ring(id, minor_d, actual_id = 0)``` | Draw O-ring with specified internal diameter and minor diameter. ```actual_id``` can be used to stretch it around something. |
|
||||
|
||||

|
||||
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | ```O_ring(2.5, 1.6)``` | O-ring nitrile 2.5mm x 1.6mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
@@ -1579,34 +1640,6 @@ A permanent magnet that can be magnatized and de-magnatized electronically.
|
||||
| 1 | ```opengrab()``` | OpenGrab V3 electro permanent magnet |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="O_ring"></a>
|
||||
## O_ring
|
||||
Nitrile rubber O-rings.
|
||||
|
||||
Just a black torus specified by internal diameter, ```id``` and ```minor_d``` plus a BOM entry.
|
||||
Can be shown stretched by specifying the ```actual_id```.
|
||||
|
||||
|
||||
[vitamins/o_ring.scad](vitamins/o_ring.scad) Implementation.
|
||||
|
||||
[tests/o_ring.scad](tests/o_ring.scad) Code for this example.
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```O_ring(id, minor_d, actual_id = 0)``` | Draw O-ring with specified internal diameter and minor diameter. ```actual_id``` can be used to stretch it around something. |
|
||||
|
||||

|
||||
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | ```O_ring(2.5, 1.6)``` | O-ring nitrile 2.5mm x 1.6mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
@@ -1624,6 +1657,13 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
### Properties
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```hdmi_depth(type)``` | Front to back depth |
|
||||
| ```hdmi_height(type)``` | Outside height above the PCB |
|
||||
| ```hdmi_height1(type)``` | Inside height at the sides |
|
||||
| ```hdmi_height2(type)``` | Inside height in the middle |
|
||||
| ```hdmi_thickness(type)``` | Wall thickness of the metal |
|
||||
| ```hdmi_width1(type)``` | Inside width at the top |
|
||||
| ```hdmi_width2(type)``` | Inside width at the bottom |
|
||||
| ```pcb_accessories(type)``` | List of accessories to go on the BOM, SD cards, USB cables, etc. |
|
||||
| ```pcb_colour(type)``` | Colour of the subtrate |
|
||||
| ```pcb_components(type)``` | List of components |
|
||||
@@ -1642,7 +1682,9 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```pcb_component_position(type, name, index = 0)``` | Return x y position of specified component |
|
||||
| ```pcb_coord(type, p)``` | Convert offsets from the edge to coordinates relative to the centre |
|
||||
| ```pcb_grid_pos(type, x, y, z = 0)``` | Returns a pcb grid position |
|
||||
| ```pcb_screw(type, cap = hs_cap)``` | Mounting screw type |
|
||||
|
||||
### Modules
|
||||
@@ -1650,8 +1692,9 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
|:--- |:--- |
|
||||
| ```barrel_jack(cutout = false)``` | Draw barrel power jack |
|
||||
| ```chip(length, width, thickness, colour, cutout = false)``` | Draw a coloured cube to represent a chip, or other rectangular component |
|
||||
| ```flat_flex(cutout = false)``` | Draw flat flexistrip connector as used on RPI0 |
|
||||
| ```flex(cutout = false)``` | Draw flexistrip connector |
|
||||
| ```hdmi(cutout = false)``` | Draw HDMI socket |
|
||||
| ```hdmi(type, cutout = false)``` | Draw HDMI socket |
|
||||
| ```jack(cutout = false)``` | Draw 3.5mm jack |
|
||||
| ```molex_254(ways)``` | Draw molex header |
|
||||
| ```pcb(type)``` | Draw specified PCB |
|
||||
@@ -1661,7 +1704,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| ```pcb_component_position(type, name)``` | Position child at the specified component position |
|
||||
| ```pcb_components(type, cutouts = false, angle = undef)``` | Draw list of PCB components on the PCB |
|
||||
| ```pcb_cutouts(type, angle = undef)``` | Make cut outs to clear components on a PCB |
|
||||
| ```pcb_grid(type, x, y, z = 0)``` | Positions children at specified grid positions |
|
||||
| ```pcb_grid(type, x, y, z = 0)``` | Positions children at specified grid position |
|
||||
| ```pcb_screw_positions(type)``` | Positions children at the mounting hole positions |
|
||||
| ```pcb_spacer(screw, height, wall = 1.8, taper = 0)``` | Generate STL for PCB spacer |
|
||||
| ```rj45(cutout = false)``` | Draw RJ45 Ethernet connector |
|
||||
@@ -1676,20 +1719,22 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | ```pcb(ArduinoLeonardo)``` | Arduino Leonardo |
|
||||
| 1 | ```pcb(ArduinoUno3)``` | Arduino Uno R3 |
|
||||
| 1 | | Cat 5 patch cable 300mm |
|
||||
| 1 | ```d_plug(DCONN15, pcb = true)``` | D-type 15 way PCB mount plug |
|
||||
| 1 | ```pcb(DuetE)``` | Duet 2 Ethernet electronics |
|
||||
| 1 | ```pcb(Duex2)``` | Duex2 expansion board |
|
||||
| 1 | ```pcb(Duex5)``` | Duex5 expasnion board |
|
||||
| 1 | ```pcb(EnviroPlus)``` | Enviro+ |
|
||||
| 1 | ```pcb(ExtruderPCB)``` | Extruder connection PCB |
|
||||
| 1 | ```pcb(Keyes5p1)``` | Keyes5.1 Arduino Uno expansion board |
|
||||
| 1 | ```pcb(Melzi)``` | Melzi electronics |
|
||||
| 3 | | Micro SD card |
|
||||
| 4 | | Micro SD card |
|
||||
| 1 | ```molex_254(2)``` | Molex KK header 2 way |
|
||||
| 1 | ```molex_254(3)``` | Molex KK header 3 way |
|
||||
| 16 | ```nut(M2_nut, nyloc = true)``` | Nut M2 x 1.6mm nyloc |
|
||||
| 16 | ```nut(M2p5_nut, nyloc = true)``` | Nut M2.5 x 2.2mm nyloc |
|
||||
| 28 | ```nut(M2p5_nut, nyloc = true)``` | Nut M2.5 x 2.2mm nyloc |
|
||||
| 12 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc |
|
||||
| 12 | ```nut(M4_nut, nyloc = true)``` | Nut M4 x 3.2mm nyloc |
|
||||
| 1 | ```pcb(PI_IO)``` | PI_IO V2 |
|
||||
@@ -1701,19 +1746,22 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 1 | ```pcb(PERF80x20)``` | Perfboard 80 x 20mm |
|
||||
| 1 | ```pin_socket(2p54header, 13, 2, right_angle = true)``` | Pin socket 13 x 2 right_angle |
|
||||
| 1 | ```pcb(RPI3)``` | Raspberry Pi 3 |
|
||||
| 12 | ```screw(M2_cap_screw, 20)``` | Screw M2 cap x 20mm |
|
||||
| 4 | ```screw(M2_cap_screw, 25)``` | Screw M2 cap x 25mm |
|
||||
| 1 | ```pcb(RPI0)``` | Raspberry Pi Zero |
|
||||
| 16 | ```screw(M2_cap_screw, 25)``` | Screw M2 cap x 25mm |
|
||||
| 4 | ```screw(M2p5_cap_screw, 16)``` | Screw M2.5 cap x 16mm |
|
||||
| 8 | ```screw(M2p5_cap_screw, 20)``` | Screw M2.5 cap x 20mm |
|
||||
| 8 | ```screw(M2p5_pan_screw, 20)``` | Screw M2.5 pan x 20mm |
|
||||
| 4 | ```screw(M2p5_pan_screw, 30)``` | Screw M2.5 pan x 30mm |
|
||||
| 8 | ```screw(M3_cap_screw, 25)``` | Screw M3 cap x 25mm |
|
||||
| 4 | ```screw(M3_cap_screw, 30)``` | Screw M3 cap x 30mm |
|
||||
| 12 | ```screw(M4_cap_screw, 30)``` | Screw M4 cap x 30mm |
|
||||
| 4 | ```screw(M2p5_pan_screw, 25)``` | Screw M2.5 pan x 25mm |
|
||||
| 4 | ```screw(M2p5_pan_screw, 35)``` | Screw M2.5 pan x 35mm |
|
||||
| 8 | ```screw(M3_cap_screw, 30)``` | Screw M3 cap x 30mm |
|
||||
| 4 | ```screw(M3_cap_screw, 35)``` | Screw M3 cap x 35mm |
|
||||
| 4 | ```screw(M4_cap_screw, 30)``` | Screw M4 cap x 30mm |
|
||||
| 8 | ```screw(M4_cap_screw, 35)``` | Screw M4 cap x 35mm |
|
||||
| 3 | ```terminal_35(2)``` | Terminal block 2 way 3.5mm |
|
||||
| 2 | ```green_terminal(gt_2p54, 4)``` | Terminal block 4 way 0.1" |
|
||||
| 1 | | USB A to Mini B lead |
|
||||
| 16 | ```washer(M2_washer)``` | Washer M2 x 5mm x 0.3mm |
|
||||
| 16 | ```washer(M2p5_washer)``` | Washer M2.5 x 5.9mm x 0.5mm |
|
||||
| 28 | ```washer(M2p5_washer)``` | Washer M2.5 x 5.9mm x 0.5mm |
|
||||
| 12 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
|
||||
| 12 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm |
|
||||
| 1 | ```pcb(ZC_A0591)``` | ZC-A0591 ULN2003 driver PCB |
|
||||
@@ -1721,20 +1769,23 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
### Printed
|
||||
| Qty | Filename |
|
||||
| ---:|:--- |
|
||||
| 4 | pcb_spacer20100.stl |
|
||||
| 4 | pcb_spacer20110.stl |
|
||||
| 4 | pcb_spacer20120.stl |
|
||||
| 4 | pcb_spacer20130.stl |
|
||||
| 4 | pcb_spacer25200.stl |
|
||||
| 4 | pcb_spacer20140.stl |
|
||||
| 4 | pcb_spacer20150.stl |
|
||||
| 4 | pcb_spacer20160.stl |
|
||||
| 4 | pcb_spacer25100_2.stl |
|
||||
| 4 | pcb_spacer25110_2.stl |
|
||||
| 4 | pcb_spacer25120_2.stl |
|
||||
| 4 | pcb_spacer25230.stl |
|
||||
| 4 | pcb_spacer2570.stl |
|
||||
| 4 | pcb_spacer2580_2.stl |
|
||||
| 4 | pcb_spacer2590_2.stl |
|
||||
| 4 | pcb_spacer30140.stl |
|
||||
| 4 | pcb_spacer30150.stl |
|
||||
| 4 | pcb_spacer30190.stl |
|
||||
| 4 | pcb_spacer40160.stl |
|
||||
| 4 | pcb_spacer40170.stl |
|
||||
| 4 | pcb_spacer40180.stl |
|
||||
| 4 | pcb_spacer2580.stl |
|
||||
| 4 | pcb_spacer2590.stl |
|
||||
| 4 | pcb_spacer30170.stl |
|
||||
| 4 | pcb_spacer30180.stl |
|
||||
| 4 | pcb_spacer30220.stl |
|
||||
| 4 | pcb_spacer40190.stl |
|
||||
| 4 | pcb_spacer40200.stl |
|
||||
| 4 | pcb_spacer40210.stl |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -1816,17 +1867,18 @@ Pin headers and sockets, etc.
|
||||
| ```box_header(type, cols = 1, rows = 1, smt = false, cutout = false)``` | Draw box header |
|
||||
| ```idc_transition(type, cols = 5, skip = [], cutout = false)``` | Draw IDC transition header |
|
||||
| ```pin(type, length = undef)``` | Draw a header pin |
|
||||
| ```pin_header(type, cols = 1, rows = 1, smt = false, cutout = false)``` | Draw pin header |
|
||||
| ```pin_socket(type, cols = 1, rows = 1, right_angle = false, height = 0, cutout = false)``` | Draw pin socket |
|
||||
| ```pin_header(type, cols = 1, rows = 1, smt = false, right_angle = false, cutout = false)``` | Draw pin header |
|
||||
| ```pin_socket(type, cols = 1, rows = 1, right_angle = false, height = 0, smt = false, cutout = false)``` | Draw pin socket |
|
||||
|
||||

|
||||
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | ```box_header(2p54header, 10, 2)``` | Box header 10 x 2 |
|
||||
| 1 | ```idc_transition(2p54header, 10)``` | IDC transition header 10 x 2 |
|
||||
| 1 | ```pin_header(2p54header102)``` | Pin header 10 x 2 |
|
||||
| 1 | ```box_header(2p54header102)``` | Pin header 10 x 2 |
|
||||
| 1 | ```pin_header(2p54header, 10, 2)``` | Pin header 10 x 2 |
|
||||
| 1 | ```pin_header(2p54header, 10, 2, right_angle = true)``` | Pin header 10 x 2 right_angle |
|
||||
| 1 | ```pin_socket(2p54header, 10, 2)``` | Pin socket 10 x 2 |
|
||||
| 1 | ```pin_socket(2p54header, 10, 2, right_angle = true)``` | Pin socket 10 x 2 right_angle |
|
||||
|
||||
@@ -2072,6 +2124,7 @@ Ring terminals and earth assemblies for DiBond panels.
|
||||
### Properties
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```ringterm_crimp_length(type)``` | If non-zero the length of the crimp tube |
|
||||
| ```ringterm_hole(type)``` | Wire hole diameter |
|
||||
| ```ringterm_id(type)``` | Inside diameter |
|
||||
| ```ringterm_length(type)``` | Length of the tail including the ring |
|
||||
@@ -2097,12 +2150,13 @@ Ring terminals and earth assemblies for DiBond panels.
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 2 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc |
|
||||
| 3 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc |
|
||||
| 1 | ```ring_terminal(M3_ringterm)``` | Ring terminal 3mm |
|
||||
| 1 | ```ring_terminal(M3_ringterm_cs)``` | Ring terminal 3mm |
|
||||
| 1 | ```ring_terminal(M3_ringterm_crimp)``` | Ring terminal crimp 3mm |
|
||||
| 1 | ```screw(M3_cap_screw, 10)``` | Screw M3 cap x 10mm |
|
||||
| 1 | ```screw(M3_dome_screw, 10)``` | Screw M3 dome x 10mm |
|
||||
| 4 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm |
|
||||
| 2 | ```screw(M3_dome_screw, 10)``` | Screw M3 dome x 10mm |
|
||||
| 6 | ```star_washer(M3_washer)``` | Washer star M3 x 0.5mm |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -2110,7 +2164,7 @@ Ring terminals and earth assemblies for DiBond panels.
|
||||
---
|
||||
<a name="Rockers"></a>
|
||||
## Rockers
|
||||
Rocket switch. Also used for neon indicator in the same form factor.
|
||||
Rocker switch. Also used for neon indicator in the same form factor.
|
||||
|
||||
|
||||
[vitamins/rockers.scad](vitamins/rockers.scad) Object definitions.
|
||||
@@ -2435,6 +2489,7 @@ Filament spool models
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | ```spool(spool_200x55)``` | Filament spool 200 x 55 |
|
||||
| 1 | ```spool(spool_200x60)``` | Filament spool 200 x 60 |
|
||||
| 1 | ```spool(spool_300x85)``` | Filament spool 300 x 85 |
|
||||
| 1 | ```spool(spool_300x88)``` | Filament spool 300 x 88 |
|
||||
|
||||
@@ -3006,7 +3061,7 @@ Just a BOM entry at the moment and cable bundle size functions for holes, plus c
|
||||
| 1 | | Wire orange 7/0.2mm strands, length 90mm |
|
||||
| 1 | | Wire red 7/0.2mm strands, length 90mm |
|
||||
| 1 | | Wire yellow 7/0.2mm strands, length 90mm |
|
||||
| 1 | ```ziptie(small_ziptie, 2.1)``` | Ziptie 100mm min length |
|
||||
| 1 | ```ziptie(small_ziptie, 2.1)``` | Ziptie 2.5mm x 100mm min length |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -3042,9 +3097,9 @@ Cable zipties.
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | ```ziptie(small_ziptie, 5)``` | Ziptie 100mm min length |
|
||||
| 1 | ```ziptie(ziptie_3mm, 5)``` | Ziptie 100mm min length |
|
||||
| 1 | ```ziptie(ziptie_3p6mm, 5)``` | Ziptie 100mm min length |
|
||||
| 1 | ```ziptie(small_ziptie, 5)``` | Ziptie 2.5mm x 100mm min length |
|
||||
| 1 | ```ziptie(ziptie_3p6mm, 5)``` | Ziptie 3.6mm x 100mm min length |
|
||||
| 1 | ```ziptie(ziptie_3mm, 5)``` | Ziptie 3mm x 100mm min length |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
@@ -3194,6 +3249,12 @@ Uses [fixing blocks](#fixing_block) and [corner blocks](#corner_block).
|
||||
| ```bbox_width(type)``` | Internal width |
|
||||
| ```star_washers(type)``` | Set to false to remove star washers. |
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```bbox_area(type)``` | Internal surdface area in m^2 |
|
||||
| ```bbox_volume(type)``` | Internal volume in litres |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
@@ -3203,7 +3264,7 @@ Uses [fixing blocks](#fixing_block) and [corner blocks](#corner_block).
|
||||
| ```bbox_base(type)``` | Default base, can be overridden to customise |
|
||||
| ```bbox_base_blank(type)``` | 2D template for the base |
|
||||
| ```bbox_front(type)``` | Default front, can be overridden to customise |
|
||||
| ```bbox_front_blank(type, sheet = false)``` | 2D template for the front |
|
||||
| ```bbox_front_blank(type, sheet = false, width = 0)``` | 2D template for the front |
|
||||
| ```bbox_left(type)``` | Default left side, can be overridden to customise |
|
||||
| ```bbox_left_blank(type, sheet = false)``` | 2D template for the left side |
|
||||
| ```bbox_right(type)``` | Default right side, can be overridden to customise |
|
||||
@@ -3521,6 +3582,7 @@ The ring spacing as well as the number of spokes can be specified, if zero a gas
|
||||
| Qty | Filename |
|
||||
| ---:|:--- |
|
||||
| 1 | fan_guard_120.stl |
|
||||
| 1 | fan_guard_17.stl |
|
||||
| 1 | fan_guard_25.stl |
|
||||
| 1 | fan_guard_30.stl |
|
||||
| 1 | fan_guard_40.stl |
|
||||
@@ -3795,6 +3857,54 @@ Printed handle that can be printed without needing support material due to its t
|
||||
| 1 | handle_assembly |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="Pcb_mount"></a>
|
||||
## Pcb_mount
|
||||
A frame to mount a PCB by its corners when it has no mounting holes.
|
||||
The stl must be given a parameterless wrapper in the project that uses it.
|
||||
|
||||
|
||||
[printed/pcb_mount.scad](printed/pcb_mount.scad) Implementation.
|
||||
|
||||
[tests/pcb_mount.scad](tests/pcb_mount.scad) Code for this example.
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```pcb_mount_length(pcb)``` | Outside length of the mount |
|
||||
| ```pcb_mount_width(pcb)``` | Outside width of the mount |
|
||||
| ```pillar_x_pitch(pcb)``` | x pitch of screw pillars |
|
||||
| ```pillar_y_pitch(pcb)``` | y pitch of screw pillars |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```pcb_mount(pcb, height = 5, washers = true)``` | Make the STL of a pcb mount for the specified PCB. |
|
||||
| ```pcb_mount_assembly(pcb, thickness, height = 5)``` | A PCB mount assembly with fasteners |
|
||||
| ```pcb_mount_holes(pcb, h = 0)``` | Drill holes for PCB mount |
|
||||
| ```pcb_mount_screw_positions(pcb)``` | Positions of the screws and pillars |
|
||||
| ```pcb_mount_washer_stl()``` | A plastic washer to clamp a PCB |
|
||||
|
||||

|
||||
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 4 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc |
|
||||
| 1 | ```pcb(PI_IO)``` | PI_IO V2 |
|
||||
| 1 | ```pin_socket(2p54header, 13, 2)``` | Pin socket 13 x 2 |
|
||||
| 4 | ```screw(M3_cap_screw, 16)``` | Screw M3 cap x 16mm |
|
||||
| 3 | ```terminal_35(2)``` | Terminal block 2 way 3.5mm |
|
||||
| 4 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
|
||||
|
||||
### Printed
|
||||
| Qty | Filename |
|
||||
| ---:|:--- |
|
||||
| 1 | pcb_mount_PI_IO_5.stl |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
@@ -3838,7 +3948,7 @@ The stl and assembly must be given a name and parameterless wrappers for the stl
|
||||
| 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 |
|
||||
| 2 | ```ziptie(small_ziptie, 3)``` | Ziptie 100mm min length |
|
||||
| 2 | ```ziptie(small_ziptie, 3)``` | Ziptie 2.5mm x 100mm min length |
|
||||
|
||||
### Printed
|
||||
| Qty | Filename |
|
||||
@@ -4035,7 +4145,7 @@ The stl and assembly must be given a name and parameterless wrappers for the stl
|
||||
| 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 |
|
||||
| 4 | ```ziptie(small_ziptie, 3)``` | Ziptie 100mm min length |
|
||||
| 4 | ```ziptie(small_ziptie, 3)``` | Ziptie 2.5mm x 100mm min length |
|
||||
|
||||
### Printed
|
||||
| Qty | Filename |
|
||||
@@ -4248,7 +4358,7 @@ Layout objects in a line with equal gaps given a vector of their widths.
|
||||
---
|
||||
<a name="Maths"></a>
|
||||
## Maths
|
||||
Maths utilities for minapulating vectors and matrices.
|
||||
Maths utilities for manipulating vectors and matrices.
|
||||
|
||||
|
||||
[utils/maths.scad](utils/maths.scad) Implementation.
|
||||
|
0
scripts/bom.py
Normal file → Executable file
0
scripts/doc_scripts.py
Normal file → Executable file
0
scripts/dxfs.py
Normal file → Executable file
0
scripts/gallery.py
Normal file → Executable file
0
scripts/make_all.py
Normal file → Executable file
@@ -24,8 +24,8 @@ from __future__ import print_function
|
||||
|
||||
import subprocess, sys
|
||||
|
||||
def run(*args, silent = False):
|
||||
cmd = ["openscad"] + list(args)
|
||||
def _run(args, silent):
|
||||
cmd = ["openscad"] + args
|
||||
if not silent:
|
||||
for arg in cmd:
|
||||
print(arg, end=" ")
|
||||
@@ -37,3 +37,9 @@ def run(*args, silent = False):
|
||||
print(line[:-1])
|
||||
if rc:
|
||||
sys.exit(rc)
|
||||
|
||||
def run(*args):
|
||||
_run(list(args), False)
|
||||
|
||||
def run_silent(*args):
|
||||
_run(list(args), True);
|
||||
|
@@ -67,7 +67,7 @@ def plateup(target, part_type):
|
||||
log_name = 'openscad.log'
|
||||
else:
|
||||
log_name = 'openscad.echo'
|
||||
openscad.run("-D$bom=1", "-o", log_name, src_file, silent = True)
|
||||
openscad.run_silent("-D$bom=1", "-o", log_name, src_file)
|
||||
#
|
||||
# Add the files on the BOM to the used list
|
||||
#
|
||||
|
0
scripts/render.py
Normal file → Executable file
0
scripts/set_config.py
Normal file → Executable file
0
scripts/stls.py
Normal file → Executable file
6
scripts/tests.py
Normal file → Executable file
@@ -107,7 +107,7 @@ def tests(tests):
|
||||
#
|
||||
# List of individual part files
|
||||
#
|
||||
scads = [i for i in os.listdir(scad_dir) if i[-5:] == ".scad"]
|
||||
scads = [i for i in sorted(os.listdir(scad_dir)) if i[-5:] == ".scad"]
|
||||
|
||||
for scad in scads:
|
||||
base_name = scad[:-5]
|
||||
@@ -138,7 +138,7 @@ def tests(tests):
|
||||
print("Can't find implementation!")
|
||||
continue
|
||||
|
||||
vsplit = "N"
|
||||
vsplit = "M"
|
||||
vtype = locations[0][1]
|
||||
types = [vtype + ' A-' + vsplit[0], vtype + ' ' + chr(ord(vsplit) + 1) + '-Z'] + [loc[1] for loc in locations[1 :]]
|
||||
if type == vtype:
|
||||
@@ -257,7 +257,7 @@ See [usage](docs/usage.md) for requirements, installation instructions and a usa
|
||||
print('<tr>', file = doc_file, end = '')
|
||||
for type in types:
|
||||
if i < len(index[type]):
|
||||
name = index[type][i]
|
||||
name = sorted(index[type])[i]
|
||||
print('<td> <a href = "#' + name + '">' + name + '</a> </td>', file = doc_file, end = '')
|
||||
else:
|
||||
print('<td></td>', file = doc_file, end = '')
|
||||
|
0
scripts/views.py
Normal file → Executable file
22
tests/hygrometer.scad
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// 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/>.
|
||||
//
|
||||
use <../vitamins/hygrometer.scad>
|
||||
|
||||
if($preview)
|
||||
hygrometer();
|
@@ -21,10 +21,20 @@ use <../utils/layout.scad>
|
||||
|
||||
include <../vitamins/inserts.scad>
|
||||
|
||||
module inserts()
|
||||
module inserts() {
|
||||
|
||||
for(i = [0: len(inserts) -1])
|
||||
translate([10 * i, 0])
|
||||
insert(inserts[i]);
|
||||
|
||||
color(pp1_colour)
|
||||
translate([len(inserts) * 10, 0]) {
|
||||
insert_lug(inserts[0], 2, 1);
|
||||
|
||||
translate([10, 0])
|
||||
insert_boss(inserts[0], z = 10, wall = 2);
|
||||
}
|
||||
}
|
||||
|
||||
if($preview)
|
||||
inserts();
|
||||
|
35
tests/pcb_mount.scad
Normal file
@@ -0,0 +1,35 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2019
|
||||
// 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 <../lib.scad>
|
||||
use <../printed/pcb_mount.scad>
|
||||
|
||||
PI_IO = ["PI_IO", "PI_IO V2", 35.56, 25.4, 1.6, 0, 0, 0, "green", true, [],
|
||||
[[(3.015 - 2.7) * 25.4 - 3.5 /2, (4.5 - 3.685) * 25.4, 90, "term35", 2],
|
||||
[(3.46 - 2.7) * 25.4 - 3.5 /2, (4.5 - 3.69) * 25.4, 90, "term35", 2],
|
||||
[(3.91 - 2.7) * 25.4 - 3.5 /2, (4.5 - 3.69) * 25.4, 90, "term35", 2],
|
||||
[(3.4 - 2.7) * 25.4, (4.5 - 4.15) * 25.4, 0, "2p54socket", 13, 2],
|
||||
], []];
|
||||
|
||||
module pcb_mounts()
|
||||
if($preview)
|
||||
pcb_mount_assembly(PI_IO, 3);
|
||||
else
|
||||
pcb_mount(PI_IO);
|
||||
|
||||
pcb_mounts();
|
@@ -23,7 +23,7 @@ include <../vitamins/d_connectors.scad>
|
||||
include <../vitamins/pcbs.scad>
|
||||
|
||||
module pcbs()
|
||||
layout([for(p = pcbs) pcb_width(p)], 15)
|
||||
layout([for(p = pcbs) pcb_width(p)], 10)
|
||||
translate([0, pcb_length(pcbs[$i]) / 2])
|
||||
rotate(90)
|
||||
pcb_assembly(pcbs[$i], 5 + $i, 3);
|
||||
|
@@ -28,15 +28,18 @@ module pin_headers()
|
||||
idc_transition(pin_headers[$i], 10);
|
||||
|
||||
translate([0, 20])
|
||||
pin_header(pin_headers[$i], 10, 2);
|
||||
pin_header(pin_headers[$i], 10, 2, right_angle = true);
|
||||
|
||||
translate([0, 40])
|
||||
pin_header(pin_headers[$i], 10, 2);
|
||||
|
||||
translate([0, 60])
|
||||
box_header(pin_headers[$i], 10, 2);
|
||||
|
||||
translate([0, 65])
|
||||
translate([0, 80])
|
||||
pin_socket(pin_headers[$i], 10, 2);
|
||||
|
||||
translate([0, 95])
|
||||
translate([0, 110])
|
||||
pin_socket(pin_headers[$i], 10, 2, right_angle = true);
|
||||
|
||||
}
|
||||
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 42 KiB |
BIN
tests/png/hygrometer.png
Normal file
After Width: | Height: | Size: 73 KiB |
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 78 KiB |
BIN
tests/png/pcb_mount.png
Normal file
After Width: | Height: | Size: 109 KiB |
Before Width: | Height: | Size: 149 KiB After Width: | Height: | Size: 147 KiB |
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 93 KiB After Width: | Height: | Size: 103 KiB |
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 149 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 39 KiB |
@@ -24,7 +24,7 @@ include <../vitamins/ring_terminals.scad>
|
||||
|
||||
module ring_terminals()
|
||||
layout([for(t = ring_terminals) ringterm_od(t)], 5)
|
||||
rotate(90)
|
||||
rotate(180)
|
||||
ring_terminal_assembly(ring_terminals[$i], 3);
|
||||
|
||||
if($preview)
|
||||
|
@@ -18,7 +18,7 @@
|
||||
//
|
||||
|
||||
//
|
||||
//! Maths utilities for minapulating vectors and matrices.
|
||||
//! Maths utilities for manipulating vectors and matrices.
|
||||
//
|
||||
function sqr(x) = x * x;
|
||||
|
||||
|
@@ -21,6 +21,8 @@
|
||||
//! Models timing belt running over toothed or smooth pulleys and calculates an accurate length.
|
||||
//! Only models 2D paths, so not core XY!
|
||||
//!
|
||||
//! To make the back of the belt run against a smooth pulley on the outside of the loop specify a negative pitch radius.
|
||||
//!
|
||||
//! By default the path is a closed loop but a gap length and position can be specified to make open loops.
|
||||
//!
|
||||
//! Individual teeth are not drawn, instead they are represented by a lighter colour.
|
||||
|
@@ -17,7 +17,7 @@
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
RB5015 = ["RM5015", "Blower Runda RB5015", 51.3, 51, 15, 31.5, M4_cap_screw, 26, [27.3, 25.4], 4.5, [[4.3, 45.4], [47.3,7.4]], 20, 14, 1.5, 1.3, 1.2, 15];
|
||||
RB5015 = ["RB5015", "Blower Runda RB5015", 51.3, 51, 15, 31.5, M4_cap_screw, 26, [27.3, 25.4], 4.5, [[4.3, 45.4], [47.3,7.4]], 20, 14, 1.5, 1.3, 1.2, 15];
|
||||
PE4020 = ["PE4020", "Blower Pengda Technology 4020", 40, 40, 20, 27.5, M3_cap_screw, 22, [21.5, 20 ], 3.2, [[37,3],[3,37],[37,37]], 29.3, 17, 1.7, 1.2, 1.3, 13];
|
||||
|
||||
blowers = [PE4020, RB5015];
|
||||
|
@@ -47,6 +47,19 @@ LCD1602A = ["LCD1602A", "LCD display 1602A", 71.3, 24.3, 7.0, LCD1602APCB,
|
||||
[], // clearance need for the ts ribbon
|
||||
];
|
||||
|
||||
LCDS7282BPCB = ["", "", 85, 36, 1.65, 0, 2.56, 0, "green", false, [[-2.5, -2.5], [-2.5, 2.5], [2.5, 2.5], [2.5, -2.5]],
|
||||
[ [3.5, 18, 0, "2p54header", 2, 7]
|
||||
],
|
||||
[]];
|
||||
|
||||
LCDS7282B = ["LCDS7282B", "LCD display S-7282B", 73.6, 28.7, 9.6, LCDS7282BPCB,
|
||||
[-2.5, 0, 0], // pcb offst
|
||||
[[-64.5 / 2, -14.5 / 2], [64.5 / 2, 14.5 / 2, 0.6]], // aperture
|
||||
[], // touch screen
|
||||
0, // thread length
|
||||
[], // clearance need for the ts ribbon
|
||||
];
|
||||
|
||||
SSD1963_4p3PCB = ["", "", 120, 74, 1.65, 3, 3, 0, "mediumblue", false, [[3, 3], [-3, 3], [-3, -3], [3, -3]],
|
||||
[ [2.75 + 1.27, 37, 90, "2p54header", 20, 2]
|
||||
],
|
||||
@@ -60,6 +73,6 @@ SSD1963_4p3 = ["SSD1963_4p3", "LCD display SSD1963 4.3\"", 105.5, 67.2, 3.4, SSD
|
||||
[[0, -34.5], [12, -31.5]],
|
||||
];
|
||||
|
||||
displays = [HDMI5, SSD1963_4p3, LCD1602A];
|
||||
displays = [HDMI5, SSD1963_4p3, LCD1602A, LCDS7282B];
|
||||
|
||||
use <display.scad>
|
||||
|
@@ -61,30 +61,35 @@ heater_y = heater_width / 2;
|
||||
|
||||
fan_x_offset = rad_dia / 2 + 4;
|
||||
|
||||
module e3d_resistor(type) {
|
||||
module e3d_resistor(type, naked = false, resistor_wire_rotate = [0,0,0]) {
|
||||
translate([11 - heater_x, -3 - heater_y, heater_height / 2 + nozzle_h]) {
|
||||
color("grey")
|
||||
rotate([-90, 0, 0])
|
||||
cylinder(r = resistor_dia / 2, h = resistor_len);
|
||||
|
||||
color("red")
|
||||
translate([-3.5/2, resistor_len + 3.5/2 + 1, 0]) {
|
||||
cylinder(d = 3.5, h = 36);
|
||||
if(!naked)
|
||||
color("red")
|
||||
translate([0, resistor_len + 3.5/2 + 1, 0]) {
|
||||
rotate(resistor_wire_rotate) {
|
||||
translate([-3.5/2, 0, 0]) {
|
||||
cylinder(d = 3.5, h = 36);
|
||||
|
||||
translate([3.5, 0, 0])
|
||||
cylinder(r = 3.5 / 2, h = 36);
|
||||
translate([3.5, 0, 0])
|
||||
cylinder(r = 3.5 / 2, h = 36);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module heater_block(type) {
|
||||
module heater_block(type, naked = false, resistor_wire_rotate = [0,0,0]) {
|
||||
translate_z(-hot_end_length(type)) {
|
||||
translate_z(nozzle_h)
|
||||
color("lightgrey")
|
||||
translate([-heater_x, -heater_y, 0])
|
||||
cube([heater_length, heater_width, heater_height]);
|
||||
|
||||
e3d_resistor(type);
|
||||
e3d_resistor(type, naked, resistor_wire_rotate);
|
||||
e3d_nozzle(type);
|
||||
}
|
||||
}
|
||||
@@ -118,7 +123,7 @@ module e3d_fan(type) {
|
||||
fan(fan30x10);
|
||||
}
|
||||
|
||||
module e3d_hot_end(type, filament, naked = false) {
|
||||
module e3d_hot_end(type, filament, naked = false, resistor_wire_rotate = [0,0,0]) {
|
||||
insulator_length = hot_end_insulator_length(type);
|
||||
inset = hot_end_inset(type);
|
||||
h_ailettes = rad_len / (2 * rad_nb_ailettes - 1);
|
||||
@@ -146,17 +151,17 @@ module e3d_hot_end(type, filament, naked = false) {
|
||||
}
|
||||
|
||||
rotate(90)
|
||||
heater_block(type);
|
||||
heater_block(type, naked, resistor_wire_rotate);
|
||||
|
||||
if(!naked)
|
||||
translate_z(inset - insulator_length)
|
||||
e3d_fan();
|
||||
}
|
||||
|
||||
module e3d_hot_end_assembly(type, filament, naked = false) {
|
||||
module e3d_hot_end_assembly(type, filament, naked = false, resistor_wire_rotate = [0,0,0]) {
|
||||
bundle = 3.2;
|
||||
|
||||
e3d_hot_end(type, filament, naked);
|
||||
e3d_hot_end(type, filament, naked, resistor_wire_rotate);
|
||||
|
||||
// Wire and ziptie
|
||||
if(!naked)
|
||||
|
@@ -147,11 +147,16 @@ module fan_holes(type, poly = false, screws = true, h = 100) { //! Make all the
|
||||
}
|
||||
}
|
||||
|
||||
function nut_and_washer_thickness(screw, nyloc) = washer_thickness(screw_washer(screw)) + nut_thickness(screw_nut(screw), nyloc);
|
||||
function fan_screw_depth(type) = fan_boss_d(type) ? fan_depth(type) : fan_thickness(type);
|
||||
function fan_screw_length(type, thickness) = screw_longer_than(thickness + fan_screw_depth(type) + nut_and_washer_thickness(fan_screw(type), true)); //! Screw length required
|
||||
function fan_screw_depth(type, full_depth = false) = fan_boss_d(type) || full_depth ? fan_depth(type) : fan_thickness(type);
|
||||
|
||||
module fan_assembly(type, thickness, include_fan = true, screw = false) { //! Fan with its fasteners
|
||||
function fan_screw_length(type, thickness, full_depth = false) =
|
||||
let(depth = fan_screw_depth(type, full_depth),
|
||||
washers = depth == fan_depth(type) ? 2 : 1,
|
||||
washer = screw_washer(fan_screw(type)),
|
||||
nut = screw_nut(fan_screw(type)))
|
||||
screw_longer_than(thickness + depth + washer_thickness(washer) * washers + nut_thickness(nut, true)); //! Screw length required
|
||||
|
||||
module fan_assembly(type, thickness, include_fan = true, screw = false, full_depth = false) { //! Fan with its fasteners
|
||||
translate_z(-fan_depth(type) / 2) {
|
||||
if(include_fan)
|
||||
fan(type);
|
||||
@@ -160,11 +165,14 @@ module fan_assembly(type, thickness, include_fan = true, screw = false) { //! Fa
|
||||
nut = screw_nut(Screw);
|
||||
fan_hole_positions(type) {
|
||||
translate_z(thickness)
|
||||
screw_and_washer(Screw, fan_screw_length(type, thickness));
|
||||
screw_and_washer(Screw, fan_screw_length(type, thickness, full_depth));
|
||||
|
||||
translate_z(include_fan ? -fan_screw_depth(type) : 0)
|
||||
translate_z(include_fan ? -fan_screw_depth(type, full_depth) : 0)
|
||||
vflip()
|
||||
nut(nut, true);
|
||||
if(fan_screw_depth(type, full_depth) == fan_depth(type))
|
||||
nut_and_washer(nut, true);
|
||||
else
|
||||
nut(nut, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -40,7 +40,8 @@ fan50x15 = [50, 15, 48, 20, M4_dome_screw, 25, 12.5,100,7, 0, undef];
|
||||
fan40x11 = [40, 11, 37, 16, M3_dome_screw, 25, 7.5,100, 9, 0, undef];
|
||||
fan30x10 = [30, 10, 27, 12, M3_dome_screw, 17, 10, 100, 5, 0, undef];
|
||||
fan25x10 = [25, 10, 24, 10, M2p5_pan_screw, 16, 10, 100, 5, 0, undef];
|
||||
fan17x8 = [17, 8, 16, 6.75, M2_cap_screw, 12.6, 8, 100, 7, 0, undef];
|
||||
|
||||
fans = [fan25x10, fan30x10, fan40x11, fan50x15, fan60x15, fan60x25, fan70x15, fan80x25, fan80x38, fan120x25];
|
||||
fans = [fan17x8, fan25x10, fan30x10, fan40x11, fan50x15, fan60x15, fan60x25, fan70x15, fan80x25, fan80x38, fan120x25];
|
||||
|
||||
use <fan.scad>
|
||||
|
@@ -44,10 +44,10 @@ function hot_end_length(type) = hot_end_total_length(type) - hot_end_inset(type)
|
||||
use <jhead.scad>
|
||||
use <e3d.scad>
|
||||
|
||||
module hot_end(type, filament, naked = false) { //! Draw specified hot end
|
||||
module hot_end(type, filament, naked = false, resistor_wire_rotate = [0,0,0]) { //! Draw specified hot end
|
||||
if(hot_end_style(type) == jhead)
|
||||
jhead_hot_end_assembly(type, filament, naked);
|
||||
|
||||
if(hot_end_style(type) == e3d)
|
||||
e3d_hot_end_assembly(type, filament, naked);
|
||||
e3d_hot_end_assembly(type, filament, naked, resistor_wire_rotate);
|
||||
}
|
||||
|
87
vitamins/hygrometer.scad
Normal file
@@ -0,0 +1,87 @@
|
||||
//
|
||||
// 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/>.
|
||||
//
|
||||
|
||||
//
|
||||
//! Mini LCD Celsius Digital Thermometer Hygrometer Temperature Humidity Meter Gauge on eBay
|
||||
//
|
||||
include <../core.scad>
|
||||
use <../utils/round.scad>
|
||||
|
||||
od = 40.9;
|
||||
h = 14;
|
||||
flange_d = 45.5;
|
||||
flange_t = 1.5;
|
||||
flange_d2 = 32;
|
||||
flange_t2 = 2;
|
||||
apperture_d = 24.7;
|
||||
hygrometer_hole_r = 21.3;
|
||||
slot_w = 5.5;
|
||||
|
||||
module hygrometer_hole(h = 0) { //! Drill the hole for a hygrometer
|
||||
round(cnc_bit_r) {
|
||||
intersection() {
|
||||
drill(hygrometer_hole_r, h);
|
||||
|
||||
rotate(30)
|
||||
square([slot_w + 2 * cnc_bit_r, 100], center = true);
|
||||
}
|
||||
drill((od + 0.2) / 2, h);
|
||||
}
|
||||
}
|
||||
|
||||
function hygrometer_or() = flange_d / 2; //! The outside radius of a hygrometer
|
||||
|
||||
module hygrometer() { //! Draw a hygrometer
|
||||
vitamin("hygrometer(): Mini LCD Digital Thermometer / Hygrometer");
|
||||
|
||||
explode(40) {
|
||||
color(grey30)
|
||||
rotate_extrude()
|
||||
polygon([
|
||||
[0, 0],
|
||||
[apperture_d / 2, 0],
|
||||
[apperture_d / 2, flange_t],
|
||||
[flange_d2 / 2, flange_t2],
|
||||
[flange_d / 2, flange_t],
|
||||
[flange_d / 2, 0],
|
||||
[od / 2, 0],
|
||||
[od / 2, -h],
|
||||
[0, -h]
|
||||
]);
|
||||
|
||||
color("#94A7AB")
|
||||
cylinder(d = apperture_d, h = eps);
|
||||
|
||||
color("black")
|
||||
linear_extrude(height = 0.2, center = true) {
|
||||
translate([0, 3])
|
||||
text("20_4", font = "7 segment", valign = "bottom", halign = "center", size = apperture_d / 6);
|
||||
|
||||
translate([7, 3])
|
||||
text("C", font = "7 segment", valign = "bottom", halign = "center", size = apperture_d / 8);
|
||||
|
||||
translate([-1.9, 0.5])
|
||||
text("50", font = "7 segment", valign = "top", halign = "center", size = apperture_d / 2.7);
|
||||
|
||||
translate([0, -apperture_d / 6])
|
||||
text(" %", font = "Arial", valign = "center", halign = "center", size = apperture_d / 6);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@@ -21,6 +21,7 @@
|
||||
//! Heatfit threaded inserts. Can be pushed into thermoplastics using a soldering iron with a conical bit set to 200°C.
|
||||
//
|
||||
include <../core.scad>
|
||||
use <../utils/quadrant.scad>
|
||||
|
||||
function insert_length(type) = type[1]; //! Length
|
||||
function insert_outer_d(type) = type[2]; //! Outer diameter at the top
|
||||
@@ -96,31 +97,52 @@ module insert_hole(type, counterbore = 0, horizontal = false) { //! Make a hole
|
||||
function insert_boss_radius(type, wall) = corrected_radius(insert_hole_radius(type)) + wall; //! Compute the outer radius of an insert boss
|
||||
|
||||
module insert_boss(type, z, wall = 2 * extrusion_width) { //! Make a boss to take an insert
|
||||
render(convexity = 3)
|
||||
difference() {
|
||||
ir = insert_hole_radius(type);
|
||||
linear_extrude(height = z)
|
||||
hull()
|
||||
poly_ring(corrected_radius(ir) + wall, ir);
|
||||
ir = insert_hole_radius(type);
|
||||
or = corrected_radius(ir) + wall;
|
||||
|
||||
translate_z(z)
|
||||
insert_hole(type, max(0, z - insert_hole_length(type) - 2 * layer_height));
|
||||
module shape()
|
||||
hull()
|
||||
poly_ring(or, ir);
|
||||
|
||||
linear_extrude(height = z)
|
||||
poly_ring(or, ir);
|
||||
|
||||
linear_extrude(height = z - insert_hole_length(type))
|
||||
difference() {
|
||||
shape();
|
||||
|
||||
poly_circle(insert_screw_diameter(type) / 2 + 0.1);
|
||||
}
|
||||
|
||||
if(z > insert_hole_length(type) + 2 * layer_height)
|
||||
linear_extrude(height = 2 * layer_height) // cap the end if room
|
||||
shape();
|
||||
}
|
||||
|
||||
module insert_lug(insert, wall, side, counter_bore = 0) { //! Make a flying insert lug, see [ssr_shroud](#Ssr_shroud)
|
||||
module insert_lug(insert, wall, counter_bore = 0, extension = 0, corner_r = 0, flying = true) { //! Make a flying insert lug, see [ssr_shroud](#Ssr_shroud)
|
||||
boss_r = insert_boss_radius(insert, wall);
|
||||
boss_h = insert_hole_length(insert);
|
||||
boss_h2 = boss_h + counter_bore;
|
||||
|
||||
module shape()
|
||||
intersection() {
|
||||
hull() {
|
||||
circle(boss_r);
|
||||
|
||||
translate([boss_r + extension - eps, 0])
|
||||
square([eps, 2 * boss_r], center = true);
|
||||
}
|
||||
if(corner_r)
|
||||
translate([boss_r + extension - corner_r, 0])
|
||||
rotate(-45)
|
||||
quadrant(w = 100, r = corner_r - eps, center = true);
|
||||
}
|
||||
|
||||
translate_z(-boss_h)
|
||||
linear_extrude(height = boss_h)
|
||||
difference() {
|
||||
hull() {
|
||||
circle(boss_r);
|
||||
shape();
|
||||
|
||||
translate([side * (boss_r - 1), 0])
|
||||
square([eps, 2 * boss_r], center = true);
|
||||
}
|
||||
poly_circle(insert_hole_radius(insert));
|
||||
}
|
||||
|
||||
@@ -128,24 +150,19 @@ module insert_lug(insert, wall, side, counter_bore = 0) { //! Make a flying inse
|
||||
translate_z(-boss_h2) {
|
||||
linear_extrude(height = counter_bore + eps)
|
||||
difference() {
|
||||
hull() {
|
||||
circle(boss_r);
|
||||
shape();
|
||||
|
||||
translate([side * (boss_r - 1), 0])
|
||||
square([eps, 2 * boss_r], center = true);
|
||||
}
|
||||
poly_circle(insert_screw_diameter(insert) / 2 + 0.1);
|
||||
}
|
||||
|
||||
// support cones
|
||||
hull() {
|
||||
cylinder(h = eps, r = boss_r - eps);
|
||||
// support cone
|
||||
if(flying)
|
||||
hull() {
|
||||
linear_extrude(height = eps)
|
||||
shape();
|
||||
|
||||
translate([side * (boss_r - 1), 0])
|
||||
cube([eps, 2 * boss_r, eps], center = true);
|
||||
|
||||
translate([side * (boss_r - wall + eps), 0, - (2 * boss_r - wall)])
|
||||
cube(eps, center = true);
|
||||
}
|
||||
translate([boss_r + extension - wall - eps, 0, - (2 * boss_r + extension - wall)])
|
||||
cube(eps, center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -49,9 +49,12 @@ function pcb_grid(type) = type[13]; //! Grid if a perfboard
|
||||
function pcb_polygon(type) = type[14]; //! Optional outline polygon for odd shaped boards
|
||||
function pcb_screw(type, cap = hs_cap) = Len(type[15]) ? type[15] : find_screw(cap, screw_smaller_than(pcb_hole_d(type))); //! Mounting screw type
|
||||
|
||||
module pcb_grid(type, x, y, z = 0) //! Positions children at specified grid positions
|
||||
translate([-pcb_length(type) / 2 + pcb_grid(type).x + 2.54 * x,
|
||||
-pcb_width(type) / 2 + pcb_grid(type).y + 2.54 * y, pcb_thickness(type) + z])
|
||||
function pcb_grid_pos(type, x, y, z = 0) = //! Returns a pcb grid position
|
||||
[-pcb_length(type) / 2 + pcb_grid(type).x + 2.54 * x,
|
||||
-pcb_width(type) / 2 + pcb_grid(type).y + 2.54 * y, pcb_thickness(type) + z];
|
||||
|
||||
module pcb_grid(type, x, y, z = 0) //! Positions children at specified grid position
|
||||
translate(pcb_grid_pos(type, x, y, z))
|
||||
children();
|
||||
|
||||
// allows negative ordinates to represent offsets from the far edge
|
||||
@@ -197,14 +200,27 @@ module jack(cutout = false) { //! Draw 3.5mm jack
|
||||
}
|
||||
}
|
||||
|
||||
module hdmi(cutout = false) { //! Draw HDMI socket
|
||||
l = 12;
|
||||
iw1 = 14;
|
||||
iw2 = 10;
|
||||
ih1 = 3;
|
||||
ih2 = 4.5;
|
||||
h = 6.5;
|
||||
t = 0.5;
|
||||
function hdmi_depth(type) = type[2]; //! Front to back depth
|
||||
function hdmi_width1(type) = type[3]; //! Inside width at the top
|
||||
function hdmi_width2(type) = type[4]; //! Inside width at the bottom
|
||||
function hdmi_height1(type) = type[5]; //! Inside height at the sides
|
||||
function hdmi_height2(type) = type[6]; //! Inside height in the middle
|
||||
function hdmi_height(type) = type[7]; //! Outside height above the PCB
|
||||
function hdmi_thickness(type) = type[8]; //! Wall thickness of the metal
|
||||
|
||||
hdmi_full = [ "hdmi_full", "HDMI socket", 12, 14, 10, 3, 4.5, 6.5, 0.5 ];
|
||||
hdmi_mini = [ "hdmi_mini", "Mini HDMI socket", 7.5, 10.5, 8.3, 1.28, 2.5, 3.2, 0.35 ];
|
||||
|
||||
module hdmi(type, cutout = false) { //! Draw HDMI socket
|
||||
vitamin(str("hdmi(", type[0], "): ", type[1]));
|
||||
|
||||
l = hdmi_depth(type);
|
||||
iw1 = hdmi_width1(type);
|
||||
iw2 = hdmi_width2(type);
|
||||
ih1 = hdmi_height1(type);
|
||||
ih2 = hdmi_height2(type);
|
||||
h = hdmi_height(type);
|
||||
t = hdmi_thickness(type);
|
||||
|
||||
module D() {
|
||||
hull() {
|
||||
@@ -503,6 +519,53 @@ module flex(cutout = false) { //! Draw flexistrip connector
|
||||
}
|
||||
}
|
||||
|
||||
module flat_flex(cutout = false) { //! Draw flat flexistrip connector as used on RPI0
|
||||
l1 = 17;
|
||||
w1 = 1.4;
|
||||
h1 = 1.2;
|
||||
|
||||
l2 = 15.4;
|
||||
w2 = 1.6;
|
||||
h2 = 1.0;
|
||||
|
||||
l3 = 16;
|
||||
w3 = 1.1;
|
||||
h3 = 1.2;
|
||||
|
||||
l4 = 12;
|
||||
|
||||
slot_l = 11.8;
|
||||
slot_h = 0.9;
|
||||
|
||||
w = w1 + w2 + w3;
|
||||
if(cutout)
|
||||
;
|
||||
else {
|
||||
color(grey30) {
|
||||
translate([w / 2 - w1, 0, h1 / 2])
|
||||
rotate([90, 0, 90])
|
||||
linear_extrude(height = w1)
|
||||
difference() {
|
||||
square([l1, h1], center = true);
|
||||
|
||||
translate([0, -h1 / 2])
|
||||
square([slot_l, slot_h * 2], center = true);
|
||||
}
|
||||
|
||||
}
|
||||
color(grey90) {
|
||||
translate([-w / 2 + w3 / 2, 0, h3 / 2])
|
||||
cube([w3, l3, h3], center = true);
|
||||
|
||||
translate([-w / 2 + w3 + w2 / 2, 0, h2 / 2])
|
||||
cube([w2, l2, h2], center = true);
|
||||
|
||||
translate([-w / 2 + w3 + w2 / 2, 0, h3 / 2])
|
||||
cube([w2, l4, h3], center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module terminal_35(ways) { //! Draw 3.5mm terminal block
|
||||
vitamin(str("terminal_35(", ways, "): Terminal block ", ways, " way 3.5mm"));
|
||||
pitch = 3.5;
|
||||
@@ -637,19 +700,22 @@ module standoff(h, d, h2, d2) {
|
||||
|
||||
module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb component from description
|
||||
function show(comp, part) = (comp[3] == part || comp[3] == str("-",part)) && (!cutouts || angle == undef || angle == comp.z);
|
||||
function param(n, default = 0) = len(comp) > n ? comp[n] : default;
|
||||
rotate(comp.z) {
|
||||
if(show(comp, "2p54header")) pin_header(2p54header, comp[4], comp[5], len(comp) > 5 ? comp[6] : false, cutouts);
|
||||
if(show(comp, "2p54boxhdr")) box_header(2p54header, comp[4], comp[5], len(comp) > 5 ? comp[6] : false, cutouts);
|
||||
if(show(comp, "2p54socket")) pin_socket(2p54header, comp[4], comp[5], comp[6], len(comp) > 7 ? comp[7] : 0, cutouts);
|
||||
if(show(comp, "chip")) chip(comp[4], comp[5], comp[6], len(comp) > 7 ? comp[7] : grey30, cutouts);
|
||||
if(show(comp, "2p54header")) pin_header(2p54header, comp[4], comp[5], param(6), cutouts);
|
||||
if(show(comp, "2p54boxhdr")) box_header(2p54header, comp[4], comp[5], param(6), cutouts);
|
||||
if(show(comp, "2p54socket")) pin_socket(2p54header, comp[4], comp[5], param(6, false), param(7), param(8, false), cutouts);
|
||||
if(show(comp, "chip")) chip(comp[4], comp[5], comp[6], param(7, grey30), cutouts);
|
||||
if(show(comp, "rj45")) rj45(cutouts);
|
||||
if(show(comp, "usb_Ax2")) usb_Ax2(cutouts);
|
||||
if(show(comp, "usb_uA")) usb_uA(cutouts);
|
||||
if(show(comp, "usb_B")) usb_B(cutouts);
|
||||
if(show(comp, "jack")) jack(cutouts);
|
||||
if(show(comp, "barrel_jack")) barrel_jack(cutouts);
|
||||
if(show(comp, "hdmi")) hdmi(cutouts);
|
||||
if(show(comp, "hdmi")) hdmi(hdmi_full, cutouts);
|
||||
if(show(comp, "mini_hdmi")) hdmi(hdmi_mini, cutouts);
|
||||
if(show(comp, "flex")) flex(cutouts);
|
||||
if(show(comp, "flat_flex")) flat_flex(cutouts);
|
||||
if(show(comp, "D_plug")) if(!cutouts) translate_z(d_pcb_offset(comp[4])) d_plug(comp[4], pcb = true);
|
||||
if(show(comp, "molex_hdr")) if(!cutouts) molex_254(comp[4]);
|
||||
if(show(comp, "term254")) if(!cutouts) green_terminal(gt_2p54,comp[4], comp[5]);
|
||||
@@ -667,6 +733,9 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
|
||||
}
|
||||
}
|
||||
|
||||
function pcb_component_position(type, name, index = 0) = //! Return x y position of specified component
|
||||
[for(comp = pcb_components(type), p = [pcb_coord(type, [comp.x, comp.y])]) if(comp[3] == name) [p.x, p.y]][index];
|
||||
|
||||
module pcb_component_position(type, name) { //! Position child at the specified component position
|
||||
for(comp = pcb_components(type)) {
|
||||
p = pcb_coord(type, [comp.x, comp.y]);
|
||||
@@ -700,11 +769,12 @@ module pcb_components(type, cutouts = false, angle = undef) { //! Draw list of P
|
||||
module pcb_cutouts(type, angle = undef) pcb_components(type, true, angle); //! Make cut outs to clear components on a PCB
|
||||
|
||||
module pcb_grid_positions(type) {
|
||||
x0 = pcb_grid(type).x;
|
||||
y0 = pcb_grid(type).y;
|
||||
grid = pcb_grid(type);
|
||||
x0 = grid.x;
|
||||
y0 = grid.y;
|
||||
|
||||
cols = round((pcb_length(type) - 2 * x0) / inch(0.1));
|
||||
rows = round((pcb_width(type) - 2 * y0) / inch(0.1));
|
||||
cols = is_undef(grid[2]) ? round((pcb_length(type) - 2 * x0) / inch(0.1)) : grid[2] - 1;
|
||||
rows = is_undef(grid[3]) ? round((pcb_width(type) - 2 * y0) / inch(0.1)) : grid[3] - 1;
|
||||
for(x = [0 : cols], y = [0 : rows])
|
||||
pcb_grid(type, x, y)
|
||||
children();
|
||||
@@ -740,9 +810,9 @@ module pcb(type) { //! Draw specified PCB
|
||||
pcb_screw_positions(type)
|
||||
tube(or = max(pcb_land_d(type), 1) / 2, ir = pcb_hole_d(type) / 2, h = t + 2 * eps);
|
||||
|
||||
fr4 = pcb_colour(type) == "green";
|
||||
fr4 = pcb_colour(type) != "sienna";
|
||||
plating = 0.15;
|
||||
color(fr4 ? "silver" : "gold")
|
||||
color(pcb_colour(type) == "green" ? "silver" : "gold")
|
||||
translate_z(-plating)
|
||||
linear_extrude(height = fr4 ? t + 2 * plating : plating)
|
||||
if(Len(grid)) {
|
||||
@@ -752,7 +822,7 @@ module pcb(type) { //! Draw specified PCB
|
||||
|
||||
circle(d = 1);
|
||||
}
|
||||
if(fr4) { // oval lands at the ends
|
||||
if(fr4 && len(grid) < 3) { // oval lands at the ends
|
||||
screw_x = pcb_coord(type, pcb_holes(type)[0]).x;
|
||||
y0 = pcb_grid(type).y;
|
||||
rows = round((pcb_width(type) - 2 * y0) / inch(0.1));
|
||||
|
@@ -209,7 +209,29 @@ RPI3 = ["RPI3", "Raspberry Pi 3", 85, 56, 1.4, 3, 2.75, 6, "green"
|
||||
[45, 11.5,-90, "flex"],
|
||||
[7.75, 28, 180, "-uSD", [12, 11.5, 1.28]],
|
||||
],
|
||||
[": Micro SD card"]];
|
||||
[": Micro SD card"],
|
||||
[32.5 - 9.5 * 2.54, 52.5 - 1.27, 20, 2]];
|
||||
|
||||
RPI0 = ["RPI0", "Raspberry Pi Zero", 65, 30, 1.4, 3, 2.75, 6, "green", false, [[3.5, 3.5], [-3.5, 3.5], [-3.5, -3.5], [3.5, -3.5]],
|
||||
[//[32.5, -3.5, 0, "2p54header", 20, 2],
|
||||
[25.5, 13, 0, "chip", 12, 12, 1.2],
|
||||
[12.4, 3.4, -90, "mini_hdmi"],
|
||||
[54, 2, -90, "usb_uA"],
|
||||
[41.4, 2, -90, "usb_uA"],
|
||||
[7.25, 16.7, 180, "uSD", [12, 11.5, 1.4]],
|
||||
[-1.3, 15, 0, "flat_flex"],
|
||||
],
|
||||
[": Micro SD card"],
|
||||
[32.5 - 9.5 * 2.54, 26.5 - 1.27, 20, 2]];
|
||||
|
||||
EnviroPlus = ["EnviroPlus", "Enviro+", 65, 30.6, 1.6, 3, 2.75, 6, "white", false, [[3.5, 3.8], [-3.5, 3.8], [-3.5, -3.8], [3.5, -3.8]],
|
||||
[[32.5, -3.8, 0, "-2p54socket", 20, 2, false, 5, true],
|
||||
[-15.5, 2.5, 0, "-chip", 15, 5, 3, "white"],
|
||||
[-14.25,16.25, 0, "chip", 27.5, 13.5, 1.5]
|
||||
],
|
||||
[],
|
||||
[8, 1.5, 9, 1]];
|
||||
|
||||
|
||||
ArduinoUno3 = ["ArduinoUno3", "Arduino Uno R3", 68.58, 53.34, 1.6, 0, 3.3, 0, "#2140BE", false, [[15.24, 50.8],[66.04, 35.56],[66.04, 7.62],[13.97, 2.54]],
|
||||
[[30.226, -2.54, 0, "2p54socket", 10, 1],
|
||||
@@ -237,6 +259,32 @@ ArduinoUno3 = ["ArduinoUno3", "Arduino Uno R3", 68.58, 53.34, 1.6, 0, 3.3, 0, "#
|
||||
M2p5_pan_screw
|
||||
];
|
||||
|
||||
ArduinoLeonardo = ["ArduinoLeonardo", "Arduino Leonardo", 68.58, 53.34, 1.6, 0, 3.3, 0, "#2140BE", false, [[15.24, 50.8],[66.04, 35.56],[66.04, 7.62],[13.97, 2.54]],
|
||||
[[30.226, -2.54, 0, "2p54socket", 10, 1],
|
||||
[54.61, -2.54, 0, "2p54socket", 8, 1],
|
||||
[36.83, 2.54, 0, "2p54socket", 8, 1],
|
||||
[57.15, 2.54, 0, "2p54socket", 6, 1],
|
||||
[64.91, 27.89, 0, "2p54header", 2, 3],
|
||||
[ 6.5, -3.5, 0, "button_6mm"],
|
||||
[4.7625, 7.62, 180, "barrel_jack"],
|
||||
[1.5875, 38.1, 180,"usb_uA"],
|
||||
],
|
||||
[],[],
|
||||
inch([
|
||||
[-1.35, -1.05],
|
||||
[-1.35, 1.05],
|
||||
[ 1.19, 1.05],
|
||||
[ 1.25, 0.99],
|
||||
[ 1.25, 0.54],
|
||||
[ 1.35, 0.44],
|
||||
[ 1.35, -0.85],
|
||||
[ 1.25, -0.95],
|
||||
[ 1.25, -1.05],
|
||||
]),
|
||||
M2p5_pan_screw
|
||||
];
|
||||
|
||||
|
||||
Keyes5p1 = ["Keyes5p1", "Keyes5.1 Arduino Uno expansion board", 68.58, 53.34, 1.6, 0, 3.3, 0, "#2140BE", false, [[15.24, 50.8],[66.04, 35.56],[66.04, 7.62],[13.97, 2.54]],
|
||||
[[30.226, -2.54, 0, "-2p54header", 10, 1],
|
||||
[54.61, -2.54, 0, "-2p54header", 8, 1],
|
||||
@@ -291,6 +339,6 @@ PERF74x51 = ["PERF74x51", "Perfboard 74 x 51mm", 74, 51, 1.0, 0, 3.0, 0, "sienna
|
||||
|
||||
PSU12V1A = ["PSU12V1A", "PSU 12V 1A", 67, 31, 1.7, 0, 3.9, 0, "green", true, [[3.5, 3.5], [-3.5, 3.5], [-3.5, -3.5], [3.5, -3.5]], [], []];
|
||||
|
||||
pcbs = [ExtruderPCB, PI_IO, RPI3, ArduinoUno3, Keyes5p1, PERF80x20, PERF70x50, PERF70x30, PERF60x40, PERF74x51, PSU12V1A, DuetE, Duex2, Duex5, Melzi, ZC_A0591];
|
||||
pcbs = [ExtruderPCB, PI_IO, RPI0, EnviroPlus, RPI3, ArduinoUno3, ArduinoLeonardo, Keyes5p1, PERF80x20, PERF70x50, PERF70x30, PERF60x40, PERF74x51, PSU12V1A, DuetE, Duex2, Duex5, Melzi, ZC_A0591];
|
||||
|
||||
use <pcb.scad>
|
||||
|
@@ -31,7 +31,7 @@
|
||||
//
|
||||
M2x16_brass_pillar = ["M2x16_brass_pillar", "nurled", 2, 16, 3.17, 3.17, 0, 0, brass, brass, 3,-3];
|
||||
M3x13_hex_pillar = ["M3x13_hex_pillar", "hex", 3, 13, 5/cos(30), 5/cos(30), 6, 6, "silver", "silver", -6, 6];
|
||||
M3x20_hex_pillar = ["M3x20_hex_pillar", "hex", 3, 20, 5/cos(30), 5/cos(30), 6, 6, "silver", "silver", -6, 6];
|
||||
M3x20_hex_pillar = ["M3x20_hex_pillar", "hex", 3, 20, 5/cos(30), 5/cos(30), 6, 6, "silver", "silver", -8, 8];
|
||||
M3x20_nylon_pillar = ["M3x20_nylon_pillar", "nylon", 3, 20, 8, 5/cos(30), 0, 6, "white", brass, -6, 6];
|
||||
M4x17_nylon_pillar = ["M4x17_nylon_pillar", "nylon", 4, 20, 8, 5/cos(30), 0, 6, "white", brass, -6, 6];
|
||||
M3x20_nylon_hex_pillar = ["M3x20_nylon_hex_pillar", "hex nylon", 3, 20, 8/cos(30), 8/cos(30), 6, 6, grey20, grey20, -6, 6];
|
||||
|
@@ -43,30 +43,52 @@ module pin(type, length = undef) { //! Draw a header pin
|
||||
}
|
||||
}
|
||||
|
||||
module pin_header(type, cols = 1, rows = 1, smt = false, cutout = false) { //! Draw pin header
|
||||
module pin_header(type, cols = 1, rows = 1, smt = false, right_angle = false, cutout = false) { //! Draw pin header
|
||||
pitch = hdr_pitch(type);
|
||||
h = pitch;
|
||||
ra_offset = 2.4;
|
||||
width = pitch * rows;
|
||||
|
||||
if(cutout)
|
||||
dogbone_rectangle([cols * pitch + 2 * panel_clearance, rows * pitch + 2 * panel_clearance, 100], center = false);
|
||||
else
|
||||
vitamin(str("pin_header(", type[0], cols, rows, arg(smt, false, "smt"), "): Pin header ", cols, " x ", rows));
|
||||
vitamin(str("pin_header(", type[0], ", ", cols, ", ", rows,
|
||||
arg(smt, false, "smt"), arg(right_angle, false, "right_angle"), "): Pin header ", cols, " x ", rows, right_angle ? " right_angle" : ""));
|
||||
|
||||
translate_z(smt ? 3.5 - h : 0) {
|
||||
for(x = [0 : cols - 1], y = [0 : rows - 1])
|
||||
for(x = [0 : cols - 1], y = [0 : rows - 1]) {
|
||||
translate([pitch * (x - (cols - 1) / 2), pitch * (y - (rows - 1) / 2), 0])
|
||||
pin(type);
|
||||
if(right_angle)
|
||||
pin(type, hdr_pin_below(type) + width / 2 + (y - 0.5) * pitch);
|
||||
else
|
||||
pin(type);
|
||||
|
||||
color(hdr_base_colour(type))
|
||||
linear_extrude(height = h)
|
||||
for(x = [0 : cols - 1], y = [0 : rows - 1])
|
||||
translate([pitch * (x - (cols - 1) / 2), pitch * (y - (rows - 1) / 2), pitch / 2])
|
||||
hull() {
|
||||
chamfer = pitch / 4;
|
||||
square([pitch + eps, pitch - chamfer], center = true);
|
||||
if(right_angle) {
|
||||
w = hdr_pin_width(type);
|
||||
rotate([-90, 0, 180])
|
||||
translate([pitch * (x - (cols - 1) / 2), -pitch * (y - (rows - 1) / 2) -width / 2, hdr_pin_below(type) - (y - 0.5) * pitch])
|
||||
pin(type, hdr_pin_length(type) - hdr_pin_below(type) + ra_offset + pitch / 2 + (y - 0.5) * pitch);
|
||||
|
||||
square([pitch - chamfer, pitch + eps], center = true);
|
||||
}
|
||||
translate([pitch * (x - (cols - 1) / 2), pitch * (y - (rows - 1) / 2) - w / 2, pitch * (y - (rows - 1) / 2) + width / 2 - w / 2])
|
||||
rotate([0, -90, 0])
|
||||
color(hdr_pin_colour(type))
|
||||
rotate_extrude(angle = 90, $fn = 32)
|
||||
translate([0, -w / 2])
|
||||
square(w);
|
||||
}
|
||||
}
|
||||
translate([0, right_angle ? -ra_offset - pitch / 2 : 0, right_angle ? width / 2 : 0])
|
||||
rotate([right_angle ? 90 : 0, 0, 0])
|
||||
color(hdr_base_colour(type))
|
||||
linear_extrude(height = h)
|
||||
for(x = [0 : cols - 1], y = [0 : rows - 1])
|
||||
translate([pitch * (x - (cols - 1) / 2), pitch * (y - (rows - 1) / 2), pitch / 2])
|
||||
hull() {
|
||||
chamfer = pitch / 4;
|
||||
square([pitch + eps, pitch - chamfer], center = true);
|
||||
|
||||
square([pitch - chamfer, pitch + eps], center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,12 +102,12 @@ module box_header(type, cols = 1, rows = 1, smt = false, cutout = false) { //! D
|
||||
if(cutout)
|
||||
dogbone_rectangle([cols * pitch + 2 * panel_clearance, rows * pitch + 2 * panel_clearance, 100], center = false);
|
||||
else
|
||||
vitamin(str("box_header(", type[0], cols, rows, arg(smt, false, "smt"), "): Pin header ", cols, " x ", rows));
|
||||
vitamin(str("box_header(", type[0], ", ", cols, ", ", rows, arg(smt, false, "smt"), "): Box header ", cols, " x ", rows));
|
||||
|
||||
translate_z(smt ? 3.5 - h : 0) {
|
||||
for(x = [0 : cols - 1], y = [0 : rows - 1])
|
||||
translate([pitch * (x - (cols - 1) / 2), pitch * (y - (rows - 1) / 2), 0])
|
||||
pin(type);
|
||||
pin(type, hdr_pin_length(type) - pitch + base);
|
||||
|
||||
color(hdr_base_colour(type)) {
|
||||
linear_extrude(height = base)
|
||||
@@ -138,16 +160,16 @@ module idc_transition(type, cols = 5, skip = [], cutout = false) { //! Draw IDC
|
||||
}
|
||||
}
|
||||
|
||||
module pin_socket(type, cols = 1, rows = 1, right_angle = false, height = 0, cutout = false) { //! Draw pin socket
|
||||
module pin_socket(type, cols = 1, rows = 1, right_angle = false, height = 0, smt = false, cutout = false) { //! Draw pin socket
|
||||
pitch = hdr_pitch(type);
|
||||
length = pitch * cols + 0.5;
|
||||
width = pitch * rows - 0.08;
|
||||
depth = max(hdr_socket_depth(type), height);
|
||||
depth = height ? height : hdr_socket_depth(type);
|
||||
ra_offset = 1.5;
|
||||
if(cutout)
|
||||
;
|
||||
else {
|
||||
vitamin(str("pin_socket(", type[0], ", ", cols, ", ", rows, arg(right_angle, false, "right_angle"), arg(height, 0, "height"),
|
||||
vitamin(str("pin_socket(", type[0], ", ", cols, ", ", rows, arg(right_angle, false, "right_angle"), arg(height, 0, "height"), arg(smt, false, "smt"),
|
||||
"): Pin socket ", cols, " x ", rows, right_angle ? " right_angle" : ""));
|
||||
color(hdr_base_colour(type))
|
||||
translate([0, right_angle ? -ra_offset - pitch / 2 : 0, right_angle ? width / 2 : 0])
|
||||
@@ -164,8 +186,9 @@ module pin_socket(type, cols = 1, rows = 1, right_angle = false, height = 0, cut
|
||||
|
||||
color(hdr_pin_colour(type))
|
||||
for(x = [0 : cols - 1], y = [0 : rows -1]) {
|
||||
translate([pitch * (x - (cols - 1) / 2), pitch * (y - (rows - 1) / 2), 0])
|
||||
pin(type, hdr_pin_below(type) + width / 2 + (y - 0.5) * pitch);
|
||||
if(!smt)
|
||||
translate([pitch * (x - (cols - 1) / 2), pitch * (y - (rows - 1) / 2), 0])
|
||||
pin(type, hdr_pin_below(type) + width / 2 + (y - 0.5) * pitch);
|
||||
|
||||
if(right_angle) {
|
||||
rotate([-90, 0, 0])
|
||||
|
@@ -17,14 +17,14 @@
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
// p p b p p b
|
||||
// i i e i i a
|
||||
// t n l n n s
|
||||
// c o e
|
||||
// h l w w c
|
||||
// c
|
||||
// p p b p p b Socket depth
|
||||
// i i e i i a
|
||||
// t n l n n s
|
||||
// c o e
|
||||
// h l w w c
|
||||
// c
|
||||
//
|
||||
2p54header = ["2p54header", 2.54, 12, 3.2, 0.66, "gold", grey20, 8.5];
|
||||
2p54header = ["2p54header", 2.54, 11.6, 3.2, 0.66, "gold", grey20, 8.5];
|
||||
|
||||
pin_headers = [ 2p54header ];
|
||||
|
||||
|
@@ -26,48 +26,96 @@ use <nut.scad>
|
||||
use <washer.scad>
|
||||
use <../utils/tube.scad>
|
||||
|
||||
function ringterm_od(type) = type[1]; //! Outside diameter
|
||||
function ringterm_id(type) = type[2]; //! Inside diameter
|
||||
function ringterm_length(type) = type[3]; //! Length of the tail including the ring
|
||||
function ringterm_width(type) = type[4]; //! Width of the tail
|
||||
function ringterm_hole(type) = type[5]; //! Wire hole diameter
|
||||
function ringterm_thickness(type) = type[6]; //! Metal thickness
|
||||
function ringterm_screw(type) = type[7]; //! Screw type
|
||||
function ringterm_od(type) = type[1]; //! Outside diameter
|
||||
function ringterm_id(type) = type[2]; //! Inside diameter
|
||||
function ringterm_length(type) = type[3]; //! Length of the tail including the ring
|
||||
function ringterm_width(type) = type[4]; //! Width of the tail
|
||||
function ringterm_hole(type) = type[5]; //! Wire hole diameter
|
||||
function ringterm_thickness(type) = type[6]; //! Metal thickness
|
||||
function ringterm_screw(type) = type[7]; //! Screw type
|
||||
function ringterm_crimp_length(type) = type[8]; //! If non-zero the length of the crimp tube
|
||||
function ringterm_extent(type) = ringterm_length(type) / sqrt(2); //! Space to leave
|
||||
|
||||
module ring_terminal(type) { //! Draw specifeid ring terminal
|
||||
screw = ringterm_screw(type);
|
||||
d = 2 * screw_radius(screw);
|
||||
vitamin(str("ring_terminal(", type[0], "): Ring terminal ",d,"mm"));
|
||||
crimp = ringterm_crimp_length(type);
|
||||
vitamin(str("ring_terminal(", type[0], "): Ring terminal ", crimp ? "crimp " : "", d, "mm"));
|
||||
|
||||
t = ringterm_thickness(type);
|
||||
w = ringterm_width(type);
|
||||
od = ringterm_od(type);
|
||||
id = ringterm_id(type);
|
||||
l = ringterm_length(type);
|
||||
angle = 45;
|
||||
bend = washer_radius(screw_washer(screw)) + t * tan(angle / 2);
|
||||
angle = crimp ? 0 : 45;
|
||||
transition = 1;
|
||||
bend = crimp ? l - od / 2 - crimp - transition : washer_radius(screw_washer(screw)) + t * tan(angle / 2);
|
||||
hole_d = ringterm_hole(type);
|
||||
|
||||
module hull_if_crimp()
|
||||
if(crimp)
|
||||
hull()
|
||||
children();
|
||||
else
|
||||
children();
|
||||
|
||||
color("silver") union() {
|
||||
tube(or = od / 2, ir = id / 2, h = t, center = false);
|
||||
linear_extrude(height = t)
|
||||
difference() {
|
||||
hull_if_crimp() {
|
||||
circle(d = od);
|
||||
|
||||
translate([-w / 2, -bend, 0])
|
||||
cube([w, bend - id / 2, t]);
|
||||
translate([-w / 2, -bend, 0])
|
||||
square([w, bend - id / 2]);
|
||||
}
|
||||
circle(d = id);
|
||||
}
|
||||
|
||||
translate([0, -bend])
|
||||
rotate([-angle, 0, 0])
|
||||
linear_extrude(height = t)
|
||||
difference() {
|
||||
length = l - od / 2 - bend;
|
||||
hull() {
|
||||
translate([-w / 2, -eps])
|
||||
square([w, eps]);
|
||||
if(crimp) {
|
||||
translate([0, -bend, w / 2])
|
||||
rotate([90, 0, 0]) {
|
||||
render() difference() {
|
||||
union() {
|
||||
translate_z(transition)
|
||||
cylinder(d = w, h = crimp);
|
||||
|
||||
translate([0, -length + w / 2])
|
||||
circle(d = w);
|
||||
hull() {
|
||||
translate_z(transition)
|
||||
cylinder(d = w, h = eps);
|
||||
|
||||
translate([-w / 2, -w / 2])
|
||||
cube([w, t, eps]);
|
||||
}
|
||||
}
|
||||
translate([0, -length + w / 2])
|
||||
circle(d = ringterm_hole(type));
|
||||
hull() {
|
||||
translate_z(-eps)
|
||||
cylinder(d = w - 2 * t, h = crimp + transition + 2 * eps);
|
||||
|
||||
translate([-w / 2 + t, -w / 2 + t])
|
||||
cube([w - 2 * t, w / 2 - t, eps]);
|
||||
}
|
||||
translate([0, w / 2])
|
||||
cube([0.1, w, 100], center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
translate([0, -bend])
|
||||
rotate([-angle, 0, 0])
|
||||
linear_extrude(height = t)
|
||||
difference() {
|
||||
length = l - od / 2 - bend;
|
||||
hull() {
|
||||
translate([-w / 2, -eps])
|
||||
square([w, eps]);
|
||||
|
||||
translate([0, -length + w / 2])
|
||||
circle(d = w);
|
||||
}
|
||||
if(hole_d)
|
||||
translate([0, -length + w / 2])
|
||||
circle(d = hole_d);
|
||||
}
|
||||
}
|
||||
translate_z(ringterm_thickness(type))
|
||||
children();
|
||||
|
@@ -20,16 +20,17 @@
|
||||
//
|
||||
// Ring terminals
|
||||
//
|
||||
// o i l w h t s
|
||||
// d d e i o h c
|
||||
// n d l i r
|
||||
// g t e c e
|
||||
// t h k w
|
||||
// h
|
||||
// o i l w h t s c
|
||||
// d d e i o h c r
|
||||
// n d l i r i
|
||||
// g t e c e m
|
||||
// t h k w p
|
||||
// h
|
||||
//
|
||||
M3_ringterm = ["M3_ringterm", 6, 3, 12, 3, 1.5, 0.2, M3_dome_screw];
|
||||
M3_ringterm_cs = ["M3_ringterm_cs", 6, 3, 12, 3, 1.5, 0.2, M3_cap_screw];
|
||||
M3_ringterm = ["M3_ringterm", 6, 3, 12, 3, 1.5, 0.2, M3_dome_screw, 0];
|
||||
M3_ringterm_cs = ["M3_ringterm_cs", 6, 3, 12, 3, 1.5, 0.2, M3_cap_screw, 0];
|
||||
M3_ringterm_crimp = ["M3_ringterm_crimp", 5.5, 3, 13, 4.1, 0, 0.7, M3_dome_screw, 4.5];
|
||||
|
||||
ring_terminals = [M3_ringterm, M3_ringterm_cs];
|
||||
ring_terminals = [M3_ringterm, M3_ringterm_cs, M3_ringterm_crimp];
|
||||
|
||||
use <ring_terminal.scad>
|
||||
|
@@ -18,7 +18,7 @@
|
||||
//
|
||||
|
||||
//
|
||||
//! Rocket switch. Also used for neon indicator in the same form factor.
|
||||
//! Rocker switch. Also used for neon indicator in the same form factor.
|
||||
//
|
||||
include <../core.scad>
|
||||
use <spade.scad>
|
||||
|
@@ -110,7 +110,7 @@ screw_lists = [
|
||||
[ M2_cap_screw, M2p5_cap_screw, M3_cap_screw, M4_cap_screw, M5_cap_screw, M6_cap_screw, M8_cap_screw],
|
||||
[ 0, 0, M3_low_cap_screw],
|
||||
[ 0, 0, M3_hex_screw, M4_hex_screw, M5_hex_screw, M6_hex_screw, M8_hex_screw],
|
||||
[ 0, M2p5_pan_screw, M3_pan_screw, M4_pan_screw, No632_pan_screw, M5_pan_screw, M6_pan_screw],
|
||||
[ 0, M2p5_pan_screw, M3_pan_screw, M4_pan_screw, M5_pan_screw, M6_pan_screw, No632_pan_screw],
|
||||
[ 0, No2_screw, No4_screw, No6_screw, No6_cs_screw],
|
||||
[ 0, M2_cs_cap_screw,M3_cs_cap_screw, M4_cs_cap_screw],
|
||||
[ 0, 0, M3_dome_screw, M4_dome_screw],
|
||||
|
@@ -27,7 +27,8 @@
|
||||
spool_300x88 = ["spool_300x88", 300, 88, 43, 6, 8, 52, 214, 300];
|
||||
spool_300x85 = ["spool_300x85", 300, 85, 60, 4, 8, 52, 250, 280];
|
||||
spool_200x55 = ["spool_200x55", 200, 55, 40, 5, 5, 52, 200, 200];
|
||||
spool_200x60 = ["spool_200x60", 200, 60, 60, 5, 2, 52, 78, 191]; // 3D Filaprint
|
||||
|
||||
spools = [spool_200x55, spool_300x85, spool_300x88];
|
||||
spools = [spool_200x55, spool_200x60, spool_300x85, spool_300x88];
|
||||
|
||||
use <spool.scad>
|
||||
|
@@ -48,11 +48,12 @@ module ziptie(type, r, t = 0) //! Draw specified ziptie wrapped around radius ``
|
||||
tangents = rounded_polygon_tangents(outside_path);
|
||||
length = ceil(rounded_polygon_length(outside_path, tangents) + ziptie_tail(type) + latch.z + 1);
|
||||
len = length <= 100 ? 100 : length;
|
||||
width = ziptie_width(type);
|
||||
|
||||
vitamin(str("ziptie(", type[0], ", ", r, "): Ziptie ", len, "mm min length"));
|
||||
vitamin(str("ziptie(", type[0], ", ", r, "): Ziptie ", width, "mm x ", len, "mm min length"));
|
||||
|
||||
color(ziptie_colour(type)){
|
||||
linear_extrude(height = ziptie_width(type), center = true)
|
||||
linear_extrude(height = width, center = true)
|
||||
difference() {
|
||||
rounded_polygon(outside_path, tangents);
|
||||
rounded_polygon(inside_path);
|
||||
|