1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-09-08 06:01:16 +02:00

Compare commits

...

19 Commits

Author SHA1 Message Date
Chris Palmer
6c4d5de350 Merge branch 'loekwous-feature/add-blackpill-pcb' 2025-01-22 01:28:57 +00:00
Chris Palmer
8458e432fc Updated images and readme. 2025-01-22 01:28:39 +00:00
Chris Palmer
7503e8c2cf Merge branch 'feature/add-blackpill-pcb' of https://github.com/loekwous/NopSCADlib into loekwous-feature/add-blackpill-pcb 2025-01-22 00:11:47 +00:00
Chris Palmer
0154b2a32c Added Sparkfun 9DOF_stick PCB. 2025-01-21 14:45:22 +00:00
Chris Palmer
0b802187bb Corrected the chip number on ZC_A0591 pcb. 2025-01-21 14:31:22 +00:00
Chris Palmer
923c3b5c57 Avoid makeing empty folders for dxfs, stls or png if there are no parts of that type. 2025-01-21 14:22:50 +00:00
loekwous
e11bb72814 Added Black pill pcb 2025-01-01 19:29:08 +01:00
Chris Palmer
70fd7fbe14 Updated changelog. 2024-10-20 12:21:16 +01:00
Chris Palmer
45e7962721 Merge branch 'mmuman-micro-rocker' 2024-10-20 12:19:19 +01:00
Chris Palmer
4d8911718c Updated images and readme. 2024-10-20 12:18:52 +01:00
François Revol
cb57b25b0b Add 10x15 micro rocker switches
Spades are not exact but close enough.
2024-10-20 01:03:09 +02:00
Chris Palmer
6deaa5da9c Updated changelog. 2024-10-17 16:24:27 +01:00
Chris Palmer
9820d3eb10 Merge branch 'mmuman-rect-leds' 2024-10-17 16:22:01 +01:00
Chris Palmer
066242af58 Updated images and readme. 2024-10-17 16:19:29 +01:00
Chris Palmer
4b3468f78d Fixed LED bezels to cope with square LEDs. 2024-10-17 16:17:47 +01:00
Chris Palmer
001ea2a174 Fixed LED bezel test. 2024-10-17 16:17:17 +01:00
Chris Palmer
8e9d2dd367 Fixed LED test. 2024-10-17 16:16:47 +01:00
François Revol
f4a7065e1f Add rectangular LEDs
As per https://www.futurlec.com/LED/Red_2x5mm_LED.shtml
2024-10-17 13:36:18 +02:00
Chris Palmer
5ec0c6132d Updated changelog. 2024-10-10 00:33:29 +01:00
17 changed files with 217 additions and 67 deletions

View File

@@ -3,6 +3,35 @@
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
### [v21.32.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.32.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.31.0...v21.32.0 "diff with v21.31.0")
* 2024-10-20 [`4d89117`](https://github.com/nophead/NopSCADlib/commit/4d8911718c54fdee5054d934c4aeeee34386d7f9 "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
* 2024-10-17 [`cb57b25`](https://github.com/nophead/NopSCADlib/commit/cb57b25b0bbe23b5f5a7f5c910dbdd3cf53530dd "show commit") [F.R.](# "Fran<61>ois Revol") Add 10x15 micro rocker switches
* Spades are not exact but close enough.
### [v21.31.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.31.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.30.0...v21.31.0 "diff with v21.30.0")
* 2024-10-17 [`066242a`](https://github.com/nophead/NopSCADlib/commit/066242af588446037fc69606388ccc65d9884ad6 "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
* 2024-10-17 [`4b3468f`](https://github.com/nophead/NopSCADlib/commit/4b3468f78d998fbd2e849d10bdc63dd3aeadc72a "show commit") [C.P.](# "Chris Palmer") Fixed LED bezels to cope with square LEDs.
* 2024-10-17 [`001ea2a`](https://github.com/nophead/NopSCADlib/commit/001ea2a174dbc4395636fb325628a53874e59943 "show commit") [C.P.](# "Chris Palmer") Fixed LED bezel test.
* 2024-10-17 [`8e9d2dd`](https://github.com/nophead/NopSCADlib/commit/8e9d2dd367015403aa542b16fa384d08856e8401 "show commit") [C.P.](# "Chris Palmer") Fixed LED test.
* 2024-10-17 [`f4a7065`](https://github.com/nophead/NopSCADlib/commit/f4a7065e1f1198add4e50754343fd0d97954e239 "show commit") [F.R.](# "Fran<61>ois Revol") Add rectangular LEDs
* As per `https://www.futurlec.com/LED/Red_2x5mm_LED.shtml`
### [v21.30.0](https://github.com/nophead/NopSCADlib/releases/tag/v21.30.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v21.29.2...v21.30.0 "diff with v21.29.2")
* 2024-10-10 [`7ffff8b`](https://github.com/nophead/NopSCADlib/commit/7ffff8b7b7e111400dd7e3cb8e96bc95471a8ffa "show commit") [C.P.](# "Chris Palmer") Updated images and readme.
* 2024-10-10 [`e001cc4`](https://github.com/nophead/NopSCADlib/commit/e001cc46a34206801c7e1a474634b9b1f83dfc9a "show commit") [C.P.](# "Chris Palmer") Restored Lumintop colour to white and made text black on white batteries.
* 2024-10-08 [`7b42157`](https://github.com/nophead/NopSCADlib/commit/7b421570b46136de925963321ef44cb570e868b6 "show commit") [J.G.](# "Jan Giebels") corrected c&p error
* 2024-10-08 [`49ba60f`](https://github.com/nophead/NopSCADlib/commit/49ba60f159b2c3685696fff3f1dca5a9184d2553 "show commit") [J.G.](# "Jan Giebels") added L4680, L32700, L16340 `Li-Ion/LiFePo4` batteries
#### [v21.29.2](https://github.com/nophead/NopSCADlib/releases/tag/v21.29.2 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v21.29.1...v21.29.2 "diff with v21.29.1")
* 2024-10-07 [`9e45dba`](https://github.com/nophead/NopSCADlib/commit/9e45dbad04bb4752b9b3aceaa88ee71bb975d749 "show commit") [C.P.](# "Chris Palmer") Fixed incorrect parameters passed to `tube()` in `ht_pipe()`.
Fixed `lib.scad` to include `ht_pipes.scad` instead of using it.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1015 KiB

After

Width:  |  Height:  |  Size: 1018 KiB

View File

@@ -157,7 +157,7 @@ cable_grommets_y = 0;
translate([x5, cable_grommets_y])
cable_grommets();
translate([x5, cable_grommets_y + 30])
translate([x5, cable_grommets_y + 45])
led_bezels();
translate([x5 + 50, cable_grommets_y])
@@ -366,9 +366,12 @@ components_y = toggles_y + 40;
translate([x2, leds_y])
leds();
translate([x2 + 35, leds_y])
translate([x2 + 55, leds_y])
ldrs();
translate([x2 + 87, leds_y])
fuseholders();
translate([x2 + 8, carriers_y])
carriers();
@@ -378,9 +381,6 @@ translate([x2, magnets_y])
translate([x2 + 20, carriers_y])
led_meters();
translate([x2 + 70, leds_y])
fuseholders();
translate([x2, spades_y])
spades();

View File

@@ -40,32 +40,72 @@ function led_bezel_hole_r(type) = //! Panel hole radius
module led_bezel(type) { //! Makes the STL for the bezel
led = led_bezel_led(type);
stl(str(led[0],"_bezel")) {
rl = led_diameter(led) / 2;
rr = led_rim_dia(led) / 2;
wall = led_bezel_wall(type);
poly_tube(or = rr + wall + led_bezel_flange(type), ir = rl, h = led_bezel_flange_t(type)); // Flange
poly_tube(or = rl + wall, ir = rl, h = led_height(led) - rl - led_rim_t(led)); // Tube up to LED flange
poly_tube(or = corrected_radius(rr) + wall, ir = rr, h = led_bezel_height(type)); // Tube beyond the flange
if(is_num(led_diameter(led))) {
rl = led_diameter(led) / 2;
rr = led_rim_dia(led) / 2;
poly_tube(or = rr + wall + led_bezel_flange(type), ir = rl, h = led_bezel_flange_t(type)); // Flange
poly_tube(or = rl + wall, ir = rl, h = led_height(led) - rl - led_rim_t(led)); // Tube up to LED flange
poly_tube(or = corrected_radius(rr) + wall, ir = rr, h = led_bezel_height(type)); // Tube beyond the flange
}
else {
linear_extrude(led_bezel_flange_t(type)) // Flange
difference() {
offset(wall + led_bezel_flange(type))
square(led_rim_dia(led), true);
square(led_diameter(led), true);
}
linear_extrude(led_height(led) - led_rim_t(led)) // Tube up to the LED flange
difference() {
offset(wall)
square(led_diameter(led), true);
square(led_diameter(led), true);
}
linear_extrude(led_bezel_height(type)) // Tube beyond the LED flange
difference() {
offset(wall)
square(led_rim_dia(led), true);
square(led_rim_dia(led), true);
}
}
}
}
module led_bezel_retainer(type) { //! Makes the STL for the retaining ring
led = led_bezel_led(type);
stl(str(led[0],"_bezel_retainer")) {
ir = led_bezel_r(type);
poly_tube(or = ir + led_bezel_wall(type), ir = ir, h = 4);
wall = led_bezel_wall(type);
if(is_num(led_diameter(led))) {
ir = led_bezel_r(type);
poly_tube(or = ir + wall, ir = ir, h = 4);
}
else
linear_extrude(4)
difference() {
offset(2 * wall)
square(led_rim_dia(led), true);
offset(wall)
square(led_rim_dia(led), true);
}
}
}
module led_bezel_assembly(type, colour = "red") {//! Led bezel with LED
led = led_bezel_led(type);
d = led_diameter(led);
assembly(str(led[0], "_", colour, "_bezel")) {
translate_z(led_bezel_flange_t(type)) {
vflip()
stl_colour(pp1_colour)
led_bezel(type);
translate_z(-led_height(led) + led_diameter(led) / 2)
translate_z(-led_height(led) + (is_num(d) ? d / 2 : 0))
explode(-20)
led(led, colour);
}

View File

@@ -2112,6 +2112,7 @@ Standard domed through hole LEDs. Can specify colour and lead length.
| 1 | `led(LED3mm, "green")` | LED 3 mm green |
| 1 | `led(LED5mm, "blue")` | LED 5 mm blue |
| 1 | `led(LED8mm)` | LED 8 mm red |
| 1 | `led(LED5x2mm, "green")` | LED [5, 2] mm green |
<a href="#top">Top</a>
@@ -2981,6 +2982,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 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 | `pcb(BlackPill)` | Black Pill |
| 1 | | Cat 5 patch cable 300mm |
| 1 | `d_plug(DCONN15, pcb = true)` | D-type 15 way PCB mount plug - not shown |
| 1 | `pcb(DuetE)` | Duet 2 Ethernet electronics |
@@ -3008,7 +3010,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `molex_254(3)` | Molex KK header 3 way - not shown |
| 20 | `nut(M2_nut, nyloc = true)` | Nut M2 x 1.6mm nyloc |
| 38 | `nut(M2p5_nut, nyloc = true)` | Nut M2.5 x 2.2mm nyloc |
| 47 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
| 48 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc |
| 8 | `nut(M4_nut, nyloc = true)` | Nut M4 x 3.2mm nyloc |
| 1 | `pcb(OPZ2)` | Orange Pi Zero 2 |
| 1 | `pcb(PI_IO)` | PI_IO V2 - not shown |
@@ -3032,17 +3034,19 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 4 | `screw(M2_cap_screw, 25)` | Screw M2 cap x 25mm |
| 2 | `screw(M2p5_cap_screw, 20)` | Screw M2.5 cap x 20mm |
| 8 | `screw(M2p5_cap_screw, 30)` | Screw M2.5 cap x 30mm |
| 12 | `screw(M2p5_cap_screw, 35)` | Screw M2.5 cap x 35mm |
| 8 | `screw(M2p5_cap_screw, 35)` | Screw M2.5 cap x 35mm |
| 4 | `screw(M2p5_cap_screw, 40)` | Screw M2.5 cap x 40mm |
| 4 | `screw(M2p5_dome_screw, 25)` | Screw M2.5 dome x 25mm |
| 4 | `screw(M2p5_pan_screw, 20)` | Screw M2.5 pan x 20mm |
| 8 | `screw(M2p5_pan_screw, 30)` | Screw M2.5 pan x 30mm |
| 19 | `screw(M3_cap_screw, 16)` | Screw M3 cap x 16mm |
| 13 | `screw(M3_cap_screw, 20)` | Screw M3 cap x 20mm |
| 4 | `screw(M3_cap_screw, 25)` | Screw M3 cap x 25mm |
| 5 | `screw(M3_cap_screw, 25)` | Screw M3 cap x 25mm |
| 11 | `screw(M3_cap_screw, 35)` | Screw M3 cap x 35mm |
| 4 | `screw(M4_cap_screw, 20)` | Screw M4 cap x 20mm |
| 4 | `screw(M4_cap_screw, 25)` | Screw M4 cap x 25mm |
| 1 | `pcb(XIAO)` | Seeeduino XIAO |
| 1 | `pcb(9DOF_stick)` | Sparkfun 9 degrees of freedom IMU |
| 1 | `pcb(TP4056)` | TP4056 Li-lon Battery charger module |
| 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 |
@@ -3051,7 +3055,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | `pcb(WD2002SJ)` | WD2002SJ Buck Boost DC-DC converter |
| 20 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm |
| 38 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm |
| 47 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm |
| 48 | `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 |
@@ -3065,18 +3069,18 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 4 | pcb_spacer2090.stl |
| 2 | pcb_spacer25110.stl |
| 4 | pcb_spacer25140.stl |
| 4 | pcb_spacer25170.stl |
| 4 | pcb_spacer25180.stl |
| 4 | pcb_spacer25190_2.stl |
| 4 | pcb_spacer25190.stl |
| 4 | pcb_spacer25200_2.stl |
| 4 | pcb_spacer25240.stl |
| 4 | pcb_spacer25210_2.stl |
| 4 | pcb_spacer25250.stl |
| 4 | pcb_spacer25260.stl |
| 4 | pcb_spacer25270.stl |
| 4 | pcb_spacer2580.stl |
| 4 | pcb_spacer30130.stl |
| 4 | pcb_spacer30210.stl |
| 5 | pcb_spacer30130.stl |
| 4 | pcb_spacer30220.stl |
| 3 | pcb_spacer30230.stl |
| 4 | pcb_spacer30230.stl |
| 3 | pcb_spacer30240.stl |
| 10 | pcb_spacer3050.stl |
| 9 | pcb_spacer3060.stl |
| 9 | pcb_spacer3070.stl |
@@ -3804,6 +3808,7 @@ Rocker switch. Also used for neon indicator in the same form factor.
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 2 | `rocker(neon_indicator)` | Neon Indicator H8630FBNAL |
| 2 | `rocker(micro_rocker)` | Rocker Switch 10x15 |
| 2 | `rocker(small_rocker)` | Rocker Switch PRASA1-16F-BB0BW |
@@ -6432,6 +6437,7 @@ Printed LED bezels for panel mounting
| 1 | `led(LED3mm, "yellow")` | LED 3 mm yellow |
| 1 | `led(LED5mm, "blue")` | LED 5 mm blue |
| 1 | `led(LED8mm)` | LED 8 mm red |
| 1 | `led(LED5x2mm, "yellow")` | LED [5, 2] mm yellow |
### Printed
| Qty | Filename |
@@ -6442,6 +6448,8 @@ Printed LED bezels for panel mounting
| 1 | LED3mm_bezel_retainer.stl |
| 1 | LED5mm_bezel.stl |
| 1 | LED5mm_bezel_retainer.stl |
| 1 | LED5x2mm_bezel.stl |
| 1 | LED5x2mm_bezel_retainer.stl |
| 1 | LED8mm_bezel.stl |
| 1 | LED8mm_bezel_retainer.stl |
@@ -6451,6 +6459,7 @@ Printed LED bezels for panel mounting
| 1 | LED10mm_orange_bezel_assembly |
| 1 | LED3mm_yellow_bezel_assembly |
| 1 | LED5mm_blue_bezel_assembly |
| 1 | LED5x2mm_yellow_bezel_assembly |
| 1 | LED8mm_red_bezel_assembly |

View File

@@ -66,9 +66,16 @@ def make_parts(target, part_type, parts = None):
top_dir = set_config(target, lambda: usage(part_type))
target_dir = top_dir + part_type + 's'
deps_dir = target_dir + "/deps"
bom_dir = top_dir + "bom"
tmp_dir = mktmpdir(top_dir)
#
# Check we have some of this type
#
bom_dir = top_dir + "bom"
all_parts = bom_to_parts(bom_dir, part_type)
if not all_parts:
return
tmp_dir = mktmpdir(top_dir)
if not os.path.isdir(target_dir):
os.makedirs(target_dir)
@@ -83,7 +90,6 @@ def make_parts(target, part_type, parts = None):
#
# Decide which files to make
#
all_parts = bom_to_parts(bom_dir, part_type)
if parts:
targets = list(parts) #copy the list so we dont modify the list passed in
else:

View File

@@ -37,19 +37,21 @@ def usage():
sys.exit(1)
def render(target, type):
#
# Make the target directory
#
top_dir = set_config(target, usage)
tmp_dir = mktmpdir(top_dir)
target_dir = top_dir + type + 's'
bom_dir = top_dir + 'bom'
if not os.path.isdir(target_dir):
os.makedirs(target_dir)
#
# Find all the parts
#
parts = bom_to_parts(bom_dir, type)
if not parts:
return
#
# Make the target directory
#
tmp_dir = mktmpdir(top_dir)
target_dir = top_dir + type + 's'
if not os.path.isdir(target_dir):
os.makedirs(target_dir)
#
# Read the json bom to get the colours
#

View File

@@ -23,7 +23,7 @@ include <../vitamins/leds.scad>
use <../printed/led_bezel.scad>
module led_bezels()
layout([for(l = LEDs) led_diameter(l)], 6) let(l = LEDs[$i], b = led_bezel(l))
layout([for(l = LEDs) max(led_diameter(l))], 6) let(l = LEDs[$i], b = led_bezel(l))
if($preview)
led_bezel_fastened_assembly(b, 3, ["yellow", "blue", "red", "orange"][$i % 4]);
else {

View File

@@ -22,7 +22,7 @@ use <../utils/layout.scad>
include <../vitamins/leds.scad>
module leds()
layout([for(l = LEDs) led_diameter(l)], 5)
layout(echoit([for(l = LEDs) max(led_diameter(l))]), 5)
led(LEDs[$i], ["green", "blue", "red", "orange"][$i % 4]);
if($preview)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 241 KiB

After

Width:  |  Height:  |  Size: 237 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 83 KiB

View File

@@ -41,16 +41,21 @@ module led(type, colour = "red", lead = 5, right_angle = 0) { //! Draw specified
rotate([right_angle ? 90 : 0, 0, 0])
translate_z(right_angle ? right_angle - led_rim_t(type) : 0)
color(colour) {
rotate_extrude()
rounded_corner(r = d / 2, h = led_height(type), r2 = d / 2);
if (is_num(d)) {
rotate_extrude()
rounded_corner(r = d / 2, h = led_height(type), r2 = d / 2);
linear_extrude(led_rim_t(type))
difference() {
circle(d = led_rim_dia(type));
linear_extrude(led_rim_t(type))
difference() {
circle(d = led_rim_dia(type));
translate([d / 2 + eps, -5])
square(10);
}
translate([d / 2 + eps, -5])
square(10);
}
} else {
translate_z(led_height(type)/2) cube([d.x, d.y, led_height(type)], center = true);
translate_z(led_rim_t(type)/2) cube([led_rim_dia(type).x, led_rim_dia(type).y, led_rim_t(type)], center = true);
}
}
t = led_lead_t(type);
len = lead - (right_angle ? t : 0);

View File

@@ -18,18 +18,20 @@
//
//
// d r r h p l
// i i i e i e
// a m m i t a
// g c d
// d t h h
// t t
// d r r h p l
// i i i e i e
// a m m i t a
// g c d
// d t h h
// t t
//
LED3mm = ["LED3mm", 3, 3.15, 1.15, 4.6, 2.54, 0.4];
LED5mm = ["LED5mm", 5, 5.9, 1.1, 9.0, 2.54, 0.4];
LED8mm = ["LED8mm", 8, 9.2, 1.95,11.0, 2.54, 0.4];
LED10mm = ["LED10mm", 10, 11.0, 2.0, 13.5, 2.54, 0.4];
LED3mm = ["LED3mm", 3, 3.15, 1.15, 4.6, 2.54, 0.4];
LED5mm = ["LED5mm", 5, 5.9, 1.1, 9.0, 2.54, 0.4];
LED8mm = ["LED8mm", 8, 9.2, 1.95, 11.0, 2.54, 0.4];
LED10mm = ["LED10mm", 10, 11.0, 2.0, 13.5, 2.54, 0.4];
LEDs = [LED3mm, LED5mm, LED8mm, LED10mm];
LED5x2mm = ["LED5x2mm", [5,2], [5,2.7], 0.7, 7.0, 2.54, 0.5];
LEDs = [LED3mm, LED5mm, LED8mm, LED10mm, LED5x2mm];
use <led.scad>

View File

@@ -750,7 +750,7 @@ ZC_A0591 = ["ZC_A0591", "ZC-A0591 ULN2003 driver PCB", 35, 32, 1.6, 0, 2.5, 0, "
[ [ 11.725, 8.3, -90, "jst_xh", 5],
[ -6.5, 10, 0, "2p54header", 1, 4],
[ 20.4, -4.5, 0, "2p54header", 4, 1],
[ 20.4, 11, 180, "pdip", 16, "ULN2803AN", true],
[ 20.4, 11, 180, "pdip", 16, "ULN2003AN", true],
[ 5.5, 6, 0, "led", LED3mm, [1,1,1, 0.5]],
[ 5.5, 10.5, 0, "led", LED3mm, [1,1,1, 0.5]],
[ 5.5, 15, 0, "led", LED3mm, [1,1,1, 0.5]],
@@ -1020,6 +1020,39 @@ ArduinoNano = let(l = 43.18, w = 17.78, pitch = inch(0.6), pins = 15, poffset =
[(l - inch(pins - 1) / 10) / 2 + poffset, (w - pitch) / 2, pins, 2, silver, 2.54, pitch], // 15x2 grid of holes
];
BlackPill = let(l = 52.81, w = 20.78, pitch = inch(0.6), pins = 20, poffset = inch(-0.05), led_spacing = [0, 9.93/2], btn_spacing = [0, 4.3/2]) [
"BlackPill", "Black Pill",
l, w, 1.6, // Size
0, // corner radius
0, // mounting hole diameter
0, // pad around mounting hole
"#101010", // color
false, // true if parts should be separate BOM items
[],
[ // components
[l / 2 + poffset, w / 2 - pitch / 2, 0, "-2p54joiner", pins, 1, undef, "yellow"],
[l / 2 + poffset, w / 2 + pitch / 2, 0, "-2p54joiner", pins, 1, undef, "yellow"],
[l - inch(0.27), w / 2, 90, "2p54header", 4, 1, undef, undef, true],
[ l -26.75, w / 2, 45, "chip", 7, 7, 1.3],
[ 3.6, w / 2, 180, "usb_C" ],
[ 15, 5.3, 0, "text", 4, 1.27, "BOOT0"],
[ 15, w-5.3, 0, "text", 4, 1.27, "NRST"],
[ l - 16, w/2-led_spacing.y, 0, "text", 4, 1.27, "PWR"],
[ l - 16, w/2+led_spacing.y, 0, "text", 4, 1.27, "C13"],
[ 15, w / 2 - btn_spacing.y, 90, "chip", 3.5, 6, 1.8, silver ], // mock button boot0
[ 15, w / 2 - btn_spacing.y, 90, "chip", 1.3, 2.6, 2.6, grey(90) ], // mock button boot0
[ 15, w / 2 + btn_spacing.y, 90, "chip", 3.5, 6, 1.8, silver ], // mock button nrst
[ 15, w / 2 + btn_spacing.y, 90, "chip", 1.3, 2.6, 2.6, grey(90) ], // mock button nrst
[ l - 12, 8.5, 90, "chip", 3.5, 6, 1.8, silver ], // mock button user
[ l - 12, 8.5, 90, "chip", 1.3, 2.6, 2.6, grey(90) ], // mock button user
[ l - 17, 12.5, 90, "chip", 3.2, 2.5, 0.6, brass ], // xtal
[ l - 12, 12.5, 90, "smd_sot", SOT23],
[ l - 12, w / 2 - led_spacing.y, 0, "smd_led", LED0603, "red"],
[ l - 12, w / 2 + led_spacing.y, 0, "smd_led", LED0603, "blue"]],
[], // 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,
[
@@ -1244,11 +1277,31 @@ tiny_buck = pcb("tiny_buck", "Ultra Small 3A buck regulator", [20, 11, 1.6],
]
);
tiny_pcbs = [ESP_201, ESP_01M, XIAO, ESP_12F, MP1584EN, ESP_01,tiny_buck, LIPO_fuel_gauge];
9DOF_stick = pcb("9DOF_stick", "Sparkfun 9 degrees of freedom IMU", [24, 11, 0.8],
colour = "red",
hole_d = 3.3,
holes = [[-1.2 - 3.3 / 2, 11 / 2]],
components = [
[9.7, 11/ 2, 0, "chip", 3, 3.5, 1],
[9.7, 8.5, 0, "smd_cap", CAP0603, 0.8],
for(i = [0 : 3])
[5.27, 2.5 + i * 2, 0, "smd_cap", CAP0603, 0.8],
[12.8, 4, 90, "smd_res", RES0603, "472"],
[14.1, 4, 90, "smd_res", RES0603, "472"],
// Silkscreen
[17.75, 1.4, 0,"text", 11, 1.4, "9DOF Stick", "Liberation Sans:style=Bold"],
[3, 11/2, 90, "text", 10, 1, "SCL SDA VDD GND", "Liberation Sans:style=Bold"],
],
grid = [inch(0.05), 11 / 2 - inch(0.15), 1, 4, "silver", 0, inch(0.1)]
);
tiny_pcbs = [ESP_201, ESP_01M, XIAO, ESP_12F, MP1584EN, ESP_01,tiny_buck, LIPO_fuel_gauge, 9DOF_stick];
big_pcbs = [BTT_RELAY_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_E3_TURBO, BTT_SKR_V1_4_TURBO, DuetE, Duex5];
pcbs = [KY_040, TP4056, L9110S, ZC_A0591, RCWL0516, MT3608,RAMPSEndstop, ArduinoNano, HW803_1WAY_RELAY, Feather405, RPI_Pico, ESP32_DOIT_V1, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, OPZ2, PanelDue_v3, RPI3A, RPI3, RPI4];
pcbs = [KY_040, TP4056, L9110S, ZC_A0591, RCWL0516, MT3608,RAMPSEndstop, ArduinoNano, HW803_1WAY_RELAY, Feather405, RPI_Pico,
ESP32_DOIT_V1, BlackPill, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, WD2002SJ, OPZ2, PanelDue_v3, RPI3A, RPI3, RPI4];
pcbs_not_shown = [Melzi, Duex2, PSU12V1A, Keyes5p1, PI_IO, ExtruderPCB];

View File

@@ -19,6 +19,9 @@
include <spades.scad>
micro_spades = [[spade3p5, 7.6, 0, 0, 0],
[spade3p5, 7.6, 0, 5.1, 0]];
small_spades = [[spade4p8, 7.6, 0, 0, 0],
[spade4p8, 7.6, 0, 7.1, 0]];
@@ -26,18 +29,19 @@ neon_spades = [[spade4p8, 7.3, 0, -7, 0],
[spade4p8, 7.3, 0, 7, 0]];
//
// p s s f f f w h d b p b
// a l l l l l i e e e i u
// r o o a a a d i p z v t
// t t t n n n t g t e o t
// g g g h h h l t o
// w h e e e t n
// p s s f f f w h d b p b
// a l l l l l i e e e i u
// r o o a a a d i p z v t
// t t t n n n t g t e o t
// g g g h h h l t o
// w h e e e t n
//
// w h t
// w h t
//
small_rocker = ["small_rocker", "Rocker Switch PRASA1-16F-BB0BW", 13, 19.25, 15, 21, 2, 12.8, 18.5, 11.8, 2.5, -1, 3.8, small_spades];
neon_indicator = ["neon_indicator", "Neon Indicator H8630FBNAL", 13, 19.25, 15, 21, 2, 12.8, 18.5, 12.5, 2.5, 0, 0.3, neon_spades];
micro_rocker = ["micro_rocker", "Rocker Switch 10x15", 8.8, 13.9, 10.5, 15, 1.5, 8.2, 14, 9.3, 2.0, 0.8, 3.0, micro_spades];
small_rocker = ["small_rocker", "Rocker Switch PRASA1-16F-BB0BW", 13, 19.25, 15, 21, 2, 12.8, 18.5, 11.8, 2.5, -1, 3.8, small_spades];
neon_indicator = ["neon_indicator", "Neon Indicator H8630FBNAL", 13, 19.25, 15, 21, 2, 12.8, 18.5, 12.5, 2.5, 0, 0.3, neon_spades];
rockers = [small_rocker, neon_indicator];
rockers = [micro_rocker, small_rocker, neon_indicator];
use <rocker.scad>