diff --git a/lib.scad b/lib.scad index 3c91165..2f76514 100644 --- a/lib.scad +++ b/lib.scad @@ -35,7 +35,6 @@ include include include include -include include include include diff --git a/libtest.png b/libtest.png index 0f6d26b..7f560a1 100644 Binary files a/libtest.png and b/libtest.png differ diff --git a/readme.md b/readme.md index f806491..e8cac18 100644 --- a/readme.md +++ b/readme.md @@ -2305,10 +2305,11 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o | ---:|:--- |:---| | 1 | `pcb(ArduinoLeonardo)` | Arduino Leonardo | | 1 | `pcb(ArduinoUno3)` | Arduino Uno R3 | +| 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 | `pcb(DuetE)` | Duet 2 Ethernet electronics | -| 1 | `pcb(Duex2)` | Duex2 expansion board | +| 1 | `pcb(Duex2)` | Duex2 expansion board - not shown | | 1 | `pcb(Duex5)` | Duex5 expansion board | | 1 | `pcb(ESP-01)` | ESP-01 | | 1 | `pcb(EnviroPlus)` | Enviro+ | @@ -2316,13 +2317,15 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o | 1 | `pcb(Keyes5p1)` | Keyes5.1 Arduino Uno expansion board | | 1 | `pcb(MP1584EN)` | MP1584EN 3A buck converter | | 1 | `pcb(MT3608)` | MT3608 boost converter module | +| 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 | | 16 | `nut(M2_nut, nyloc = true)` | Nut M2 x 1.6mm nyloc | | 34 | `nut(M2p5_nut, nyloc = true)` | Nut M2.5 x 2.2mm nyloc | -| 12 | `nut(M3_nut, nyloc = true)` | Nut M3 x 2.4mm nyloc | -| 12 | `nut(M4_nut, nyloc = true)` | Nut M4 x 3.2mm nyloc | +| 16 | `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(PSU12V1A)` | PSU 12V 1A | | 1 | `pcb(PERF60x40)` | Perfboard 60 x 40mm | @@ -2344,15 +2347,17 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o | 4 | `screw(M2p5_pan_screw, 30)` | Screw M2.5 pan x 30mm | | 4 | `screw(M3_cap_screw, 16)` | Screw M3 cap x 16mm | | 8 | `screw(M3_cap_screw, 30)` | Screw M3 cap x 30mm | -| 12 | `screw(M4_cap_screw, 35)` | Screw M4 cap x 35mm | +| 4 | `screw(M3_cap_screw, 35)` | Screw M3 cap x 35mm | +| 8 | `screw(M4_cap_screw, 35)` | Screw M4 cap x 35mm | | 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" | +| 1 | | USB A to Mini B lead - not shown | | 1 | `pcb(WD2002SJ)` | WD2002SJ Buck Boost DC-DC converter | | 16 | `washer(M2_washer)` | Washer M2 x 5mm x 0.3mm | | 34 | `washer(M2p5_washer)` | Washer M2.5 x 5.9mm x 0.5mm | -| 12 | `washer(M3_washer)` | Washer M3 x 7mm x 0.5mm | -| 12 | `washer(M4_washer)` | Washer M4 x 9mm x 0.8mm | +| 16 | `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 | ### Printed @@ -2370,11 +2375,11 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o | 4 | pcb_spacer25170_2.stl | | 4 | pcb_spacer25200.stl | | 4 | pcb_spacer25210.stl | -| 2 | pcb_spacer2590.stl | +| 2 | pcb_spacer2580.stl | | 4 | pcb_spacer30180.stl | | 4 | pcb_spacer30190.stl | +| 4 | pcb_spacer30220.stl | | 4 | pcb_spacer3050.stl | -| 4 | pcb_spacer40220.stl | | 4 | pcb_spacer40230.stl | | 4 | pcb_spacer40240.stl | diff --git a/tests/PCBs.scad b/tests/PCBs.scad index ce09067..58403c7 100644 --- a/tests/PCBs.scad +++ b/tests/PCBs.scad @@ -21,8 +21,10 @@ include <../vitamins/pcbs.scad> use <../utils/layout.scad> +function spacing(p) = let(w = pcb_width(p)) w < 22 ? w + 3 : w + 10; + module pcbs() { - layout([for(p = pcbs) pcb_width(p)], 10) + layout([for(p = pcbs) spacing(p)], 0) translate([0, pcb_length(pcbs[$i]) / 2]) rotate(90) pcb_assembly(pcbs[$i], 5 + $i, 3); @@ -31,6 +33,10 @@ module pcbs() { layout([for(p = perfboards) pcb_length(p)], 10) translate([0, -pcb_width(perfboards[$i]) / 2]) pcb_assembly(perfboards[$i], 5 + $i, 3); + + for(p = pcbs_not_shown) + hidden() + pcb(p); } if($preview) pcbs(); diff --git a/tests/png/pcbs.png b/tests/png/pcbs.png index f678f34..d8b814e 100644 Binary files a/tests/png/pcbs.png and b/tests/png/pcbs.png differ diff --git a/vitamins/pcbs.scad b/vitamins/pcbs.scad index 647fce6..20db9b2 100644 --- a/vitamins/pcbs.scad +++ b/vitamins/pcbs.scad @@ -21,6 +21,7 @@ include include include include +include // // l w t r h l c b h @@ -195,6 +196,123 @@ Duex5 = ["Duex5", "Duex5 expansion board", ]), []]; +TMC2130 = [ + "TMC2130", "TMC2130", + 20, 14, 1.6, // size + 0, 0, 0, // corner radius, mounting hole diameter, pad around mounting hole + grey(95), // colour + false, // true if parts should be separate BOM items + [], // hole positions + [ + [ 10, 1, 0, "-2p54header", 8, 1 ], + [ 10, 13, 0, "-2p54header", 8, 1 ], + [ 12, 7, 0, "-chip", 6, 4, 1, grey(20) ], + // mock up a heat sink + [ 10, 7, 0, "block", 9, 8.5, 2, "DeepSkyBlue" ], + for (y = [-4,-2,0,2,4]) [ 10, 7 + y, 0, "block", 9, 0.75, 11, "DeepSkyBlue" ], + ], + [] +]; + +BTT_SKR_V1_4_TURBO = [ + "BTT_SKR_V1_4_TURBO", "BigTreeTech SKR v1.4 Turbo", + 110, 85, 1.6, // size + 1, // corner radius + 3, // mounting hole diameter + 4, // pad around mounting hole + grey(30), // colour + false, // true if parts should be separate BOM items + [ // hole positions + [-4, 4], [-4, -4], [4, -4], [4, 4] + ], + [ // components + [ (29.15+31.5)/2, 8, -90, "usb_B" ], + [ (46.9+51.55)/2, 7, -90, "uSD", [14, 14, 2] ], + [ 105, 13, 0, "button_6mm" ], + [ 58, 43, 0, "chip", 15, 15, 1, grey(20) ], + // ESP-01 socket + [ 69.8, 4, 0, "2p54socket", 4, 2 ], + // terminals + [ 5.3, 13.2, 180, "gterm", gt_5x17, 2, undef, grey(20)], + [ 5.3, 25.8, 180, "gterm", gt_5x17, 2, undef, grey(20)], + [ 5.3, 37.2, 180, "gterm", gt_5x11, 2, undef, grey(20)], + [ 5.3, 47.2, 180, "gterm", gt_5x11, 2, undef, grey(20)], + + [ 2.8, 56.7, -90, "jst_xh", 2, false, grey(20) ], + [ 10.9, 56.7, 90, "jst_xh", 2, false, grey(20) ], + [ 82, 4, 0, "jst_xh", 2, false, grey(20) ], + [ 90, 4, 0, "jst_xh", 2, false, grey(20) ], + [ 98, 4, 0, "jst_xh", 2, false, grey(20) ], + + [ 87.7, 29.0, -90, "jst_xh", 3, false, grey(20) ], + [ 87.7, 39.5, -90, "jst_xh", 3, false, grey(20) ], + [ 87.7, 50.1, -90, "jst_xh", 3, false, grey(20) ], + [ 95.3, 29.0, -90, "jst_xh", 3, false, grey(20) ], + [ 95.3, 39.5, -90, "jst_xh", 3, false, grey(20) ], + [ 95.3, 50.1, -90, "jst_xh", 3, false, grey(20) ], + + [ 85.7, 18.2, 180, "jst_xh", 3, false, grey(20) ], + [ 94.9, 18.2, 180, "jst_xh", 2, false, grey(20) ], + [ 77.2, 19.6, -90, "jst_xh", 3, false, grey(20) ], + [ 69.8, 11.0, 0, "jst_xh", 5, false, grey(20) ], + + [ 69.0, 19.2, 0, "2p54header", 4, 1 ], + [ 57.8, 18.0, 0, "2p54header", 3, 2 ], + [ 28.0, 19.7, 0, "2p54header", 2, 2 ], + + [ 37.6, 28.8, 0, "2p54header", 1, 3, undef, "red" ], + [ 77.8, 27.5, 0, "2p54header", 2, 2 ], + [ 81.8, 26.4, 0, "2p54header", 1, 3, undef, "red" ], + [ 43.8, 42.8, 0, "2p54header", 1, 5 ], + + // EXP1 & EXP2 + [ -6.6, 29.4, 90, "2p54boxhdr", 5, 2 ], + [ -6.6, 50.4, 90, "2p54boxhdr", 5, 2 ], + + // motor axes connections + [ 11.2, -3.75, 180, "jst_xh", 2, false, grey(20) ], + [ 21.8, -3.75, 180, "jst_xh", 4, false, grey(20) ], + [ 35.0, -3.75, 180, "jst_xh", 4, false, grey(20) ], + [ 48.2, -3.75, 180, "jst_xh", 4, false, grey(20) ], + [ 61.4, -3.75, 180, "jst_xh", 4, false, grey(20) ], + [ 74.7, -3.75, 180, "jst_xh", 4, false, grey(20) ], + [ 87.9, -3.75, 180, "jst_xh", 4, false, grey(20) ], + [ 98.5, -3.75, 180, "jst_xh", 2, false, grey(20) ], + + // stepper drivers + [ 11.5, 62.5, 0, "2p54socket", 8, 1, undef, undef, undef, "red" ], + [ 11.5, 75.2, 0, "2p54socket", 8, 1 ], + [ 2.6, 66.3, 90, "2p54socket", 2, 1, undef, undef, undef, "red" ], + [ 11.5, 68.85, 0, "pcb", 11, TMC2130 ], + + [ 33.1, 62.5, 0, "2p54socket", 8, 1, undef, undef, undef, "red" ], + [ 33.1, 75.2, 0, "2p54socket", 8, 1 ], + [ 24.2, 66.3, 90, "2p54socket", 2, 1, undef, undef, undef, "red" ], + [ 33.1, 68.85, 0, "pcb", 11, TMC2130 ], + + [ 54.8, 62.5, 0, "2p54socket", 8, 1, undef, undef, undef, "red" ], + [ 54.8, 75.2, 0, "2p54socket", 8, 1 ], + [ 45.9, 66.3, 90, "2p54socket", 2, 1, undef, undef, undef, "red" ], + [ 54.8, 68.85, 0, "pcb", 11, TMC2130 ], + + [ 76.4, 62.5, 0, "2p54socket", 8, 1, undef, undef, undef, "red" ], + [ 76.4, 75.2, 0, "2p54socket", 8, 1 ], + [ 67.5, 66.3, 90, "2p54socket", 2, 1, undef, undef, undef, "red" ], + [ 76.4, 68.85, 0, "pcb", 11, TMC2130 ], + + [ 98.1, 62.5, 0, "2p54socket", 8, 1, undef, undef, undef, "red" ], + [ 98.1, 75.2, 0, "2p54socket", 8, 1 ], + [ 89.2, 66.3, 90, "2p54socket", 2, 1, undef, undef, undef, "red" ], + + // closed loop pins + [ 24.4, 57.5, 0, "2p54header", 6, 1 ], + [ 40.6, 57.5, 0, "2p54header", 6, 1 ], + [ 56.7, 57.5, 0, "2p54header", 6, 1 ], + [ 72.9, 57.5, 0, "2p54header", 6, 1 ], + [ 89.1, 57.5, 0, "2p54header", 6, 1 ], + ], + [] // accessories +]; Melzi = ["Melzi", "Melzi electronics", 203.2, 49.53, 1.6, 3.81, 3.1, 6, "green", false, [[3.81, 3.81], [-3.81, 3.81], [-3.81, -3.81], [3.81, -3.81]], [], @@ -440,7 +558,9 @@ ESP_01 = [ [] // accessories ]; -pcbs = [MP1584EN, TP4056, ESP_01, MT3608, RAMPSEndstop, ExtruderPCB, PI_IO, ZC_A0591, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, Keyes5p1, PSU12V1A, WD2002SJ, RPI3, RPI4, DuetE, Duex2, Duex5]; +pcbs = [MP1584EN, TP4056, ESP_01, RAMPSEndstop, MT3608, PI_IO, ExtruderPCB, ZC_A0591, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, Keyes5p1, PSU12V1A, WD2002SJ, RPI3, RPI4, BTT_SKR_V1_4_TURBO, DuetE, Duex5]; + +pcbs_not_shown = [Melzi, Duex2]; perfboards = [PERF74x51, PERF70x50, PERF60x40, PERF70x30, PERF80x20];