1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-09-03 12:22:46 +02:00

Compare commits

...

29 Commits

Author SHA1 Message Date
Chris
9d4d5aba17 veroboard_assembly() renamed veroboard_fastened_assembly().
veroboard_assembly() now doesn't include the fasteners.
2023-03-10 21:24:42 +00:00
Chris
d939401183 Added vero_grid_pos() function. 2023-03-10 21:11:03 +00:00
Chris
584542f87a Added fastons. 2023-03-10 21:09:28 +00:00
Chris
62372a049b The wire() module can now draw wires if a path is specified. 2023-03-10 20:49:41 +00:00
Chris
14698e5203 Added PTFE heatshrink sleeving. 2023-03-10 17:25:26 +00:00
Chris
14f6bb533a Added sleeving_length to al_clad_resistor_assembly(). 2023-03-10 16:04:17 +00:00
Chris
01e9aae698 Added TO220_size() and TO220_lead_pos(i, l). 2023-03-10 15:46:57 +00:00
Chris Palmer
27f9b242f2 Added crystal, transistors, diode and LEDs to Arduino Uno. 2023-02-04 00:09:16 +00:00
Chris Palmer
f07fda70cd Wire links can now be sleeved. 2023-02-03 10:02:53 +00:00
Chris Palmer
abf1f1ab3f PCB blocks can now have rounded edges for more realistic cans. 2023-02-01 18:31:33 +00:00
Chris Palmer
df06d1f57f Upated changelog. 2023-02-01 01:33:04 +00:00
Chris Palmer
470d6d6216 Started radial components with crystals. 2023-02-01 01:31:06 +00:00
Chris Palmer
0e5e15a747 Added SOIC14 package. 2023-02-01 01:29:34 +00:00
Chris Palmer
3f84912e55 Added rounded_top_rectangle(). 2023-02-01 01:27:01 +00:00
Chris Palmer
ff7041c285 Updated changelog. 2023-01-29 06:56:40 +00:00
Chris Palmer
dd8a100d9c Merge branch 'elliotf-add-orange-pi-zero-2' 2023-01-29 06:54:28 +00:00
Chris Palmer
01eeafb255 Updated images and readme. 2023-01-29 06:54:02 +00:00
Chris Palmer
dd876c8fc9 Added vertical USB connector to PCB test. 2023-01-29 06:53:07 +00:00
Chris Palmer
ff40a276e1 Fixed display position in tests. 2023-01-29 06:52:30 +00:00
Chris Palmer
463c620cc3 Made a new row of PCBs in the test. 2023-01-29 06:41:47 +00:00
Chris Palmer
7b1a916043 Fixed vAx1 dimensions, removed flange and repositioned the tongue. 2023-01-29 06:20:35 +00:00
Chris Palmer
1a2a9bb512 Merge branch 'add-orange-pi-zero-2' of https://github.com/elliotf/NopSCADlib into elliotf-add-orange-pi-zero-2 2023-01-28 20:35:54 +00:00
Chris Palmer
adcb515d20 Updated changelog. 2023-01-28 20:27:50 +00:00
Chris Palmer
34719c3360 Box shelves now have screws in the corners to hold them down. 2023-01-28 20:25:38 +00:00
Chris Palmer
024439d4c2 Can now specify short inserts to be used for butt_boxes. 2023-01-28 20:22:53 +00:00
Chris Palmer
005c112ba9 Added values to the SMD capacitors on the example PCB. 2023-01-28 20:21:09 +00:00
Chris Palmer
dfbcbf84ab Changed OpenGrab link as nicadrone.com has gone. 2023-01-28 20:15:15 +00:00
Elliot Foster
de051343d0 WiP of an Orange Pi Zero 2 PCB 2023-01-28 13:37:47 -06:00
Chris Palmer
b6e47ed9b7 Updated changelog. 2023-01-24 09:59:02 +00:00
44 changed files with 960 additions and 192 deletions

View File

@@ -3,6 +3,49 @@
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
### [v20.23.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.23.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.22.0...v20.23.0 "diff with v20.22.0")
* 2023-02-01 [`470d6d6`](https://github.com/nophead/NopSCADlib/commit/470d6d6216b1cef8ce6cafd4b14300edb62eac4a "show commit") [C.P.](# "Chris Palmer") Started radial components with crystals.
* 2023-02-01 [`0e5e15a`](https://github.com/nophead/NopSCADlib/commit/0e5e15a747fed6b4ef434c9796bef6cb9e658c0e "show commit") [C.P.](# "Chris Palmer") Added SOIC14 package.
* 2023-02-01 [`3f84912`](https://github.com/nophead/NopSCADlib/commit/3f84912e555cd4f7e97e7cac3091260fe969df4c "show commit") [C.P.](# "Chris Palmer") Added `rounded_top_rectangle()`.
### [v20.22.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.22.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.21.0...v20.22.0 "diff with v20.21.0")
* 2023-01-29 [`01eeafb`](https://github.com/nophead/NopSCADlib/commit/01eeafb2552a4fcc735e85e8d0e7c0855c18be8c "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
* 2023-01-29 [`dd876c8`](https://github.com/nophead/NopSCADlib/commit/dd876c8fc9f2658332c1c3200a6a67e1b78a8f64 "show commit") [C.P.](# "Chris Palmer") Added vertical USB connector to PCB test.
* 2023-01-29 [`ff40a27`](https://github.com/nophead/NopSCADlib/commit/ff40a276e1a37836ab011689e849da76ce19d4a7 "show commit") [C.P.](# "Chris Palmer") Fixed display position in tests.
* 2023-01-29 [`463c620`](https://github.com/nophead/NopSCADlib/commit/463c620cc3053428ecf7ca6360477992b9538978 "show commit") [C.P.](# "Chris Palmer") Made a new row of PCBs in the test.
* 2023-01-29 [`7b1a916`](https://github.com/nophead/NopSCADlib/commit/7b1a9160434f5b000c83f03d39305f73b0bbf646 "show commit") [C.P.](# "Chris Palmer") Fixed vAx1 dimensions, removed flange and repositioned the tongue.
* 2023-01-28 [`de05134`](https://github.com/nophead/NopSCADlib/commit/de051343d01e57b5e0c43a5f8de69eb508bd86ca "show commit") [E.F.](# "Elliot Foster") WiP of an Orange Pi Zero 2 PCB
### [v20.21.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.21.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.20.1...v20.21.0 "diff with v20.20.1")
* 2023-01-28 [`34719c3`](https://github.com/nophead/NopSCADlib/commit/34719c33607f8720701eb59719af337cb4a1b777 "show commit") [C.P.](# "Chris Palmer") Box shelves now have screws in the corners to hold them down.
* 2023-01-28 [`024439d`](https://github.com/nophead/NopSCADlib/commit/024439d4c2d0f302027d130584cedadb6d9d14a9 "show commit") [C.P.](# "Chris Palmer") Can now specify short inserts to be used for `butt_boxes`.
#### [v20.20.1](https://github.com/nophead/NopSCADlib/releases/tag/v20.20.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.20.0...v20.20.1 "diff with v20.20.0")
* 2023-01-28 [`005c112`](https://github.com/nophead/NopSCADlib/commit/005c112ba9fc210f88fa82cf638108dbe0b20f26 "show commit") [C.P.](# "Chris Palmer") Added values to the SMD capacitors on the example PCB.
* 2023-01-28 [`dfbcbf8`](https://github.com/nophead/NopSCADlib/commit/dfbcbf84ab57a2c70aaf5b1fa26668278b6993d3 "show commit") [C.P.](# "Chris Palmer") Changed OpenGrab link as `nicadrone.com` has gone.
### [v20.20.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.20.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.19.1...v20.20.0 "diff with v20.19.1")
* 2023-01-24 [`e7e9313`](https://github.com/nophead/NopSCADlib/commit/e7e9313e71fb2b30aca142ceded2dc5615695071 "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
* 2023-01-23 [`dab06ce`](https://github.com/nophead/NopSCADlib/commit/dab06ce4ca771787aa625d1370b4f2b779580315 "show commit") [E.F.](# "Elliot Foster") Add Raspberry Pi 3 A+ to pcbs
#### [v20.19.1](https://github.com/nophead/NopSCADlib/releases/tag/v20.19.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v20.19.0...v20.19.1 "diff with v20.19.0")
* 2023-01-24 [`494002a`](https://github.com/nophead/NopSCADlib/commit/494002aebeda560e65ca4f8cb3794707487a3c2a "show commit") [C.P.](# "Chris Palmer") Added test to MP1584EN PCB.
* 2023-01-24 [`77e948f`](https://github.com/nophead/NopSCADlib/commit/77e948f43c911442211bcbf6d1b1520184d2c70b "show commit") [C.P.](# "Chris Palmer") Added can bus connectors to OpenGrab model.
Tweaked some PCB component positions.
* 2023-01-24 [`543cdb4`](https://github.com/nophead/NopSCADlib/commit/543cdb4e01d38308a06d4368ebabadb85c696567 "show commit") [C.P.](# "Chris Palmer") Incresed the clearance of holes made for pin header.
### [v20.19.0](https://github.com/nophead/NopSCADlib/releases/tag/v20.19.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v20.18.1...v20.19.0 "diff with v20.18.1")
* 2023-01-12 [`ebd50ba`](https://github.com/nophead/NopSCADlib/commit/ebd50bae535283b94b310ee74c9b98b2e3b7f8be "show commit") [C.P.](# "Chris Palmer") Added SMD diodes, inductors and potentiometers.
Complete set of components added to MP1584EN buck regulator.

View File

@@ -37,6 +37,7 @@ include <vitamins/components.scad>
include <vitamins/displays.scad>
include <vitamins/extrusions.scad>
include <vitamins/extrusion_brackets.scad>
include <vitamins/fastons.scad>
include <vitamins/geared_steppers.scad>
include <vitamins/hot_ends.scad>
include <vitamins/inserts.scad>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1007 KiB

After

Width:  |  Height:  |  Size: 0 B

View File

@@ -63,6 +63,7 @@ use <tests/drag_chain.scad>
use <tests/extrusions.scad>
use <tests/extrusion_brackets.scad>
use <tests/fans.scad>
use <tests/fastons.scad>
use <tests/fuseholder.scad>
use <tests/geared_steppers.scad>
use <tests/hot_ends.scad>
@@ -215,7 +216,7 @@ translate([950, box_y])
box_test();
translate([950, 1400])
translate([950, 1525])
rotate(-90)
bbox_test();
@@ -236,7 +237,7 @@ linear_bearings_y = leadnuts_y + 50;
steppers_y = linear_bearings_y + 110;
sheets_y = steppers_y + 55;
pcbs_y = sheets_y + 60;
displays_y = pcbs_y + 140;
displays_y = pcbs_y + 265;
fans_y = displays_y + 110;
transformers_y = fans_y + 120;
psus_y = transformers_y + 190;
@@ -336,9 +337,10 @@ leds_y = 0;
carriers_y = leds_y + 40;
magnets_y = carriers_y + 40;
spades_y = magnets_y + 20;
buttons_y = spades_y + 20;
jacks_y = buttons_y + 40;
microswitches_y = jacks_y + 40;
fastons_y = spades_y + 20;
buttons_y = fastons_y + 20;
jacks_y = buttons_y + 30;
microswitches_y = jacks_y + 30;
rockers_y = microswitches_y + 40;
toggles_y = rockers_y + 60;
components_y = toggles_y + 40;
@@ -364,6 +366,9 @@ translate([x2 + 70, leds_y])
translate([x2, spades_y])
spades();
translate([x2, fastons_y])
fastons();
translate([x2, buttons_y])
buttons();

View File

@@ -474,16 +474,19 @@ function subst_sheet(type, sheet) =
let(s = box_sheets(type))
sheet ? assert(sheet_thickness(sheet) == sheet_thickness(s)) sheet : s;
module box_shelf_blank(type, sheet = false) { //! Generates a 2D template for a shelf sheet
module box_shelf_blank(type, sheet = false, wall = undef) { //! Generates a 2D template for a shelf sheet
difference() {
sheet_2D(subst_sheet(type, sheet), box_width(type) - bezel_clearance, box_depth(type) - bezel_clearance, 1);
offset(bezel_clearance / 2)
box_corner_quadrants(type, box_width(type), box_depth(type));
box_shelf_screw_positions(type, [], 0, wall)
drill(screw_clearance_radius(box_shelf_screw(type)), 0);
}
}
module box_shelf_screw_positions(type, screw_positions, thickness = 0, wall = undef) { //! Place children at the shelf screw positions
module box_shelf_screw_positions(type, screw_positions, thickness = 0, wall = undef, top_screws = true) { //! Place children at the shelf screw positions
w = is_undef(wall) ? box_wall(type) : wall;
insert = box_shelf_insert(type);
translate_z(-insert_boss_radius(insert, w))
@@ -491,13 +494,22 @@ module box_shelf_screw_positions(type, screw_positions, thickness = 0, wall = un
multmatrix(p)
translate_z(thickness)
children();
r = box_boss_r(type);
inset = box_intrusion(type) - r + (r + insert_boss_radius(insert, w) + bezel_clearance / 2) / sqrt(2);
if(top_screws)
translate_z(thickness)
for(x = [-1, 1], y = [-1, 1])
translate([x * (box_width(type) / 2 - inset), y * (box_depth(type) / 2 - inset)])
rotate(45 * x * (2 + y))
children();
}
module box_shelf_bracket(type, screw_positions, wall = undef) { //! Generates a shelf bracket, the first optional child is a 2D cutout and the second 3D cutouts
w = is_undef(wall) ? box_wall(type) : wall;
insert = box_shelf_insert(type);
lip = 2 * insert_boss_radius(insert, w);
width = insert_length(insert) + w;
width = max(insert_length(insert) + w, lip);
module shape()
difference() {

View File

@@ -51,9 +51,10 @@ function bbox_name(type) = type[8]; //! Optional name if there is more tha
function bbox_skip_blocks(type)= type[9]; //! List of fixing blocks to skip, used to allow a hinged panel for example
function bbox_star_washers(type)= type[10];//! Set to false to remove star washers.
function bbox_thin_blocks(type) = type[11];//! Set for 2 screw blocks instead of three hole fixing blocks.
function bbox_short_inserts(type)= type[12];//! Set to use short inserts in the blocks
function bbox(screw, sheets, base_sheet, top_sheet, span, size, name = "bbox", skip_blocks = [], star_washers = true, thin_blocks = false) = //! Construct the property list for a butt_box
[ screw, sheets, base_sheet, top_sheet, span, size.x, size.y, size.z, name, skip_blocks, star_washers, thin_blocks ];
function bbox(screw, sheets, base_sheet, top_sheet, span, size, name = "bbox", skip_blocks = [], star_washers = true, thin_blocks = false, short_inserts = false) = //! Construct the property list for a butt_box
[ screw, sheets, base_sheet, top_sheet, span, size.x, size.y, size.z, name, skip_blocks, star_washers, thin_blocks, short_inserts ];
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 surface area in m^2
@@ -78,7 +79,8 @@ function corner_block_positions(type) = let(
rotate([z > 0 ? 180 : 0, 0, corner * 90 + (z > 0 ? 90 : 0)])
];
function corner_holes(type) = [for(p = corner_block_positions(type), q = corner_block_holes(bbox_screw(type))) p * q];
function corner_holes(type) = let(short = bbox_short_inserts(type))
[for(p = corner_block_positions(type), q = corner_block_holes(bbox_screw(type), short_insert = short)) p * q];
function fixing_block_positions(type) = let(
width = bbox_width(type),
@@ -112,7 +114,8 @@ function fixing_block_positions(type) = let(
function side_holes(type) = let(
screw = bbox_screw(type),
holes = bbox_thin_blocks(type) ? 2screw_block_holes(screw) : fixing_block_holes(screw))
short = bbox_short_inserts(type),
holes = bbox_thin_blocks(type) ? 2screw_block_holes(screw, short_insert = short) : fixing_block_holes(screw))
[for(p = fixing_block_positions(type), q = holes) p * q];
module bbox_drill_holes(type, t)
@@ -232,6 +235,7 @@ module _bbox_assembly(type, top = true, base = true, left = true, right = true,
tt = sheet_thickness(bbox_top_sheet(type));
star_washers = bbox_star_washers(type);
thin_blocks = bbox_thin_blocks(type);
short = bbox_short_inserts(type);
function is_missing_screw(p) = p.y > depth / 2 - 1 ? !back : false;
@@ -241,14 +245,14 @@ module _bbox_assembly(type, top = true, base = true, left = true, right = true,
let(q = transform([0, 0, 0], p), thickness = q.z > 0 ? tt : bt)
multmatrix(p)
fastened_corner_block_assembly(is_missing_screw(q) && ((q.z > 0) != (q.x > 0)) ? 0 : t, bbox_screw(type), thickness,
is_missing_screw(q) && ((q.z > 0) == (q.x > 0)) ? 0 : t, star_washers = star_washers);
is_missing_screw(q) && ((q.z > 0) == (q.x > 0)) ? 0 : t, star_washers = star_washers, short_insert = short);
h = height / 2 - 1;
for(p = fixing_block_positions(type))
let(q = transform([0, 0, 0], p), thickness = q.z > h ? tt : q.z < -h ? bt : t)
multmatrix(p)
if(thin_blocks)
fastened_2screw_block_assembly(is_missing_screw(q) ? 0 : t, bbox_screw(type), thickness_below = thickness, star_washers = star_washers);
fastened_2screw_block_assembly(is_missing_screw(q) ? 0 : t, bbox_screw(type), thickness_below = thickness, star_washers = star_washers, short_insert = short);
else
fastened_fixing_block_assembly(is_missing_screw(q) ? 0 : t, bbox_screw(type), thickness2 = thickness, star_washers = star_washers);

231
readme.md
View File

@@ -21,33 +21,33 @@ A list of changes classified as breaking, additions or fixes is maintained in [C
## Table of Contents<a name="top"/>
<table><tr>
<th align="left"> Vitamins A-H </th><th align="left"> Vitamins I-Q </th><th align="left"> Vitamins R-Z </th><th align="left"> Printed </th><th align="left"> Utilities </th><th align="left"> Core Utilities </th></tr>
<tr><td> <a href = "#7_segments">7_segments</a> </td><td> <a href = "#IECs">IECs</a> </td><td> <a href = "#Rails">Rails</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 = "#Axials">Axials</a> </td><td> <a href = "#Inserts">Inserts</a> </td><td> <a href = "#Ring_terminals">Ring_terminals</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 = "#BLDC_motors">BLDC_motors</a> </td><td> <a href = "#Jack">Jack</a> </td><td> <a href = "#Rockers">Rockers</a> </td><td> <a href = "#Cable_clip">Cable_clip</a> </td><td> <a href = "#Catenary">Catenary</a> </td><td> <a href = "#Global">Global</a> </td></tr>
<tr><td> <a href = "#Ball_bearings">Ball_bearings</a> </td><td> <a href = "#LDRs">LDRs</a> </td><td> <a href = "#Rod">Rod</a> </td><td> <a href = "#Cable_grommets">Cable_grommets</a> </td><td> <a href = "#Core_xy">Core_xy</a> </td><td> <a href = "#Polyholes">Polyholes</a> </td></tr>
<tr><td> <a href = "#Batteries">Batteries</a> </td><td> <a href = "#LED_meters">LED_meters</a> </td><td> <a href = "#SK_brackets">SK_brackets</a> </td><td> <a href = "#Camera_housing">Camera_housing</a> </td><td> <a href = "#Dogbones">Dogbones</a> </td><td> <a href = "#Rounded_rectangle">Rounded_rectangle</a> </td></tr>
<tr><td> <a href = "#Bearing_blocks">Bearing_blocks</a> </td><td> <a href = "#LEDs">LEDs</a> </td><td> <a href = "#SMDs">SMDs</a> </td><td> <a href = "#Carriers">Carriers</a> </td><td> <a href = "#Fillet">Fillet</a> </td><td> <a href = "#Sphere">Sphere</a> </td></tr>
<tr><td> <a href = "#Belts">Belts</a> </td><td> <a href = "#Leadnuts">Leadnuts</a> </td><td> <a href = "#SSRs">SSRs</a> </td><td> <a href = "#Corner_block">Corner_block</a> </td><td> <a href = "#Gears">Gears</a> </td><td> <a href = "#Teardrops">Teardrops</a> </td></tr>
<tr><td> <a href = "#Blowers">Blowers</a> </td><td> <a href = "#Light_strips">Light_strips</a> </td><td> <a href = "#Screws">Screws</a> </td><td> <a href = "#Door_hinge">Door_hinge</a> </td><td> <a href = "#Hanging_hole">Hanging_hole</a> </td><td></td></tr>
<tr><td> <a href = "#Box_sections">Box_sections</a> </td><td> <a href = "#Linear_bearings">Linear_bearings</a> </td><td> <a href = "#Sealing_strip">Sealing_strip</a> </td><td> <a href = "#Door_latch">Door_latch</a> </td><td> <a href = "#Horiholes">Horiholes</a> </td><td></td></tr>
<tr><td> <a href = "#Bulldogs">Bulldogs</a> </td><td> <a href = "#Magnets">Magnets</a> </td><td> <a href = "#Servo_motors">Servo_motors</a> </td><td> <a href = "#Drag_chain">Drag_chain</a> </td><td> <a href = "#Layout">Layout</a> </td><td></td></tr>
<tr><td> <a href = "#Buttons">Buttons</a> </td><td> <a href = "#Mains_sockets">Mains_sockets</a> </td><td> <a href = "#Shaft_couplings">Shaft_couplings</a> </td><td> <a href = "#Fan_guard">Fan_guard</a> </td><td> <a href = "#Maths">Maths</a> </td><td></td></tr>
<tr><td> <a href = "#Cable_strips">Cable_strips</a> </td><td> <a href = "#Microswitches">Microswitches</a> </td><td> <a href = "#Sheets">Sheets</a> </td><td> <a href = "#Fixing_block">Fixing_block</a> </td><td> <a href = "#Offset">Offset</a> </td><td></td></tr>
<tr><td> <a href = "#Cameras">Cameras</a> </td><td> <a href = "#Microview">Microview</a> </td><td> <a href = "#Spades">Spades</a> </td><td> <a href = "#Flat_hinge">Flat_hinge</a> </td><td> <a href = "#Quadrant">Quadrant</a> </td><td></td></tr>
<tr><td> <a href = "#Circlips">Circlips</a> </td><td> <a href = "#Modules">Modules</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Foot">Foot</a> </td><td> <a href = "#Round">Round</a> </td><td></td></tr>
<tr><td> <a href = "#Components">Components</a> </td><td> <a href = "#Nuts">Nuts</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#Handle">Handle</a> </td><td> <a href = "#Rounded_cylinder">Rounded_cylinder</a> </td><td></td></tr>
<tr><td> <a href = "#DIP">DIP</a> </td><td> <a href = "#O_ring">O_ring</a> </td><td> <a href = "#Stepper_motors">Stepper_motors</a> </td><td> <a href = "#Knob">Knob</a> </td><td> <a href = "#Rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
<tr><td> <a href = "#D_connectors">D_connectors</a> </td><td> <a href = "#Opengrab">Opengrab</a> </td><td> <a href = "#Swiss_clips">Swiss_clips</a> </td><td> <a href = "#LED_bezel">LED_bezel</a> </td><td> <a href = "#Rounded_triangle">Rounded_triangle</a> </td><td></td></tr>
<tr><td> <a href = "#Displays">Displays</a> </td><td> <a href = "#PCB">PCB</a> </td><td> <a href = "#Terminals">Terminals</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 = "#Extrusion_brackets">Extrusion_brackets</a> </td><td> <a href = "#PCBs">PCBs</a> </td><td> <a href = "#Toggles">Toggles</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 = "#Extrusions">Extrusions</a> </td><td> <a href = "#PSUs">PSUs</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td> <a href = "#Pocket_handle">Pocket_handle</a> </td><td> <a href = "#Thread">Thread</a> </td><td></td></tr>
<tr><td> <a href = "#Fans">Fans</a> </td><td> <a href = "#Panel_meters">Panel_meters</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td> <a href = "#Press_fit">Press_fit</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td> <a href = "#Printed_box">Printed_box</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#Pillow_blocks">Pillow_blocks</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td> <a href = "#Printed_pulleys">Printed_pulleys</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Pin_headers">Pin_headers</a> </td><td> <a href = "#Washers">Washers</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Potentiometers">Potentiometers</a> </td><td> <a href = "#Wire">Wire</a> </td><td> <a href = "#SSR_shroud">SSR_shroud</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td> <a href = "#Zipties">Zipties</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
<tr><td></td><td></td><td></td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#7_segments">7_segments</a> </td><td> <a href = "#IECs">IECs</a> </td><td> <a href = "#Radials">Radials</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 = "#Axials">Axials</a> </td><td> <a href = "#Inserts">Inserts</a> </td><td> <a href = "#Rails">Rails</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 = "#BLDC_motors">BLDC_motors</a> </td><td> <a href = "#Jack">Jack</a> </td><td> <a href = "#Ring_terminals">Ring_terminals</a> </td><td> <a href = "#Cable_clip">Cable_clip</a> </td><td> <a href = "#Catenary">Catenary</a> </td><td> <a href = "#Global">Global</a> </td></tr>
<tr><td> <a href = "#Ball_bearings">Ball_bearings</a> </td><td> <a href = "#LDRs">LDRs</a> </td><td> <a href = "#Rockers">Rockers</a> </td><td> <a href = "#Cable_grommets">Cable_grommets</a> </td><td> <a href = "#Core_xy">Core_xy</a> </td><td> <a href = "#Polyholes">Polyholes</a> </td></tr>
<tr><td> <a href = "#Batteries">Batteries</a> </td><td> <a href = "#LED_meters">LED_meters</a> </td><td> <a href = "#Rod">Rod</a> </td><td> <a href = "#Camera_housing">Camera_housing</a> </td><td> <a href = "#Dogbones">Dogbones</a> </td><td> <a href = "#Rounded_rectangle">Rounded_rectangle</a> </td></tr>
<tr><td> <a href = "#Bearing_blocks">Bearing_blocks</a> </td><td> <a href = "#LEDs">LEDs</a> </td><td> <a href = "#SK_brackets">SK_brackets</a> </td><td> <a href = "#Carriers">Carriers</a> </td><td> <a href = "#Fillet">Fillet</a> </td><td> <a href = "#Sphere">Sphere</a> </td></tr>
<tr><td> <a href = "#Belts">Belts</a> </td><td> <a href = "#Leadnuts">Leadnuts</a> </td><td> <a href = "#SMDs">SMDs</a> </td><td> <a href = "#Corner_block">Corner_block</a> </td><td> <a href = "#Gears">Gears</a> </td><td> <a href = "#Teardrops">Teardrops</a> </td></tr>
<tr><td> <a href = "#Blowers">Blowers</a> </td><td> <a href = "#Light_strips">Light_strips</a> </td><td> <a href = "#SSRs">SSRs</a> </td><td> <a href = "#Door_hinge">Door_hinge</a> </td><td> <a href = "#Hanging_hole">Hanging_hole</a> </td><td></td></tr>
<tr><td> <a href = "#Box_sections">Box_sections</a> </td><td> <a href = "#Linear_bearings">Linear_bearings</a> </td><td> <a href = "#Screws">Screws</a> </td><td> <a href = "#Door_latch">Door_latch</a> </td><td> <a href = "#Horiholes">Horiholes</a> </td><td></td></tr>
<tr><td> <a href = "#Bulldogs">Bulldogs</a> </td><td> <a href = "#Magnets">Magnets</a> </td><td> <a href = "#Sealing_strip">Sealing_strip</a> </td><td> <a href = "#Drag_chain">Drag_chain</a> </td><td> <a href = "#Layout">Layout</a> </td><td></td></tr>
<tr><td> <a href = "#Buttons">Buttons</a> </td><td> <a href = "#Mains_sockets">Mains_sockets</a> </td><td> <a href = "#Servo_motors">Servo_motors</a> </td><td> <a href = "#Fan_guard">Fan_guard</a> </td><td> <a href = "#Maths">Maths</a> </td><td></td></tr>
<tr><td> <a href = "#Cable_strips">Cable_strips</a> </td><td> <a href = "#Microswitches">Microswitches</a> </td><td> <a href = "#Shaft_couplings">Shaft_couplings</a> </td><td> <a href = "#Fixing_block">Fixing_block</a> </td><td> <a href = "#Offset">Offset</a> </td><td></td></tr>
<tr><td> <a href = "#Cameras">Cameras</a> </td><td> <a href = "#Microview">Microview</a> </td><td> <a href = "#Sheets">Sheets</a> </td><td> <a href = "#Flat_hinge">Flat_hinge</a> </td><td> <a href = "#Quadrant">Quadrant</a> </td><td></td></tr>
<tr><td> <a href = "#Circlips">Circlips</a> </td><td> <a href = "#Modules">Modules</a> </td><td> <a href = "#Spades">Spades</a> </td><td> <a href = "#Foot">Foot</a> </td><td> <a href = "#Round">Round</a> </td><td></td></tr>
<tr><td> <a href = "#Components">Components</a> </td><td> <a href = "#Nuts">Nuts</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Handle">Handle</a> </td><td> <a href = "#Rounded_cylinder">Rounded_cylinder</a> </td><td></td></tr>
<tr><td> <a href = "#DIP">DIP</a> </td><td> <a href = "#O_ring">O_ring</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#Knob">Knob</a> </td><td> <a href = "#Rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
<tr><td> <a href = "#D_connectors">D_connectors</a> </td><td> <a href = "#Opengrab">Opengrab</a> </td><td> <a href = "#Stepper_motors">Stepper_motors</a> </td><td> <a href = "#LED_bezel">LED_bezel</a> </td><td> <a href = "#Rounded_triangle">Rounded_triangle</a> </td><td></td></tr>
<tr><td> <a href = "#Displays">Displays</a> </td><td> <a href = "#PCB">PCB</a> </td><td> <a href = "#Swiss_clips">Swiss_clips</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 = "#Extrusion_brackets">Extrusion_brackets</a> </td><td> <a href = "#PCBs">PCBs</a> </td><td> <a href = "#Terminals">Terminals</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 = "#Extrusions">Extrusions</a> </td><td> <a href = "#PSUs">PSUs</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td> <a href = "#Pocket_handle">Pocket_handle</a> </td><td> <a href = "#Thread">Thread</a> </td><td></td></tr>
<tr><td> <a href = "#Fans">Fans</a> </td><td> <a href = "#Panel_meters">Panel_meters</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td> <a href = "#Press_fit">Press_fit</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
<tr><td> <a href = "#Fastons">Fastons</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td> <a href = "#Printed_box">Printed_box</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Pillow_blocks">Pillow_blocks</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td> <a href = "#Printed_pulleys">Printed_pulleys</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#Pin_headers">Pin_headers</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Potentiometers">Potentiometers</a> </td><td> <a href = "#Washers">Washers</a> </td><td> <a href = "#SSR_shroud">SSR_shroud</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td> <a href = "#Wire">Wire</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td></td><td> <a href = "#Zipties">Zipties</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
<tr><td></td><td></td><td></td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
</table>
@@ -110,7 +110,7 @@ Axial components for PCBs.
| Module | Description |
|:--- |:--- |
| `ax_res(type, value, tol = 5, pitch = 0)` | Through hole axial resistor. If `pitch` is zero the minimum is used. If below the minimum the resistor is placed vertical. |
| `wire_link(d, l, h = 1, tail = 3)` | Draw a wire jumper link. If `l` is zero then a vertical wire is drawn. |
| `wire_link(d, l, h = 1, tail = 3, sleeve = false)` | Draw a wire jumper link. `sleeve` can be a list with the diameter and colour. If `l` is zero then a vertical wire is drawn. |
![axials](tests/png/axials.png)
@@ -124,6 +124,7 @@ Axial components for PCBs.
| 1 | `ax_res(res1_4, 47000)` | Resistor 47000 Ohms 5% 0.25W |
| 1 | `ax_res(res1_2, 8200)` | Resistor 8200 Ohms 5% 0.5W |
| 1 | `ax_res(res1_2, 8250, tol = 1)` | Resistor 8250 Ohms 1% 0.5W |
| 1 | `wire_link(0.8, 7.62, h = 0.75, sleeve = [1.5, "red"])` | Wire link 0.8mm x 0.3" with red sleeving |
| 1 | `wire_link(0.8, 10.16)` | Wire link 0.8mm x 0.4" |
| 1 | `wire_link(0.8, 0, h = 5)` | Wire link 0.8mm x 8mm |
@@ -805,6 +806,8 @@ Various electronic components used in hot ends and heated beds.
### Functions
| Function | Description |
|:--- |:--- |
| `TO220_lead_pos(i, l)` | Position of ith lead end when length = l |
| `TO220_size()` | Size of a TO220 |
| `TO220_thickness()` | Thickness of the tab of a TO220 |
| `TO247_size()` | Body dimensions of a T247, hole offset, lead height and lead wide length |
| `fack2spm_bezel_size()` | FACK2SPM Bezel dimensions |
@@ -816,6 +819,7 @@ Various electronic components used in hot ends and heated beds.
| ` TO220(description, leads = 3, lead_length = 16)` | Draw a TO220 package, use `description` to describe what it is |
| ` TO247(description, lead_length = 20)` | Draw a TO247 package, use `description` to describe what it is |
| `al_clad_resistor(type, value, leads = true)` | Draw an aluminium clad resistor |
| `al_clad_resistor_assembly(type, value, sleeved = true, sleeving = HSHRNK32, sleeving_length = 15)` | Draw aluminium clad resistor with optional sleaving, positions children at the screw positions |
| `al_clad_resistor_hole_positions(type)` | Position children at the screw holes of an aluminium clad resistor |
| `al_clad_resistor_holes(type, h = 100)` | Drill screw holes for an aluminium clad resistor |
| `fack2spm()` | Draw a FACK2SPM Cat5E RJ45 shielded panel mount coupler |
@@ -1191,6 +1195,56 @@ Can draw three styles: solid, open frame and open frame with screw bosses.
| 32 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm |
<a href="#top">Top</a>
---
<a name="Fastons"></a>
## Fastons
Faston receptacles to mate with spade connectors
[vitamins/fastons.scad](vitamins/fastons.scad) Object definitions.
[vitamins/faston.scad](vitamins/faston.scad) Implementation.
[tests/fastons.scad](tests/fastons.scad) Code for this example.
### Properties
| Function | Description |
|:--- |:--- |
| `faston_d_bot(type)` | Radius of bottom corners |
| `faston_d_top(type)` | Radius of the clips |
| `faston_fillet_d(type)` | Fillets at the transition |
| `faston_insul_crimp_d(type)` | Outside diameter of the insulation crimp |
| `faston_insul_crimp_l(type)` | Length of the insulation crimp |
| `faston_insul_crimp_o(type)` | Offset of insulation crimp |
| `faston_insul_crimp_p(type)` | Position of the tip of the insulation crimp |
| `faston_size(type)` | Size of the receptical part |
| `faston_t(type)` | Thickness |
| `faston_wall_h(type)` | Height of transition web wall |
| `faston_width(type)` | Width of matching spade |
| `faston_wire_crimp_d(type)` | Outside diameter of the wire crimp |
| `faston_wire_crimp_l(type)` | Length of the wire crimp |
| `faston_wire_crimp_p(type)` | Position of the tip of the wire crimp |
### Functions
| Function | Description |
|:--- |:--- |
| `faston_insul_stop(type)` | Position where insulation stops |
| `faston_length(type)` | Total length of crimp |
### Modules
| Module | Description |
|:--- |:--- |
| `faston(type, closed = false)` | Draw specified faston |
![fastons](tests/png/fastons.png)
### Vitamins
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 4 | `faston(5_160430_7)` | Faston part no 5_160430_7 to fit 4.75mm spade |
<a href="#top">Top</a>
---
@@ -2242,7 +2296,7 @@ Can be shown stretched by specifying the `actual_id`.
---
<a name="Opengrab"></a>
## Opengrab
Nicodrone OpenGrab V3 electro-permanent magnet, see <https://nicadrone.com/products/epm-v3>.
Nicodrone OpenGrab V3 electro-permanent magnet, see <https://kb.zubax.com/display/MAINKB/OpenGrab+EPM+v3>.
A permanent magnet that can be magnetized and de-magnetized electronically.
@@ -2394,7 +2448,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| Module | Description |
|:--- |:--- |
| `barrel_jack(cutout = false)` | Draw barrel power jack |
| `block(size, colour, makes_cutout, cutouts)` | Draw a coloured cube to represent a random PCB component |
| `block(size, colour, makes_cutout, cutouts, r = 0, rtop = 0)` | Draw a coloured cube to represent a random PCB component |
| `buzzer(height, diameter, colour)` | Draw PCB buzzer with specified height, diameter and colour |
| `chip(length, width, thickness, colour, cutout = false)` | Draw a coloured cube to represent a chip, or other rectangular component, or cylinder if width is zero |
| `flat_flex(type, cutout = false)` | Draw flat flexistrip connector as used on RPI0 |
@@ -2427,6 +2481,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| `usb_C(cutout = false)` | Draw USB C connector |
| `usb_miniA(cutout = false)` | Draw USB mini A connector |
| `usb_uA(cutout = false)` | Draw USB micro A connector |
| `usb_vAx1(cutout = false)` | Draw a vertical USB type A single socket |
| `vero_pin(cropped = false)` | Draw a vero pin |
![pcb](tests/png/pcb.png)
@@ -2436,6 +2491,11 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| ---:|:--- |:---|
| 1 | `potentiometer(BTT_encoder)` | BTT_encoder |
| 1 | `box_header(2p54header, 4, 2)` | Box header 4 x 2 |
| 1 | `rd_xtal(ACT1100, "40MHz")` | Crystal ACT1100 40MHz |
| 1 | `rd_xtal(ACT1700, "80MHz")` | Crystal ACT1700 80MHz |
| 1 | `rd_xtal(C_002RX, "60KHz")` | Crystal C_002RX 60KHz |
| 1 | `rd_xtal(HC49, "4MHz")` | Crystal HC49 4MHz |
| 1 | `rd_xtal(HC49_4H, "10MHz")` | Crystal HC49_4H 10MHz |
| 1 | `d_plug(DCONN9, pcb = true)` | D-type 9 way PCB mount plug |
| 1 | `dil_socket(12, 15.24)` | DIL socket 24 x 0.6" |
| 1 | `smd_diode(DO241AC)` | DO241AC package SS34 |
@@ -2466,12 +2526,13 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `smd_led(LED0603, orange)` | SMD LED 0603 orange |
| 1 | `smd_led(LED0805, red)` | SMD LED 0805 red |
| 1 | `smd_led(LED1206, blue)` | SMD LED 1306 blue |
| 1 | `smd_capacitor(CAP0603)` | SMD capacitor 0603 |
| 1 | `smd_capacitor(CAP0805)` | SMD capacitor 0805 |
| 1 | `smd_capacitor(CAP1206)` | SMD capacitor 1206 |
| 1 | `smd_capacitor(CAP0603)` | SMD capacitor 0603 10nF |
| 1 | `smd_capacitor(CAP0805)` | SMD capacitor 0805 100nF |
| 1 | `smd_capacitor(CAP1206)` | SMD capacitor 1206 1uF |
| 1 | `smd_resistor(RES0603, 1K)` | SMD resistor 0603 1K 0.1W |
| 1 | `smd_resistor(RES0805, 1K)` | SMD resistor 0805 1K 0.125W |
| 1 | `smd_resistor(RES1206, 1K)` | SMD resistor 1206 1K 0.25W |
| 1 | `smd_soic(SOIC14)` | SOIC14 package 74HC00 |
| 1 | `smd_soic(SOIC16)` | SOIC16 package ICL323 |
| 1 | `smd_soic(SOIC18)` | SOIC18 package PIC18F88 |
| 1 | `smd_soic(SOIC8)` | SOIC8 package M34063 |
@@ -2494,6 +2555,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 2 | `vero_pin()` | Vero board pin |
| 1 | `wire_link(0.8, 5.08, h = 10.16)` | Wire link 0.8mm x 0.2" |
| 1 | `wire_link(0.8, 10.16)` | Wire link 0.8mm x 0.4" |
| 1 | `wire_link(0.8, 10.16, h = 0.75, sleeve = [1.5, "red"])` | Wire link 0.8mm x 0.4" with red sleeving |
| 1 | `wire_link(0.8, 0, h = 5)` | Wire link 0.8mm x 8mm |
@@ -2553,7 +2615,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| Module | Description |
|:--- |:--- |
| `barrel_jack(cutout = false)` | Draw barrel power jack |
| `block(size, colour, makes_cutout, cutouts)` | Draw a coloured cube to represent a random PCB component |
| `block(size, colour, makes_cutout, cutouts, r = 0, rtop = 0)` | Draw a coloured cube to represent a random PCB component |
| `buzzer(height, diameter, colour)` | Draw PCB buzzer with specified height, diameter and colour |
| `chip(length, width, thickness, colour, cutout = false)` | Draw a coloured cube to represent a chip, or other rectangular component, or cylinder if width is zero |
| `flat_flex(type, cutout = false)` | Draw flat flexistrip connector as used on RPI0 |
@@ -2586,6 +2648,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| `usb_C(cutout = false)` | Draw USB C connector |
| `usb_miniA(cutout = false)` | Draw USB mini A connector |
| `usb_uA(cutout = false)` | Draw USB micro A connector |
| `usb_vAx1(cutout = false)` | Draw a vertical USB type A single socket |
| `vero_pin(cropped = false)` | Draw a vero pin |
![pcbs](tests/png/pcbs.png)
@@ -2616,14 +2679,15 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `pcb(MP1584EN)` | MP1584EN 3A buck converter |
| 1 | `pcb(MT3608)` | MT3608 boost converter module |
| 1 | `pcb(Melzi)` | Melzi electronics - not shown |
| 5 | | Micro SD card |
| 6 | | Micro SD card |
| 1 | | Micro SD card - not shown |
| 1 | `molex_254(2)` | Molex KK header 2 way - not shown |
| 1 | `molex_254(3)` | Molex KK header 3 way - not shown |
| 20 | `nut(M2_nut, nyloc = true)` | Nut M2 x 1.6mm nyloc |
| 34 | `nut(M2p5_nut, nyloc = true)` | Nut M2.5 x 2.2mm nyloc |
| 36 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
| 40 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
| 8 | `nut(M4_nut, nyloc = true)` | Nut M4 x 3.2mm nyloc |
| 1 | `pcb(OPZ2)` | Orange Pi Zero 2 |
| 1 | `pcb(PI_IO)` | PI_IO V2 - not shown |
| 1 | `pcb(PSU12V1A)` | PSU 12V 1A - not shown |
| 1 | `pcb(PERF60x40)` | Perfboard 60 x 40mm |
@@ -2646,11 +2710,11 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 12 | `screw(M2p5_cap_screw, 30)` | Screw M2.5 cap x 30mm |
| 4 | `screw(M2p5_pan_screw, 20)` | Screw M2.5 pan x 20mm |
| 8 | `screw(M2p5_pan_screw, 25)` | Screw M2.5 pan x 25mm |
| 8 | `screw(M3_cap_screw, 16)` | Screw M3 cap x 16mm |
| 6 | `screw(M3_cap_screw, 20)` | Screw M3 cap x 20mm |
| 17 | `screw(M3_cap_screw, 16)` | Screw M3 cap x 16mm |
| 15 | `screw(M3_cap_screw, 20)` | Screw M3 cap x 20mm |
| 8 | `screw(M3_cap_screw, 30)` | Screw M3 cap x 30mm |
| 14 | `screw(M3_cap_screw, 35)` | Screw M3 cap x 35mm |
| 8 | `screw(M4_cap_screw, 40)` | Screw M4 cap x 40mm |
| 4 | `screw(M4_cap_screw, 20)` | Screw M4 cap x 20mm |
| 4 | `screw(M4_cap_screw, 25)` | Screw M4 cap x 25mm |
| 1 | `pcb(XIAO)` | Seeeduino XIAO |
| 1 | `pcb(TP4056)` | TP4056 Li-lon Battery charger module |
| 3 | `terminal_35(2)` | Terminal block 2 way 3.5mm - not shown |
@@ -2659,7 +2723,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `pcb(WD2002SJ)` | WD2002SJ Buck Boost DC-DC converter |
| 20 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm |
| 34 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm |
| 36 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
| 40 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
| 8 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm |
| 1 | `pcb(ZC_A0591)` | ZC-A0591 ULN2003 driver PCB |
@@ -2675,22 +2739,19 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 4 | pcb_spacer25140.stl |
| 4 | pcb_spacer25150_2.stl |
| 4 | pcb_spacer25160_2.stl |
| 4 | pcb_spacer25180.stl |
| 4 | pcb_spacer25190.stl |
| 4 | pcb_spacer25200.stl |
| 4 | pcb_spacer25210.stl |
| 2 | pcb_spacer2550.stl |
| 4 | pcb_spacer2590.stl |
| 4 | pcb_spacer30170.stl |
| 4 | pcb_spacer30210.stl |
| 5 | pcb_spacer30220.stl |
| 5 | pcb_spacer30230.stl |
| 4 | pcb_spacer30240.stl |
| 4 | pcb_spacer3050.stl |
| 4 | pcb_spacer3060.stl |
| 2 | pcb_spacer3070.stl |
| 4 | pcb_spacer3080.stl |
| 4 | pcb_spacer40250.stl |
| 4 | pcb_spacer40260.stl |
| 4 | pcb_spacer30180.stl |
| 8 | pcb_spacer3050.stl |
| 9 | pcb_spacer3060.stl |
| 7 | pcb_spacer3070.stl |
| 8 | pcb_spacer3080.stl |
| 4 | pcb_spacer40100.stl |
| 4 | pcb_spacer4090.stl |
<a href="#top">Top</a>
@@ -3052,6 +3113,46 @@ Timing belt pulleys, both toothed and plain with internal bearings for idlers.
| 1 | `screw(M4_grub_screw, 6)` | Screw M4 grub x 6mm |
<a href="#top">Top</a>
---
<a name="Radials"></a>
## Radials
Radial components for PCBs.
[vitamins/radials.scad](vitamins/radials.scad) Object definitions.
[vitamins/radial.scad](vitamins/radial.scad) Implementation.
[tests/radials.scad](tests/radials.scad) Code for this example.
### Properties
| Function | Description |
|:--- |:--- |
| `rd_xtal_flange(type)` | Crystal flange width and thickness |
| `rd_xtal_lead_d(type)` | Crystal lead diameter |
| `rd_xtal_pitch(type)` | Crystal lead pitch |
| `rd_xtal_size(type)` | Crystal length, width and height and optional corner radius |
### Modules
| Module | Description |
|:--- |:--- |
| `cylindrical_wrap(r, h = eps)` | Wrap a 2D child extruded to height `h` around a cylinder with radius `r`. |
| `rd_xtal(type, value, z = 0, pitch = undef, tail = 3)` | Draw a crystal |
![radials](tests/png/radials.png)
### Vitamins
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 1 | `rd_xtal(ACT1100, "ACT1100")` | Crystal ACT1100 ACT1100 |
| 1 | `rd_xtal(ACT1700, "ACT1700")` | Crystal ACT1700 ACT1700 |
| 1 | `rd_xtal(C_002RX, "C_002RX")` | Crystal C_002RX C_002RX |
| 1 | `rd_xtal(HC49, "HC49")` | Crystal HC49 HC49 |
| 1 | `rd_xtal(HC49_4H, "HC49_4H")` | Crystal HC49_4H HC49_4H |
| 1 | `pcb(PERF60x40)` | Perfboard 60 x 40mm |
<a href="#top">Top</a>
---
@@ -3747,6 +3848,7 @@ Surface mount components for PCBs.
| 1 | `smd_resistor(RES0603, 1R0)` | SMD resistor 0603 1R0 0.1W |
| 1 | `smd_resistor(RES0805, 10M)` | SMD resistor 0805 10M 0.125W |
| 1 | `smd_resistor(RES1206, 100K)` | SMD resistor 1206 100K 0.25W |
| 1 | `smd_soic(SOIC14)` | SOIC14 package SOIC14 |
| 1 | `smd_soic(SOIC16)` | SOIC16 package SOIC16 |
| 1 | `smd_soic(SOIC18)` | SOIC18 package SOIC18 |
| 1 | `smd_soic(SOIC8)` | SOIC8 package SOIC8 |
@@ -4227,6 +4329,8 @@ Tubing and sleeving. The internal diameter can be forced to stretch it over some
| 1 | `tubing(HSHRNK24)` | Heatshrink sleeving ID 2.4mm x 15mm |
| 1 | `tubing(HSHRNK64)` | Heatshrink sleeving ID 6.4mm x 15mm |
| 1 | `tubing(NEOP85)` | Neoprene tubing OD 8mm ID 5mm x 15mm |
| 1 | `tubing(STFE4_3p2_CLR)` | PTFE heatshrink sleeving OD 3.7mm ID 3.2mm x 15mm |
| 1 | `tubing(STFE4_6p4_CLR)` | PTFE heatshrink sleeving OD 7mm ID 6.4mm x 15mm |
| 1 | `tubing(PTFE07)` | PTFE sleeving OD 1.2mm ID 0.71mm x 15mm |
| 1 | `tubing(PTFE20)` | PTFE sleeving OD 2.6mm ID 2mm x 15mm |
| 1 | `tubing(PTFE2_3)` | PTFE tubing OD 3mm ID 2mm x 15mm |
@@ -4320,6 +4424,7 @@ Veroboard with mounting holes, track breaks, removed tracks, solder points and c
| Function | Description |
|:--- |:--- |
| `vero(name, assembly, holes, strips, pitch = 2.54, fr4 = false, screw = M3_cap_screw, mounting_holes = [], breaks = [], no_tracks = [], components = [], joints = [])` | Constructor |
| `vero_grid_pos(type, x, y)` | Convert grid position to offset from the centre |
| `vero_length(type)` | Length of the board |
| `vero_size(type)` | Board size |
| `vero_thickness(type)` | Thickness of the substrate |
@@ -4336,7 +4441,9 @@ Veroboard with mounting holes, track breaks, removed tracks, solder points and c
| `vero_mounting_hole_positions(type)` | Positions children at the mounting holes |
| `vero_mounting_holes(type, h = 100)` | Drill mounting holes in a panel |
| `veroboard(type)` | Draw specified veroboard with missing tracks and track breaks |
| `veroboard_assembly(type, height, thickness, flip = false, ngb = false)` | Draw the assembly with components and fasteners in place |
| `veroboard_assembly(type, ngb = false)` | Draw the assembly with components |
| `veroboard_fastened_assembly(type, height, thickness, flip = false, ngb = false)` | Draw the assembly with components and fasteners in place |
| `veroboard_fasteners(type, height, thickness, flip = false)` | Draw the fasteners in place |
![veroboard](tests/png/veroboard.png)
@@ -4344,16 +4451,16 @@ Veroboard with mounting holes, track breaks, removed tracks, solder points and c
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 2 | `idc_transition(2p54header, 10)` | IDC transition header 10 x 2 |
| 4 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
| 4 | `screw(M3_dome_screw, 25)` | Screw M3 dome x 25mm |
| 2 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
| 2 | `screw(M3_dome_screw, 25)` | Screw M3 dome x 25mm |
| 2 | `green_terminal(gt_2p54, 10)` | Terminal block 10 way 0.1" |
| 2 | `veroboard(z_vb)` | Veroboard 5 holes x 22 strips |
| 8 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
| 4 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
### Printed
| Qty | Filename |
| ---:|:--- |
| 4 | pcb_spacer30120.stl |
| 2 | pcb_spacer30120.stl |
### Assemblies
| Qty | Name |
@@ -4491,7 +4598,7 @@ Utilities for adding wires to the BOM and optionally drawing them and cable bund
| `cable_tie_holes(cable_r, h = 100)` | Holes to thread a ziptie through a panel to make a cable tie. |
| `mouse_hole(cable, h = 100, teardrop = false)` | A mouse hole to allow a panel to go over a wire bundle. |
| `ribbon_cable(ways, length)` | Add ribbon cable to the BOM |
| `wire(colour, strands, length, strand = 0.2)` | Add stranded wire to the BOM |
| `wire(colour, strands, length, strand = 0.2, d = 0, path = [])` | Add stranded wire to the BOM and draw it if diameter and path specified |
![wire](tests/png/wire.png)
@@ -4617,10 +4724,10 @@ The top bezel can have an optional child, which is subtracted to allow modificat
| `box_left_blank(type, sheet = false)` | Generates a 2D template for the left sheet, `sheet` can be set to override the type |
| `box_right(type)` | Default right side, can be overridden to customise |
| `box_right_blank(type, sheet = false)` | Generates a 2D template for the right sheet, `sheet` can be set to override the type |
| `box_shelf_blank(type, sheet = false)` | Generates a 2D template for a shelf sheet |
| `box_shelf_blank(type, sheet = false, wall = undef)` | Generates a 2D template for a shelf sheet |
| `box_shelf_bracket(type, screw_positions, wall = undef)` | Generates a shelf bracket, the first optional child is a 2D cutout and the second 3D cutouts |
| `box_shelf_bracket_section(type, rows, cols, x, y)` | Generates sections of the shelf bracket to allow it to be bigger than the printer |
| `box_shelf_screw_positions(type, screw_positions, thickness = 0, wall = undef)` | Place children at the shelf screw positions |
| `box_shelf_screw_positions(type, screw_positions, thickness = 0, wall = undef, top_screws = true)` | Place children at the shelf screw positions |
| `box_top(type)` | Default top, can be overridden to customise |
| `box_top_blank(type)` | Generates a 2D template for the top sheet |
| `grill(width, height, r = 1000, poly = false, h = 0)` | A staggered array of 5mm holes to make grills in sheets. Can be constrained to be circular. Set `poly` `true` for printing, `false` for milling. |
@@ -4697,6 +4804,7 @@ fixing_blocks along the sides.
| `bbox_name(type)` | Optional name if there is more than one box in a project |
| `bbox_screw(type)` | Screw type for corner blocks |
| `bbox_sheets(type)` | Sheet type for the sides |
| `bbox_short_inserts(type)` | Set to use short inserts in the blocks |
| `bbox_skip_blocks(type)` | List of fixing blocks to skip, used to allow a hinged panel for example |
| `bbox_span(type)` | Maximum span between fixing blocks |
| `bbox_star_washers(type)` | Set to false to remove star washers. |
@@ -4707,7 +4815,7 @@ fixing_blocks along the sides.
### Functions
| Function | Description |
|:--- |:--- |
| `bbox(screw, sheets, base_sheet, top_sheet, span, size, name = "bbox", skip_blocks = [], star_washers = true, thin_blocks = false)` | Construct the property list for a butt_box |
| `bbox(screw, sheets, base_sheet, top_sheet, span, size, name = "bbox", skip_blocks = [], star_washers = true, thin_blocks = false, short_inserts = false)` | Construct the property list for a butt_box |
| `bbox_area(type)` | Internal surface area in m^2 |
| `bbox_volume(type)` | Internal volume in litres |
@@ -6727,6 +6835,7 @@ Cylinder with a rounded end.
|:--- |:--- |
| `rounded_corner(r, h, r2, ir = 0)` | 2D version |
| `rounded_cylinder(r, h, r2, ir = 0, angle = 360)` | Rounded cylinder given radius `r`, height `h`, optional internal radius `ir` and optional `angle` |
| `rounded_top_rectangle(size, r, r2)` | Make a rounded rectangle with a rounded top edge |
![rounded_cylinder](tests/png/rounded_cylinder.png)

View File

@@ -21,6 +21,7 @@ include <../vitamins/microswitches.scad>
include <../vitamins/d_connectors.scad>
include <../vitamins/leds.scad>
include <../vitamins/axials.scad>
include <../vitamins/radials.scad>
include <../vitamins/smds.scad>
include <../vitamins/7_segments.scad>
include <../vitamins/potentiometers.scad>
@@ -67,24 +68,26 @@ test_pcb = ["test_pcb", "Test PCB",
[ 16, 2, 90, "smd_res", RES1206, "1K"],
[ 19, 2, 90, "smd_res", RES0805, "1K"],
[ 22, 2, 90, "smd_res", RES0603, "1K"],
[ 25, 2, 90, "smd_cap", CAP1206, 1.5],
[ 28, 2, 90, "smd_cap", CAP0805, 1.0],
[ 31, 2, 90, "smd_cap", CAP0603, 0.7],
[ 25, 2, 90, "smd_cap", CAP1206, 1.5, "1uF"],
[ 28, 2, 90, "smd_cap", CAP0805, 1.0, "100nF"],
[ 31, 2, 90, "smd_cap", CAP0603, 0.7, "10nF"],
[ 34, 3, 90, "smd_diode",DO241AC, "SS34"],
[ 22, 6, -90, "smd_pot", TC33X1, "10K"],
[ 21, 6, -90, "smd_pot", TC33X1, "10K"],
[ 16, 6, -90, "smd_sot", SOT23, "2N7000"],
[ 28, 20, -90, "smd_sot", SOT223, "LM117"],
[ 28, 8, -90, "smd_sot", SOT223, "LM117"],
[ 45, 35, 0, "2p54header", 4, 1],
[ 60, 35, 0, "2p54header", 5, 1, false, "blue" ],
[ 80, 33, 0, "2p54boxhdr", 4, 2],
[ 45, 30, 0, "2p54socket", 4, 1, false, 0, false, "red" ],
[ 60, 30, 0, "2p54socket", 6, 1],
[ 10, 10, 0, "2p54header", 4, 1],
[ 25, 10, 0, "2p54header", 5, 1, false, "blue" ],
[ 10, 20, 0, "2p54boxhdr", 4, 2],
[ 10, 30, 0, "2p54socket", 6, 1],
[ 25, 30, 0, "2p54socket", 4, 1, false, 0, false, "red" ],
[ 59, 50, 180, "led", LED3mm, "red"],
[ 66, 50, 180, "led", LED5mm, "orange"],
[ 77, 50, 180, "led", LED8mm, "blue"],
[ 90, 50, 180, "led", LED10mm, "yellow"],
[ 10, 45, 180, "rj45"],
[ 10, 35, 180, "rj45"],
[ 7, 50, 180, "usb_vAx1"],
[ 8, 65, 180, "usb_A"],
[ 8, 105, 180, "usb_Ax2"],
[ 7, 85, 180, "molex_usb_Ax1"],
@@ -102,22 +105,30 @@ test_pcb = ["test_pcb", "Test PCB",
[ 25, 200, 0, "buzzer", 4.5, 8.5],
[ 25, 218, 0, "buzzer"],
[ 65, 9, 0, "link", inch(0.4)],
[ 65, 12, 0, "ax_res", res1_8, 1000],
[ 65, 17, 0, "ax_res", res1_4, 10000],
[ 65, 22, 0, "ax_res", res1_2, 100000],
[ 55, 22, 0, "vero_pin"],
[ 55, 17, 0, "vero_pin", true],
[ 55, 9, 0, "link", 0, 5],
[ 45, 5, 0, "link", inch(0.4), 0.75, undef, undef, [1.5, "red"]], // Sleeved link
[ 45, 9, 0, "link", inch(0.4)], // Flat link
[ 45, 12, 0, "ax_res", res1_8, 1000],
[ 45, 17, 0, "ax_res", res1_4, 10000],
[ 45, 22, 0, "ax_res", res1_2, 100000],
[ 35, 22, 0, "vero_pin"],
[ 35, 17, 0, "vero_pin", true],
[ 35, 9, 0, "link", 0, 5], // Vertical wire
[ 80, 9, 0, "link", inch(0.2), inch(0.4)],
[ 80, 12, 0, "ax_res", res1_8, 1000000, 1, inch(0.1)],
[ 80, 17, 0, "ax_res", res1_4, 100, 2, inch(0.1)],
[ 80, 22, 0, "ax_res", res1_2, 10, 10, inch(0.2)],
[ 60, 9, 0, "link", inch(0.2), inch(0.4)], // Raised link
[ 60, 12, 0, "ax_res", res1_8, 1000000, 1, inch(0.1)],
[ 60, 17, 0, "ax_res", res1_4, 100, 2, inch(0.1)],
[ 60, 22, 0, "ax_res", res1_2, 10, 10, inch(0.2)],
[ 60, 3, 0, "flex"],
[ 50, 15, -90, "flat_flex"],
[ 40, 15, -90, "flat_flex", true],
[ 33, 110, -90, "rd_xtal", HC49, "4MHz" ],
[ 28, 110, -90, "rd_xtal", HC49_4H, "10MHz" ],
[ 28, 103, -90, "rd_xtal", C_002RX, "60KHz", 2 ],
[ 30, 130,-90, "rd_xtal", ACT1100, "40MHz", 0.5 ],
[ 30, 150,-90, "rd_xtal", ACT1700, "80MHz", 0.5 ],
[ 77, 15, -90, "flex"],
[ 95, 15, -90, "flat_flex"],
[ 87, 15, -90, "flat_flex", true],
[ 50, 50, 0, "molex_hdr", 2],
[ 50, 60, 0, "jst_xh", 2],
@@ -146,7 +157,8 @@ test_pcb = ["test_pcb", "Test PCB",
[ 80, 180, 0, "pdip", 8, "NE555" ],
[ 71, 180, 0, "smd_inductor", IND2525, "4R7"],
[ 80, 166, -90, "smd_soic", SOIC18, "PIC18F88"],
[ 87, 166, -90, "smd_soic", SOIC18, "PIC18F88"],
[ 78, 166, -90, "smd_soic", SOIC14, "74HC00"],
[ 71, 166, -90, "smd_soic", SOIC16, "ICL323"],
[ 64, 166, -90, "smd_soic", SOIC8, "M34063"],
[ 80, 150, 0, "chip", 10, 5, 1, grey(20)],
@@ -157,7 +169,7 @@ test_pcb = ["test_pcb", "Test PCB",
[ 50, 240, 0, "potentiometer"],
[ 75, 240, 0, "potentiometer", KY_040_encoder, 8],
[ 30, 85, -90, "7seg", WT5011BSR, 2],
[ 30, 55, -90, "D_plug", DCONN9],
[ 30, 55, -90, "D_plug", DCONN9],
],
// accessories
[]

View File

@@ -39,6 +39,12 @@ module pcbs() {
translate([0, -pcb_width(perfboards[$i]) / 2])
pcb_assembly(perfboards[$i], 5 + $i, 3);
translate([0, 125])
layout([for(p = big_pcbs) spacing(p)], 0)
translate([0, pcb_length(big_pcbs[$i]) / 2])
rotate(90)
pcb_assembly(big_pcbs[$i], 5 + $i, 3);
for(p = pcbs_not_shown)
hidden()
pcb(p);

View File

@@ -28,6 +28,10 @@ module axials() {
rotate(90)
wire_link(0.8, inch(0.4));
pcb_grid(pcb, 1, 1.5)
rotate(90)
wire_link(0.8, inch(0.3), 0.75, sleeve = [1.5, "red"]);
pcb_grid(pcb, 0, 7)
wire_link(0.8, 0, 5);

View File

@@ -24,9 +24,10 @@ use <../vitamins/pcb.scad>
module displays()
layout([for(d = displays) pcb_length(display_pcb(d))], 10)
translate([0, pcb_width(displays[$i]) / 2])
vflip()
display(displays[$i]);
let(d = displays[$i], offset = display_pcb_offset(d))
translate([-offset.x, pcb_width(display_pcb(d)) / 2 - offset.y])
vflip()
display(d);
if($preview)
let($show_threads = true)

35
tests/fastons.scad Normal file
View File

@@ -0,0 +1,35 @@
//
// NopSCADlib Copyright Chris Palmer 2023
// 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 <../utils/core/core.scad>
include <../vitamins/fastons.scad>
module fastons()
for(i = [0, len(fastons) - 1])
translate([i * 20, 0])
let(f = fastons[i]) {
rotate(180)
faston(f);
translate([10, 0])
rotate(180)
faston(f, true);
}
fastons();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 276 KiB

After

Width:  |  Height:  |  Size: 276 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 119 KiB

BIN
tests/png/fastons.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

After

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

After

Width:  |  Height:  |  Size: 278 KiB

BIN
tests/png/radials.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 KiB

After

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 KiB

After

Width:  |  Height:  |  Size: 171 KiB

32
tests/radials.scad Normal file
View File

@@ -0,0 +1,32 @@
//
// NopSCADlib Copyright Chris Palmer 2023
// nop.head@gmail.com
// hydraraptor.blogspot.com
//
// This file is part of NopSCADlib.
//
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
// GNU General Public License as published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
//
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along with NopSCADlib.
// If not, see <https://www.gnu.org/licenses/>.
//
include <../core.scad>
include <../vitamins/pcbs.scad>
module radials() {
pcb = PERF60x40;
pcb(pcb);
for(i = [0 : len(rd_xtals) - 1])
pcb_grid(pcb, [0.5, 1, 1.5, 9, 1][i], [0, 2, 6.5, 6.5, 11][i])
rd_xtal(rd_xtals[i], value = rd_xtals[i][0], z = 1.5, pitch = [inch(0.1), inch(0.2), [inch(0.3), inch(0.3)], [inch(0.6), inch(0.3)], inch(0.2)][i]);
}
if($preview)
radials();

View File

@@ -27,6 +27,9 @@ module rounded_cylinders() {
translate([30, 10])
rounded_cylinder(10, 20, 3, 5, 270);
translate([65, 10])
rounded_top_rectangle([30, 20, 5], 3, 2);
}
rounded_cylinders();

View File

@@ -22,7 +22,7 @@ use <../utils/layout.scad>
include <../vitamins/tubings.scad>
module tubings()
layout([for(t = tubings) tubing_od(t)], 8)
layout([for(t = tubings) tubing_od(t)], 5)
tubing(tubings[$i]);
if($preview)

View File

@@ -36,11 +36,11 @@ z_vb = ["z_vb", "z_bed_terminal", 5, z_cable_ways / 2 + 12, inch(0.1), false, M3
module veroboard_test() translate([vero_length(z_vb) / 2, vero_width(z_vb) / 2]) {
vflip()
veroboard_assembly(z_vb, 12, 3);
veroboard_assembly(z_vb);
translate([30, 0])
rotate(180)
veroboard_assembly(z_vb, 12, 3);
veroboard_fastened_assembly(z_vb, 12, 3);
}
if($preview)

View File

@@ -45,3 +45,22 @@ module rounded_cylinder(r, h, r2, ir = 0, angle = 360) //! Rounded cylinder give
rotate_extrude(angle = angle)
rounded_corner(r, h, r2, ir);
}
module rounded_top_rectangle(size, r, r2) { //! Make a rounded rectangle with a rounded top edge
hull() {
translate([size.x / 2 - r, size.y / 2 - r])
rounded_cylinder(r = r, h = size.z, r2 = r2, angle = 90);
translate([-size.x / 2 + r, size.y / 2 - r])
rotate(90)
rounded_cylinder(r = r, h = size.z, r2 = r2, angle = 90);
translate([-size.x / 2 + r, -size.y / 2 + r])
rotate(180)
rounded_cylinder(r = r, h = size.z, r2 = r2, angle = 90);
translate([size.x / 2 - r, -size.y / 2 + r])
rotate(270)
rounded_cylinder(r = r, h = size.z, r2 = r2, angle = 90);
}
}

View File

@@ -23,8 +23,9 @@
include <../utils/core/core.scad>
include <../utils/round.scad>
module wire_link(d, l, h = 1, tail = 3) { //! Draw a wire jumper link. If `l` is zero then a vertical wire is drawn.
vitamin(str("wire_link(", d, ", ", l, arg(h, 1, "h"), arg(tail, 3, "tail"), "): Wire link ", d, "mm x ", l ? str(l / inch(1), "\"") : str(h + tail,"mm")));
module wire_link(d, l, h = 1, tail = 3, sleeve = false) { //! Draw a wire jumper link. `sleeve` can be a list with the diameter and colour. If `l` is zero then a vertical wire is drawn.
vitamin(str("wire_link(", d, ", ", l, arg(h, 1, "h"), arg(tail, 3, "tail"), arg(sleeve, false, "sleeve"),
"): Wire link ", d, "mm x ", l ? str(l / inch(1), "\"") : str(h + tail,"mm"), sleeve ? str(" with ", sleeve[1], " sleeving") : ""));
r = d;
$fn = 32;
@@ -48,6 +49,12 @@ module wire_link(d, l, h = 1, tail = 3) { //! Draw a wire jumper link. If `l` is
else
translate_z(-tail)
cylinder(d = d, h = tail + h);
if(sleeve)
color(sleeve[1])
translate_z(h)
rotate([0, 90, 0])
cylinder(d = sleeve[0], h = l - 2 * r, center = true);
}
function ax_res_wattage(type) = type[1]; //! Power rating

View File

@@ -190,10 +190,7 @@ module al_clad_resistor(type, value, leads = true) { //! Draw an aluminium clad
cylinder(r = leads ? 3 : height / 2 - 2, h = length + eps, center = true);
}
module al_clad_resistor_assembly(type, value, sleeved = true) { //* Draw aluminium clad resistor with optional sleaving, positions children at the screw positions
sleeving_length = 15;
sleeving = HSHRNK32;
module al_clad_resistor_assembly(type, value, sleeved = true, sleeving = HSHRNK32, sleeving_length = 15) { //! Draw aluminium clad resistor with optional sleaving, positions children at the screw positions
al_clad_resistor(type, value);
if(sleeved)
@@ -207,52 +204,55 @@ module al_clad_resistor_assembly(type, value, sleeved = true) { //* Draw alumini
children();
}
TO220_hole_y = 2.9; // Distance to hole from top of tab
function TO220_size() = [10.2, 15, 4.4]; //! Size of a TO220
function TO220_thickness() = 1.5; //! Thickness of the tab of a TO220
function TO220_lead_pos(i, l) = //! Position of ith lead end when length = l
[i * inch(0.1), -TO220_size().y + TO220_hole_y - l, 1.9];
module TO220(description, leads = 3, lead_length = 16) { //! Draw a TO220 package, use `description` to describe what it is
width = 10.2;
s = TO220_size();
inset = 1.5;
hole = 3.3;
length = 15;
height = 4.4;
lead_height = 1.9;
lead_t = 0.4;
lead_w = 0.7;
lead_w2 = 1.4;
lead_l = 4.2;
body = 8;
hole_y = 2.9;
vitamin(str("TO220(\"", description, "\"", arg(leads, 3, "leads"), "): ", description));
translate([0, -length + hole_y]) {
color("silver") {
translate([0, -s.y + TO220_hole_y]) {
color("silver")
linear_extrude(TO220_thickness())
difference() {
translate([-width / 2, inset])
square([width, length - inset]);
translate([-s.x / 2, inset])
square([s.x, s.y - inset]);
translate([0, length - hole_y])
translate([0, s.y - TO220_hole_y])
circle(d = hole);
for(side = [-1, 1])
translate([side * width / 2, 0])
translate([side * s.x / 2, 0])
square([inset * 2, body * 2], center = true);
}
for(i = [-1 : 1])
if(i || leads == 3) {
translate([inch(0.1) * i, -lead_length / 2, lead_height])
cube([lead_w, lead_length, lead_t], center = true);
translate([inch(0.1) * i, -lead_l / 2, lead_height])
cube([lead_w2, lead_l, lead_t], center = true);
}
}
color("dimgrey")
translate([-width / 2, 0, eps])
cube([width, body, height]);
translate([-s.x / 2, 0, eps])
cube([s.x, body, s.z]);
}
color(silver)
for(i = [-1 : 1])
if(i || leads == 3) {
translate(TO220_lead_pos(i, lead_length / 2))
cube([lead_w, lead_length, lead_t], center = true);
translate(TO220_lead_pos(i, lead_l / 2))
cube([lead_w2, lead_l, lead_t], center = true);
}
translate_z(TO220_thickness())
children();
}

219
vitamins/faston.scad Normal file
View File

@@ -0,0 +1,219 @@
//
// NopSCADlib Copyright Chris Palmer 2023
// 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/>.
//
//
//! Faston receptacles to mate with spade connectors
//
include <../utils/core/core.scad>
include <../utils/sector.scad>
function faston_width(type) = type[1]; //! Width of matching spade
function faston_size(type) = type[2]; //! Size of the receptical part
function faston_d_top(type) = type[3]; //! Radius of the clips
function faston_d_bot(type) = type[4]; //! Radius of bottom corners
function faston_t(type) = type[5]; //! Thickness
function faston_wire_crimp_l(type) = type[6]; //! Length of the wire crimp
function faston_wire_crimp_d(type) = type[7]; //! Outside diameter of the wire crimp
function faston_wire_crimp_p(type) = type[8]; //! Position of the tip of the wire crimp
function faston_fillet_d(type) = type[9]; //! Fillets at the transition
function faston_wall_h(type) = type[10]; //! Height of transition web wall
function faston_insul_crimp_l(type) = type[11]; //! Length of the insulation crimp
function faston_insul_crimp_d(type) = type[12]; //! Outside diameter of the insulation crimp
function faston_insul_crimp_p(type) = type[13]; //! Position of the tip of the insulation crimp
function faston_insul_crimp_o(type) = type[14]; //! Offset of insulation crimp
function faston_length(type) = //! Total length of crimp
faston_insul_crimp_p(type).z + faston_insul_crimp_l(type);
function faston_insul_stop(type) = //! Position where insulation stops
faston_wire_crimp_p(type).z + faston_wire_crimp_l(type);
module faston(type, closed = false) { //! Draw specified faston
vitamin(str("faston(", type[0], "): Faston part no ", type[0], " to fit ", faston_width(type), "mm spade"));
s = faston_size(type);
r_top = faston_d_top(type) / 2;
r_bot = faston_d_bot(type) / 2;
t = faston_t(type);
wc_l = faston_wire_crimp_l(type);
wc_r = faston_wire_crimp_d(type) / 2;
wc_p = faston_wire_crimp_p(type);
fillet_r = faston_fillet_d(type) / 2;
wall_h = faston_wall_h(type);
ic_l = faston_insul_crimp_l(type);
ic_r = faston_insul_crimp_d(type) / 2;
ic_p = faston_insul_crimp_p(type);
ic_o = faston_insul_crimp_o(type);
$fn = 64;
// Receptical
module reciptical_shape()
for(side = [-1, 1]) mirror([side < 0 ? 1 : 0, 0]) {
translate([s.x / 2 - r_top, s.y - r_top])
difference() {
sector(r_top, 0, 180);
sector(r_top - t, 0, 180);
}
translate([s.x / 2 - r_bot, r_bot])
difference() {
sector(r_bot, -90, 0);
sector(r_bot - t, -90, 0);
}
translate([s.x / 2 - t, r_bot])
square([t, s.y - r_top - r_bot]);
square([s.x / 2 - r_bot, t]);
}
module crimp_shape(p, r, offset = 0) {
hpot = norm([p.x, p.y] - [0, r + offset]);
opp = sqrt(sqr(hpot) - sqr(r));
angle = atan((p.y - (r + offset)) / p.x) - acos(r / hpot);
r_crimp = r / 2 - eps;
lift = -0.1;
z = (opp - r * 2 * PI / -angle / 360 - PI * r_crimp) / 2 + lift / 2;
for(side = [-1, 1]) mirror([side < 0 ? 1 : 0, 0])
translate([0, r + offset]) {
difference() {
sector(r, 270, 360 + (closed ? 0 : angle));
circle(r - t);
}
if(!closed)
rotate(angle)
translate([r - t, -eps])
square([t, opp]);
else {
translate([r - r_crimp, z])
difference() {
sector(r_crimp, 0, 180);
circle(r_crimp - t);
}
translate([r - t, 0])
square([t, z]);
translate([r - 2 * r_crimp, lift])
square([t, z - lift]);
}
}
}
// Wire crimp
module wire_crimp_shape() crimp_shape(wc_p, wc_r);
// Insulation crimp
module insul_crimp_shape() crimp_shape(ic_p, ic_r, ic_o);
module crop(z = 0)
intersection() {
children();
square([s.x, 2 * (wall_h + fillet_r + z)], center = true);
}
color(silver) translate([0, -t]) {
// Transition from reciptical to wire crimp
render() difference() {
hull() {
translate_z(s.z)
linear_extrude(eps)
crop()
reciptical_shape();
translate_z(wc_p.z - eps)
linear_extrude(eps)
crop()
wire_crimp_shape();
}
translate([0, s.y, (s.z + wc_p.z) / 2])
rotate([0, 90, 0])
rounded_rectangle([wc_p.z - s.z, 2 * (s.y - wall_h), s.x + 1], fillet_r, center = true);
hull() {
translate_z(s.z - eps)
linear_extrude(eps)
offset(-t)
crop(t)
hull()
reciptical_shape();
translate_z(wc_p.z + eps / 8)
linear_extrude(eps / 8)
offset(-t)
crop(t)
hull()
wire_crimp_shape();
}
}
// Transition from wire crimp to insulation crimp
render() difference() {
hull() {
translate_z(wc_p.z + wc_l)
linear_extrude(eps)
wire_crimp_shape();
translate_z(ic_p.z - eps)
linear_extrude(eps)
insul_crimp_shape();
}
gap = ic_p.z - wc_p.z - wc_l;
d = gap * 2 / 3;
translate([0, wall_h + fillet_r - gap / 2, ic_p.z - d / 2])
hull() {
rotate([0, 90, 0])
cylinder(d = d, h = 10, center = true);
translate([-5, d / 2, d / 2 - gap])
cube([10, 10, gap]);
}
hull() {
translate_z(wc_p.z + wc_l - eps)
linear_extrude(eps)
offset(-t)
hull()
wire_crimp_shape();
translate_z(ic_p.z + eps / 8)
linear_extrude(eps / 8)
offset(-t)
hull()
insul_crimp_shape();
}
}
linear_extrude(s.z)
reciptical_shape();
translate_z(wc_p.z)
linear_extrude(wc_l)
wire_crimp_shape();
translate_z(ic_p.z)
linear_extrude(ic_l)
insul_crimp_shape();
}
}

28
vitamins/fastons.scad Normal file
View File

@@ -0,0 +1,28 @@
//
// NopSCADlib Copyright Chris Palmer 2023
// 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/>.
//
//
//! Faston receptacles to mate with spade connectors
//
5_160430_7 = ["5_160430_7", 4.75, [5.6, 2.56, 6.3], 2.25, 1.13, 0.32, 3.2, 1.64, [1.64, 3.09, 9], 0.5, 0.96, 1.7, 3.53, [2.08, 4.47, 13.3], -0.4];
fastons = [5_160430_7];
use <faston.scad>

View File

@@ -18,7 +18,7 @@
//
//
//! Nicodrone OpenGrab V3 electro-permanent magnet, see <https://nicadrone.com/products/epm-v3>.
//! Nicodrone OpenGrab V3 electro-permanent magnet, see <https://kb.zubax.com/display/MAINKB/OpenGrab+EPM+v3>.
//!
//! A permanent magnet that can be magnetized and de-magnetized electronically.
//

View File

@@ -37,6 +37,7 @@ use <d_connector.scad>
use <led.scad>
use <dip.scad>
use <axial.scad>
use <radial.scad>
use <smd.scad>
use <terminal.scad>
include <potentiometers.scad>
@@ -115,6 +116,14 @@ module usb_A_tongue() {
}
}
module usb_vAx1(cutout = false) { //! Draw a vertical USB type A single socket
h = 5.8;
w = 13.8;
translate([0, h / 2, w / 2])
rotate([90, 0, 0])
usb_A(h = h, v_flange_l = 0, bar = 0, cutout = cutout, l = 14, h_flange_l = 0, flange_t = 0.3, w = w);
}
module usb_Ax1(cutout = false) { //! Draw USB type A single socket
usb_A(h = 6.5, v_flange_l = 4.5, bar = 0, cutout = cutout);
}
@@ -123,12 +132,8 @@ module usb_Ax2(cutout = false) { //! Draw USB type A dual socket
usb_A(h = 15.6, v_flange_l = 12.15, bar = 3.4, cutout = cutout);
}
module usb_A(h, v_flange_l, bar, cutout) {
l = 17;
w = 13.25;
flange_t = 0.4;
module usb_A(h, v_flange_l, bar, cutout, l=17, h_flange_l = 11, flange_t = 0.4, w = 13.25) {
h_flange_h = 0.8;
h_flange_l = 11;
v_flange_h = 1;
socket_h = (h - 2 * flange_t - bar) / 2;
@@ -154,9 +159,11 @@ module usb_A(h, v_flange_l, bar, cutout) {
translate_z(l / 2 - flange_t)
linear_extrude(flange_t) difference() {
union() {
square([h + 2 * h_flange_h, h_flange_l], center = true);
if(h_flange_l)
square([h + 2 * h_flange_h, h_flange_l], center = true);
square([v_flange_l, w + 2 * v_flange_h], center = true);
if(v_flange_l)
square([v_flange_l, w + 2 * v_flange_h], center = true);
}
square([h - eps, w - eps], center = true);
}
@@ -164,7 +171,8 @@ module usb_A(h, v_flange_l, bar, cutout) {
for(z = bar ? [-1, 1] : [0])
translate_z(z * (bar / 2 + socket_h / 2))
usb_A_tongue();
translate([l - 17, 0])
usb_A_tongue();
}
}
@@ -1063,7 +1071,7 @@ module trimpot10(vertical, cutout = false) { //! Draw a ten turn trimpot
}
}
module block(size, colour, makes_cutout, cutouts) //! Draw a coloured cube to represent a random PCB component
module block(size, colour, makes_cutout, cutouts, r = 0, rtop = 0) //! Draw a coloured cube to represent a random PCB component
if(cutouts) {
if(makes_cutout)
translate([-50, 0, size.z / 2 - panel_clearance])
@@ -1071,8 +1079,10 @@ module block(size, colour, makes_cutout, cutouts) //! Draw a coloured cube to re
}
else
color(colour)
translate_z(size.z / 2)
cube(size, center = true);
if(rtop)
let($fn = 32) rounded_top_rectangle(size, r, rtop);
else
rounded_rectangle(size, r);
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);
@@ -1088,6 +1098,7 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
if(show(comp, "chip")) chip(comp[4], comp[5], comp[6], param(7, grey(30)), cutouts);
if(show(comp, "rj45")) rj45(cutouts);
if(show(comp, "usb_A")) usb_Ax1(cutouts);
if(show(comp, "usb_vAx1")) usb_vAx1(cutouts);
if(show(comp, "usb_Ax1")) usb_Ax1(cutouts);
if(show(comp, "usb_Ax2")) usb_Ax2(cutouts);
if(show(comp, "usb_uA")) usb_uA(cutouts);
@@ -1107,7 +1118,7 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
if(show(comp, "molex_usb_Ax1")) molex_usb_Ax1(cutouts);
if(show(comp, "smd_led")) smd_led(comp[4], comp[5], cutouts);
if(show(comp, "7seg")) let(z = param(6, 0)) translate_z(z) 7_segment_digits(comp[4], comp[5], pin_length = z + 3, cutout = cutouts);
if(show(comp, "block")) block(size = [comp[4], comp[5], comp[6]], colour = comp[7], makes_cutout = param(8));
if(show(comp, "block")) block(size = [comp[4], comp[5], comp[6]], colour = comp[7], makes_cutout = param(8), r = param(9, 0), rtop = param(10, 0));
if(!cutouts) {
// Components that don't have a cutout parameter go in this section
if(show(comp, "button_6mm")) square_button(button_6mm);
@@ -1125,7 +1136,8 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
if(show(comp, "led")) translate_z(eps) led(comp[4], comp[5], 2.6);
if(show(comp, "pdip")) pdip(comp[4], comp[5], param(6, false), param(7, inch(0.3)));
if(show(comp, "ax_res")) ax_res(comp[4], comp[5], param(6, 5), param(7, 0));
if(show(comp, "link")) wire_link(l = comp[4], h = param(5, 1), d = param(6, 0.8), tail = param(7, 3));
if(show(comp, "rd_xtal")) rd_xtal(type = comp[4], value = param(5, undef), z = param(6, 0), pitch = param(7, undef)); // type, value, z, forced pitch
if(show(comp, "link")) wire_link(l = comp[4], h = param(5, 1), d = param(6, 0.8), tail = param(7, 3), sleeve = param(8, false));
if(show(comp, "D_plug")) translate_z(d_pcb_offset(comp[4])) d_plug(comp[4], pcb = true);
if(show(comp, "molex_hdr")) molex_254(comp[4], param(5, 0), param(6, undef));
if(show(comp, "jst_xh")) jst_xh_header(jst_xh_header, comp[4], param(5, false), param(6, "white"), param(7, undef));

View File

@@ -20,6 +20,7 @@ include <microswitches.scad>
include <d_connectors.scad>
include <leds.scad>
include <axials.scad>
include <radials.scad>
include <smds.scad>
include <green_terminals.scad>
include <7_segments.scad>
@@ -537,6 +538,23 @@ Melzi = ["Melzi", "Melzi electronics", 203.2, 49.53, 1.6, 3.81, 3.1, 6, "green"
[],
[": USB A to Mini B lead", ": Micro SD card"]];
OPZ2 = ["OPZ2", "Orange Pi Zero 2", 60, 53, 1.4, 1.75, 3, 5, "blue", false, [[2.5, 2.5], [-2.5, 2.5], [-2.5, -2.5], [2.5, -2.5]],
[[-2.54, 53/2, 90, "2p54header", 13, 2],
[-10, -10-2.54*2, 0, "2p54header", 3, 1],
[2.54/2, 53/2, 90, "2p54header", 13, 1],
[6+16/2, -10.5+1, 90, "rj45"],
[24+9/2, -3.6+1, 90, "usb_C"],
[37+6.5/2, -8.5/2+1, 90, "micro_hdmi"],
[-7-5.8/2, -7+1, 90, "usb_vAx1"],
[-17, 18, 0, "chip", 13, 7.5, 1],
[-17, 28, 0, "chip", 13, 7.5, 1],
[26, 23, 0, "chip", 12.2, 14, 1],
[8.1+10.3/2, 3.7+10.3/2, 0, "chip", 10.3, 10.3, 1.8, "silver"],
[10.7+14.6/2, 14.7/2, 90, "-uSD", [14.6, 14.7, 2]],
],
[": Micro SD card"],
[60-2.54*1.5, 53/2 - 6*2.54, 2, 13]];
RPI3A = ["RPI3A", "Raspberry Pi 3 A+", 65, 56, 1.4, 3, 2.75, 6, "green", false, [[3.5, 3.5], [61.5, 3.5], [61.5, -3.5], [3.5, -3.5]],
[[32.5, -3.5, 0, "2p54header", 20, 2],
[27, -24.6, 0, "chip", 14, 14, 1],
@@ -641,6 +659,14 @@ ArduinoUno3 = ["ArduinoUno3", "Arduino Uno R3", 68.58, 53.34, 1.6, 0, 3.3, 0, "#
[4.7625, 7.62, 180,"barrel_jack"],
[1.5875, 37.78, 180,"usb_B"],
[46.99, 17, 270,"pdip", 28, "ATMEGA328", true],
[18.7, 25.8, 0, "rd_xtal", HC49_4H],
[7.5, 17.2, 90, "smd_sot", SOT223],
[7.9, 26.5, 90, "smd_sot", SOT23],
[21.3, 2.7, 0, "smd_diode", DO241AC],
[27.8, 34.6, 0, "smd_led", LED0805, "red"],
[27.8, 37, 0, "smd_led", LED0805, "red"],
[27.8, 42.3, 0, "smd_led", LED0805, "red"],
[58.8, 37.1, 0, "smd_led", LED0805, "red"],
],
[],[],
inch([
@@ -846,7 +872,7 @@ XIAO = [
[for(x = [0:6], y = [-1,1]) [x * 2.54 + 2.71, y * 3 * 2.54 + 9], // Inboard hole positions
for(x = [0:6], y = [-1,1]) [x * 2.54 + 2.71, y * 9 + 9]], // Hole positions on the edge, pad overlaps the inboard holes
[ // components
[7.6, 9, 0, "block", 12.3, 12, 2.41, silver], // can
[7.6, 9, 0, "block", 12.3, 12, 2.41, silver, false, 0.3, 0.3], // can
[21 + 1.76 - 7.35 / 2, 9, 0, "usb_C"],
],
[] // accessories
@@ -895,7 +921,7 @@ ESP32_DOIT_V1 = let(l = 51.45, w = 28.33, pitch = inch(1), pins = 15, poffset =
[l / 2 + poffset, w / 2 - pitch / 2, 0, "-2p54joiner", pins, 1],
[l / 2 + poffset, w / 2 + pitch / 2, 0, "-2p54joiner", pins, 1],
[1.75, w / 2, 180, "usb_uA" ],
[35, w / 2, 0, "block", 17.7, 16, 3, silver], // can
[35, w / 2, 0, "block", 17.7, 16, 3, silver, false, 0.3, 0.3], // can
for(y=[-1,1]) [3.5, y * 6.5, 0, "chip", 4, 3, 1.6, silver], // Mock button surround
for(y=[-1,1]) [3.5, y * 6.5, 0, "chip", 1.8,0, 2.0, grey(20)], // Mock buttons
for(y=[-1,1]) [21.6, y * 9, 0, "smd_led", LED0603, y < 0 ? "red" : "blue"],
@@ -954,7 +980,9 @@ L9110S = ["L9110S", "L9110S 2-Channel motor driver module", 29.2, 23, 1.6, 0, 3,
tiny_pcbs = [XIAO, MP1584EN, TP4056, ESP_01, LIPO_fuel_gauge];
pcbs = [RAMPSEndstop, MT3608, KY_040, L9110S, ZC_A0591, ArduinoNano, RPI_Pico, ESP32_DOIT_V1, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, RPI3A, RPI3, RPI4, BTT_RELAY_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO, BTT_SKR_V1_4_TURBO, DuetE, Duex5];
big_pcbs = [BTT_RELAY_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO, BTT_SKR_V1_4_TURBO, DuetE, Duex5];
pcbs = [RAMPSEndstop, MT3608, KY_040, L9110S, ZC_A0591, ArduinoNano, RPI_Pico, ESP32_DOIT_V1, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, OPZ2, RPI3A, RPI3, RPI4];
pcbs_not_shown = [Melzi, Duex2, PSU12V1A, Keyes5p1, PI_IO, ExtruderPCB];

137
vitamins/radial.scad Normal file
View File

@@ -0,0 +1,137 @@
//
// NopSCADlib Copyright Chris Palmer 2023
// 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/>.
//
//
//! Radial components for PCBs.
//
include <../utils/core/core.scad>
include <../utils/sweep.scad>
include <../utils/rounded_polygon.scad>
include <../utils/rounded_cylinder.scad>
function rd_xtal_size(type) = type[1]; //! Crystal length, width and height and optional corner radius
function rd_xtal_flange(type) = type[2]; //! Crystal flange width and thickness
function rd_xtal_pitch(type) = type[3]; //! Crystal lead pitch
function rd_xtal_lead_d(type) = type[4]; //! Crystal lead diameter
module cylindrical_wrap(r, h = eps) { //! Wrap a 2D child extruded to height `h` around a cylinder with radius `r`.
sides = r2sides(r);
dx = 2 * r * tan(180 / sides);
for(i = [0 : sides - 1])
rotate((i - 0.5) * 360 / sides)
translate([0, r])
rotate([-90, 0, 0])
linear_extrude(h, center = true)
intersection() {
translate([(sides / 2 - i) * -dx, 0])
children();
square([dx, inf], center = true);
}
}
module lead_positions(p, z) {
if(is_list(p))
for($x = [-1, 1], $y = [-1, 1])
translate([$x * p.x / 2, $y * p.y / 2, z])
children();
else
for($x = [-1, 1])
translate([$x * p / 2, 0, z])
children();
}
module radial_leads(ap, p, z, d, tail)
color(silver) {
assert(p == ap || z > 3 * d, "Must be space to bend the wires");
zl = tail + (p == ap ? z : 0);
let($fn = 16) {
lead_positions(p, -tail)
rotate(90)
cylinder(d = d, h = zl);
if(p != ap) {
assert(!is_list(p), "Bending four leads not supported yet");
sd = d * sign(p - ap);
path = [[0, z, 0], [0 + sd, z - d / 2, -sd], [p / 2 - ap / 2 - sd, d / 2, sd], [p / 2 - ap / 2, 0, 0]];
rpath = let($fn = 32) rounded_polygon(path);
lead_positions(ap, 0)
rotate([90, 0, 90 * -$x + 90])
sweep([for(p = rpath) [p.x, p.y, 0]], circle_points(d / 2));
}
}
}
module rd_xtal(type, value, z = 0, pitch = undef, tail = 3) { //! Draw a crystal
vitamin(str("rd_xtal(", type[0], ", \"", value, "\"): Crystal ", type[0], " ", value));
s = rd_xtal_size(type);
r = len(s) < 4 ? s.y / 2 - eps : s[3];
f = rd_xtal_flange(type);
cp = rd_xtal_pitch(type);
p = is_undef(pitch) ? cp : pitch;
d = rd_xtal_lead_d(type);
r2 = 0.2;
color(silver) {
translate_z(z) {
if(s.y) {
$fn = 32;
rounded_rectangle([s.x, s.y, s.z - r2], r);
translate_z(s.z - r2)
rounded_top_rectangle([s.x, s.y, r2], r, r2);
}
else
let($fn = 32)
rounded_cylinder(r = s.x / 2, h = s.z, r2 = r2);
if(f) {
rounded_rectangle([s.x + 2 * f.x, s.y + 2 * f.x, f[1]], r + f.x);
if(is_list(cp))
translate([-s.x / 2 - f.x, -s.y / 2 - f.x])
cube([r + f.x, r + f.x, f[1]]); // Pin 1 marked by sharp corner on 4 pin packages
}
}
radial_leads(cp, p, z, d, tail);
}
color(grey(10)) {
if(!is_undef(value))
if(s.y)
translate_z(z + s.z)
linear_extrude(eps)
resize([s.x * 0.75, s.y / 2])
text(value, halign = "center", valign = "center");
else
translate_z(z + s.z / 2)
let($fn = 32)
cylindrical_wrap(s.x / 2)
rotate(-90)
resize([s.z * 0.9, s.x * PI / 4])
text(value, halign = "center", valign = "center");
if(s.y)
lead_positions(cp, z)
cylinder(d = d * 4, h = 2 * eps, center = true);
else
translate_z(z)
cylinder(d = (s.x + cp) / 2, h = 2 * eps, center = true);
}
}

33
vitamins/radials.scad Normal file
View File

@@ -0,0 +1,33 @@
//
// NopSCADlib Copyright Chris Palmer 2023
// 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/>.
//
//
//! Radial components for PCBs.
//
// Crystals
HC49 = ["HC49", [10.5, 3.7, 13.5], [0.475, 0.6], 4.88, 0.45];
HC49_4H = ["HC49_4H", [10.5, 3.7, 3.5], [0.475, 0.6], 4.88, 0.43];
C_002RX = ["C_002RX", [ 2.0, 0, 6], false, 0.7, 0.2];
ACT1700 = ["ACT1700", [10.8, 10.8, 5.3, 1], [1, 0.6], [ inch(0.3), inch(0.3)], 0.45 ];
ACT1100 = ["ACT1100", [20.4, 10.8, 5.3, 1], [1, 0.6], [ inch(0.6), inch(0.3)], 0.45 ];
rd_xtals = [C_002RX, HC49_4H, ACT1700, ACT1100, HC49];
use <radial.scad>

View File

@@ -45,10 +45,11 @@ SOT223 = ["SOT223", [6.5, 3.5, 1.6], 0.05, 0.89, 2.3, 7.0, [0.7, 0.95, 0.25], 3]
smd_sots = [SOT23, SOT223];
SOIC8 = ["SOIC8", [4.90, 3.90, 1.25], 0.10, 0.66, 1.27, 6.00, [0.31, .50, 0.20]];
SOIC14 = ["SOIC14", [8.70, 3.90, 1.25], 0.10, 0.66, 1.27, 6.00, [0.31, .50, 0.20]];
SOIC16 = ["SOIC16", [9.90, 3.90, 1.25], 0.10, 0.66, 1.27, 6.00, [0.31, .50, 0.20]];
SOIC18 = ["SOIC18", [11.40, 7.50, 2.00], 0.10, 1.20, 1.27, 10.30, [0.31, .50, 0.20]];
SOIC18 = ["SOIC18", [11.40,7.50, 2.00], 0.10, 1.20, 1.27, 10.30, [0.31, .50, 0.20]];
smd_soics = [SOIC8, SOIC16, SOIC18];
smd_soics = [SOIC8, SOIC14, SOIC16, SOIC18];
DO241AC = ["DO241AC", [4.0, 2.5, 2.0], 0.1, 1, [4.8, 1.2, 0.15, 2]];

View File

@@ -19,23 +19,25 @@
//
// Tubing and sleeving
// Description OD ID Colour
PVC64 = ["PVC64", "PVC aquarium tubing", 6, 4, [0.8, 0.8, 0.8, 0.75 ]];
PVC85 = ["PVC85", "PVC aquarium tubing", 8, 5, [0.8, 0.8, 0.8, 0.75 ]];
NEOP85 = ["NEOP85", "Neoprene tubing", 8, 5, [0.2,0.2,0.2]];
PTFE07 = ["PTFE07", "PTFE sleeving", 1.2, 0.71, [0.95, 0.95, 0.95, 0.9]];
PTFE20 = ["PTFE20", "PTFE sleeving", 2.6, 2, [0.95, 0.95, 0.95, 0.9]];
PTFE2_4 = ["PTFE2_4", "PTFE tubing", 4, 2, [0.95, 0.95, 0.95, 0.9]];
PTFE2_3 = ["PTFE2_3", "PTFE tubing", 3, 2, [0.95, 0.95, 0.95, 0.9]];
PTFE4_6 = ["PTFE4_6", "PTFE tubing", 6, 4, [0.95, 0.95, 0.95, 0.9]];
PF7 = ["PF7", "PTFE tubing", 46/10, 3.84, [0.95, 0.95, 0.95, 0.9]];
HSHRNK16 = ["HSHRNK16", "Heatshrink sleeving", 2.0, 1.6, "grey"];
HSHRNK24 = ["HSHRNK24", "Heatshrink sleeving", 2.8, 2.4, "grey"];
HSHRNK32 = ["HSHRNK32", "Heatshrink sleeving", 3.6, 3.2, "grey"];
HSHRNK64 = ["HSHRNK64", "Heatshrink sleeving", 6.8, 6.4, "grey"];
HSHRNK100 = ["HSHRNK100", "Heatshrink sleeving",10.4, 10.0, [0.2,0.2,0.2]];
CARBONFIBER10 = ["CBNFIB10", "Carbon fiber", 10.0, 8.0, [0.3,0.3,0.3]];
// Description OD ID Colour
PVC64 = ["PVC64", "PVC aquarium tubing", 6, 4, [0.8, 0.8, 0.8, 0.75 ]];
PVC85 = ["PVC85", "PVC aquarium tubing", 8, 5, [0.8, 0.8, 0.8, 0.75 ]];
NEOP85 = ["NEOP85", "Neoprene tubing", 8, 5, [0.2,0.2,0.2]];
PTFE07 = ["PTFE07", "PTFE sleeving", 1.2, 0.71, [0.95, 0.95, 0.95, 0.9]];
PTFE20 = ["PTFE20", "PTFE sleeving", 2.6, 2, [0.95, 0.95, 0.95, 0.9]];
PTFE2_4 = ["PTFE2_4", "PTFE tubing", 4, 2, [0.95, 0.95, 0.95, 0.9]];
PTFE2_3 = ["PTFE2_3", "PTFE tubing", 3, 2, [0.95, 0.95, 0.95, 0.9]];
PTFE4_6 = ["PTFE4_6", "PTFE tubing", 6, 4, [0.95, 0.95, 0.95, 0.9]];
PF7 = ["PF7", "PTFE tubing", 46/10, 3.84, [0.95, 0.95, 0.95, 0.9]];
HSHRNK16 = ["HSHRNK16", "Heatshrink sleeving", 2.0, 1.6, "grey"];
HSHRNK24 = ["HSHRNK24", "Heatshrink sleeving", 2.8, 2.4, "grey"];
HSHRNK32 = ["HSHRNK32", "Heatshrink sleeving", 3.6, 3.2, "grey"];
HSHRNK64 = ["HSHRNK64", "Heatshrink sleeving", 6.8, 6.4, "grey"];
HSHRNK100 = ["HSHRNK100", "Heatshrink sleeving", 10.4, 10.0, [0.2,0.2,0.2]];
STFE4_3p2_CLR = ["STFE4_3p2_CLR", "PTFE heatshrink sleeving", 3.7, 3.2, [0.95, 0.95, 0.95, 0.5]];
STFE4_6p4_CLR = ["STFE4_6p4_CLR", "PTFE heatshrink sleeving", 7.0, 6.4, [0.95, 0.95, 0.95, 0.5]];
CARBONFIBER10 = ["CBNFIB10", "Carbon fiber", 10.0, 8.0, [0.3,0.3,0.3]];
tubings = [PVC64, PVC85, NEOP85, PTFE07, PTFE20, PF7, PTFE2_3, PTFE2_4, PTFE4_6, HSHRNK16, HSHRNK24, HSHRNK64, HSHRNK100, CARBONFIBER10];
tubings = [PVC64, PVC85, NEOP85, PTFE07, PTFE20, PF7, PTFE2_3, PTFE2_4, PTFE4_6, HSHRNK16, HSHRNK24, HSHRNK64, HSHRNK100, STFE4_3p2_CLR, STFE4_6p4_CLR, CARBONFIBER10];
use <tubing.scad>

View File

@@ -60,13 +60,14 @@ module solder_meniscus(type, ir = 0.3, r = undef) { //! Draw a solder meniscus
}
}
module vero_grid_pos(type, x, y) { //! Convert grid position to offset from the centre
holes = vero_holes(type);
strips = vero_strips(type);
translate([((x + holes) % holes) - holes / 2 + 0.5,
((y + strips) % strips) - strips / 2 + 0.5] * vero_pitch(type))
function vero_grid_pos(type, x, y) = //! Convert grid position to offset from the centre
let(holes = vero_holes(type), strips = vero_strips(type))
[((x + holes) % holes) - holes / 2 + 0.5,
((y + strips) % strips) - strips / 2 + 0.5] * vero_pitch(type);
module vero_grid_pos(type, x, y) //! Convert grid position to offset from the centre
translate(vero_grid_pos(type, x, y))
children();
}
module vero_mounting_hole_positions(type) //! Positions children at the mounting holes
for(p = vero_mounting_holes(type))
@@ -147,23 +148,25 @@ module vero_components(type, cutouts = false, angle = undef)
module vero_cutouts(type, angle = undef) //! Make cutouts to clear components
vero_components(type, true, angle);
module veroboard_assembly(type, height, thickness, flip = false, ngb = false) //! Draw the assembly with components and fasteners in place
module veroboard_assembly(type, ngb = false) //! Draw the assembly with components
pose_vflip(exploded = true)
assembly(vero_assembly(type), ngb = ngb) {
veroboard(type);
vero_components(type);
for(r = vero_joints(type))
for(x = r.x, y = r.y)
vero_grid_pos(type, x, y)
vflip()
solder_meniscus(type);
}
module veroboard_fasteners(type, height, thickness, flip = false) { //! Draw the fasteners in place
screw = vero_screw(type);
nut = screw_nut(screw);
screw_length = screw_length(screw, height + thickness + vero_thickness(type), 2, nyloc = true);
translate_z(height) {
veroboard(type);
vero_components(type);
for(r = vero_joints(type))
for(x = r.x, y = r.y)
vero_grid_pos(type, x, y)
vflip()
solder_meniscus(type);
}
vero_mounting_hole_positions(type) {
translate_z(height + vero_thickness(type))
if(flip)
@@ -181,3 +184,11 @@ assembly(vero_assembly(type), ngb = ngb) {
nut_and_washer(nut, true);
}
}
module veroboard_fastened_assembly(type, height, thickness, flip = false, ngb = false) { //! Draw the assembly with components and fasteners in place
translate_z(height)
veroboard_assembly(type, ngb = ngb);
veroboard_fasteners(type, height, thickness, flip);
}

View File

@@ -25,8 +25,12 @@ use <../utils/sweep.scad>
use <../utils/maths.scad>
include <zipties.scad>
module wire(colour, strands, length, strand = 0.2) //! Add stranded wire to the BOM
vitamin(str(": Wire ", colour, " ", strands, "/", strand, "mm strands, length ",length, "mm"));
module wire(colour, strands, length, strand = 0.2, d = 0, path = []) { //! Add stranded wire to the BOM and draw it if diameter and path specified
vitamin(str(": Wire ", colour, " ", strands, "/", strand, "mm strands, length ", ceil(length + path_length(path)), "mm"));
if(path && d)
color(colour) sweep(path, circle_points(r = d / 2));
}
module ribbon_cable(ways, length) //! Add ribbon cable to the BOM
vitamin(str(": Ribbon cable ", ways, " way ", length, "mm"));