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

Compare commits

...

32 Commits

Author SHA1 Message Date
Chris Palmer
3299aad5c8 Parametric potentiometers added, changes PCB "potentiometer" parameters.
The first one is now the type that defaults to the previous BigTreeTech version.
The second parameter is the shaft length overrride.

Added ESP32_DOIT_V1, ArduinoNano and KY_040 breakout PCBs.
2021-09-11 12:01:04 +01:00
Chris Palmer
74c52aac04 Can now make perfboard without screw holes.
Fixed missing items from last commit.
2021-09-11 11:54:26 +01:00
Chris Palmer
726d9ed2dc Can now draw right angle Molex KK connectors and can skip pins to allow high voltage. 2021-09-11 11:51:24 +01:00
Chris Palmer
8a838dd1ce Added pcb_grid_components() module for placing parts on a perfboard. 2021-09-11 11:46:25 +01:00
Chris Palmer
181c6ac624 Added vero_pin PCB component. 2021-09-11 11:44:36 +01:00
Chris Palmer
e952aa7840 PCB chip compoment can now be round if width is zero to fake round buttons. 2021-09-11 11:28:21 +01:00
Chris Palmer
466ee31e10 Added Jack_4mm_shielded_nut_radius(). 2021-09-11 11:21:58 +01:00
Chris Palmer
4c926c529b Fixed axial lead min pitch bug. 2021-09-11 11:20:37 +01:00
Chris Palmer
edb1eccbf1 TFT128x160 LCD display added. 2021-09-11 11:19:24 +01:00
Chris Palmer
061812cc8b PMMA1p25 sheet added. 2021-09-11 11:16:43 +01:00
Chris Palmer
ce0c97b45e 7_segment displays added as PCB component. 2021-09-11 11:15:39 +01:00
Chris Palmer
696b14699c Updated changelog. 2021-09-05 10:26:53 +01:00
Chris Palmer
2166a9be6a extrusion_corner_bracket_assembly() and extrusion_inner_corner_bracket() can now be passed the extrusion type.
E2020t and E4040t thinner extrusions added to work with the brackets.
Extrusions can now have recessed channels, round or square centre sections and holes.
Fixed the shape of extrusion centre section spars.
T-nuts now have 45 degree chamfers instead of a fixed 1mm minimum thickness.
2021-09-05 10:24:42 +01:00
Chris Palmer
511729008d Added missing documentation for sliding_t_nut(). 2021-09-03 15:47:15 +01:00
Chris Palmer
5111ec04bc E40_corner_bracket, E40_corner_bracket and M8_sliding_ball_t_nut added.
Inner corner brackets now show the long arm with chamfered ridges rather
than a normal T-nut and the grub screws are inserted to meet the extrusion.
2021-09-03 09:23:24 +01:00
Chris Palmer
cef3a620a6 Updated changelog 2021-08-31 23:41:34 +01:00
Chris Palmer
da5191e52c Merge branch 'martinbudden-M2p5_dome_screw' 2021-08-31 23:40:51 +01:00
Chris Palmer
d9af5b7f70 Updated images and readme. 2021-08-31 23:38:34 +01:00
Chris Palmer
c30d7f1ad9 Merge branch 'M2p5_dome_screw' of https://github.com/martinbudden/NopSCADlib into martinbudden-M2p5_dome_screw 2021-08-31 23:15:56 +01:00
Chris Palmer
a5382cbe04 Updated changelog. 2021-08-31 23:03:22 +01:00
Chris Palmer
00c5c90a5e Updated big picture 2021-08-31 23:00:58 +01:00
Chris Palmer
01c26d8a34 Added Lichuan servo motors contributed by Niclas Hedhman. 2021-08-31 22:51:24 +01:00
Chris Palmer
ef2102420b Added NEMA8 and NEMA8BH stepper motors.
Steppers can now have dual shafts, hollow shafts and black end caps.
2021-08-31 22:43:37 +01:00
Chris Palmer
540f841163 Added crude representation of JST ZH connectors. 2021-08-31 22:25:31 +01:00
Chris Palmer
1045502efb Added more aluminium sheet thickness 2021-08-31 22:12:30 +01:00
Chris Palmer
485184f092 Added HGH15CA and HGH20CA rails. 2021-08-31 22:04:12 +01:00
Chris Palmer
b893c9069a Added SFU1610 ballscrew nut 2021-08-31 21:56:20 +01:00
Chris Palmer
69f4ced29d Added M8_cs_cap_screw, M5_grub_screw and M6_grub_screw.
Fixed M6_cs_cap_screw and M4_grub_screw socket sizes.
2021-08-31 21:50:43 +01:00
Chris Palmer
5c1aa849fe New layout for big picture. 2021-08-31 21:34:28 +01:00
Martin Budden
9d65f69bf3 Added M2p5_dome_screw. 2021-08-31 20:05:47 +01:00
Chris Palmer
515b99fdc0 Merge branch 'martinbudden-rpi_pico' 2021-08-27 16:18:22 +01:00
Chris Palmer
631d052c68 Updated changelog 2021-08-27 16:18:04 +01:00
65 changed files with 1678 additions and 415 deletions

View File

@@ -3,6 +3,50 @@
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
### [v15.25.0](https://github.com/nophead/NopSCADlib/releases/tag/v15.25.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v15.24.0...v15.25.0 "diff with v15.24.0")
* 2021-09-05 [`2166a9b`](https://github.com/nophead/NopSCADlib/commit/2166a9be6a6fc75b06f0051971606cd181079e15 "show commit") [C.P.](# "Chris Palmer") `extrusion_corner_bracket_assembly()` and `extrusion_inner_corner_bracket()` can now be passed the extrusion type.
E2020t and E4040t thinner extrusions added to work with the brackets.
Extrusions can now have recessed channels, round or square centre sections and holes.
Fixed the shape of extrusion centre section spars.
T-nuts now have 45 degree chamfers instead of a fixed 1mm minimum thickness.
* 2021-09-03 [`5117290`](https://github.com/nophead/NopSCADlib/commit/511729008dcc878a148c3bbd00edf69de9736fb5 "show commit") [C.P.](# "Chris Palmer") Added missing documentation for `sliding_t_nut()`.
* 2021-09-03 [`5111ec0`](https://github.com/nophead/NopSCADlib/commit/5111ec04bc1d19cc46b811bf79d026fcd2ca70f8 "show commit") [C.P.](# "Chris Palmer") `E40_corner_bracket,` `E40_corner_bracket` and `M8_sliding_ball_t_nut` added.
Inner corner brackets now show the long arm with chamfered ridges rather
than a normal T-nut and the grub screws are inserted to meet the extrusion.
### [v15.24.0](https://github.com/nophead/NopSCADlib/releases/tag/v15.24.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v15.23.0...v15.24.0 "diff with v15.23.0")
* 2021-08-31 [`d9af5b7`](https://github.com/nophead/NopSCADlib/commit/d9af5b7f705791ca8ef230ecd1b831c042587002 "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
* 2021-08-31 [`9d65f69`](https://github.com/nophead/NopSCADlib/commit/9d65f69bf3e7cd325d24bc5410a4763bb7164b8f "show commit") [M.B.](# "Martin Budden") Added `M2p5_dome_screw`.
### [v15.23.0](https://github.com/nophead/NopSCADlib/releases/tag/v15.23.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v15.22.0...v15.23.0 "diff with v15.22.0")
* 2021-08-31 [`00c5c90`](https://github.com/nophead/NopSCADlib/commit/00c5c90a5e74f47f0e6f5e3a7996f70fa34f0833 "show commit") [C.P.](# "Chris Palmer") Updated big picture
* 2021-08-31 [`01c26d8`](https://github.com/nophead/NopSCADlib/commit/01c26d8a349e802738a8b0d06575a3e6915bf070 "show commit") [C.P.](# "Chris Palmer") Added Lichuan servo motors contributed by Niclas Hedhman.
* 2021-08-31 [`ef21024`](https://github.com/nophead/NopSCADlib/commit/ef2102420b15e5be4008a6a3cecf5416857265f9 "show commit") [C.P.](# "Chris Palmer") Added NEMA8 and NEMA8BH stepper motors.
Steppers can now have dual shafts, hollow shafts and black end caps.
* 2021-08-31 [`540f841`](https://github.com/nophead/NopSCADlib/commit/540f84116355e7f44a9b5796816d1e3422128ff3 "show commit") [C.P.](# "Chris Palmer") Added crude representation of JST ZH connectors.
* 2021-08-31 [`1045502`](https://github.com/nophead/NopSCADlib/commit/1045502efb1cb94fb7bcc11fd4483b425a880926 "show commit") [C.P.](# "Chris Palmer") Added more aluminium sheet thickness
* 2021-08-31 [`485184f`](https://github.com/nophead/NopSCADlib/commit/485184f09213ff0b191d5c8339471cd24ba3cc90 "show commit") [C.P.](# "Chris Palmer") Added HGH15CA and HGH20CA rails.
* 2021-08-31 [`b893c90`](https://github.com/nophead/NopSCADlib/commit/b893c9069a6bae762733cf1e139d49bab28ad792 "show commit") [C.P.](# "Chris Palmer") Added SFU1610 ballscrew nut
* 2021-08-31 [`69f4ced`](https://github.com/nophead/NopSCADlib/commit/69f4ced29da7e37c88ca24b924c6430144eec849 "show commit") [C.P.](# "Chris Palmer") Added `M8_cs_cap_screw,` `M5_grub_screw` and `M6_grub_screw`.
Fixed `M6_cs_cap_screw` and `M4_grub_screw` socket sizes.
* 2021-08-31 [`5c1aa84`](https://github.com/nophead/NopSCADlib/commit/5c1aa849fe5992617c3128c47dfc969504cbfd2f "show commit") [C.P.](# "Chris Palmer") New layout for big picture.
### [v15.22.0](https://github.com/nophead/NopSCADlib/releases/tag/v15.22.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v15.21.1...v15.22.0 "diff with v15.21.1")
* 2021-08-27 [`1247303`](https://github.com/nophead/NopSCADlib/commit/1247303cb9dc2694994993b5dc046683becb7fde "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
* 2021-08-13 [`14ab1bb`](https://github.com/nophead/NopSCADlib/commit/14ab1bb8b614055e0bf4ad33799276b0017ca13e "show commit") [M.B.](# "Martin Budden") Added Raspberry Pi Pico.
#### [v15.21.1](https://github.com/nophead/NopSCADlib/releases/tag/v15.21.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v15.21.0...v15.21.1 "diff with v15.21.0")
* 2021-08-09 [`be53547`](https://github.com/nophead/NopSCADlib/commit/be53547728834d8e786ad4cb5637c768320a3105 "show commit") [M.B.](# "Martin Budden") Fixed display of BLDC prop shaft when thread length `=` 0.

View File

@@ -55,6 +55,7 @@ include <vitamins/pulleys.scad>
include <vitamins/ring_terminals.scad>
include <vitamins/rails.scad>
include <vitamins/rod.scad>
include <vitamins/servo_motors.scad>
include <vitamins/shaft_couplings.scad>
include <vitamins/sheets.scad>
include <vitamins/sk_brackets.scad>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 913 KiB

After

Width:  |  Height:  |  Size: 931 KiB

View File

@@ -41,6 +41,7 @@
//
include <lib.scad>
use <tests/7_segments.scad>
use <tests/ball_bearings.scad>
use <tests/batteries.scad>
use <tests/bearing_blocks.scad>
@@ -83,6 +84,7 @@ use <tests/panel_meters.scad>
use <tests/PCBs.scad>
use <tests/pillars.scad>
use <tests/pillow_blocks.scad>
use <tests/potentiometers.scad>
use <tests/press_fit.scad>
use <tests/PSUs.scad>
use <tests/pulleys.scad>
@@ -92,6 +94,7 @@ use <tests/rockers.scad>
use <tests/rod.scad>
use <tests/screws.scad>
use <tests/sealing_strip.scad>
use <tests/servo_motors.scad>
use <tests/shaft_couplings.scad>
use <tests/sheets.scad>
use <tests/SK_brackets.scad>
@@ -185,16 +188,15 @@ translate([x5, cable_grommets_y + 250])
translate([950, 600])
box_test();
translate([830, 770])
translate([900, 750])
pocket_handles();
translate([950, 750])
translate([900, 850])
printed_boxes();
translate([850, 1330])
translate([850, 1330 + 85])
bbox_test();
inserts_y = 0;
nuts_y = inserts_y + 20;
washers_y = nuts_y + 120;
@@ -206,13 +208,14 @@ sealing_strip_y = springs_y + 20;
tubings_y = sealing_strip_y + 20;
pillars_y = tubings_y + 20;
ball_bearings_y = pillars_y + 40;
pulleys_y = ball_bearings_y +40;
hot_ends_y = pulleys_y + 60;
linear_bearings_y = hot_ends_y + 50;
sheets_y = linear_bearings_y + 90;
pulleys_y = ball_bearings_y + 40;
leadnuts_y = pulleys_y + 60;
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 + 170;
fans_y = displays_y + 80;
displays_y = pcbs_y + 140;
fans_y = displays_y + 110;
transformers_y = fans_y + 120;
psus_y = transformers_y + 190;
@@ -255,13 +258,16 @@ translate([x0, ball_bearings_y])
translate([x0, pulleys_y])
pulleys();
translate([x0, leadnuts_y])
leadnuts();
translate([x0, linear_bearings_y]) {
linear_bearings();
rods();
}
translate([x0 + 10, hot_ends_y])
hot_ends();
translate([x0, steppers_y])
stepper_motors();
translate([x0, sheets_y])
sheets();
@@ -279,7 +285,7 @@ translate([x0, fans_y]) {
fan_guards();
}
translate([x0, transformers_y])
translate([760, fans_y])
variacs();
translate([x0, psus_y]) {
@@ -291,7 +297,6 @@ translate([x0, psus_y]) {
zipties_y = 0;
bulldogs_y = zipties_y + 30;
swiss_clips_y = bulldogs_y + 35;
leadnuts_y = swiss_clips_y + 50;
translate([x1, zipties_y])
zipties();
@@ -302,10 +307,6 @@ translate([x1, bulldogs_y])
translate([x1, swiss_clips_y])
swiss_clips();
translate([x1, leadnuts_y])
leadnuts();
leds_y = 0;
carriers_y = leds_y + 40;
magnets_y = carriers_y + 40;
@@ -362,9 +363,9 @@ iecs_y = d_connectors_y + 80;
modules_y = iecs_y + 60;
ssrs_y = modules_y + 80;
blowers_y = ssrs_y + 60;
batteries_y = blowers_y + 100;
steppers_y = batteries_y + 55;
panel_meters_y = steppers_y + 70;
hot_ends_y = blowers_y + 100;
batteries_y = hot_ends_y + 55;
panel_meters_y = batteries_y + 70;
extrusions_y = panel_meters_y + 80;
translate([x3, veroboard_y])
@@ -409,8 +410,8 @@ translate([x3, blowers_y])
translate([x3, batteries_y])
batteries();
translate([x2, steppers_y]) // interloper
stepper_motors();
translate([x3 + 10, hot_ends_y])
hot_ends();
translate([x2, panel_meters_y])
panel_meters();
@@ -418,7 +419,7 @@ translate([x2, panel_meters_y])
translate([x2, extrusions_y])
extrusions();
translate([x3, transformers_y])
translate([400, transformers_y])
transformers();
@@ -426,18 +427,21 @@ belts_y = 0;
rails_y = belts_y + 200;
extrusion_brackets_y = rails_y + 250;
sk_brackets_y = extrusion_brackets_y + 80;
kp_pillow_blocks_y = sk_brackets_y + 50;
kp_pillow_blocks_y = sk_brackets_y + 60;
scs_bearing_blocks_y = kp_pillow_blocks_y + 60;
cable_strip_y = fans_y + 50;
box_sections_y = cable_strip_y;
BLDC_y = sheets_y;
box_sections_y = batteries_y;
BLDC_y = scs_bearing_blocks_y + 120;
pot_y = BLDC_y + 40;
cable_strip_y = pot_y + 50;
translate([0, transformers_y])
servo_motors();
translate([x4 + 200, belts_y + 58]) {
belt_test();
translate([0, 60])
opengrab_test();
}
translate([x4 + 175, belts_y, -20])
@@ -446,7 +450,7 @@ translate([x4 + 175, belts_y, -20])
translate([x4, rails_y + 130])
rails();
translate([770, cable_strip_y])
translate([x4, cable_strip_y])
cable_strips();
translate([x4, kp_pillow_blocks_y])
@@ -458,7 +462,7 @@ translate([x4, sk_brackets_y])
translate([x4, extrusion_brackets_y])
extrusion_brackets();
translate([x4 + 120, extrusion_brackets_y])
translate([x1, swiss_clips_y + 50])
shaft_couplings();
translate([x4, scs_bearing_blocks_y])
@@ -467,7 +471,10 @@ translate([x4, scs_bearing_blocks_y])
translate([x4, BLDC_y])
bldc_motors();
translate([x6, box_sections_y])
translate([x4, pot_y])
potentiometers();
translate([x2, box_sections_y])
box_sections();
translate([x6, 125])

332
readme.md
View File

@@ -21,33 +21,64 @@ 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 = "#Axials">Axials</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 = "#BLDC_motors">BLDC_motors</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 = "#Ball_bearings">Ball_bearings</a> </td><td> <a href = "#Jack">Jack</a> </td><td> <a href = "#Rockers">Rockers</a> </td><td> <a href = "#Cable_grommets">Cable_grommets</a> </td><td> <a href = "#Catenary">Catenary</a> </td><td> <a href = "#Global">Global</a> </td></tr>
<tr><td> <a href = "#Batteries">Batteries</a> </td><td> <a href = "#LDRs">LDRs</a> </td><td> <a href = "#Rod">Rod</a> </td><td> <a href = "#Camera_housing">Camera_housing</a> </td><td> <a href = "#Core_xy">Core_xy</a> </td><td> <a href = "#Polyholes">Polyholes</a> </td></tr>
<tr><td> <a href = "#Bearing_blocks">Bearing_blocks</a> </td><td> <a href = "#LED_meters">LED_meters</a> </td><td> <a href = "#SK_brackets">SK_brackets</a> </td><td> <a href = "#Carriers">Carriers</a> </td><td> <a href = "#Dogbones">Dogbones</a> </td><td> <a href = "#Rounded_rectangle">Rounded_rectangle</a> </td></tr>
<tr><td> <a href = "#Belts">Belts</a> </td><td> <a href = "#LEDs">LEDs</a> </td><td> <a href = "#SMDs">SMDs</a> </td><td> <a href = "#Corner_block">Corner_block</a> </td><td> <a href = "#Fillet">Fillet</a> </td><td> <a href = "#Sphere">Sphere</a> </td></tr>
<tr><td> <a href = "#Blowers">Blowers</a> </td><td> <a href = "#Leadnuts">Leadnuts</a> </td><td> <a href = "#SSRs">SSRs</a> </td><td> <a href = "#Door_hinge">Door_hinge</a> </td><td> <a href = "#Gears">Gears</a> </td><td> <a href = "#Teardrops">Teardrops</a> </td></tr>
<tr><td> <a href = "#Box_sections">Box_sections</a> </td><td> <a href = "#Light_strips">Light_strips</a> </td><td> <a href = "#Screws">Screws</a> </td><td> <a href = "#Door_latch">Door_latch</a> </td><td> <a href = "#Hanging_hole">Hanging_hole</a> </td><td></td></tr>
<tr><td> <a href = "#Bulldogs">Bulldogs</a> </td><td> <a href = "#Linear_bearings">Linear_bearings</a> </td><td> <a href = "#Sealing_strip">Sealing_strip</a> </td><td> <a href = "#Drag_chain">Drag_chain</a> </td><td> <a href = "#Horiholes">Horiholes</a> </td><td></td></tr>
<tr><td> <a href = "#Buttons">Buttons</a> </td><td> <a href = "#Magnets">Magnets</a> </td><td> <a href = "#Shaft_couplings">Shaft_couplings</a> </td><td> <a href = "#Fan_guard">Fan_guard</a> </td><td> <a href = "#Layout">Layout</a> </td><td></td></tr>
<tr><td> <a href = "#Cable_strips">Cable_strips</a> </td><td> <a href = "#Mains_sockets">Mains_sockets</a> </td><td> <a href = "#Sheets">Sheets</a> </td><td> <a href = "#Fixing_block">Fixing_block</a> </td><td> <a href = "#Maths">Maths</a> </td><td></td></tr>
<tr><td> <a href = "#Cameras">Cameras</a> </td><td> <a href = "#Microswitches">Microswitches</a> </td><td> <a href = "#Spades">Spades</a> </td><td> <a href = "#Flat_hinge">Flat_hinge</a> </td><td> <a href = "#Offset">Offset</a> </td><td></td></tr>
<tr><td> <a href = "#Circlips">Circlips</a> </td><td> <a href = "#Microview">Microview</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Foot">Foot</a> </td><td> <a href = "#Quadrant">Quadrant</a> </td><td></td></tr>
<tr><td> <a href = "#Components">Components</a> </td><td> <a href = "#Modules">Modules</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#Handle">Handle</a> </td><td> <a href = "#Round">Round</a> </td><td></td></tr>
<tr><td> <a href = "#DIP">DIP</a> </td><td> <a href = "#Nuts">Nuts</a> </td><td> <a href = "#Stepper_motors">Stepper_motors</a> </td><td> <a href = "#PCB_mount">PCB_mount</a> </td><td> <a href = "#Rounded_cylinder">Rounded_cylinder</a> </td><td></td></tr>
<tr><td> <a href = "#D_connectors">D_connectors</a> </td><td> <a href = "#O_ring">O_ring</a> </td><td> <a href = "#Swiss_clips">Swiss_clips</a> </td><td> <a href = "#PSU_shroud">PSU_shroud</a> </td><td> <a href = "#Rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
<tr><td> <a href = "#Displays">Displays</a> </td><td> <a href = "#Opengrab">Opengrab</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td> <a href = "#Pocket_handle">Pocket_handle</a> </td><td> <a href = "#Rounded_triangle">Rounded_triangle</a> </td><td></td></tr>
<tr><td> <a href = "#Extrusion_brackets">Extrusion_brackets</a> </td><td> <a href = "#PCB">PCB</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td> <a href = "#Press_fit">Press_fit</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr>
<tr><td> <a href = "#Extrusions">Extrusions</a> </td><td> <a href = "#PCBs">PCBs</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td> <a href = "#Printed_box">Printed_box</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
<tr><td> <a href = "#Fans">Fans</a> </td><td> <a href = "#PSUs">PSUs</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td> <a href = "#Printed_pulleys">Printed_pulleys</a> </td><td> <a href = "#Thread">Thread</a> </td><td></td></tr>
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Panel_meters">Panel_meters</a> </td><td> <a href = "#Veroboard">Veroboard</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 = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#Pillars">Pillars</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 = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Pillow_blocks">Pillow_blocks</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 = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Pin_headers">Pin_headers</a> </td><td> <a href = "#Zipties">Zipties</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td></td><td> <a href = "#Strap_handle">Strap_handle</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 = "#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_grommets">Cable_grommets</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 = "#Camera_housing">Camera_housing</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 = "#Carriers">Carriers</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 = "#Corner_block">Corner_block</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 = "#Door_hinge">Door_hinge</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_latch">Door_latch</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 = "#Drag_chain">Drag_chain</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 = "#Fan_guard">Fan_guard</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 = "#Fixing_block">Fixing_block</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 = "#Flat_hinge">Flat_hinge</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 = "#Foot">Foot</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 = "#Handle">Handle</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 = "#PCB_mount">PCB_mount</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 = "#PSU_shroud">PSU_shroud</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 = "#Pocket_handle">Pocket_handle</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 = "#Toggles">Toggles</a> </td><td> <a href = "#Press_fit">Press_fit</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 = "#Transformers">Transformers</a> </td><td> <a href = "#Printed_box">Printed_box</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 = "#Tubings">Tubings</a> </td><td> <a href = "#Printed_pulleys">Printed_pulleys</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 = "#Variacs">Variacs</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 = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td> <a href = "#SSR_shroud">SSR_shroud</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 = "#Washers">Washers</a> </td><td> <a href = "#Screw_knob">Screw_knob</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 = "#Wire">Wire</a> </td><td> <a href = "#Socket_box">Socket_box</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 = "#Zipties">Zipties</a> </td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td></td><td></td><td></td><td></td></tr>
</table>
---
<a name="7_segments"></a>
## 7_segments
7 Segment displays
[vitamins/7_segments.scad](vitamins/7_segments.scad) Object definitions.
[vitamins/7_segment.scad](vitamins/7_segment.scad) Implementation.
[tests/7_segments.scad](tests/7_segments.scad) Code for this example.
### Properties
| Function | Description |
|:--- |:--- |
| `7_segment_digit_size(type)` | Size of the actual digit and segemnt width and angle |
| `7_segment_pin_pitch(type)` | x and y pin pitches and pin diameter |
| `7_segment_pins(type)` | None |
| `7_segment_size(type)` | Size of the body |
### Modules
| Module | Description |
|:--- |:--- |
| `7_segment_digit(type, colour = grey(95)` | Draw the specified 7 segment digit |
| `7_segment_digits(type, n, colour = grey(70)` | Draw n digits side by side |
![7_segments](tests/png/7_segments.png)
<a href="#top">Top</a>
---
<a name="Axials"></a>
## Axials
@@ -941,6 +972,7 @@ LCD displays.
| ---:|:--- |:---|
| 1 | `display(BigTreeTech_TFT35v3_0)` | BigTreeTech TFT35 v3.0 |
| 1 | `display(HDMI5)` | HDMI display 5" |
| 1 | `display(TFT128x160)` | LCD TFT ST7735 display 128x160 |
| 1 | `display(LCD1602A)` | LCD display 1602A |
| 1 | `display(LCDS7282B)` | LCD display S-7282B |
| 1 | `display(SSD1963_4p3)` | LCD display SSD1963 4.3" |
@@ -963,34 +995,47 @@ Brackets for joining extrusions at a corner.
| Function | Description |
|:--- |:--- |
| `extrusion_corner_bracket_base_thickness(type)` | Thickness of base of bracket |
| `extrusion_corner_bracket_extrusion(type)` | Default extrusion this bracket is for |
| `extrusion_corner_bracket_hole_offset(type)` | Hole offset from corner |
| `extrusion_corner_bracket_side_thickness(type)` | Thickness of side of bracket |
| `extrusion_corner_bracket_size(type)` | Size of bracket |
| `extrusion_corner_bracket_tnut(type)` | The sliding t-nut to use in the assembly |
| `extrusion_inner_corner_bracket_extrusion(type)` | Default extrusion this bracket is for |
| `extrusion_inner_corner_bracket_screw_offsets(type)` | Screw offsets from the ends |
| `extrusion_inner_corner_bracket_size(type)` | Size of inner bracket |
| `extrusion_inner_corner_bracket_tnut(type)` | The sliding t-nut it is based on |
### Modules
| Module | Description |
|:--- |:--- |
| `extrusion_corner_bracket(type)` | Corner bracket for extrusion |
| `extrusion_corner_bracket_assembly(type, part_thickness = 2, screw_type = M4_cap_screw, nut_type = M4_sliding_t_nut, max_screw_depth = 6)` | Assembly with fasteners in place |
| `extrusion_corner_bracket_assembly(type, part_thickness = undef, screw_type = undef, nut_type = undef, max_screw_depth = undef, extrusion = undef)` | Assembly with fasteners in place |
| `extrusion_corner_bracket_hole_positions(type)` | Place children at hole positions |
| `extrusion_inner_corner_bracket(type, grub_screws = true)` | Inner corner bracket for extrusion |
| `extrusion_inner_corner_bracket(type, grub_screws = true, backwards = false, extrusion = undef)` | Inner corner bracket for extrusion |
![extrusion_brackets](tests/png/extrusion_brackets.png)
### Vitamins
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 1 | `extrusion(E2020, 20)` | Extrusion E2020 x 20mm |
| 1 | `extrusion(E2020, 30)` | Extrusion E2020 x 30mm |
| 1 | `extrusion(E2020, 40)` | Extrusion E2020 x 40mm |
| 1 | `extrusion(E2020, 50)` | Extrusion E2020 x 50mm |
| 2 | `extrusion_corner_bracket(E20_corner_bracket)` | Extrusion corner bracket 20 |
| 2 | `extrusion_inner_corner_bracket(E20_inner_corner_bracket, true)` | Extrusion inner corner bracket 4.5 |
| 1 | `extrusion_inner_corner_bracket(E20_inner_corner_bracket, false)` | Extrusion inner corner bracket 4.5 |
| 2 | `extrusion(E2020t, 20.5)` | Extrusion E2020t x 20.5mm |
| 1 | `extrusion(E2020t, 28)` | Extrusion E2020t x 28mm |
| 2 | `extrusion(E2020t, 39.5)` | Extrusion E2020t x 39.5mm |
| 1 | `extrusion(E2020t, 48)` | Extrusion E2020t x 48mm |
| 1 | `extrusion(E4040t, 27.4, cornerHole = true)` | Extrusion E4040t x 27.4mm |
| 1 | `extrusion(E4040t, 40, cornerHole = true)` | Extrusion E4040t x 40mm |
| 1 | `extrusion(E4040t, 60.4, cornerHole = true)` | Extrusion E4040t x 60.4mm |
| 1 | `extrusion(E4040t, 80, cornerHole = true)` | Extrusion E4040t x 80mm |
| 2 | `extrusion_corner_bracket(E20_corner_bracket)` | Extrusion corner bracket 20mm for E2020t |
| 2 | `extrusion_corner_bracket(E40_corner_bracket)` | Extrusion corner bracket 35mm for E4040t |
| 4 | `extrusion_inner_corner_bracket(E20_inner_corner_bracket)` | Extrusion inner corner bracket for E2020t |
| 2 | `extrusion_inner_corner_bracket(E40_inner_corner_bracket)` | Extrusion inner corner bracket for E4040t |
| 4 | `sliding_t_nut(M4_sliding_t_nut)` | Nut M4 sliding T |
| 4 | `sliding_t_nut(M8_sliding_ball_t_nut)` | Nut M8 sliding T with spring loaded ball |
| 4 | `screw(M4_cap_screw, 8)` | Screw M4 cap x 8mm |
| 4 | `screw(M8_cap_screw, 12)` | Screw M8 cap x 12mm |
| 4 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm |
| 4 | `washer(M8_washer)` | Washer M8 x 17mm x 1.6mm |
<a href="#top">Top</a>
@@ -1009,17 +1054,25 @@ Aluminium extrusion.
### Properties
| Function | Description |
|:--- |:--- |
| `extrusion_center_hole(type)` | Diameter of center hole |
| `extrusion_center_square(type)` | Size of center square |
| `extrusion_center_hole_wd(type)` | Diameter of center hole if -ve or square side if +ve |
| `extrusion_center_square_wd(type)` | Size of center square if +ve or tube diameter if -ve |
| `extrusion_channel_recess(type)` | Channel recess width and depth or false in none |
| `extrusion_channel_width(type)` | Channel width |
| `extrusion_channel_width_internal(type)` | Internal channel width |
| `extrusion_corner_hole(type)` | Diameter of corner hole |
| `extrusion_corner_hole_wd(type)` | Diameter of corner hole if -ve or square side if +ve |
| `extrusion_fillet(type)` | Radius of corner fillet |
| `extrusion_height(type)` | Height of extrusion |
| `extrusion_spar_thickness(type)` | Spar thickness |
| `extrusion_tab_thickness(type)` | Tab thickness |
| `extrusion_width(type)` | Width of extrusion |
### Functions
| Function | Description |
|:--- |:--- |
| `extrusion_center_hole(type)` | Diameter of center hole or side if square |
| `extrusion_center_square(type)` | Size of center square or tube |
| `extrusion_corner_hole(type)` | Diameter of corner hole or side if square |
### Modules
| Module | Description |
|:--- |:--- |
@@ -1032,12 +1085,14 @@ Aluminium extrusion.
| ---:|:--- |:---|
| 1 | `extrusion(E1515, 80)` | Extrusion E1515 x 80mm |
| 1 | `extrusion(E2020, 80)` | Extrusion E2020 x 80mm |
| 1 | `extrusion(E2020t, 80)` | Extrusion E2020t x 80mm |
| 1 | `extrusion(E2040, 80)` | Extrusion E2040 x 80mm |
| 1 | `extrusion(E2060, 80)` | Extrusion E2060 x 80mm |
| 1 | `extrusion(E2080, 80)` | Extrusion E2080 x 80mm |
| 1 | `extrusion(E3030, 80, cornerHole = true)` | Extrusion E3030 x 80mm |
| 1 | `extrusion(E3060, 80, cornerHole = true)` | Extrusion E3060 x 80mm |
| 1 | `extrusion(E4040, 80, cornerHole = true)` | Extrusion E4040 x 80mm |
| 1 | `extrusion(E4040t, 80, cornerHole = true)` | Extrusion E4040t x 80mm |
| 1 | `extrusion(E4080, 80, cornerHole = true)` | Extrusion E4080 x 80mm |
@@ -1470,6 +1525,7 @@ E.g. a "brown" socket for mains live needs to be displayed as "sienna" to look r
|:--- |:--- |
| `jack_4mm_hole_radius()` | Panel hole radius for 4mm jack |
| `jack_4mm_shielded_hole_radius()` | Panel hole radius for 4mm shielded jack |
| `jack_4mm_shielded_nut_radius()` | Largest diameter of 4mm shielded jack |
| `post_4mm_diameter()` | Outer diameter of 4mm binding post |
### Modules
@@ -1547,9 +1603,11 @@ Nuts for leadscrews.
| Function | Description |
|:--- |:--- |
| `leadnut_bore(type)` | Thread size |
| `leadnut_colour(type)` | The colour |
| `leadnut_flange_dia(type)` | Flange diameter |
| `leadnut_flange_offset(type)` | Offset of the flange from the top |
| `leadnut_flange_t(type)` | Flange thickness |
| `leadnut_flat(type)` | Flat section width |
| `leadnut_height(type)` | Total height |
| `leadnut_hole_dia(type)` | The diameter of the screw holes |
| `leadnut_hole_pitch(type)` | The radial pitch of the screw holes |
@@ -1577,6 +1635,7 @@ Nuts for leadscrews.
| ---:|:--- |:---|
| 1 | `leadnut(LSN8x2)` | Leadscrew nut 8 x 2 |
| 1 | `leadnut(LSN8x8)` | Leadscrew nut 8 x 8 RobotDigg |
| 1 | `leadnut(SFU1610)` | Leadscrew nut for SFU1610 |
<a href="#top">Top</a>
@@ -2045,6 +2104,7 @@ If a nut is given a child then it gets placed on its top surface.
| `nut_thickness(type, nyloc = false)` | Thickness of plain or nyloc version |
| `nut_trap_flat_radius(nut, horizontal = false)` | Radius across the flats of a nut trap |
| `nut_trap_radius(nut, horizontal = false)` | Radius across the corners of a nut trap |
| `t_nut_tab(type)` | Sliding t-nut T dimensions |
### Modules
| Module | Description |
@@ -2053,6 +2113,7 @@ If a nut is given a child then it gets placed on its top surface.
| `nut_and_washer(type, nyloc)` | Draw nut with corresponding washer |
| `nut_square(type, brass = false, nylon = false)` | Draw specified square nut |
| `nut_trap(screw, nut, depth = 0, horizontal = false, supported = false, h = 200)` | Make a nut trap |
| `sliding_t_nut(type)` | Draw a sliding T nut, T nut with a spring loaded ball or a hammer nut. |
| `wingnut(type)` | Draw a wingnut |
![nuts](tests/png/nuts.png)
@@ -2080,10 +2141,12 @@ If a nut is given a child then it gets placed on its top surface.
| 1 | `nut(M5_nut)` | Nut M5 x 4mm |
| 1 | `nut(M5_nut, nyloc = true)` | Nut M5 x 4mm nyloc |
| 1 | `nut(M5nS_thin_nut)` | Nut M5nS 8 x 2.7mm |
| 1 | `sliding_t_nut(M6_sliding_t_nut)` | Nut M6 hammer |
| 1 | `nut(M6_half_nut)` | Nut M6 x 3mm |
| 1 | `nut(M6_nut)` | Nut M6 x 5mm |
| 1 | `nut(M6_nut, nyloc = true)` | Nut M6 x 5mm nyloc |
| 1 | `nut(M6nS_thin_nut)` | Nut M6nS 10 x 3.2mm |
| 1 | `sliding_t_nut(M8_sliding_ball_t_nut)` | Nut M8 sliding T with spring loaded ball |
| 1 | `nut(M8_nut)` | Nut M8 x 6.5mm |
| 1 | `nut(M8_nut, nyloc = true)` | Nut M8 x 6.5mm nyloc |
| 1 | `nut(M8nS_thin_nut)` | Nut M8nS 13 x 4mm |
@@ -2277,12 +2340,12 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| `barrel_jack(cutout = false)` | Draw barrel power jack |
| `block(size, colour, makes_cutout, cutouts)` | 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 |
| `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 |
| `flex(cutout = false)` | Draw flexistrip connector |
| `hdmi(type, cutout = false)` | Draw HDMI socket |
| `jack(cutout = false)` | Draw 3.5mm jack |
| `molex_254(ways)` | Draw molex header |
| `molex_254(ways, right_angle = 0, skip = undef)` | Draw molex header, set `right_angle` to 1 for normal right angle version or -1 for inverted right angle version. |
| `molex_usb_Ax1(cutout)` | Draw Molex USB A connector suitable for perf board |
| `molex_usb_Ax2(cutout)` | Draw Molex dual USB A connector suitable for perf board |
| `pcb(type)` | Draw specified PCB |
@@ -2293,6 +2356,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| `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 position |
| `pcb_grid_components(type, components, cutouts = false, angle = undef)` | Draw list of components on the PCB grid for perf board |
| `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 |
@@ -2305,6 +2369,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| `usb_B(cutout = false)` | Draw USB B connector |
| `usb_C(cutout = false)` | Draw USB C connector |
| `usb_uA(cutout = false)` | Draw USB micro A connector |
| `vero_pin(cropped = false)` | Draw a vero pin |
![pcb](tests/png/pcb.png)
@@ -2355,7 +2420,8 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `green_terminal(gt_5x17, 3)` | Terminal block 3 way 5mm |
| 2 | `green_terminal(gt_3p5, 4)` | Terminal block 4 way 3.5mm |
| 1 | `terminal_35(4)` | Terminal block 4 way 3.5mm |
| 1 | `pcb(TestPCB)` | Test PCB |
| 1 | `pcb(test_pcb)` | Test PCB |
| 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" |
@@ -2418,12 +2484,12 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| `barrel_jack(cutout = false)` | Draw barrel power jack |
| `block(size, colour, makes_cutout, cutouts)` | 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 |
| `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 |
| `flex(cutout = false)` | Draw flexistrip connector |
| `hdmi(type, cutout = false)` | Draw HDMI socket |
| `jack(cutout = false)` | Draw 3.5mm jack |
| `molex_254(ways)` | Draw molex header |
| `molex_254(ways, right_angle = 0, skip = undef)` | Draw molex header, set `right_angle` to 1 for normal right angle version or -1 for inverted right angle version. |
| `molex_usb_Ax1(cutout)` | Draw Molex USB A connector suitable for perf board |
| `molex_usb_Ax2(cutout)` | Draw Molex dual USB A connector suitable for perf board |
| `pcb(type)` | Draw specified PCB |
@@ -2434,6 +2500,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| `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 position |
| `pcb_grid_components(type, components, cutouts = false, angle = undef)` | Draw list of components on the PCB grid for perf board |
| `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 |
@@ -2446,6 +2513,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| `usb_B(cutout = false)` | Draw USB B connector |
| `usb_C(cutout = false)` | Draw USB C connector |
| `usb_uA(cutout = false)` | Draw USB micro A connector |
| `vero_pin(cropped = false)` | Draw a vero pin |
![pcbs](tests/png/pcbs.png)
@@ -2453,18 +2521,21 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 1 | `pcb(ArduinoLeonardo)` | Arduino Leonardo |
| 1 | `pcb(ArduinoNano)` | Arduino Nano |
| 1 | `pcb(ArduinoUno3)` | Arduino Uno R3 |
| 1 | `pcb(BTT_SKR_E3_TURBO)` | BigTreeTech SKR E3 Turbo |
| 1 | `pcb(BTT_SKR_MINI_E3_V2_0)` | BigTreeTech SKR Mini E3 v2.0 |
| 1 | `pcb(BTT_SKR_V1_4_TURBO)` | BigTreeTech SKR v1.4 Turbo |
| 1 | | Cat 5 patch cable 300mm |
| 1 | `d_plug(DCONN15, pcb = true)` | D-type 15 way PCB mount plug |
| 1 | `d_plug(DCONN15, pcb = true)` | D-type 15 way PCB mount plug - not shown |
| 1 | `pcb(DuetE)` | Duet 2 Ethernet electronics |
| 1 | `pcb(Duex2)` | Duex2 expansion board - not shown |
| 1 | `pcb(Duex5)` | Duex5 expansion board |
| 1 | `pcb(ESP-01)` | ESP-01 |
| 1 | `pcb(ESP32_DOIT_V1)` | ESP32 DOIT DEV KIT V1 |
| 1 | `pcb(EnviroPlus)` | Enviro+ |
| 1 | `pcb(ExtruderPCB)` | Extruder connection PCB |
| 1 | `pcb(ExtruderPCB)` | Extruder connection PCB - not shown |
| 1 | `pcb(KY_040)` | KY_-040 rotart encoder breakout |
| 1 | `pcb(Keyes5p1)` | Keyes5.1 Arduino Uno expansion board - not shown |
| 1 | `pcb(LIPO_fuel_gauge)` | LIPO fuel gauge |
| 1 | `pcb(MP1584EN)` | MP1584EN 3A buck converter |
@@ -2472,13 +2543,13 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `pcb(Melzi)` | Melzi electronics - not shown |
| 4 | | Micro SD card |
| 1 | | Micro SD card - not shown |
| 1 | `molex_254(2)` | Molex KK header 2 way |
| 1 | `molex_254(3)` | Molex KK header 3 way |
| 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 |
| 30 | `nut(M2p5_nut, nyloc = true)` | Nut M2.5 x 2.2mm nyloc |
| 26 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
| 28 | `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(PI_IO)` | PI_IO V2 |
| 1 | `pcb(PI_IO)` | PI_IO V2 - not shown |
| 1 | `pcb(PSU12V1A)` | PSU 12V 1A - not shown |
| 1 | `pcb(PERF60x40)` | Perfboard 60 x 40mm |
| 1 | `pcb(PERF70x30)` | Perfboard 70 x 30mm |
@@ -2486,7 +2557,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `pcb(PERF70x51)` | Perfboard 70 x 51mm |
| 1 | `pcb(PERF74x51)` | Perfboard 74 x 51mm |
| 1 | `pcb(PERF80x20)` | Perfboard 80 x 20mm |
| 1 | `pin_socket(2p54header, 13, 2, right_angle = true)` | Pin socket 13 x 2 right_angle |
| 1 | `pin_socket(2p54header, 13, 2, right_angle = true)` | Pin socket 13 x 2 right_angle - not shown |
| 1 | `pcb(RAMPSEndstop)` | RAMPS Endstop Switch |
| 1 | `pcb(RPI3)` | Raspberry Pi 3 |
| 1 | `pcb(RPI4)` | Raspberry Pi 4 |
@@ -2495,24 +2566,23 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 8 | `screw(M2_cap_screw, 16)` | Screw M2 cap x 16mm |
| 12 | `screw(M2_cap_screw, 20)` | Screw M2 cap x 20mm |
| 2 | `screw(M2p5_cap_screw, 16)` | Screw M2.5 cap x 16mm |
| 4 | `screw(M2p5_cap_screw, 20)` | Screw M2.5 cap x 20mm |
| 8 | `screw(M2p5_cap_screw, 25)` | Screw M2.5 cap x 25mm |
| 4 | `screw(M2p5_cap_screw, 30)` | Screw M2.5 cap x 30mm |
| 8 | `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 |
| 4 | `screw(M3_cap_screw, 25)` | Screw M3 cap x 25mm |
| 10 | `screw(M3_cap_screw, 16)` | Screw M3 cap x 16mm |
| 14 | `screw(M3_cap_screw, 30)` | Screw M3 cap x 30mm |
| 4 | `screw(M3_cap_screw, 35)` | Screw M3 cap x 35mm |
| 8 | `screw(M4_cap_screw, 35)` | Screw M4 cap x 35mm |
| 1 | `pcb(XIAO)` | Seeeduino XIAO |
| 1 | `pcb(TP4056)` | TP4056 Li-lon Battery charger module |
| 3 | `terminal_35(2)` | Terminal block 2 way 3.5mm |
| 2 | `green_terminal(gt_2p54, 4)` | Terminal block 4 way 0.1" |
| 3 | `terminal_35(2)` | Terminal block 2 way 3.5mm - not shown |
| 2 | `green_terminal(gt_2p54, 4)` | Terminal block 4 way 0.1" - not shown |
| 1 | | USB A to Mini B lead - not shown |
| 1 | `pcb(WD2002SJ)` | WD2002SJ Buck Boost DC-DC converter |
| 20 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm |
| 30 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm |
| 26 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
| 28 | `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 |
@@ -2523,22 +2593,22 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 4 | pcb_spacer2070.stl |
| 4 | pcb_spacer2080.stl |
| 4 | pcb_spacer2090.stl |
| 4 | pcb_spacer25110.stl |
| 4 | pcb_spacer25120.stl |
| 4 | pcb_spacer25130_2.stl |
| 4 | pcb_spacer25130.stl |
| 4 | pcb_spacer25140_2.stl |
| 4 | pcb_spacer25160.stl |
| 4 | pcb_spacer25150_2.stl |
| 4 | pcb_spacer25170.stl |
| 4 | pcb_spacer25180.stl |
| 2 | pcb_spacer2550.stl |
| 4 | pcb_spacer2590.stl |
| 4 | pcb_spacer30150.stl |
| 5 | pcb_spacer30180.stl |
| 4 | pcb_spacer2580.stl |
| 4 | pcb_spacer30160.stl |
| 5 | pcb_spacer30190.stl |
| 4 | pcb_spacer30200.stl |
| 5 | pcb_spacer30200.stl |
| 4 | pcb_spacer30210.stl |
| 4 | pcb_spacer3050.stl |
| 4 | pcb_spacer3060.stl |
| 4 | pcb_spacer40210.stl |
| 6 | pcb_spacer3060.stl |
| 4 | pcb_spacer40220.stl |
| 4 | pcb_spacer40230.stl |
<a href="#top">Top</a>
@@ -2674,7 +2744,7 @@ 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 |
| `jst_xh_header(type, pin_count, right_angle = false, colour = false, pin_colour = false)` | Draw JST XH connector |
| `jst_xh_header(type, pin_count, right_angle = false, colour = false, pin_colour = false, smt = false)` | Draw JST XH connector |
| `pin(type, length = undef)` | Draw a header pin |
| `pin_header(type, cols = 1, rows = 1, smt = false, right_angle = false, cutout = false, colour)` | Draw pin header |
| `pin_socket(type, cols = 1, rows = 1, right_angle = false, height = 0, smt = false, cutout = false, colour)` | Draw pin socket |
@@ -2699,6 +2769,50 @@ Pin headers and sockets, etc.
| 1 | `pin_socket(2p54header, 8, 1)` | Pin socket 8 x 1 |
<a href="#top">Top</a>
---
<a name="Potentiometers"></a>
## Potentiometers
Potentiometers and rotary encoders
[vitamins/potentiometers.scad](vitamins/potentiometers.scad) Object definitions.
[vitamins/potentiometer.scad](vitamins/potentiometer.scad) Implementation.
[tests/potentiometers.scad](tests/potentiometers.scad) Code for this example.
### Properties
| Function | Description |
|:--- |:--- |
| `pot_body(type)` | Body diameter or width & depth, height and corner radius |
| `pot_boss_d(type)` | Boss diameter |
| `pot_boss_h(type)` | Boss height |
| `pot_face(type)` | Faceplate rib width, plate depth and plate height |
| `pot_gangs(type)` | Number of gangs for mult-gang pot |
| `pot_neck(type)` | Diameter and length of the shaft neck |
| `pot_shaft(type)` | Diameter, flat diameter, length and flat/slot length and colour. If flat diameter is less than the radius then it is a slot width |
| `pot_spigot(type)` | Spigot width, length and height above the boss |
| `pot_spigot_x(type)` | Spigot offset from the shaft centre |
| `pot_thread_d(type)` | Nomininal thread diameter |
| `pot_thread_h(type)` | Height of threaded part |
| `pot_thread_p(type)` | Thread pritch |
| `pot_wafer(type)` | Width, diameter and thickness of the track wafer plus true if curved |
### Functions
| Function | Description |
|:--- |:--- |
| `pot_size(type)` | Get pot body dimensions |
| `pot_z(type)` | Ideal distance behind panel surface to get the nut on comfortably |
### Modules
| Module | Description |
|:--- |:--- |
| `potentiometer(type, thickness = 3, shaft_length = undef)` | Draw a potentiometer with nut spaced by specified thickness |
![potentiometers](tests/png/potentiometers.png)
<a href="#top">Top</a>
---
@@ -2908,12 +3022,16 @@ Linear rails with carriages.
### Vitamins
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 1 | `rail(HGH15CA, 200)` | Linear rail HGH15CA x 200mm |
| 1 | `rail(HGH20CA, 200)` | Linear rail HGH20CA x 200mm |
| 1 | `rail(MGN12, 200)` | Linear rail MGN12 x 200mm |
| 1 | `rail(MGN15, 200)` | Linear rail MGN15 x 200mm |
| 1 | `rail(MGN5, 200)` | Linear rail MGN5 x 200mm |
| 1 | `rail(MGN7, 200)` | Linear rail MGN7 x 200mm |
| 1 | `rail(MGN9, 200)` | Linear rail MGN9 x 200mm |
| 1 | `rail(SSR15, 200)` | Linear rail SSR15 x 200mm |
| 1 | `carriage(HGH15CA_carriage)` | Linear rail carriage HGH15CA |
| 1 | `carriage(HGH20CA_carriage)` | Linear rail carriage HGH20CA |
| 1 | `carriage(MGN12C_carriage)` | Linear rail carriage MGN12C |
| 1 | `carriage(MGN12H_carriage)` | Linear rail carriage MGN12H |
| 1 | `carriage(MGN15C_carriage)` | Linear rail carriage MGN15C |
@@ -2925,7 +3043,8 @@ Linear rails with carriages.
| 1 | `carriage(SSR15_carriage)` | Linear rail carriage SSR15 |
| 26 | `nut(M2_nut, nyloc = true)` | Nut M2 x 1.6mm nyloc |
| 23 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
| 4 | `nut(M4_nut, nyloc = true)` | Nut M4 x 3.2mm nyloc |
| 7 | `nut(M4_nut, nyloc = true)` | Nut M4 x 3.2mm nyloc |
| 3 | `nut(M5_nut, nyloc = true)` | Nut M5 x 4mm nyloc |
| 11 | `screw(M2_cap_screw, 10)` | Screw M2 cap x 10mm |
| 15 | `screw(M2_cs_cap_screw, 10)` | Screw M2 cs cap x 10mm |
| 8 | `screw(M3_cap_screw, 10)` | Screw M3 cap x 10mm |
@@ -2934,10 +3053,15 @@ Linear rails with carriages.
| 2 | `screw(M3_cs_cap_screw, 12)` | Screw M3 cs cap x 12mm |
| 4 | `screw(M3_cs_cap_screw, 16)` | Screw M3 cs cap x 16mm |
| 2 | `screw(M4_cap_screw, 16)` | Screw M4 cap x 16mm |
| 2 | `screw(M4_cap_screw, 20)` | Screw M4 cap x 20mm |
| 2 | `screw(M4_cs_cap_screw, 20)` | Screw M4 cs cap x 20mm |
| 2 | `screw(M4_cs_cap_screw, 25)` | Screw M4 cs cap x 25mm |
| 2 | `screw(M5_cap_screw, 20)` | Screw M5 cap x 20mm |
| 2 | `screw(M5_cs_cap_screw, 25)` | Screw M5 cs cap x 25mm |
| 26 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm |
| 23 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
| 4 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm |
| 7 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm |
| 3 | `washer(M5_washer)` | Washer M5 x 10mm x 1mm |
<a href="#top">Top</a>
@@ -3149,6 +3273,7 @@ For an explanation of `screw_polysink()` see <https://hydraraptor.blogspot.com/2
| 1 | `screw(M2_cs_cap_screw, 10)` | Screw M2 cs cap x 10mm |
| 1 | `screw(M2_dome_screw, 10)` | Screw M2 dome x 10mm |
| 1 | `screw(M2p5_cap_screw, 10)` | Screw M2.5 cap x 10mm |
| 1 | `screw(M2p5_dome_screw, 10)` | Screw M2.5 dome x 10mm |
| 1 | `screw(M2p5_pan_screw, 10)` | Screw M2.5 pan x 10mm |
| 1 | `screw(M3_cap_screw, 10)` | Screw M3 cap x 10mm |
| 1 | `screw(M3_cs_cap_screw, 10)` | Screw M3 cs cap x 10mm |
@@ -3160,19 +3285,22 @@ For an explanation of `screw_polysink()` see <https://hydraraptor.blogspot.com/2
| 1 | `screw(M4_cap_screw, 25)` | Screw M4 cap x 25mm |
| 1 | `screw(M4_cs_cap_screw, 25)` | Screw M4 cs cap x 25mm |
| 1 | `screw(M4_dome_screw, 25)` | Screw M4 dome x 25mm |
| 1 | `screw(M4_grub_screw, 6)` | Screw M4 grub x 6mm |
| 1 | `screw(M4_grub_screw, 8)` | Screw M4 grub x 8mm |
| 1 | `screw(M4_hex_screw, 30)` | Screw M4 hex x 30mm |
| 1 | `screw(M4_pan_screw, 30)` | Screw M4 pan x 30mm |
| 1 | `screw(M5_cap_screw, 30)` | Screw M5 cap x 30mm |
| 1 | `screw(M5_cs_cap_screw, 30)` | Screw M5 cs cap x 30mm |
| 1 | `screw(M5_dome_screw, 30)` | Screw M5 dome x 30mm |
| 1 | `screw(M5_grub_screw, 10)` | Screw M5 grub x 10mm |
| 1 | `screw(M5_hex_screw, 30)` | Screw M5 hex x 30mm |
| 1 | `screw(M5_pan_screw, 30)` | Screw M5 pan x 30mm |
| 1 | `screw(M6_cap_screw, 30)` | Screw M6 cap x 30mm |
| 1 | `screw(M6_cs_cap_screw, 30)` | Screw M6 cs cap x 30mm |
| 1 | `screw(M6_grub_screw, 12)` | Screw M6 grub x 12mm |
| 1 | `screw(M6_hex_screw, 30)` | Screw M6 hex x 30mm |
| 1 | `screw(M6_pan_screw, 30)` | Screw M6 pan x 30mm |
| 1 | `screw(M8_cap_screw, 35)` | Screw M8 cap x 35mm |
| 1 | `screw(M8_cs_cap_screw, 35)` | Screw M8 cs cap x 35mm |
| 1 | `screw(M8_hex_screw, 30)` | Screw M8 hex x 30mm |
| 1 | `screw(No2_screw, 10)` | Screw No2 pan wood x 10mm |
| 1 | `screw(No4_screw, 10)` | Screw No4 pan wood x 10mm |
@@ -3210,6 +3338,61 @@ Sealing strip from B&Q used to seal around the door of 3D printers.
| 1 | `sealing_strip(100)` | Sealing strip 10mm x 4mm x 100mm |
<a href="#top">Top</a>
---
<a name="Servo_motors"></a>
## Servo_motors
BLDC servos for CNC machines
[vitamins/servo_motors.scad](vitamins/servo_motors.scad) Object definitions.
[vitamins/servo_motor.scad](vitamins/servo_motor.scad) Implementation.
[tests/servo_motors.scad](tests/servo_motors.scad) Code for this example.
### Properties
| Function | Description |
|:--- |:--- |
| `faceplate_boss_size(type)` | Centre boss outer d, inner d and height |
| `faceplate_hole_dia(type)` | Screw hole size |
| `faceplate_hole_pitch(type)` | Screw hole pitch |
| `faceplate_thickness(type)` | Thickness of the faceplate |
| `faceplate_width(type)` | Width of faceplate |
| `servo_motor_cap(type)` | Diameter height and corner radius of encoder cover |
| `servo_motor_faceplate(type)` | Face plate type |
| `servo_motor_length(type)` | Total length from the faceplate |
| `servo_motor_shaft(type)` | Shaft type |
| `shaft_diameter(type)` | Shaft diameter |
| `shaft_key_size(type)` | None |
| `shaft_length(type)` | Shaft length |
| `shaft_type(type)` | String to indicate the shaft type |
### Functions
| Function | Description |
|:--- |:--- |
| `servo_motor_width(type)` | Width of the motor body |
### Modules
| Module | Description |
|:--- |:--- |
| `faceplate_screw_positions(type)` | Position children at faceplate screw positions |
| `motor_faceplate(type)` | Draw specified motor faceplate |
| `motor_shaft(type)` | Draw the specified motor shaft |
| `servo_motor(type)` | Draw the specified servo |
| `servo_screw_positions(type)` | Position children at screw positions |
![servo_motors](tests/png/servo_motors.png)
### Vitamins
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 1 | `servo_motor(Lichuan_M01330_80ST) ` | Servo Lichuan LCMT07L02NB-80M01330B 80ST mount 80 x 123mm |
| 1 | `servo_motor(Lichuan_M02430_80ST) ` | Servo Lichuan LCMT07L02NB-80M02430B 80ST mount 80 x 150mm |
| 1 | `servo_motor(Lichuan_M03530_80ST) ` | Servo Lichuan LCMT07L02NB-80M03530B 80ST mount 80 x 178mm |
| 1 | `servo_motor(Lichuan_M04030_80ST) ` | Servo Lichuan LCMT07L02NB-80M04030B 80ST mount 80 x 190mm |
<a href="#top">Top</a>
---
@@ -3300,6 +3483,9 @@ When woven sheets (e.g. carbon fibre) are rendered it is necessary to specify th
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 1 | `sheet(FoilTape, 30, 30, 2)` | Aluminium foil tape 30mm x 30mm x 0.05mm |
| 1 | `sheet(AL1_6, 30, 30, 2)` | Aluminium tooling plate 30mm x 30mm x 1.6mm |
| 1 | `sheet(AL2, 30, 30, 2)` | Aluminium tooling plate 30mm x 30mm x 2mm |
| 1 | `sheet(AL3, 30, 30, 2)` | Aluminium tooling plate 30mm x 30mm x 3mm |
| 1 | `sheet(AL6, 30, 30, 2)` | Aluminium tooling plate 30mm x 30mm x 6mm |
| 1 | `sheet(AL8, 30, 30, 2)` | Aluminium tooling plate 30mm x 30mm x 8mm |
| 1 | `sheet(Spring05, 30, 30, 2)` | Bi-metal saw blade 30mm x 30mm x 0.5mm |
@@ -3311,6 +3497,7 @@ When woven sheets (e.g. carbon fibre) are rendered it is necessary to specify th
| 1 | `sheet(MDF12, 30, 30, 2)` | Sheet MDF 30mm x 30mm x 12mm |
| 1 | `sheet(MDF19, 30, 30, 2)` | Sheet MDF 30mm x 30mm x 19mm |
| 1 | `sheet(MDF6, 30, 30, 2)` | Sheet MDF 30mm x 30mm x 6mm |
| 1 | `sheet(PMMA1p25, 30, 30, 2)` | Sheet acrylic 30mm x 30mm x 1.25mm |
| 1 | `sheet(PMMA10, 30, 30, 2)` | Sheet acrylic 30mm x 30mm x 10mm |
| 1 | `sheet(PMMA2, 30, 30, 2)` | Sheet acrylic 30mm x 30mm x 2mm |
| 1 | `sheet(PMMA3, 30, 30, 2)` | Sheet acrylic 30mm x 30mm x 3mm |
@@ -3616,15 +3803,20 @@ NEMA stepper motor model.
### Properties
| Function | Description |
|:--- |:--- |
| `NEMA_black_caps(type)` | End caps are black |
| `NEMA_body_radius(type)` | Body radius |
| `NEMA_boss_height(type)` | Boss height |
| `NEMA_boss_radius(type)` | Boss around the spindle radius |
| `NEMA_cap_heights(type)` | Height of the end cap at the corner and the side |
| `NEMA_end_connector(type)` | If has a connector then plug goes in the end rather than the side |
| `NEMA_hole_pitch(type)` | Screw hole pitch |
| `NEMA_length(type)` | Body length |
| `NEMA_radius(type)` | End cap radius |
| `NEMA_shaft_bore(type)` | Hollow shaft in non-zero |
| `NEMA_shaft_dia(type)` | Shaft diameter |
| `NEMA_shaft_length(type)` | Shaft length above the face, if a list then a leadscrew: length, lead, starts |
| `NEMA_shaft_length2(type)` | Rear shaft length if non-zero |
| `NEMA_thread_d(type)` | Screw hole diameter |
| `NEMA_width(type)` | Width of the square face |
### Functions
@@ -3655,6 +3847,8 @@ NEMA stepper motor model.
| 1 | `NEMA(NEMA17M)` | Stepper motor NEMA17 x 40mm |
| 1 | `NEMA(NEMA17)` | Stepper motor NEMA17 x 47mm |
| 1 | `NEMA(NEMA23)` | Stepper motor NEMA22 x 51.2mm |
| 1 | `NEMA(NEMA8)` | Stepper motor NEMA8 x 30mm |
| 1 | `NEMA(NEMA8BH)` | Stepper motor NEMA8 x 30mm |
| 16 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
| 20 | `star_washer(M3_washer)` | Washer star M3 x 0.5mm |

29
tests/7_segments.scad Normal file
View File

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

View File

@@ -22,6 +22,8 @@ include <../vitamins/d_connectors.scad>
include <../vitamins/leds.scad>
include <../vitamins/axials.scad>
include <../vitamins/smds.scad>
include <../vitamins/7_segments.scad>
include <../vitamins/potentiometers.scad>
use <../vitamins/pcb.scad>
@@ -46,7 +48,7 @@ TMC2130 = ["TMC2130", "TMC2130",
[]
];
test_pcb = ["TestPCB", "Test PCB",
test_pcb = ["test_pcb", "Test PCB",
100, 250, 1.6, // length, width, thickness
3, // Corner radius
2.75, // Mounting hole diameter
@@ -95,6 +97,8 @@ test_pcb = ["TestPCB", "Test PCB",
[ 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],
[ 80, 9, 0, "link", inch(0.2), inch(0.4)],
[ 80, 12, 0, "ax_res", res1_8, 1000000, 1, inch(0.1)],
@@ -137,7 +141,8 @@ test_pcb = ["TestPCB", "Test PCB",
[ 52, 194, 0, "2p54socket", 8, 1, false, 0, false, "red" ],
[ 50, 220, 0, "standoff", 5, 4.5, 12.5, 2.54],
[ 50, 240, 0, "potentiometer"],
[ 75, 240, 0, "potentiometer", 7, 8],
[ 75, 240, 0, "potentiometer", KY_040_encoder, 8],
[ 30, 85, -90, "7seg", WT5011BSR, 2],
],
// accessories
[]

View File

@@ -21,7 +21,7 @@ include <../vitamins/pcbs.scad>
use <../utils/layout.scad>
function spacing(p) = let(w = pcb_width(p)) w < 22 ? w + 3 : w + 10;
function spacing(p) = let(w = pcb_width(p)) w < 22 ? w + 3 : w + 7;
module pcbs() {
layout([for(p = pcbs) spacing(p)], 0)
@@ -29,9 +29,9 @@ module pcbs() {
rotate(90)
pcb_assembly(pcbs[$i], 5 + $i, 3);
translate([0, 45])
translate([0, 65])
layout([for(p = tiny_pcbs) pcb_length(p)], 3)
translate([0, pcb_width(tiny_pcbs[$i]) / 2])
translate([0, -pcb_width(tiny_pcbs[$i]) / 2])
pcb_assembly(tiny_pcbs[$i], 5 + $i, 3);
translate([0, 120])

View File

@@ -22,18 +22,20 @@ include <../vitamins/extrusions.scad>
use <../utils/layout.scad>
module sk_brackets() {
module sk_brackets(examples = false) {
screws = [M4_dome_screw, M4_cap_screw, M5_cap_screw, M5_cap_screw];
nuts = [M4_hammer_nut, M4_sliding_t_nut, M5_sliding_t_nut, undef];
// channel depth = 6 for 2020 extrusion, 9 for 3030 extrusion
depths = [6, 6, 9, 0];
layout([for(s = sk_brackets) 1.5 * sk_size(s)[1]]) {
sk_bracket_assembly(sk_brackets[$i], screw_type = screws[$i], nut_type = nuts[$i], max_screw_depth = depths[$i]);
translate([0, -sk_hole_offset(sk_brackets[$i]) - extrusion_width($i < 2 ? E2020 : E3030) / 2, 0])
rotate([0, 90, 0])
extrusion($i < 2 ? E2020 : E3030, 20, false);
if(examples)
translate([0, -sk_hole_offset(sk_brackets[$i]) - extrusion_width($i < 2 ? E2020 : E3030) / 2, 0])
rotate([0, 90, 0])
extrusion($i < 2 ? E2020 : E3030, 20, false);
}
}
if($preview)
sk_brackets();
sk_brackets(true);

View File

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

View File

@@ -16,13 +16,51 @@
// 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 <../core.scad>
include <../vitamins/extrusion_brackets.scad>
include <../vitamins/extrusions.scad>
include <../vitamins/extrusion_brackets.scad>
include <../vitamins/washers.scad>
include <../vitamins/nuts.scad>
module inner_bracket_test(bracket, backwards = false)
rotate([90, 0, 180]) {
extrusion = extrusion_inner_corner_bracket_extrusion(bracket);
eWidth = extrusion_width(extrusion);
size = extrusion_inner_corner_bracket_size(bracket);
tnut = extrusion_inner_corner_bracket_tnut(bracket);
translate([backwards ? -eWidth : 0, 0])
extrusion_inner_corner_bracket(bracket, backwards = backwards);
translate([-eWidth / 2, 0])
rotate([-90, 0, 0])
extrusion(extrusion, size.x - nut_thickness(tnut) - extrusion_tab_thickness(extrusion), false, cornerHole = eWidth > 20);
translate([-eWidth, -eWidth / 2])
rotate([0, 90, 0])
extrusion(extrusion, eWidth + size.y - nut_thickness(tnut) - extrusion_tab_thickness(extrusion), false, cornerHole = eWidth > 20);
}
module bracket_test(bracket)
rotate([90, 0, 180]) {
extrusion = extrusion_corner_bracket_extrusion(bracket);
eWidth = extrusion_width(extrusion);
size = extrusion_corner_bracket_size(bracket);
extrusion_corner_bracket_assembly(bracket);
translate([-eWidth / 2, 0])
rotate([-90, 0, 0])
extrusion(extrusion, size.y, false, cornerHole = eWidth > 20);
translate([-eWidth, -eWidth / 2])
rotate([0, 90, 0])
extrusion(extrusion, eWidth + size.x, false, cornerHole = eWidth > 20);
}
module extrusion_brackets(examples = false) {
extrusion_inner_corner_bracket(E20_inner_corner_bracket);
@@ -32,34 +70,30 @@ module extrusion_brackets(examples = false) {
translate([60, 0])
extrusion_corner_bracket_assembly(E20_corner_bracket);
eWidth = extrusion_width(E2020);
translate([110, 0])
extrusion_inner_corner_bracket(E40_inner_corner_bracket);
translate([140, 0])
extrusion_corner_bracket_assembly(E40_corner_bracket);
if(examples) {
translate([20, 60, 10]) rotate([90, 0, 180]) {
extrusion_inner_corner_bracket(E20_inner_corner_bracket);
translate([20, 50, 10])
inner_bracket_test(E20_inner_corner_bracket, true);
translate([-eWidth / 2, 0, 0])
rotate([-90, 0, 0])
extrusion(E2020, 20, false);
translate([20, 80, 10])
inner_bracket_test(E20_inner_corner_bracket);
translate([-eWidth, -eWidth / 2, 0])
rotate([0, 90, 0])
extrusion(E2020, 40, false);
}
translate([20, 120, 10])
bracket_test(E20_corner_bracket);
translate([100, 60, 10]) rotate([90, 0, 180]) {
extrusion_corner_bracket_assembly(E20_corner_bracket);
translate([100, 70, 10])
inner_bracket_test(E40_inner_corner_bracket);
translate([-eWidth / 2, 0, 0])
rotate([-90, 0, 0])
extrusion(E2020, 30, false);
translate([-eWidth, -eWidth / 2, 0])
rotate([0, 90, 0])
extrusion(E2020, 50, false);
}
translate([100, 130, 10])
bracket_test(E40_corner_bracket);
}
}
if($preview)
extrusion_brackets(true);
let($show_threads = true)
extrusion_brackets(true);

View File

@@ -21,9 +21,24 @@ use <../utils/layout.scad>
include <../vitamins/extrusions.scad>
gap = 10;
module extrusions()
layout([for(e = extrusions) extrusion_width(e)], 10)
extrusion(extrusions[$i], 80, cornerHole = extrusion_width(extrusions[$i]) > 20);
layout([for(e = extrusions) is_list(e[0]) ? extrusion_width(e[0]) : extrusion_width(e)], gap)
let(e = extrusions[$i])
if(is_list(e[0])) {
list = e;
heights = [for(e = list) extrusion_height(e)];
l = len(heights) - 1;
offset = (heights * [for(i = [0 : l]) 1] + l * gap) / 2;
translate([0, -offset])
rotate(90)
layout(heights, gap)
rotate(-90)
extrusion(list[$i], 80, cornerHole = extrusion_width(list[$i]) > 20);
}
else
extrusion(e, 80, cornerHole = extrusion_width(e) > 20);
if ($preview)
extrusions();

View File

@@ -52,6 +52,12 @@ module nuts() {
if(n == M5_nut)
sliding_t_nut(M5_sliding_t_nut);
if(n == M6_nut)
sliding_t_nut(M6_sliding_t_nut);
if(n == M8_nut)
sliding_t_nut(M8_sliding_ball_t_nut);
}
translate([0, 80]) {

View File

@@ -64,8 +64,9 @@ module pin_headers() {
pin_socket(pin_headers[$i], 3, 3, right_angle = true);
}
for(i = [0, 1], p = [5, 2][i], j = [0 , 1]) {
h = [jst_ph_header, jst_xh_header][j];
headers = [jst_zh_header, jst_ph_header, jst_xh_header];
for(i = [0, 1], p = [5, 2][i], j = [0 : len(headers) - 1]) {
h = headers[j];
translate([-20 * (i + 1), 0 + j * 40])
jst_xh_header(h, p);

BIN
tests/png/7_segments.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

After

Width:  |  Height:  |  Size: 126 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 KiB

After

Width:  |  Height:  |  Size: 180 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 KiB

After

Width:  |  Height:  |  Size: 169 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: 166 KiB

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 KiB

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

After

Width:  |  Height:  |  Size: 176 KiB

BIN
tests/png/servo_motors.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 103 KiB

31
tests/potentiometers.scad Normal file
View File

@@ -0,0 +1,31 @@
//
// NopSCADlib Copyright Chris Palmer 2021
// 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/>.
//
//! Potentiometers and rotary encoders
include <../core.scad>
include <../utils/layout.scad>
include <../vitamins/potentiometers.scad>
module potentiometers()
layout([for(p = potentiometers) pot_size(p).x])
hflip()
potentiometer(potentiometers[$i], shaft_length = 30);
if($preview)
let($show_threads = true)
potentiometers();

View File

@@ -29,7 +29,7 @@ pos = 1; //[-1 : 0.1 : 1]
function rail_carriages(rail) = [for(c = carriages) if(carriage_rail(c) == rail) c];
module rails()
layout([for(r = rails) carriage_width(rail_carriages(r)[0])], 20)
layout([for(r = rails) carriage_width(rail_carriages(r)[0])], 10)
rotate(-90) {
rail = rails[$i];
carriages = rail_carriages(rail);

View File

@@ -48,7 +48,7 @@ module screws() {
for(x = [0 : len(screw_lists[y]) -1]) {
screw = screw_lists[y][x];
if(screw) {
length = screw_head_type(screw) == hs_grub ? 6
length = screw_head_type(screw) == hs_grub ? screw_radius(screw) * 4
: screw_radius(screw) <= 1.5 ? 10
: screw_max_thread(screw) ? screw_longer_than(screw_max_thread(screw) + 5)
: 30;

31
tests/servo_motors.scad Normal file
View File

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

View File

@@ -22,12 +22,12 @@ include <../vitamins/stepper_motors.scad>
use <../utils/layout.scad>
module stepper_motors()
layout([for(s = stepper_motors) NEMA_width(s)], 5, no_offset = true) let(m = stepper_motors[$i]) {
layout([for(s = stepper_motors) NEMA_width(s)], 5, no_offset = false) let(m = stepper_motors[$i]) {
rotate(180)
NEMA(m, 0, m == NEMA17P || m == NEMA17M || m == NEMA17M8);
NEMA(m, 0, in([NEMA17P, NEMA17M, NEMA17M8, NEMA8, NEMA8BH], m));
translate_z(4)
NEMA_screws(m, M3_pan_screw, n = $i, earth = $i > 4 ? undef : $i - 1);
NEMA_screws(m, M3_pan_screw, n = $i - 2, earth = $i > 6 ? undef : $i - 3);
}
if($preview)

View File

@@ -25,7 +25,9 @@ include <../utils/core/core.scad>
module ring(or, ir) //! Create a ring with specified external and internal radii
difference() {
circle4n(or);
circle4n(ir);
if(ir > 0)
circle4n(ir);
}
module tube(or, ir, h, center = true) //! Create a tube with specified external and internal radii and height `h`

107
vitamins/7_segment.scad Normal file
View File

@@ -0,0 +1,107 @@
//
// NopSCADlib Copyright Chris Palmer 2021
// 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/>.
//
//
//! 7 Segment displays
//
include <../utils/core/core.scad>
function 7_segment_size(type) = type[1]; //! Size of the body
function 7_segment_digit_size(type) = type[2]; //! Size of the actual digit and segemnt width and angle
function 7_segment_pins(type) = type[3]; //! [x, y] array of pins
function 7_segment_pin_pitch(type) = type[4]; //! x and y pin pitches and pin diameter
module 7_segment_digit(type, colour = grey(95), pin_length = 6.4) { //! Draw the specified 7 segment digit
size = 7_segment_size(type);
digit = 7_segment_digit_size(type);
pins = 7_segment_pins(type);
pin_pitch = 7_segment_pin_pitch(type);
color(grey(95))
linear_extrude(size.z)
square([size.x - 0.1, size.y], center = true);
color(grey(15))
translate_z(size.z)
cube([size.x - 0.1, size.y, eps], center = true);
color(colour)
translate_z(size.z)
linear_extrude(2 * eps) {
t = digit[2];
a = digit[3];
sq = [digit.x - 2 * t, (digit.y - 3 * t) / 2];
multmatrix([ // Skew
[1, tan(a), 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[0, 0, 0, 1]
])
difference() {
square([digit.x, digit.y], center = true);
for(y = [-1, 1], x = [-1, 1]) {
translate([0, y * (t + sq.y) / 2])
square(sq, center = true);
translate([x * digit.x / 2, y * digit.y / 2])
rotate(-45 * x * y) {
square([10, t], center = true);
square([t / 5, 10], center = true);
}
translate([x * (digit.x - t) / 2, 0])
rotate(45) {
square([t / 5, t * 2], center = true);
square([t * 2, t / 5], center = true);
translate([x * t / 2, -x * t / 2])
square([t, t], center = true);
}
}
}
r = 1.25 * t / 2;
translate([digit.x / 2 - r + digit.y / 2 * tan(a), -digit.y / 2 + r])
circle(r);
}
color(silver)
translate_z(-pin_length)
linear_extrude(pin_length)
for(x = [0 : 1 : pins.x - 1], y = [0 : 1 : pins.y - 1])
translate([(x - (pins.x - 1) / 2) * pin_pitch.x, (y - (pins.y - 1) / 2) * pin_pitch.y])
circle(d = pin_pitch[2], $fn = 16);
}
module 7_segment_digits(type, n, colour = grey(70), pin_length = 6.4, cutout = false) { //! Draw n digits side by side
size = 7_segment_size(type);
if(cutout)
linear_extrude(100)
square([n * size.x, size.y], center = true);
else
for(i = [0 : 1 : n - 1])
translate([(i - (n - 1) / 2) * size.x, 0])
7_segment_digit(type, colour, pin_length);
}

28
vitamins/7_segments.scad Normal file
View File

@@ -0,0 +1,28 @@
//
// NopSCADlib Copyright Chris Palmer 2021
// 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/>.
//
//
//! 7 Segment displays
//
WT5011BSR = ["WT5011BSR", [12.7, 19, 8.2], [7.2, 12.7, 1.2, 10], [5, 2], [inch(0.1), inch(0.6), 0.4]];
7_segments = [ WT5011BSR ];
use <7_segment.scad>

View File

@@ -57,7 +57,7 @@ function ax_res_colour(type) = type[7]; //! Body colour
module orientate_axial(length, height, pitch, wire_d) { // Orient horizontal or vertical and add the wires
min_pitch = ceil((length + 1) / inch(0.1)) * inch(0.1);
lead_pitch = pitch ? pitch : min_pitch;
if(lead_pitch >= min_pitch) {
if(lead_pitch > min_pitch - eps) {
not_on_bom()
wire_link(wire_d, lead_pitch, height);

View File

@@ -73,6 +73,19 @@ SSD1963_4p3 = ["SSD1963_4p3", "LCD display SSD1963 4.3\"", 105.5, 67.2, 3.4, SSD
[[0, -34.5], [12, -31.5]],
];
TFT128x160PCB = ["", "", 56, 35, 1.2, 1, 2.0, 0, "mediumblue", false, [[-2.5, -2.5], [-2.5, 2.5], [2.5, 2.5], [2.5, -2.5]],
[ [2, 17.5, 0, "molex_hdr", 8]
],
[]];
TFT128x160 = ["TFT128x160", "LCD TFT ST7735 display 128x160", 46, 34, 2.1, TFT128x160PCB,
[0, 0, 0], // pcb offset
[[-37 / 2 - 2.5, -30 / 2], [37 / 2 - 2.5, 30 / 2, 0.3]], // aperture
[], // touch screen
0, // thread length
[], // clearance need for the ts ribbon
];
/* Dimensions taken from:
https://github.com/bigtreetech/BIGTREETECH-TFT35-V3.0/blob/master/Hardware/TFT35%20V3.0-SIZE-TOP.pdf
@@ -124,6 +137,6 @@ BigTreeTech_TFT35v3_0 = ["BigTreeTech_TFT35v3_0", "BigTreeTech TFT35 v3.0",
];
displays = [HDMI5, SSD1963_4p3, BigTreeTech_TFT35v3_0, LCD1602A, LCDS7282B];
displays = [HDMI5, SSD1963_4p3, BigTreeTech_TFT35v3_0, LCD1602A, LCDS7282B, TFT128x160];
use <display.scad>

View File

@@ -21,101 +21,116 @@
//
include <../utils/core/core.scad>
function extrusion_width(type) = type[1]; //! Width of extrusion
function extrusion_height(type) = type[2]; //! Height of extrusion
function extrusion_center_hole(type) = type[3]; //! Diameter of center hole
function extrusion_corner_hole(type) = type[4]; //! Diameter of corner hole
function extrusion_center_square(type) = type[5]; //! Size of center square
function extrusion_channel_width(type) = type[6]; //! Channel width
function extrusion_channel_width_internal(type) = type[7]; //! Internal channel width
function extrusion_tab_thickness(type) = type[8]; //! Tab thickness
function extrusion_spar_thickness(type) = type[9]; //! Spar thickness
function extrusion_fillet(type) = type[10]; //! Radius of corner fillet
function extrusion_width(type) = type[1]; //! Width of extrusion
function extrusion_height(type) = type[2]; //! Height of extrusion
function extrusion_center_hole_wd(type) = type[3]; //! Diameter of center hole if -ve or square side if +ve
function extrusion_corner_hole_wd(type) = type[4]; //! Diameter of corner hole if -ve or square side if +ve
function extrusion_center_square_wd(type) = type[5]; //! Size of center square if +ve or tube diameter if -ve
function extrusion_channel_width(type) = type[6]; //! Channel width
function extrusion_channel_width_internal(type) = type[7]; //! Internal channel width
function extrusion_tab_thickness(type) = type[8]; //! Tab thickness
function extrusion_spar_thickness(type) = type[9]; //! Spar thickness
function extrusion_fillet(type) = type[10]; //! Radius of corner fillet
function extrusion_channel_recess(type) = type[11]; //! Channel recess width and depth or false in none
function extrusion_center_hole(type) = abs(extrusion_center_hole_wd(type)); //! Diameter of center hole or side if square
function extrusion_corner_hole(type) = abs(extrusion_corner_hole_wd(type)); //! Diameter of corner hole or side if square
function extrusion_center_square(type) = abs(extrusion_center_square_wd(type)); //! Size of center square or tube
module extrusion_cross_section(type, cornerHole) {
width = extrusion_width(type);
height = extrusion_height(type);
centerSquare = extrusion_center_square(type);
tabThickness = extrusion_tab_thickness(type);
sparThickness = extrusion_spar_thickness(type);
channelWidth = extrusion_channel_width(type);
recess = extrusion_channel_recess(type);
cornerSquare = (width - extrusion_channel_width_internal(type)) / 2;
module squircle(d) // Draw a square if positive else a circle
if(d > 0)
square([d, d], center = true);
else
if(d < 0)
circle(d = -d);
module extrusion_corner(type, cornerHole) {
width = extrusion_width(type);
tabThickness = extrusion_tab_thickness(type);
sparThickness = extrusion_spar_thickness(type);
centerSquare = extrusion_center_square(type);
channelWidth = extrusion_channel_width(type);
fillet = extrusion_fillet(type);
cornerSize = (width-channelWidth)/2;
cornerSquare = (width-extrusion_channel_width_internal(type))/2;
cornerHoleDiameter = extrusion_corner_hole(type);
cornerSize = (width - channelWidth) / 2;
cornerHoleDiameter = abs(extrusion_corner_hole(type));
translate([-width/2,-width/2]) {
translate([-width / 2, -width / 2]) {
difference() {
union() {
translate([fillet,0])
square([cornerSize-fillet,tabThickness]);
translate([0,fillet])
square([tabThickness,cornerSize-fillet]);
translate([fillet,fillet])
translate([fillet, 0])
square([cornerSize - fillet, tabThickness]);
translate([0, fillet])
square([tabThickness, cornerSize - fillet]);
translate([fillet, fillet])
circle(fillet);
translate([fillet,fillet])
square([cornerSquare-fillet,cornerSquare-fillet]);
translate([fillet, fillet])
square([cornerSquare - fillet, cornerSquare - fillet]);
}
if(cornerHole && cornerHoleDiameter > 0)
translate([cornerSquare/2,cornerSquare/2])
circle(d=cornerHoleDiameter);
}
if(cornerHole)
translate([cornerSquare / 2, cornerSquare / 2])
squircle(extrusion_corner_hole_wd(type));
}
}
rotate(-135) translate([centerSquare/2,-sparThickness/2]) square([sqrt(2)*(width-centerSquare-cornerSquare)/2,sparThickness]);
}
module extrusion_center_section(type) {
width = extrusion_width(type);
tabThickness = extrusion_tab_thickness(type);
sparThickness = extrusion_spar_thickness(type);
centerSquare = extrusion_center_square(type);
channelWidth = extrusion_channel_width(type);
for(side = [-1, 1]) {
translate([side * (width / 2 - tabThickness / 2), 0])
square([tabThickness, width - channelWidth], center = true);
translate([0,width/2])
for(angle=[225,315])
rotate(angle)
translate([centerSquare/2,-sparThickness/2])
square([sqrt(2)*(width-centerSquare)/2,sparThickness]);
translate([0,-width/2])
for(angle=[45,135])
rotate(angle)
translate([centerSquare/2,-sparThickness/2])
square([sqrt(2)*(width-centerSquare)/2,sparThickness]);
centerHeight = width-channelWidth;
translate([-width/2,-centerHeight/2])
square([tabThickness,centerHeight]);
translate([width/2-tabThickness,-centerHeight/2])
square([tabThickness,centerHeight]);
l = cornerSquare + sparThickness * tan(22.5) - sparThickness / sqrt(2);
for(end = [-1, 1])
translate([side * (width / 2 - l / 2), end * (cornerSquare - sparThickness / 2)])
square([l, sparThickness], center = true);
}
}
centerSquare = extrusion_center_square(type);
count = height / width - 1;
width = extrusion_width(type);
height = extrusion_height(type);
count = (height-width)/width;
difference() {
union() {
for(i = [0 : count])
translate([0, i * width + (width - height) / 2]) {
difference() {
union() {
squircle(extrusion_center_square_wd(type));
for(i=[0:count])
translate([0,i*width+(width-height)/2])
difference() {
square([centerSquare,centerSquare],center=true);
if(extrusion_center_hole(type)>0)
circle(d=extrusion_center_hole(type));
}
translate([0,(width-height)/2])
for(angle=[0,90])
rotate(angle)
extrusion_corner(type, cornerHole);
translate([0,-(width-height)/2])
for(angle=[180,270])
rotate(angle)
extrusion_corner(type, cornerHole);
if(count>=1)
for(i=[1:count])
translate([0,i*width-height/2])
extrusion_center_section(type);
for(j = [0 : 3])
rotate(45 + 90 * j)
translate([centerSquare / 2 - sparThickness / 2, -sparThickness / 2])
square([width / sqrt(2) - cornerSquare * sqrt(2) - centerSquare / 2 + sparThickness *(1 + tan(22.5)), sparThickness]);
}
squircle(d = extrusion_center_hole_wd(type));
}
}
for(side = [-1, 1])
translate([0, side * (width - height) / 2])
for(angle = [0, 90])
rotate(angle + (side < 0 ? 180 : 0))
extrusion_corner(type, cornerHole);
if(count >= 1)
for(i = [1 : count])
translate([0, i * width - height / 2])
extrusion_center_section(type);
}
if(recess)
for(i = [0 : count], j = [0 : 3])
translate([0, i * width + (width - height) / 2])
rotate(j * 90)
translate([width / 2, 0])
square([recess.y * 2, recess.x], center = true);
}
}
module extrusion(type, length, center = true, cornerHole = false) { //! Draw the specified extrusion

View File

@@ -20,44 +20,65 @@
//! Brackets for joining extrusions at a corner.
include <../core.scad>
use <extrusion.scad>
function extrusion_inner_corner_bracket_size(type) = type[1]; //! Size of inner bracket
function extrusion_inner_corner_bracket_size(type) = type[1]; //! Size of inner bracket
function extrusion_inner_corner_bracket_tnut(type) = type[2]; //! The sliding t-nut it is based on
function extrusion_inner_corner_bracket_extrusion(type) = type[3]; //! Default extrusion this bracket is for
function extrusion_inner_corner_bracket_screw_offsets(type) = type[4]; //! Screw offsets from the ends
module extrusion_inner_corner_bracket(type, grub_screws = true) { //! Inner corner bracket for extrusion
vitamin(str("extrusion_inner_corner_bracket(", type[0], ", ", grub_screws, "): Extrusion inner corner bracket ", type[1].z));
module extrusion_inner_corner_bracket(type, grub_screws = true, backwards = false, extrusion = undef) { //! Inner corner bracket for extrusion
extrusion = is_undef(extrusion) ? extrusion_inner_corner_bracket_extrusion(type) : extrusion;
vitamin(str("extrusion_inner_corner_bracket(", type[0], "): Extrusion inner corner bracket for ", extrusion[0]));
size = extrusion_inner_corner_bracket_size(type);
armLength = size.x;
tnut = extrusion_inner_corner_bracket_tnut(type);
screw_offsets = extrusion_inner_corner_bracket_screw_offsets(type);
bottomTabOffset = 4;
topTabOffset = 10;
sizeBottom = [armLength - bottomTabOffset, 6, size.z];
sizeTop = [armLength - topTabOffset, 6, size.z];
tabSizeY1 = 10;
tabSizeY2 = 6;
tabSizeZ = 3.25;
holeRadius = M4_tap_radius;
sizeBottom = [size.y - bottomTabOffset, nut_square_width(tnut), size.z];
sizeTop = [size.x - topTabOffset, nut_square_width(tnut), size.z];
tab = t_nut_tab(tnut);
tabSizeZ = nut_thickness(tnut);
screw = find_screw(hs_grub, nut_size(tnut));
holeRadius = screw_pilot_hole(screw);
depth = (extrusion_width(extrusion) - extrusion_center_square(extrusion)) / 2;
translate([-size.z - 0.75, -size.z - 0.75, 0])
offset = extrusion_tab_thickness(extrusion) + tabSizeZ;
offset2 = extrusion_tab_thickness(extrusion) - nut_thickness(tnut, true) + nut_thickness(tnut);
translate([backwards ? offset2 : -offset, -offset])
rotate([-90, 0, 0]) {
color("silver") {
translate([(armLength + bottomTabOffset) / 2, 0, tabSizeZ])
translate([(size.y + bottomTabOffset) / 2, 0, tabSizeZ])
rotate([0, 180, 0])
extrusionSlidingNut(sizeBottom, tabSizeY1, tabSizeY2, tabSizeZ, holeRadius, (bottomTabOffset - armLength) / 2 + 5);
translate([tabSizeZ, 0, (armLength + topTabOffset) / 2])
extrusionSlidingNut(sizeBottom, tab[0], tab[1], tabSizeZ, holeRadius, (bottomTabOffset - size.y) / 2 + screw_offsets.y);
translate([tabSizeZ, 0, (size.x + topTabOffset) / 2])
rotate([0, -90, 0])
extrusionSlidingNut(sizeTop, tabSizeY1, tabSizeY2, tabSizeZ, holeRadius,-(topTabOffset - armLength) / 2 - 5);
translate([0, -size.z / 2, 0]) {
cube([bottomTabOffset, size.z, size.z]);
cube([size.z, size.z, topTabOffset]);
extrusionSlidingNut(sizeTop, tab[0], tab[0], tabSizeZ, holeRadius, -(topTabOffset - size.x) / 2 - screw_offsets.x);
translate([0, -tab[1] / 2]) {
cube([bottomTabOffset, tab[1], size.z]);
cube([size.z, tab[1], topTabOffset]);
}
}
if(grub_screws)
not_on_bom() no_explode() {
grubScrewLength = 6;
for(angle = [[0, 0, 0], [0, -90, 180]])
rotate(angle)
translate([armLength - 5, 0, size.z])
screw(M3_grub_screw, grubScrewLength);
screw_len = screw_shorter_than(depth);
gap = depth - screw_len;
screw_z = offset - gap;
rotate([0, -90, 180])
if(backwards)
translate([size.x - screw_offsets.x, 0, -offset2 + gap])
vflip()
screw(screw, screw_len);
else
translate([size.x - screw_offsets.x, 0, screw_z])
screw(screw, screw_len);
translate([size.y - screw_offsets.y, 0, screw_z])
screw(screw, screw_len);
}
}
}
@@ -66,24 +87,29 @@ function extrusion_corner_bracket_size(type) = type[1]; //! Size of
function extrusion_corner_bracket_base_thickness(type) = type[2]; //! Thickness of base of bracket
function extrusion_corner_bracket_side_thickness(type) = type[3]; //! Thickness of side of bracket
function extrusion_corner_bracket_hole_offset(type) = type[4]; //! Hole offset from corner
function extrusion_corner_bracket_tnut(type) = type[5]; //! The sliding t-nut to use in the assembly
function extrusion_corner_bracket_extrusion(type) = type[6]; //! Default extrusion this bracket is for
module extrusion_corner_bracket(type) { //! Corner bracket for extrusion
vitamin(str("extrusion_corner_bracket(", type[0], "): Extrusion corner bracket ", type[1].z));
vitamin(str("extrusion_corner_bracket(", type[0], "): Extrusion corner bracket ", type[1].z, "mm for ", extrusion_corner_bracket_extrusion(type)[0]));
eSize = extrusion_corner_bracket_size(type).z;
cbSize = extrusion_corner_bracket_size(type).x;
baseThickness = extrusion_corner_bracket_base_thickness(type);
hole_r = screw_clearance_radius(find_screw(hs_cap, nut_size(extrusion_corner_bracket_tnut(type))));
module base() {
linear_extrude(baseThickness)
difference() {
translate([0, -eSize / 2, 0])
translate([0, -eSize / 2])
square([cbSize, eSize]);
hull() {
translate([extrusion_corner_bracket_hole_offset(type) + 1.5, 0, 0])
circle(r = M5_clearance_radius);
translate([extrusion_corner_bracket_hole_offset(type) - 1.5, 0, 0])
circle(r = M5_clearance_radius);
translate([extrusion_corner_bracket_hole_offset(type) + 1.5, 0])
circle(hole_r);
translate([extrusion_corner_bracket_hole_offset(type) - 1.5, 0])
circle(hole_r);
}
}
}
@@ -91,9 +117,11 @@ module extrusion_corner_bracket(type) { //! Corner bracket for extrusion
color("silver") {
rotate([90, 0, 90])
base();
translate([0, baseThickness, 0])
translate([0, baseThickness])
rotate([90, 0, 0])
base();
sideThickness = extrusion_corner_bracket_side_thickness(type);
for(z = [-eSize / 2, eSize / 2 - sideThickness]) {
translate_z(z) {
@@ -112,25 +140,31 @@ module extrusion_corner_bracket_hole_positions(type) { //! Place children at hol
children();
}
module extrusion_corner_bracket_assembly(type, part_thickness = 2, screw_type = M4_cap_screw, nut_type = M4_sliding_t_nut, max_screw_depth = 6) { //! Assembly with fasteners in place
module extrusion_corner_bracket_assembly(type, part_thickness = undef, screw_type = undef, nut_type = undef, max_screw_depth = undef, extrusion = undef) { //! Assembly with fasteners in place
extrusion_corner_bracket(type);
extrusion = is_undef(extrusion) ? extrusion_corner_bracket_extrusion(type) : extrusion;
screw_washer_thickness = washer_thickness(screw_washer(screw_type));
nut_washer_type = nut_washer(nut_type);
nut = is_undef(nut_type) ? extrusion_corner_bracket_tnut(type) : nut_type;
screw = is_undef(screw_type) ? find_screw(hs_cap, nut_size(nut)) : screw_type;
thickness = is_undef(part_thickness) ? extrusion_tab_thickness(extrusion) : part_thickness;
depth = is_undef(max_screw_depth) ? (extrusion_width(extrusion) - extrusion_center_square(extrusion)) / 2 - eps : max_screw_depth;
screw_washer_thickness = washer_thickness(screw_washer(screw));
nut_washer_type = nut_washer(nut);
nut_washer_thickness = nut_washer_type ? washer_thickness(nut_washer_type) : 0;
nut_offset = extrusion_corner_bracket_base_thickness(type) + part_thickness;
screw_length = max_screw_depth ? screw_shorter_than(extrusion_corner_bracket_base_thickness(type) + screw_washer_thickness + max_screw_depth)
: screw_longer_than(nut_offset + screw_washer_thickness + nut_washer_thickness + nut_thickness(nut_type));
nut_offset = extrusion_corner_bracket_base_thickness(type) + thickness;
screw_length = depth ? screw_shorter_than(extrusion_corner_bracket_base_thickness(type) + screw_washer_thickness + depth)
: screw_longer_than(nut_offset + screw_washer_thickness + nut_washer_thickness + nut_thickness(nut));
extrusion_corner_bracket_hole_positions(type) {
screw_and_washer(screw_type, screw_length);
screw_and_washer(screw, screw_length);
translate_z(-nut_offset)
vflip()
if(nut_washer_type)
nut_and_washer(nut_type);
nut_and_washer(nut);
else
rotate(90)
sliding_t_nut(nut_type);
sliding_t_nut(nut);
}
}

View File

@@ -20,10 +20,11 @@
// Extrusion brackets
//
E20_inner_corner_bracket = [ "E20_inner_corner_bracket", [25, 25, 4.5] ];
E20_inner_corner_bracket = [ "E20_inner_corner_bracket", [26, 25, 4.7], M4_sliding_t_nut, E2020t, [7, 6]];
E40_inner_corner_bracket = [ "E40_inner_corner_bracket", [38, 31, 8.5], M6_sliding_t_nut, E4040t, [13, 10]];
E20_corner_bracket = [ "E20_corner_bracket", [28, 28, 20], 2, 3, 19.5];
E20_corner_bracket = [ "E20_corner_bracket", [28, 28, 20], 2, 3, 19.5, M4_sliding_t_nut, E2020t];
E40_corner_bracket = [ "E40_corner_bracket", [40, 40, 35], 2, 3, 19.5, M8_sliding_ball_t_nut, E4040t];
use <extrusion_bracket.scad>

View File

@@ -19,18 +19,19 @@
//
// Extrusion
//
// W H d1 d2 s cw cwi t st f
E1515 = [ "E1515", 15, 15, 2.5, 0,5.7,3.4, 5.7, 1.1,1.1, 0.5 ];
E2020 = [ "E2020", 20, 20, 4.2, 3, 8, 6, 12.0, 2, 2, 1 ];
E2040 = [ "E2040", 20, 40, 4.2, 3, 8, 6, 12.0, 2, 2, 1 ];
E2060 = [ "E2060", 20, 60, 4.2, 3, 8, 6, 12.0, 2, 2, 1 ];
E2080 = [ "E2080", 20, 80, 4.2, 3, 8, 6, 12.0, 2, 2, 1 ];
E3030 = [ "E3030", 30, 30, 6.8, 4.2, 12, 8, 16.5, 2, 2, 1 ];
E3060 = [ "E3060", 30, 60, 6.8, 4.2, 12, 8, 16.5, 2, 2, 1 ];
E4040 = [ "E4040", 40, 40, 10.5, 6.0, 15, 10, 20.0, 5.5, 3, 1 ];
E4080 = [ "E4080", 40, 80, 10.5, 6.0, 15, 10, 20.0, 5.5, 3, 1 ];
// W H d1 d2 sq cw cwi t st f recess
E1515 = [ "E1515", 15, 15, -2.5, 0, 5.7, 3.4, 5.7, 1.1, 1.1, 0.5, false ];
E2020 = [ "E2020", 20, 20, -4.2, -3, 8, 6, 12.0, 2, 2, 1, false ];
E2020t = [ "E2020t",20, 20, -5.0, -3, 7.8, 6.2, 11.0, 1.8, 1.5, 1.5, [7.2, 0.5] ];
E2040 = [ "E2040", 20, 40, -4.2, -3, 8, 6, 12.0, 2, 2, 1, false ];
E2060 = [ "E2060", 20, 60, -4.2, -3, 8, 6, 12.0, 2, 2, 1, false ];
E2080 = [ "E2080", 20, 80, -4.2, -3, 8, 6, 12.0, 2, 2, 1, false ];
E3030 = [ "E3030", 30, 30, -6.8, -4.2, 12, 8, 16.5, 2, 2, 1, false ];
E3060 = [ "E3060", 30, 60, -6.8, -4.2, 12, 8, 16.5, 2, 2, 1, false ];
E4040 = [ "E4040", 40, 40, -10.5, -6.0, 15, 10, 20.0, 5.5, 3, 1, false ];
E4040t = [ "E4040t",40, 40, -10, 6.8, -16, 10, 20.0, 4.0, 2.4, 1.5, [12, 1] ];
E4080 = [ "E4080", 40, 80, -10.5, -6.0, 15, 10, 20.0, 5.5, 3, 1, false ];
extrusions = [E1515,E2020,E2040,E2060,E2080,E3030,E3060,E4040,E4080];
extrusions = [E1515, [E2020t, E2020], E2040, E2060, E2080, E3030, E3060, [E4040t, E4040], E4080];
use <extrusion.scad>

View File

@@ -87,7 +87,8 @@ module jack_4mm(colour, thickness, display_colour = false) { //! Draw a 4mm jack
}
}
function jack_4mm_shielded_hole_radius() = 12/2; //! Panel hole radius for 4mm shielded jack
function jack_4mm_shielded_hole_radius() = 12 / 2; //! Panel hole radius for 4mm shielded jack
function jack_4mm_shielded_nut_radius() = 14.4 / 2; //! Largest diameter of 4mm shielded jack
module jack_4mm_shielded(colour, thickness, display_colour = false) { //! Draw a 4mm shielded jack
vitamin(str("jack_4mm_shielded(\"", colour, "\", 3", arg(display_colour, false), "): 4mm shielded jack socket ", colour));

View File

@@ -36,12 +36,17 @@ function leadnut_hole_pitch(type) = type[10]; //! The radial pitch of the
function leadnut_screw(type) = type[11]; //! The type of the fixing screws
function leadnut_pitch(type) = type[12]; //! Screw pitch
function leadnut_lead(type) = type[13]; //! Screw lead
function leadnut_flat(type) = type[14]; //! Flat section width
function leadnut_colour(type) = type[15]; //! The colour
function leadnut_shank(type) = leadnut_height(type) - leadnut_flange_t(type) - leadnut_flange_offset(type); //! The length of the shank below the flange
module leadnut_screw_positions(type) { //! Position children at the screw holes
holes = leadnut_holes(type);
for(i = [0 : holes - 1], a = i * 360 / holes + 180)
flat = leadnut_flat(type);
angles = flat ? [let(h = holes / 2, a = 90 / (h - 1)) for(i = [0 : h - 1], side = [-1, 1]) side * (45 + i * a)]
: [for(i = [0 : holes - 1]) i * 360 / holes + 180];
for(a = angles)
rotate(a)
translate([leadnut_hole_pitch(type), 0, leadnut_flange_t(type)])
rotate(45)
@@ -55,8 +60,10 @@ module leadnut(type) { //! Draw specified leadnut
h = leadnut_height(type);
pitch = leadnut_pitch(type);
lead = leadnut_lead(type);
flat = leadnut_flat(type);
flange_d = leadnut_flange_dia(type);
color("dimgrey") vflip()
color(leadnut_colour(type)) vflip()
translate_z(-leadnut_flange_offset(type) - leadnut_flange_t(type)) {
tube(or = leadnut_od(type) / 2, ir = bore_r, h = h, center = false);
@@ -66,12 +73,17 @@ module leadnut(type) { //! Draw specified leadnut
translate_z(leadnut_flange_offset(type))
linear_extrude(leadnut_flange_t(type))
difference() {
circle(d = leadnut_flange_dia(type));
circle(d = flange_d);
circle(bore_r);
leadnut_screw_positions(type)
circle(d = leadnut_hole_dia(type));
if(flat)
for(side = [-1, 1])
translate([side * flange_d / 2, 0])
square([flange_d - flat, flange_d], center = true);
}
}
}

View File

@@ -16,10 +16,18 @@
// You should have received a copy of the GNU General Public License along with NopSCADlib.
// If not, see <https://www.gnu.org/licenses/>.
//
// b s h f f f h h h s p l f c
// o h e l l l o o o c i e l o
// r a i a a a l l l r t a a l
// e n g n n n e e e e c d t o
// k h g g g s w h u
// t e e e d p r
//
// d t o
LSN8x2 = ["LSN8x2", "Leadscrew nut 8 x 2", 8, 10.2, 15, 22, 3.5, 1.5, 4, 3.5, 8, M3_cap_screw, 2, 2, 0, "dimgrey"];
LSN8x8 = ["LSN8x8", "Leadscrew nut 8 x 8 RobotDigg", 8, 12.75,19, 25.4, 4.1, 0, 3, 3.5, 19.05/2, M3_cap_screw, 2, 8, 0, "dimgrey"];
SFU1610 = ["SFU1610", "Leadscrew nut for SFU1610", 16, 28, 42.5, 48, 10, 0, 6, 6, 38/2, M6_cap_screw, 5, 10, 40, "#DFDAC5"];
LSN8x2 = ["LSN8x2", "Leadscrew nut 8 x 2", 8, 10.2, 15, 22, 3.5, 1.5, 4, 3.5, 8, M3_cap_screw, 2, 2];
LSN8x8 = ["LSN8x8", "Leadscrew nut 8 x 8 RobotDigg",8, 12.75,19, 25.4, 4.1, 0, 3, 3.5, 19.05/2, M3_cap_screw, 2, 8];
leadnuts = [LSN8x2, LSN8x8];
leadnuts = [LSN8x2, LSN8x8, SFU1610];
use <leadnut.scad>

View File

@@ -137,18 +137,61 @@ module wingnut(type) { //! Draw a wingnut
}
}
module sliding_t_nut(type) {
hammerNut = type[10];
vitamin(str("sliding_t_nut(", type[0], "): Nut M", nut_size(type), hammerNut ? " hammer" : " sliding T"));
function t_nut_tab(type) = [type[8], type[9]]; //! Sliding t-nut T dimensions
size = [type[7], type[2], nut_thickness(type, true)];
tabSizeY1 = type[8];
tabSizeY2 = type[9];
module sliding_ball_t_nut(size, w, h, r) {
rad = 0.5;
stem = size.z - h;
ball_d = 4;
offset = 12;
module shape()
rotate([90, 0, 90])
translate_z(-offset)
linear_extrude(size.x) {
hull() {
translate([0, h - size.y / 2])
semi_circle(d = size.y);
for(side = [-1, 1])
translate([side * (w / 2 - rad), rad])
circle(rad);
}
rounded_square([size.y, stem * 2], rad / 2, true);
}
render() difference() {
shape();
cylinder(r = r, h = 100, center = true);
}
translate([-offset + ball_d, 0, h - 0.4])
sphere(d = ball_d);
if(show_threads)
render() intersection() {
translate_z(-stem)
female_metric_thread(2 * r, metric_coarse_pitch(2 * r), size.z - 2, center = false);
shape();
}
}
module sliding_t_nut(type) { //! Draw a sliding T nut, T nut with a spring loaded ball or a hammer nut.
hammerNut = type[10];
size = [type[7], nut_square_width(type), nut_thickness(type, true)];
tab = t_nut_tab(type);
tabSizeZ = nut_thickness(type);
holeRadius = nut_size(type) / 2;
vitamin(str("sliding_t_nut(", type[0], "): Nut M", nut_size(type), hammerNut ? " hammer" : " sliding T", !tab[1] ? " with spring loaded ball" : ""));
color(grey(80))
extrusionSlidingNut(size, tabSizeY1, tabSizeY2, tabSizeZ, holeRadius, 0, hammerNut);
if(!tab[1])
sliding_ball_t_nut(size, tab[0], tabSizeZ, holeRadius);
else
extrusionSlidingNut(size, tab[0], tab[1], tabSizeZ, holeRadius, 0, hammerNut);
}
module extrusionSlidingNut(size, tabSizeY1, tabSizeY2, tabSizeZ, holeRadius, holeOffset = 0, hammerNut = false) {
@@ -171,7 +214,7 @@ module extrusionSlidingNut(size, tabSizeY1, tabSizeY2, tabSizeZ, holeRadius, hol
}
linear_extrude(tabSizeZ)
difference() {
square([size.x, tabSizeY2], center = true);
square([size.x, tabSizeY1 == tabSizeY2 ? size.y : tabSizeY2], center = true);
if(holeRadius)
translate([holeOffset, 0])
circle(holeRadius);
@@ -183,15 +226,28 @@ module extrusionSlidingNut(size, tabSizeY1, tabSizeY2, tabSizeZ, holeRadius, hol
female_metric_thread(thread_d, metric_coarse_pitch(thread_d), size.z, center = false);
// add the side tabs
tab_h = size.z - 2 * stem_h;
chamfer =tab_h / 4;
for(m = [0, 1])
mirror([0, m, 0])
translate([0, tabSizeY2 / 2]) {
cubeZ = 1;
translate([-size.x / 2, 0])
if(tabSizeY1 == tabSizeY2)
translate([-size.x / 2, size.y / 2])
hull() {
cube([size.x, (tabSizeY1 - size.y) / 2 - chamfer, tab_h]);
translate_z(chamfer)
cube([size.x, (tabSizeY1 - size.y) / 2,tab_h - 2 * chamfer]);
}
else {
dy = (tabSizeY1 - tabSizeY2) / 2;
cubeZ = tabSizeZ - dy;
translate([-size.x / 2, tabSizeY2 / 2])
cube([size.x, (tabSizeY1 - tabSizeY2) / 2, cubeZ]);
translate_z(cubeZ)
translate([0, tabSizeY2 / 2, cubeZ])
rotate([0, -90, 0])
right_triangle(tabSizeZ - cubeZ, (tabSizeY1 - tabSizeY2) / 2, size.x, center = true);
right_triangle(tabSizeZ - cubeZ, dy, size.x, center = true);
}
}

View File

@@ -52,8 +52,12 @@ toggle_nut = ["toggle_nut", 6.1, 9.2, 1.5, 1.5, M6_washer, 1.5,
M4_wingnut = ["M4_wingnut", 4, 10, 3.75,8, M4_washer, 0, 22, 10, 6, 3];
// sx ty1 ty2 hammer
M3_sliding_t_nut = ["M3_sliding_t_nut", 3, 6, 3.0, 4.0, false, 0, 10, 10, 6, false];
M4_sliding_t_nut = ["M4_sliding_t_nut", 4, 6, 3.25,4.5, false, 0, 11, 10, 6, false];
M5_sliding_t_nut = ["M5_sliding_t_nut", 5, 6, 3.25,4.5, false, 0, 11, 10, 7, false];
M4_sliding_t_nut = ["M4_sliding_t_nut", 4, 6, 3.7, 4.7, false, 0, 11, 10, 6, false];
M5_sliding_t_nut = ["M5_sliding_t_nut", 5, 6, 3.7, 4.7, false, 0, 11, 10, 7, false];
M6_sliding_t_nut = ["M6_sliding_t_nut", 6, 8, 6.6, 8.5, false, 0, 16, 18.6,8,2, false];
M8_sliding_ball_t_nut = ["M8_sliding_ball_t_nut",
8, 8, 6.7, 7.6, false, 0, 22, 13.5, 0, false];
M3_hammer_nut = ["M3_hammer_nut", 3, 6, 2.75,4.0, false, 0, 5.5, 10, 6, true];
M4_hammer_nut = ["M4_hammer_nut", 4, 6, 3.25,4.5, false, 0, 5.5, 10, 6, true];

View File

@@ -27,6 +27,7 @@ include <buttons.scad>
include <green_terminals.scad>
include <pin_headers.scad>
use <microswitch.scad>
use <7_segment.scad>
use <../utils/rounded_cylinder.scad>
use <../utils/dogbones.scad>
@@ -37,6 +38,7 @@ use <led.scad>
use <dip.scad>
use <axial.scad>
use <smd.scad>
include <potentiometers.scad>
function pcb_name(type) = type[1]; //! Description
function pcb_length(type) = type[2]; //! Length
@@ -58,7 +60,6 @@ function pcb_size(type) = [pcb_length(type), pcb_width(type), pcb_thickness(type
function pcb_component(type, name, index = 0) = //! Return the component specified by name and index
[for(component = pcb_components(type)) if(component[3] == name) component][index];
function pcb_grid_pos(type, x, y, z = 0) = //! Returns a pcb grid position
let(grid = pcb_grid(type))
[-pcb_size(type).x / 2 + grid.x + x * (is_undef(grid[5]) ? 2.54 : grid[5]),
@@ -88,10 +89,13 @@ module pcb_hole_positions(type, all = true) { // Position children at the hole p
module pcb_screw_positions(type) //! Positions children at the mounting hole positions
pcb_hole_positions(type, false) children();
module chip(length, width, thickness, colour, cutout = false) //! Draw a coloured cube to represent a chip, or other rectangular component
module 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
if(!cutout)
color(colour)
translate_z(thickness / 2) cube([length, width, thickness], center = true);
if(width)
translate_z(thickness / 2) cube([length, width, thickness], center = true);
else
cylinder(d = length, h = thickness);
module usb_A_tongue() {
l = 9;
@@ -362,31 +366,11 @@ module jack(cutout = false) { //! Draw 3.5mm jack
module buzzer(height, diameter, colour) { //! Draw PCB buzzer with specified height, diameter and colour
color (colour)
tube(or = diameter / 2, ir = height > 5 ? 1 : 0.75, h = height, center = false);
color("white")
cylinder(d = 2, h = max(height - 3 , 0.5));
}
module potentiometer(h1, h2) {
color("silver") {
baseSize = [12, 11, 6];
translate_z(baseSize.z / 2)
cube(baseSize, center = true);
translate_z(baseSize.z) {
cylinder(d = 5, h = h1 - 0.5);
if (show_threads)
male_metric_thread(6, metric_coarse_pitch(5), length = h1 - 0.5, center = false);
}
translate_z(baseSize.z + h1 - 0.5)
cylinder(d = 3, h = 0.5);
translate_z(baseSize.z + h1)
linear_extrude(h2)
difference() {
circle(d=5);
square([0.75,5], center = true);
}
}
}
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
@@ -875,7 +859,7 @@ module terminal_35(ways, colour = "blue") { //! Draw 3.5mm terminal block
single();
}
module molex_254(ways) { //! Draw molex header
module molex_254(ways, right_angle = 0, skip = undef) { //! Draw molex header, set `right_angle` to 1 for normal right angle version or -1 for inverted right angle version.
vitamin(str("molex_254(", ways, "): Molex KK header ", ways, " way"));
pitch = 2.54;
width = ways * pitch - 0.1;
@@ -885,20 +869,66 @@ module molex_254(ways) { //! Draw molex header
back = 1;
below = 2.3;
above = 9;
pin_w = 0.64;
r = 1;
a = right_angle ? width / 2 - r - pin_w / 2 : above;
ra_offset = 2.72;
color("white")
union() {
translate([ -depth / 2, -width / 2,])
cube([depth, width, base]);
translate(right_angle ? [-ra_offset, 0, depth / 2] : [ 0, 0, 0])
rotate(right_angle ? right_angle > 0 ? [180, 90, 0] : [0, -90, 0] : [ 0, 0, 0])
union() {
translate([ -depth / 2, -width / 2,])
cube([depth, width, base]);
w = width - pitch;
translate([- depth / 2, -w / 2])
cube([back, w, height]);
}
w = width - pitch;
translate([- depth / 2, -w / 2])
cube([back, w, height]);
}
color("silver")
for(i = [0: ways -1])
translate([0, i * pitch - width / 2 + pitch / 2, (above + below) / 2 - below])
cube([0.44, 0.75, above + below], center = true);
for(i = [0 : ways -1])
if(is_undef(skip) || !in(skip, i))
translate([0, i * pitch - width / 2 + pitch / 2]) {
translate_z((a + below) / 2 - below)
cube([pin_w, pin_w, a + below], center = true);
l = above + ra_offset - r - pin_w / 2;
if(right_angle) {
translate([-l / 2 - r - pin_w / 2, 0, width / 2])
cube([l, pin_w, pin_w], center = true);
translate([-r - pin_w / 2, 0, a])
rotate([90, 0, 0])
rotate_extrude(angle = 90)
translate([r + pin_w / 2, 0])
square(pin_w, true);
}
}
}
module vero_pin(cropped = false) { //! Draw a vero pin
vitamin("vero_pin(): Vero board pin");
l = cropped ? 7.5 : 10;
d = 1.03;
spline_d = 1.23;
spline_h = 1.3;
collar_d = 1.72;
collar_h = 0.65;
above = 3.6;
splines = 6;
spline_w = 0.3;
color(silver) {
translate_z(-l + above + collar_h)
cylinder(d = d, h = l, $fn = 32);
cylinder(d = collar_d, h = collar_h);
for(i = [0 : splines - 1])
rotate(360 * i / splines)
translate([d / 2, 0, -spline_h])
rounded_rectangle([spline_d - d, spline_w, spline_h], spline_w / 4, center = false);
}
}
module standoff(h, d, h2, d2) { //! Draw a standoff
@@ -1000,6 +1030,7 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
if(show(comp, "molex_usb_Ax2")) molex_usb_Ax2(cutouts);
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(!cutouts) {
// Components that don't have a cutout parameter go in this section
@@ -1020,13 +1051,14 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
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, "D_plug")) translate_z(d_pcb_offset(comp[4])) d_plug(comp[4], pcb = true);
if(show(comp, "molex_hdr")) molex_254(comp[4]);
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));
if(show(comp, "jst_ph")) jst_xh_header(jst_ph_header, comp[4], param(5, false), param(6, "white"), param(7, undef));
if(show(comp, "potentiometer")) potentiometer(param(4, 5), param(5, 9));
if(show(comp, "potentiometer")) let(pot = param(4, BTT_encoder)) translate_z(pot_size(pot).z) vflip() potentiometer(pot, shaft_length = param(5, undef));
if(show(comp, "buzzer")) buzzer(param(4, 9), param(5, 12), param(6, grey(20)));
if(show(comp, "smd_res")) smd_resistor(comp[4], comp[5]);
if(show(comp, "smd_cap")) smd_capacitor(comp[4], comp[5]);
if(show(comp, "vero_pin")) vero_pin(param(4, false));
}
}
}
@@ -1064,6 +1096,19 @@ module pcb_components(type, cutouts = false, angle = undef) { //! Draw list of P
}
}
module pcb_grid_components(type, components, cutouts = false, angle = undef) //! Draw list of components on the PCB grid for perf board
for(comp = components) {
p = pcb_grid_pos(type, comp.x, comp.y);
if(comp[3][0] == "-")
translate([p.x, p.y])
vflip()
pcb_component(comp, cutouts, angle);
else
translate([p.x, p.y, pcb_thickness(type)])
pcb_component(comp, cutouts, angle);
}
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) {
@@ -1149,7 +1194,7 @@ module pcb(type) { //! Draw specified PCB
circle(d = 1);
}
if(fr4 && len(grid) < 3) { // oval lands at the ends
if(fr4 && len(grid) < 3 && pcb_holes(type)) { // 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));

View File

@@ -22,6 +22,8 @@ include <leds.scad>
include <axials.scad>
include <smds.scad>
include <green_terminals.scad>
include <7_segments.scad>
include <potentiometers.scad>
//
// l w t r h l c b h
@@ -818,11 +820,71 @@ LIPO_fuel_gauge = [
[] // accessories
];
ESP32_DOIT_V1 = let(l = 51.45, w = 28.33, pitch = inch(1), pins = 15, poffset = inch(0.05)) [
"ESP32_DOIT_V1", "ESP32 DOIT DEV KIT V1",
l, w, 1.6, // Size
2, // corner radius
3, // mounting hole diameter
0, // pad around mounting hole
grey(20), // color
false, // true if parts should be separate BOM items
[for(x = [-1, 1], y = [-1, 1]) [x * 46.7 / 2 + l / 2, y * 23.4 / 2 + w / 2, false]],
[ // components
[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
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"],
[14.8 - 2.5, 8, 0, "chip", 5, 5, 0.8],
[l / 2 + poffset + inch(0.7), w / 2 + pitch / 2 - 2, 90, "smd_cap", CAP1206, 1.75],
],
[], // accessories
[(l - inch(pins - 1) / 10) / 2 + inch(0.05), (w - pitch) / 2, pins, 2, silver, 2.54, pitch], // 15x2 grid of holes
];
ArduinoNano = let(l = 43.18, w = 17.78, pitch = inch(0.6), pins = 15, poffset = -0.05, led_spacing = [1.5, 1.8]) [
"ArduinoNano", "Arduino Nano",
l, w, 1.6, // Size
0, // corner radius
1.85, // mounting hole diameter
0, // pad around mounting hole
"#2140BE", // color
false, // true if parts should be separate BOM items
[for(x = [-1, 1], y = [-1, 1]) [x * 40.64 / 2 + l / 2, y * 15.24 / 2 + w / 2]],
[ // components
[l / 2 + poffset, w / 2 - pitch / 2, 0, "-2p54joiner", pins, 1],
[l / 2 + poffset, w / 2 + pitch / 2, 0, "-2p54joiner", pins, 1],
[l / 2 + poffset + inch(0.75), w / 2, 0, "2p54header", 2, 3],
[1.75, w / 2, 180, "usb_uA" ],
[l / 2 - inch(0.25), w / 2, 45, "chip", 7, 7, 1.3],
[l / 2 + poffset + inch(0.15), w / 2, 0, "chip", 3.5, 6, 1.8, silver ], // mock button
[l / 2 + poffset + inch(0.15), w / 2, 0, "chip", 1.3, 2.6, 2.6, grey(90) ], // mock button
for(y = [-1.5 : 1.5]) [l / 2 + poffset + inch(0.4) - led_spacing.x, w / 2 + y * led_spacing.y, 0, "smd_res", RES0603, "1K"],
for(y = [-1.5 : 1.5]) [l / 2 + poffset + inch(0.4) + led_spacing.x, w / 2 + y * led_spacing.y, 0, "smd_led", LED0603, ["green", "red", "orange", "orange"][y + 1.5]],
],
[], // accessories
[(l - inch(pins - 1) / 10) / 2 + poffset, (w - pitch) / 2, pins, 2, silver, 2.54, pitch], // 15x2 grid of holes
];
KY_040 = ["KY_040", "KY_-040 rotart encoder breakout",
26.3, 19.5, 1.6, 0, 3, 0, grey(20), false,
[
[3.23 + 1.5, 1.3 + 1.5],
[3.23 + 1.5 + 16.775, 1.3 + 1.5]
],
[
[-3, 12, 90, "2p54header", 5, 1, undef, undef, true],
[10.8, 11.3, 0, "potentiometer", KY_040_encoder],
],
[]];
tiny_pcbs = [XIAO, MP1584EN, TP4056, ESP_01, LIPO_fuel_gauge];
pcbs = [RAMPSEndstop, MT3608, PI_IO, ExtruderPCB, ZC_A0591, RPI_Pico, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, RPI3, RPI4, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO, BTT_SKR_V1_4_TURBO, DuetE, Duex5];
pcbs = [RAMPSEndstop, KY_040, MT3608, ZC_A0591, ArduinoNano, RPI_Pico, ESP32_DOIT_V1, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, RPI3, RPI4, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO, BTT_SKR_V1_4_TURBO, DuetE, Duex5];
pcbs_not_shown = [Melzi, Duex2, PSU12V1A, Keyes5p1];
pcbs_not_shown = [Melzi, Duex2, PSU12V1A, Keyes5p1, PI_IO, ExtruderPCB];
perfboards = [PERF74x51, PERF70x51, PERF70x50, PERF60x40, PERF70x30, PERF80x20];

View File

@@ -229,7 +229,7 @@ module pin_socket(type, cols = 1, rows = 1, right_angle = false, height = 0, smt
}
}
module jst_xh_header(type, pin_count, right_angle = false, colour = false, pin_colour = false) { //! Draw JST XH connector
module jst_xh_header(type, pin_count, right_angle = false, colour = false, pin_colour = false, smt = false) { //! Draw JST XH connector
colour = colour ? colour : hdr_base_colour(type);
pin_colour = pin_colour ? pin_colour : hdr_pin_colour(type);
pitch = hdr_pitch(type);
@@ -306,10 +306,12 @@ module jst_xh_header(type, pin_count, right_angle = false, colour = false, pin_c
color(pin_colour)
for(x = [0 : pin_count - 1]) {
below = !smt ? 0 : hdr_pin_below(type);
verticalPinLength = right_angle ? hdr_pin_below(type) + ra_z + y_offset : hdr_pin_length(type);
horizontalPinLength = hdr_pin_length(type) - hdr_pin_below(type) + ra_box_offset;
translate([pitch * (x - (pin_count - 1) / 2), 0]) {
pin(type, verticalPinLength);
translate_z(below)
pin(type, verticalPinLength - below);
if(right_angle) {
translate([0, -pinWidth / 2, ra_z - pinWidth / 2 + y_offset])

View File

@@ -29,6 +29,7 @@
jst_xh_header = ["jst_xh_header",2.5, 10, 3.4, 0.64, gold, grey(90), 0, [4.9, 5.75, 7], 0.8, 0.525, 0.6, 6.1];
jst_ph_header = ["jst_ph_header",2.0, 9, 3.4, 0.64, silver, grey(90), 0, [3.9, 4.5, 6], 0.6, 0.55, 0.25, 4.8];
jst_zh_header = ["jst_zh_header",1.5, 7.4, 3.4, 0.5 , silver, grey(90), 0, [3.0, 3.5,4.5], 0.5, 0.45, 0.25, 3.7];
pin_headers = [ 2p54header ];

207
vitamins/potentiometer.scad Normal file
View File

@@ -0,0 +1,207 @@
//
// NopSCADlib Copyright Chris Palmer 2021
// 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/>.
//
//! Potentiometers and rotary encoders
include <../utils/core/core.scad>
use <../utils/rounded_cylinder.scad>
use <../utils/round.scad>
use <../utils/thread.scad>
pot_nut_t = 2;
pot_proud = 0.3;
spigot_r = 0.5;
tab = [3.2, 0.5];
function pot_body(type) = type[0]; //! Body diameter or width & depth, height and corner radius
function pot_face(type) = type[1]; //! Faceplate rib width, plate depth and plate height
function pot_wafer(type) = type[2]; //! Width, diameter and thickness of the track wafer plus true if curved
function pot_gangs(type) = type[3]; //! Number of gangs for mult-gang pot
function pot_thread_d(type) = type[4]; //! Nomininal thread diameter
function pot_thread_p(type) = type[5]; //! Thread pritch
function pot_thread_h(type) = type[6]; //! Height of threaded part
function pot_boss_d(type) = type[7]; //! Boss diameter
function pot_boss_h(type) = type[8]; //! Boss height
function pot_spigot(type) = type[9]; //! Spigot width, length and height above the boss
function pot_spigot_x(type) = type[10]; //! Spigot offset from the shaft centre
function pot_shaft(type) = type[11]; //! Diameter, flat diameter, length and flat/slot length and colour. If flat diameter is less than the radius then it is a slot width
function pot_neck(type) = type[12]; //! Diameter and length of the shaft neck
function pot_size(type) = let(d = pot_body(type)) len(d) > 3 ? [d.x , d.y, d.z] : [d.x, d.x, d.y]; //! Get pot body dimensions
function pot_z(type) = pot_thread_h(type) - pot_nut_t - pot_proud; //! Ideal distance behind panel surface to get the nut on comfortably
function pot_spigot_r(type) = let(sp = pot_spigot(type)) sp.x > 2 * spigot_r ? spigot_r : 0;
module potentiometer(type, thickness = 3, shaft_length = undef) {//! Draw a potentiometer with nut spaced by specified thickness
bh = pot_boss_h(type);
s = pot_size(type);
face = pot_face(type);
wafer = pot_wafer(type);
wafer_z = wafer? wafer.z : 0;
round = len(pot_body(type)) < 4;
dia_cast_colour = grey(60);
thread_d = pot_thread_d(type);
thread_h = pot_thread_h(type);
shaft = pot_shaft(type);
color(dia_cast_colour) {
// Boss
if(bh)
cylinder(d = pot_boss_d(type), h = bh);
if(face) {
if(face.x) {
linear_extrude(face.z)
square([face.x, face.y], center = true);
linear_extrude(bh)
difference() {
square([face.x, face.y], center = true);
square([face.x - 2 * face.z, s.x], center = true);
}
}
translate_z(bh - face.z)
linear_extrude(face.z)
intersection() {
circle(d = s.x - eps);
difference() {
square([s.x + eps, face.y], center = true);
if(face.x)
square([face.x - 2 * face.z, s.x], center = true);
}
}
}
// spigot
x = pot_spigot_x(type);
sp = pot_spigot(type);
if(x)
translate([x, 0, bh])
vflip()
rounded_rectangle(sp + [0, 0, bh], pot_spigot_r(type));
// thread
vflip()
if(show_threads)
male_metric_thread(thread_d, pot_thread_p(type), thread_h, center = false, bot = 0, colour = dia_cast_colour);
else
cylinder(d = thread_d, h = pot_thread_h(type));
}
d = pot_body(type);
fz = face ? face.z : 0;
gap = face ? face.z + tab[1] : 0;
total_h = s.z - bh;
gangs = pot_gangs(type);
gang_h = (total_h - (gangs - 1) * gap) / gangs;
pitch = gang_h + gap;
for(i = [0 : gangs - 1])
translate_z(bh + i * pitch) {
// Wafer that carries the track and contacts
if(wafer)
color("sienna") {
linear_extrude(wafer.z) round(wafer[3] ? 1 : 0) {
if(round)
circle(d = s.x - eps);
else
rounded_square([s.x, s.y], d[3]);
intersection() {
translate([0, -s.y / 2])
square([wafer.x, (wafer.y - s.y) * 2], center = true);
if(wafer[3])
circle(wafer.y - s.y / 2);
else
square(100, center = true);
}
}
}
color(silver) {
// Body
translate_z(wafer_z)
if(round)
rounded_cylinder(r = s.x / 2, r2 = d[2], h = gang_h - wafer_z);
else
rounded_rectangle([s.x, s.y, gang_h - wafer_z], d[3]);
// Make tabs that hold the face on
if(face) {
translate_z(-tab[1] - fz)
linear_extrude(face.z + tab[1] + wafer_z)
intersection() {
circle(d = s.x);
for(x = [-1, 1], y = [-1, 1], a = y * 90 + 90 + x * 30)
rotate(a)
translate([s.x / 2, 0])
slot(r = tab.x / 2, l = (s.x - pot_boss_d(type)) / 2 - tab.x / 2, h = 0);
}
}
}
// Face plate between sections
if(face && i) {
color(dia_cast_colour)
translate_z(-fz)
linear_extrude(fz)
intersection() {
circle(d = s.x - eps);
square([s.x + eps, face.y], center = true);
}
color(shaft[4])
vflip()
cylinder(d = shaft.x, h = gap);
}
}
// Shaft
color(shaft[4])
translate_z(-thread_h) vflip() {
shaft_z = is_undef(shaft_length) ? shaft.z : min(shaft_length, shaft.z);
flat_h = shaft[3] - (shaft.z - shaft_z);
plain = shaft_z - flat_h;
neck = pot_neck(type);
neck_h = neck[1];
if(neck_h)
cylinder(d = neck.x, h = neck_h);
if(plain - neck_h > 0)
translate_z(neck_h)
cylinder(d = shaft.x, h = plain - neck_h);
if(flat_h)
translate_z(plain)
linear_extrude(flat_h)
difference() {
circle(d = shaft.x);
if(shaft.y > shaft.x / 2)
translate([0, shaft.x / 2])
square([shaft.x, 2 * (shaft.x - shaft.y)], center = true);
else
if(shaft.y)
square([shaft.y, shaft.x + 1], center = true);
}
}
}

View File

@@ -0,0 +1,29 @@
//
// NopSCADlib Copyright Chris Palmer 2021
// 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/>.
//
//! Potentiometers and rotary encoders
// body h r face wafer gangs thread d pitch h boss h spigot w, l, h offset shaft d flat h flat h colour neck
imperial_pot_x2 = [[24, 22.5, 1.5], [5.7, 15.33, 0.8], [20, 28, 1.6, true], 2, inch(3/8), inch(1/32), 6.35, 13.6, 2.4, [1.12, 3.03, 2], 11, [6.27, 5.5, 44.3, 44.3, silver], [0, 0]];
imperial_pot = [[24, 12, 1.5], [5.7, 15.33, 0.8], [20, 28, 1.6, true], 1, inch(3/8), inch(1/32), 6.35, 13.6, 2.4, [1.12, 3.03, 2], 11, [6.27, 5.5, 44.3, 44.3, grey(95)], [0, 0]];
metric_pot = [[23, 11, 1.0], [0, 15.33, 0.8], [18, 27, 1.2, false], 1, 10, 0.75, 7.32, 13.9, 2.5, [1.12, 2.88, 1.26], 11, [6.27, 5.5, 43.8, 43.5, grey(50)], [0, 0]];
KY_040_encoder = [[12, 12, 6.5, 1.0], false, false, 1, 7, 0.75, 7, 0, 0, [0.4, 2, 0.8],5.8, [6, 4.5, 13, 10, grey(60)], [4, 0.5]];
BTT_encoder = [[12, 11, 6, 0.5], false, false, 1, 6, 0.8, 4.5, 0, 0, false, 0, [5, 0.75, 9.5, 9, silver], [3, 0.5]];
potentiometers = [BTT_encoder, KY_040_encoder, metric_pot, imperial_pot, imperial_pot_x2];
use <potentiometer.scad>

View File

@@ -16,33 +16,41 @@
// 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>
//
// Rails
//
// Wr Hr Emin P D d h go gw
MGN5 = [ "MGN5", 5, 3.6, 5, 15, 3.6, 2.4, 0.8, M2_cs_cap_screw, M2_cs_cap_screw, 1, 1 ]; // Screw holes too small for M2 heads
MGN7 = [ "MGN7", 7, 5, 5, 15, 4.3, 2.4, 2.6, M2_cap_screw, M2_cs_cap_screw, 1.5, 1.5 ];
MGN9 = [ "MGN9", 9, 6, 5, 20, 6.0, 3.5, 3.5, M3_cap_screw, M3_cs_cap_screw, 1.5, 1.5 ];
MGN12 =[ "MGN12", 12, 8, 7.5, 25, 6.0, 3.5, 4.5, M3_cap_screw, M3_cs_cap_screw, 2.25, 2.75];
MGN15 =[ "MGN15", 15, 10, 10, 40, 6.0, 3.5, 5.0, M3_cap_screw, M3_cs_cap_screw, 2.5, 2.75 ];
SSR15= [ "SSR15", 15, 12.5, 10, 60, 7.5, 4.5, 5.3, M4_cap_screw, M4_cs_cap_screw, 2.5, 2.75 ];
// Wr Hr Emin P D d h go gw
MGN5 = [ "MGN5", 5, 3.6, 5, 15, 3.6, 2.4, 0.8, M2_cs_cap_screw, M2_cs_cap_screw, 1, 1 ]; // Screw holes too small for M2 heads
MGN7 = [ "MGN7", 7, 5, 5, 15, 4.3, 2.4, 2.6, M2_cap_screw, M2_cs_cap_screw, 1.5, 1.5 ];
MGN9 = [ "MGN9", 9, 6, 5, 20, 6.0, 3.5, 3.5, M3_cap_screw, M3_cs_cap_screw, 1.5, 1.5 ];
MGN12 = [ "MGN12", 12, 8, 7.5, 25, 6.0, 3.5, 4.5, M3_cap_screw, M3_cs_cap_screw, 2.25, 2.75 ];
MGN15 = [ "MGN15", 15, 10, 10, 40, 6.0, 3.5, 5.0, M3_cap_screw, M3_cs_cap_screw, 2.5, 2.75 ];
SSR15 = [ "SSR15", 15, 12.5, 10, 60, 7.5, 4.5, 5.3, M4_cap_screw, M4_cs_cap_screw, 2.5, 2.75 ];
HGH15CA= [ "HGH15CA", 15, 15, 20, 60, 7.5, 4.5, 5.3, M4_cap_screw, M4_cs_cap_screw, 2.5, 2.75 ];
HGH20CA= [ "HGH20CA", 20, 17.5, 20, 60, 9.5, 6.0, 8.5, M5_cap_screw, M5_cs_cap_screw, 2.5, 2.75 ];
//
// Carriages
//
// L L1 W H H1 C B
MGN5C_carriage = ["MGN5C", 16, 9.6, 12, 6, 1.5, 0, 8, M2_cap_screw, MGN5 ];
MGN7C_carriage = ["MGN7C", 23, 14.3, 17, 8, 1.5, 8, 12, M2_cap_screw, MGN7 ];
MGN7H_carriage = ["MGN7H", 30.8, 21.8, 17, 8, 1.5,13, 12, M2_cap_screw, MGN7 ];
MGN9C_carriage = ["MGN9C", 29.7, 20.8, 20, 10, 2, 10, 15, M3_cap_screw, MGN9 ];
MGN9H_carriage = ["MGN9H", 39.9, 29.9, 20, 10, 2, 16, 15, M3_cap_screw, MGN9 ];
MGN12C_carriage = ["MGN12C", 34.7, 21.7, 27, 13, 3, 15, 20, M3_cap_screw, MGN12 ];
MGN12H_carriage = ["MGN12H", 45.4, 32.4, 27, 13, 3, 20, 20, M3_cap_screw, MGN12 ];
MGN15C_carriage = ["MGN15C", 43.3, 27.7, 32, 16, 4, 20, 25, M3_cap_screw, MGN15 ];
SSR15_carriage = ["SSR15", 40.3, 23.3, 34, 24, 4.5, 0, 26, M4_cap_screw, SSR15 ];
// L L1 W H H1 C B
MGN5C_carriage = [ "MGN5C", 16, 9.6, 12, 6, 1.5, 0, 8, M2_cap_screw, MGN5 ];
MGN7C_carriage = [ "MGN7C", 23, 14.3, 17, 8, 1.5, 8, 12, M2_cap_screw, MGN7 ];
MGN7H_carriage = [ "MGN7H", 30.8, 21.8, 17, 8, 1.5, 13, 12, M2_cap_screw, MGN7 ];
MGN9C_carriage = [ "MGN9C", 29.7, 20.8, 20, 10, 2, 10, 15, M3_cap_screw, MGN9 ];
MGN9H_carriage = [ "MGN9H", 39.9, 29.9, 20, 10, 2, 16, 15, M3_cap_screw, MGN9 ];
MGN12C_carriage = [ "MGN12C", 34.7, 21.7, 27, 13, 3, 15, 20, M3_cap_screw, MGN12 ];
MGN12H_carriage = [ "MGN12H", 45.4, 32.4, 27, 13, 3, 20, 20, M3_cap_screw, MGN12 ];
MGN15C_carriage = [ "MGN15C", 43.3, 27.7, 32, 16, 4, 20, 25, M3_cap_screw, MGN15 ];
HGH15CA_carriage= [ "HGH15CA", 61.4, 39.4, 34, 28, 4, 26, 26, M4_cap_screw, HGH15CA ];
HGH20CA_carriage= [ "HGH20CA", 77.5, 50.5, 44, 30, 4.6, 35, 32, M5_cap_screw, HGH20CA ];
SSR15_carriage = [ "SSR15", 40.3, 23.3, 34, 24, 4.5, 0, 26, M4_cap_screw, SSR15 ];
rails = [MGN5, MGN7, MGN9, MGN12, MGN15, SSR15];
rails = [MGN5, MGN7, MGN9, MGN12, MGN15, SSR15, HGH15CA, HGH20CA];
carriages = [MGN5C_carriage, MGN7C_carriage, MGN7H_carriage, MGN9C_carriage, MGN9H_carriage, MGN12C_carriage, MGN12H_carriage, MGN12H_carriage, MGN15C_carriage, SSR15_carriage];
carriages = [MGN5C_carriage, MGN7C_carriage, MGN7H_carriage, MGN9C_carriage, MGN9H_carriage,
MGN12C_carriage, MGN12H_carriage, MGN12H_carriage, MGN15C_carriage, SSR15_carriage,
HGH15CA_carriage, HGH20CA_carriage
];
use <rail.scad>

View File

@@ -79,9 +79,11 @@ M2_cs_cap_screw = ["M2_cs_cap","M2 cs cap", hs_cs_cap,2, 3.8, 0, 0.65,1.3
M3_cs_cap_screw = ["M3_cs_cap","M3 cs cap", hs_cs_cap,3, 6.0, 0, 1.05,2.0, 18, M3_washer, M3_nut, M3_tap_radius, M3_clearance_radius];
M4_cs_cap_screw = ["M4_cs_cap","M4 cs cap", hs_cs_cap,4, 8.0, 0, 1.49,2.5, 20, M4_washer, M4_nut, M4_tap_radius, M4_clearance_radius];
M5_cs_cap_screw = ["M5_cs_cap","M5 cs cap", hs_cs_cap,5,10.0, 0, 3.00,3.0, 22, M5_washer, M5_nut, M5_tap_radius, M5_clearance_radius];
M6_cs_cap_screw = ["M6_cs_cap","M6 cs cap", hs_cs_cap,6,12.0, 0, 3.00,4.0, 24, M6_washer, M6_nut, M6_tap_radius, M6_clearance_radius];
M6_cs_cap_screw = ["M6_cs_cap","M6 cs cap", hs_cs_cap,6,12.0, 0, 2.50,4.0, 24, M6_washer, M6_nut, M6_tap_radius, M6_clearance_radius];
M8_cs_cap_screw = ["M8_cs_cap","M8 cs cap", hs_cs_cap,8,16.0, 0, 3.50,5.0, 28, M8_washer, M8_nut, M8_tap_radius, M8_clearance_radius];
M2_dome_screw = ["M2_dome", "M2 dome", hs_dome, 2, 3.5, 1.3, 0.6, 1.3, 16, M2_washer, M2_nut, M2_tap_radius, M2_clearance_radius];
M2p5_dome_screw = ["M2p5_dome", "M2.5 dome", hs_dome,2.5, 5.35,1.6, 0.8, 2.0, 17,M2p5_washer, M2p5_nut, M2p5_tap_radius, M2p5_clearance_radius];
M3_dome_screw = ["M3_dome", "M3 dome", hs_dome, 3, 5.7, 1.65, 1.04,2.0, 18, M3_washer, M3_nut, M3_tap_radius, M3_clearance_radius];
M4_dome_screw = ["M4_dome", "M4 dome", hs_dome, 4, 7.6, 2.2, 1.3, 2.5, 20, M4_washer, M4_nut, M4_tap_radius, M4_clearance_radius];
M5_dome_screw = ["M5_dome", "M5 dome", hs_dome, 5, 9.5, 2.75, 1.56,3.0, 22, M5_washer, M5_nut, M5_tap_radius, M5_clearance_radius];
@@ -102,7 +104,9 @@ M8_hex_screw = ["M8_hex", "M8 hex", hs_hex, 8, 15, 5.65, 0, 0
M3_low_cap_screw = ["M3_low_cap", "M3 low cap", hs_cap, 3, 5.5, 2, 1.5, 2.0, 18, M3_washer, M3_nut, M3_tap_radius, M3_clearance_radius];
M3_grub_screw = ["M3_grub", "M3 grub", hs_grub, 3, 0, 0, 2.5, 1.5, 0, M3_washer, M3_nut, M3_tap_radius, M3_clearance_radius];
M4_grub_screw = ["M4_grub", "M4 grub", hs_grub, 4, 0, 0, 2.4, 2.5, 0, M4_washer, M4_nut, M4_tap_radius, M4_clearance_radius];
M4_grub_screw = ["M4_grub", "M4 grub", hs_grub, 4, 0, 0, 2.4, 2.0, 0, M4_washer, M4_nut, M4_tap_radius, M4_clearance_radius];
M5_grub_screw = ["M5_grub", "M5 grub", hs_grub, 5, 0, 0, 2.4, 2.5, 0, M5_washer, M5_nut, M5_tap_radius, M5_clearance_radius];
M6_grub_screw = ["M6_grub", "M6 grub", hs_grub, 6, 0, 0, 2.4, 3.0, 0, M6_washer, M6_nut, M6_tap_radius, M6_clearance_radius];
No2_screw = ["No2", "No2 pan wood", hs_pan, 2.2, 4.2, 1.7, 0, 0, 0, M2p5_washer, false, No2_pilot_radius, No2_clearance_radius];
No4_screw = ["No4", "No4 pan wood", hs_pan, 3.0, 5.5, 2.0, 0, 0, 0 ,M3p5_washer, false, No4_pilot_radius, No4_clearance_radius];
@@ -113,12 +117,12 @@ No8_screw = ["No8", "No8 pan wood", hs_pan, 4.2, 8.2, 3.05, 0, 0
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],
[ M2_cs_cap_screw, 0, M3_cs_cap_screw, M4_cs_cap_screw, M5_cs_cap_screw, M6_cs_cap_screw],
[ M2_dome_screw, 0, M3_dome_screw, M4_dome_screw, M5_dome_screw],
[ M2_cs_cap_screw, 0, M3_cs_cap_screw, M4_cs_cap_screw, M5_cs_cap_screw, M6_cs_cap_screw, M8_cs_cap_screw],
[ M2_dome_screw, M2p5_dome_screw,M3_dome_screw, M4_dome_screw, M5_dome_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, M5_pan_screw, M6_pan_screw, No632_pan_screw],
[ No2_screw, 0, No4_screw, No6_screw, No8_screw, No6_cs_screw],
[ 0, 0, M3_grub_screw, M4_grub_screw]
[ 0, 0, M3_grub_screw, M4_grub_screw, M5_grub_screw, M6_grub_screw]
];
use <screw.scad>

140
vitamins/servo_motor.scad Normal file
View File

@@ -0,0 +1,140 @@
//
// NopSCADlib Copyright Niclas Hedhman 2018
// niclas@hedhman.org
//
// 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/>.
//
//! BLDC servos for CNC machines
//
include <../core.scad>
include <../utils/tube.scad>
include <../utils/round.scad>
include <../utils/quadrant.scad>
include <../utils/rounded_cylinder.scad>
function servo_motor_cap(type) = type[2]; //! Diameter height and corner radius of encoder cover
function servo_motor_length(type) = type[3]; //! Total length from the faceplate
function servo_motor_shaft(type) = type[4]; //! Shaft type
function servo_motor_faceplate(type) = type[5]; //! Face plate type
function faceplate_width(type) = type[1]; //! Width of faceplate
function faceplate_thickness(type) = type[2]; //! Thickness of the faceplate
function faceplate_boss_size(type) = type[3]; //! Centre boss outer d, inner d and height
function faceplate_hole_pitch(type) = type[4]; //! Screw hole pitch
function faceplate_hole_dia(type) = type[5]; //! Screw hole size
function servo_motor_width(type) = faceplate_width(servo_motor_faceplate(type)); //! Width of the motor body
function shaft_type(type) = type[0]; //! String to indicate the shaft type
function shaft_diameter(type) = type[1]; //! Shaft diameter
function shaft_length(type) = type[2]; //! Shaft length
function shaft_key_size(type) = type[3]; //! Keyway [length, width, depth]
module servo_motor(type) { //! Draw the specified servo
fplate = servo_motor_faceplate(type);
t = faceplate_thickness(fplate);
w = servo_motor_width(type);
inset = (w - faceplate_hole_pitch(fplate)) / 2;
cap = servo_motor_cap(type);
l = servo_motor_length(type);
vitamin(str("servo_motor(", type[0], ") : Servo ", type[1], " ", fplate[0], " mount ", servo_motor_width(type), " x ", servo_motor_length(type), "mm"));
color(grey(20))
translate_z(-l + cap.z) {
linear_extrude(l - t - cap.z)
round(2)
difference() {
square([w, w], center = true);
faceplate_screw_positions(fplate)
rotate($i * 90 + 180)
quadrant(w = 2 * inset, r = inset, center = true);
}
vflip()
rounded_cylinder(r = cap.x / 2, r2 = cap.y, h = cap.z);
}
motor_shaft(servo_motor_shaft(type));
motor_faceplate(fplate);
}
module motor_shaft(type) { //! Draw the specified motor shaft
diameter = shaft_diameter(type);
length = shaft_length(type);
key_size = shaft_key_size(type);
key_r = key_size.y / 2;
color("silver")
if( shaft_type(type) == "keyed" ) {
render() difference() {
cylinder(h = length, d = diameter);
translate([diameter / 2, 0, length])
rotate([0, 90, 0])
slot(r = key_r, l = 2 * (key_size.x - key_r), h = 2 * key_size.z);
}
}
}
module servo_screw_positions(type) //! Position children at screw positions
faceplate_screw_positions(servo_motor_faceplate(type))
children();
module faceplate_screw_positions(type) //! Position children at faceplate screw positions
for($i = [0 : 3])
let(corner = [[1, 1], [-1, 1], [-1,-1], [1, -1]][$i], pitch = faceplate_hole_pitch(type))
translate(corner * pitch / 2)
children();
module motor_faceplate(type) { //! Draw specified motor faceplate
w = faceplate_width(type);
t = faceplate_thickness(type);
boss = faceplate_boss_size(type);
boss_r = boss[0] / 2;
boss_ir = boss[1] / 2;
boss_t = boss.z;
rad = 5; // corner radius
translate_z(-t) {
color(silver)
linear_extrude(t)
difference() {
rounded_square([w - eps, w - eps], rad);
faceplate_screw_positions(type)
circle(d = faceplate_hole_dia(type));
}
color(grey(10))
translate_z(eps)
linear_extrude(t - 2 * eps)
difference() {
rounded_square([w, w], rad);
faceplate_screw_positions(type)
circle(d = faceplate_hole_dia(type) + eps);
}
}
color(grey(10))
tube(h = boss_t, or = boss_r - eps, ir = boss_ir + eps, center = false);
color(silver)
tube(h = boss_t - eps, or = boss_r, ir = boss_ir, center = false);
}

View File

@@ -0,0 +1,33 @@
//
// NopSCADlib Copyright Niclas Hedhman 2018
// niclas@hedhman.org
//
// 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/>.
// type w, t, boss, pitch, screw dia
80ST_faceplate = [ "80ST", 80, 8, [70, 34, 3], 63.63, 6 ];
// type, dia, len, key length, width, depth
Shaft_19mm_keyed = [ "keyed", 19, 35, [25, 6, 3.5] ];
// Code, Description, Cap, Length, Shaft, Faceplate
Lichuan_M01330_80ST = [ "Lichuan_M01330_80ST", "Lichuan LCMT07L02NB-80M01330B", [70, 3, 38], 123, Shaft_19mm_keyed, 80ST_faceplate ];
Lichuan_M02430_80ST = [ "Lichuan_M02430_80ST", "Lichuan LCMT07L02NB-80M02430B", [70, 3, 38], 150, Shaft_19mm_keyed, 80ST_faceplate ];
Lichuan_M03530_80ST = [ "Lichuan_M03530_80ST", "Lichuan LCMT07L02NB-80M03530B", [70, 3, 38], 178, Shaft_19mm_keyed, 80ST_faceplate ];
Lichuan_M04030_80ST = [ "Lichuan_M04030_80ST", "Lichuan LCMT07L02NB-80M04030B", [70, 3, 38], 190, Shaft_19mm_keyed, 80ST_faceplate ];
servo_motors = [Lichuan_M01330_80ST, Lichuan_M02430_80ST, Lichuan_M03530_80ST, Lichuan_M04030_80ST];
use <servo_motor.scad>

View File

@@ -31,6 +31,7 @@ MDF10 = [ "MDF10", "Sheet MDF", 10, mdf_colour,
MDF12 = [ "MDF12", "Sheet MDF", 12, mdf_colour, true]; // ~1/2"
MDF18 = [ "MDF18", "Sheet MDF", 18, mdf_colour, true];
MDF19 = [ "MDF19", "Sheet MDF", 19, mdf_colour, true]; // ~3/4"
PMMA1p25 = [ "PMMA1p25", "Sheet acrylic", 1.25,[1, 1, 1, 0.5 ], false];
PMMA2 = [ "PMMA2", "Sheet acrylic", 2, [1, 1, 1, 0.5 ], false];
PMMA3 = [ "PMMA3", "Sheet acrylic", 3, [1, 1, 1, 0.5 ], false]; // ~1/8"
PMMA6 = [ "PMMA6", "Sheet acrylic", 6, [1, 1, 1, 0.5 ], false]; // ~1/4"
@@ -42,6 +43,9 @@ DiBond6 = [ "DiBond6", "Sheet DiBond", 6, [0.2, 0.2, 0.2, 1 ],
Cardboard = [ "Cardboard", "Corrugated cardboard", 5, [0.8, 0.6, 0.3, 1 ], false];
FoilTape = [ "FoilTape", "Aluminium foil tape", 0.05,[0.9, 0.9, 0.9, 1 ], false];
Foam20 = [ "Foam20", "Foam sponge", 20,[0.3, 0.3, 0.3, 1 ], true];
AL1_6 = [ "AL1_6", "Aluminium tooling plate", 1.6, [0.5, 0.5, 0.5, 0.5], false];
AL2 = [ "AL2", "Aluminium tooling plate", 2, [0.9, 0.9, 0.9, 1 ], false];
AL3 = [ "AL3", "Aluminium tooling plate", 3, [0.9, 0.9, 0.9, 1 ], false];
AL6 = [ "AL6", "Aluminium tooling plate", 6, [0.9, 0.9, 0.9, 1 ], false];
AL8 = [ "AL8", "Aluminium tooling plate", 8, [0.9, 0.9, 0.9, 1 ], false];
Steel06 = [ "Steel06", "Sheet mild steel", 0.6,"silver" , false];
@@ -52,7 +56,7 @@ CF2 = [ "CF2", "Sheet carbon fiber", 2, grey(35),
CF3 = [ "CF3", "Sheet carbon fiber", 3, grey(35), false, 2, 2, grey(20)];
sheets = [CF1, CF2, CF3, MDF6, MDF10, MDF12, MDF19, PMMA2, PMMA3, PMMA6, PMMA8, PMMA10,
glass2, DiBond, DiBond6, Cardboard, FoilTape, AL6, AL8, Steel06, Spring05, Silicone3, Foam20];
sheets = [CF1, CF2, CF3, MDF6, MDF10, MDF12, MDF19, PMMA1p25, PMMA2, PMMA3, PMMA6, PMMA8, PMMA10,
glass2, DiBond, DiBond6, Cardboard, FoilTape, AL1_6, AL2, AL3, AL6, AL8, Steel06, Spring05, Silicone3, Foam20];
use <sheet.scad>

View File

@@ -30,20 +30,25 @@ use <../utils/round.scad>
use <washer.scad>
use <rod.scad>
function NEMA_width(type) = type[1]; //! Width of the square face
function NEMA_length(type) = type[2]; //! Body length
function NEMA_radius(type) = type[3]; //! End cap radius
function NEMA_body_radius(type) = type[4]; //! Body radius
function NEMA_boss_radius(type) = type[5]; //! Boss around the spindle radius
function NEMA_boss_height(type) = type[6]; //! Boss height
function NEMA_shaft_dia(type) = type[7]; //! Shaft diameter
function NEMA_shaft_length(type)= type[8]; //! Shaft length above the face, if a list then a leadscrew: length, lead, starts
function NEMA_hole_pitch(type) = type[9]; //! Screw hole pitch
function NEMA_cap_heights(type) = type[10]; //! Height of the end cap at the corner and the side
function NEMA_width(type) = type[1]; //! Width of the square face
function NEMA_length(type) = type[2]; //! Body length
function NEMA_radius(type) = type[3]; //! End cap radius
function NEMA_body_radius(type) = type[4]; //! Body radius
function NEMA_boss_radius(type) = type[5]; //! Boss around the spindle radius
function NEMA_boss_height(type) = type[6]; //! Boss height
function NEMA_shaft_dia(type) = type[7]; //! Shaft diameter
function NEMA_shaft_length(type) = type[8]; //! Shaft length above the face, if a list then a leadscrew: length, lead, starts
function NEMA_hole_pitch(type) = type[9]; //! Screw hole pitch
function NEMA_cap_heights(type) = type[10]; //! Height of the end cap at the corner and the side
function NEMA_thread_d(type) = type[11]; //! Screw hole diameter
function NEMA_black_caps(type) = type[12]; //! End caps are black
function NEMA_end_connector(type)= type[13]; //! If has a connector then plug goes in the end rather than the side
function NEMA_shaft_length2(type)= type[14]; //! Rear shaft length if non-zero
function NEMA_shaft_bore(type) = type[15]; //! Hollow shaft in non-zero
function NEMA_holes(type) = [-NEMA_hole_pitch(type) / 2, NEMA_hole_pitch(type) / 2]; //! Screw positions for for loop
function NEMA_big_hole(type) = NEMA_boss_radius(type) + 0.2; //! Clearance hole for the big boss
stepper_body_colour = "black";
stepper_body_colour = grey(20);
stepper_cap_colour = grey(50);
stepper_machined_colour = grey(90);
@@ -65,11 +70,21 @@ module NEMA(type, shaft_angle = 0, jst_connector = false) { //! Draw specified N
cap = NEMA_cap_heights(type)[1];
cap2 = NEMA_cap_heights(type)[0];
vitamin(str("NEMA(", type[0], "): Stepper motor NEMA", round(NEMA_width(type) / 2.54), " x ", length, "mm"));
thread_d = 3; // Is this always the case?
thread_d = NEMA_thread_d(type);
corner_r = 0.9;
bore = NEMA_shaft_bore(type);
end_connector = NEMA_end_connector(type) && jst_connector;
header = end_connector ? jst_zh_header : jst_ph_header;
socket_size = hdr_box_size(header);
pcb_thickness = 1.6;
tabSize = [16, 4, cap - hdr_ra_height(header) - pcb_thickness];
pins = 6;
end_conn_w = socket_size.x + hdr_pitch(header) * (pins - 1);
end_conn_inset = socket_size.y - 2;
module cap_shape(end)
round(0.5, $fn = 32) difference() {
intersection() {
difference() {
round(corner_r, $fn = 32) intersection() {
square([side, side], center = true);
circle(NEMA_radius(type), $fn = 360);
@@ -78,15 +93,26 @@ module NEMA(type, shaft_angle = 0, jst_connector = false) { //! Draw specified N
for(x = NEMA_holes(type), y = NEMA_holes(type))
translate([x, y])
circle(d = thread_d);
if(bore)
circle(d = bore + eps);
if(end_connector && end < 0)
translate([0, side / 2])
square([end_conn_w, end_conn_inset * 2], true);
}
color(stepper_body_colour) // black laminations
translate_z(-length / 2)
linear_extrude(length - cap * 2, center = true)
intersection() {
square([side, side], center = true);
difference() {
round(corner_r, $fn = 32)
intersection() {
square([side, side], center = true);
circle(body_rad);
circle(body_rad);
}
circle(d = bore + eps);
}
color(stepper_machined_colour) {
@@ -96,11 +122,8 @@ module NEMA(type, shaft_angle = 0, jst_connector = false) { //! Draw specified N
cap_shape(1);
}
pcb_thickness = 1.6;
header = jst_ph_header;
socket_size = hdr_box_size(header);
tabSize = [16, 4, cap - hdr_ra_height(header) - pcb_thickness];
color(stepper_cap_colour) { // aluminium end caps
wing_t = 0.5; // end connector side wings
color(NEMA_black_caps(type) ? "black" : stepper_cap_colour) { // aluminium end caps
for(end = [-1, 1]) {
translate_z(-length / 2 + end * (length - cap) / 2)
linear_extrude(cap, center = true)
@@ -116,20 +139,36 @@ module NEMA(type, shaft_angle = 0, jst_connector = false) { //! Draw specified N
}
if(jst_connector)
translate([-tabSize.x / 2, side / 2, -length])
cube(tabSize);
if(end_connector)
for(x = [-1, 1])
translate([x * (end_conn_w / 2 + wing_t / 2), side / 2 - end_conn_inset, -length + cap / 2])
cube([wing_t, socket_size.y * 2, cap], center = true);
else
translate([-tabSize.x / 2, side / 2, -length])
cube(tabSize);
}
if(jst_connector)
translate([0, side / 2, -length + cap - hdr_ra_height(header)]) {
rotate(180)
not_on_bom()
jst_xh_header(header, 6, true);
if(jst_connector) not_on_bom()
if(end_connector) {
translate([0, side / 2 + hdr_y_offset(header) + socket_size.y / 2 - end_conn_inset, -length + socket_size.z])
rotate([180, 0, 0])
jst_xh_header(header, pins, false, smt = true);
translate_z(-pcb_thickness / 2)
color("green")
cube([socket_size.x + 5 * 2, tabSize.y * 2, pcb_thickness], true);
}
h = cap - socket_size.z;
translate([0, side / 2 + socket_size.y / 2 - end_conn_inset, -length + socket_size.z + h / 2])
color(grey(70))
cube([end_conn_w, socket_size.y, h], center = true);
}
else
translate([0, side / 2, -length + cap - hdr_ra_height(header)]) {
rotate(180)
jst_xh_header(header, pins, true, smt = true);
translate_z(-pcb_thickness / 2)
color("green")
cube([socket_size.x + 5 * 2, tabSize.y * 2, pcb_thickness], true);
}
if(show_threads)
for(x = NEMA_holes(type), y = NEMA_holes(type))
@@ -137,14 +176,15 @@ module NEMA(type, shaft_angle = 0, jst_connector = false) { //! Draw specified N
female_metric_thread(thread_d, metric_coarse_pitch(thread_d), cap, colour = stepper_cap_colour);
shaft = NEMA_shaft_length(type);
translate_z(-5)
shaft2 = NEMA_shaft_length2(type);
translate_z(-length + eps - shaft2)
rotate(shaft_angle)
if(!is_list(shaft))
color(stepper_machined_colour)
cylinder(r = shaft_rad, h = shaft + 5); // shaft
tube(or = shaft_rad, ir = bore / 2, h = shaft + length + shaft2, center = false); // shaft
else
not_on_bom()
leadscrew(shaft_rad * 2, shaft.x + 5, shaft.y, shaft.z, center = false);
leadscrew(shaft_rad * 2, shaft.x + length + shaft2, shaft.y, shaft.z, center = false);
if(!jst_connector)
translate([0, side / 2, -length + cap / 2])

View File

@@ -21,17 +21,20 @@
// NEMA stepper motor model
//
// corner body boss boss shaft
// side, length, radius, radius, radius, depth, shaft, length, holes, cap heights
NEMA17 = ["NEMA17", 42.3, 47, 53.6/2, 25, 11, 2, 5, 24, 31, [11.5, 9]];
NEMA17M = ["NEMA17M", 42.3, 40, 53.6/2, 25, 11, 2, 5, 20, 31, [12.5, 11]];
NEMA17M8= ["NEMA17M8", 42.3, 40, 53.6/2, 25, 11, 2, 8, [280, 8, 4], 31, [12.5, 11]];
NEMA17S = ["NEMA17S", 42.3, 34, 53.6/2, 25, 11, 2, 5, 24, 31, [8, 8]];
NEMA17P = ["NEMA17P", 42.3, 26.5, 53.6/2, 25, 11, 2, 5, 26.5, 31, [10, 8]];
NEMA16 = ["NEMA16", 39.5, 19.2, 50.6/2, 50.6/2, 11, 2, 5, 12, 31, [8, 8]];
NEMA14 = ["NEMA14", 35.2, 36, 46.4/2, 21, 11, 2, 5, 21, 26, [8, 8]];
NEMA23 = ["NEMA23", 56.4, 51.2, 75.7/2, 35, 38.1/2, 1.6, 6.35, 24, 47.1, [8, 8]];
// corner body boss boss shaft cap thread black end shaft shaft
// side, length, radius, radius, radius, depth, shaft, length, holes, heights, dia, caps, conn, length2, bore
NEMA8 = ["NEMA8", 20, 30, 30/2, 20, 7.5, 1.6, 4, 6, 16, [8, 8], 2, true, true, 0, 0];
NEMA8BH = ["NEMA8BH", 20, 30, 30/2, 20, 7.5, 1.6, 5, 12, 16, [8, 8], 2, true, true, 7, 2.8];
NEMA17 = ["NEMA17", 42.3, 47, 53.6/2, 25, 11, 2, 5, 24, 31, [11.5, 9], 3, false, false, 0, 0];
NEMA17M = ["NEMA17M", 42.3, 40, 53.6/2, 25, 11, 2, 5, 20, 31, [12.5, 11], 3, false, false, 0, 0];
NEMA17M8= ["NEMA17M8", 42.3, 40, 53.6/2, 25, 11, 2, 8, [280, 8, 4], 31, [12.5, 11], 3, false, false, 0, 0];
NEMA17S = ["NEMA17S", 42.3, 34, 53.6/2, 25, 11, 2, 5, 24, 31, [8, 8], 3, false, false, 0, 0];
NEMA17P = ["NEMA17P", 42.3, 26.5, 53.6/2, 25, 11, 2, 5, 26.5, 31, [10, 8], 3, false, false, 0, 0];
NEMA16 = ["NEMA16", 39.5, 19.2, 50.6/2, 50.6/2, 11, 2, 5, 12, 31, [8, 8], 3, false, false, 0, 0];
NEMA14 = ["NEMA14", 35.2, 36, 46.4/2, 21, 11, 2, 5, 21, 26, [8, 8], 3, false, false, 0, 0];
NEMA23 = ["NEMA23", 56.4, 51.2, 75.7/2, 35, 38.1/2, 1.6, 6.35, 24, 47.1, [8, 8], 3, false, false, 0, 0];
stepper_motors = [NEMA14, NEMA16, NEMA17P, NEMA17S, NEMA17M, NEMA17, NEMA23];
stepper_motors = [NEMA8, NEMA8BH, NEMA14, NEMA16, NEMA17P, NEMA17S, NEMA17M, NEMA17, NEMA23];
small_steppers = [];
use <stepper_motor.scad>