diff --git a/readme.md b/readme.md index 919de9b..def0bf4 100644 --- a/readme.md +++ b/readme.md @@ -2403,6 +2403,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o | `usb_Ax2(cutout = false)` | Draw USB type A dual socket | | `usb_B(cutout = false)` | Draw USB B connector | | `usb_C(cutout = false)` | Draw USB C connector | +| `usb_miniA(cutout = false)` | Draw USB mini A connector | | `usb_uA(cutout = false)` | Draw USB micro A connector | | `vero_pin(cropped = false)` | Draw a vero pin | @@ -2553,6 +2554,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o | `usb_Ax2(cutout = false)` | Draw USB type A dual socket | | `usb_B(cutout = false)` | Draw USB B connector | | `usb_C(cutout = false)` | Draw USB C connector | +| `usb_miniA(cutout = false)` | Draw USB mini A connector | | `usb_uA(cutout = false)` | Draw USB micro A connector | | `vero_pin(cropped = false)` | Draw a vero pin | diff --git a/tests/PCB.scad b/tests/PCB.scad index 69c50d7..66782f9 100644 --- a/tests/PCB.scad +++ b/tests/PCB.scad @@ -85,16 +85,18 @@ test_pcb = ["test_pcb", "Test PCB", [ 8, 105, 180, "usb_Ax2"], [ 7, 85, 180, "molex_usb_Ax1"], [ 8.5,125, 180, "molex_usb_Ax2"], - [ 3, 140, 180, "usb_uA"], - [ 8, 155, 180, "usb_B"], + [ 3, 138, 180, "usb_uA"], + [ 4.6,148, 180, "usb_miniA"], + [ 3.7,158, 180, "usb_C"], + [ 8, 170, 180, "usb_B"], + [ 6, 184, 180, "uSD", [12, 11.5, 1.4]], + [ 8, 196, 180, "jack"], + [ 6, 206, 180, "barrel_jack"], + [ 5, 220, 180, "hdmi"], + [ 3, 235, 180, "mini_hdmi"], + [ 38, 190, -90, "text", 25, 4, "Silkscreen", "Liberation Sans:style=Bold"], [ 25, 200, 0, "buzzer", 4.5, 8.5], [ 25, 218, 0, "buzzer"], - [ 38, 190, -90, "text", 25, 4, "Silkscreen", "Liberation Sans:style=Bold"], - [ 8, 190, 180, "jack"], - [ 6, 200, 180, "barrel_jack"], - [ 5, 218, 180, "hdmi"], - [ 3, 235, 180, "mini_hdmi"], - [ 6, 175, 180, "uSD", [12, 11.5, 1.4]], [ 65, 9, 0, "link", inch(0.4)], [ 65, 12, 0, "ax_res", res1_8, 1000], diff --git a/tests/png/pcb.png b/tests/png/pcb.png index d760063..02209fd 100644 Binary files a/tests/png/pcb.png and b/tests/png/pcb.png differ diff --git a/tests/png/pcbs.png b/tests/png/pcbs.png index 8e55c85..fd18676 100644 Binary files a/tests/png/pcbs.png and b/tests/png/pcbs.png differ diff --git a/vitamins/pcb.scad b/vitamins/pcb.scad index c19a7e7..fac640e 100644 --- a/vitamins/pcb.scad +++ b/vitamins/pcb.scad @@ -485,6 +485,50 @@ module usb_uA(cutout = false) { //! Draw USB micro A connector } } +module usb_miniA(cutout = false) { //! Draw USB mini A connector + l = 9.2; + iw1 = 7.0; + iw2 = 6.0; + ih1 = 1.05; + ih2 = 1.0; + h = 4.0; + t = 0.4; + + module D() { + hull() { + translate([-iw1 / 2, h - t - ih1]) + square([iw1, ih1]); + + translate([-iw2 / 2, t + ih2]) + square([iw2, eps]); + + } + translate([-iw2 / 2, t]) + square([iw2, ih2]); + } + + if(cutout) + rotate([90, 0, 90]) + linear_extrude(100) + offset(2 * panel_clearance) + D(); + else + color("silver") rotate([90, 0, 90]) { + linear_extrude(l, center = true) + difference() { + offset(t) + D(); + + D(); + } + + translate_z(-l / 2) + linear_extrude(1) + offset(t) + D(); + } +} + module usb_C(cutout = false) { //! Draw USB C connector l = 7.35; w = 8.94; @@ -1046,6 +1090,7 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon if(show(comp, "usb_A")) usb_Ax1(cutouts); if(show(comp, "usb_Ax2")) usb_Ax2(cutouts); if(show(comp, "usb_uA")) usb_uA(cutouts); + if(show(comp, "usb_miniA")) usb_miniA(cutouts); if(show(comp, "usb_B")) usb_B(cutouts); if(show(comp, "usb_C")) usb_C(cutouts); if(show(comp, "jack")) jack(cutouts); diff --git a/vitamins/pcbs.scad b/vitamins/pcbs.scad index f95ed1c..3f6eb46 100644 --- a/vitamins/pcbs.scad +++ b/vitamins/pcbs.scad @@ -885,7 +885,7 @@ ArduinoNano = let(l = 43.18, w = 17.78, pitch = inch(0.6), pins = 15, poffset = [l / 2 + poffset, w / 2 - pitch / 2, 0, "-2p54joiner", pins, 1], [l / 2 + poffset, w / 2 + pitch / 2, 0, "-2p54joiner", pins, 1], [l / 2 + poffset + inch(0.75), w / 2, 0, "2p54header", 2, 3, false, undef, false, false], - [1.75, w / 2, 180, "usb_uA" ], + [3.1, w / 2, 180, "usb_miniA" ], [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