Added USB-C connector, micro hdmi and RPI4.

This commit is contained in:
Chris Palmer 2020-08-01 19:38:22 +01:00
parent 3cf275579c
commit cb54a3131b
5 changed files with 69 additions and 11 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 813 KiB

After

Width:  |  Height:  |  Size: 816 KiB

View File

@ -2140,6 +2140,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| ```usb_Ax1(cutout = false)``` | Draw USB type A single socket |
| ```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_uA(cutout = false)``` | Draw USB micro A connector |
![pcb](tests/png/pcb.png)
@ -2273,6 +2274,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| ```usb_Ax1(cutout = false)``` | Draw USB type A single socket |
| ```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_uA(cutout = false)``` | Draw USB micro A connector |
![pcbs](tests/png/pcbs.png)
@ -2292,11 +2294,11 @@ 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(MT3608)``` | MT3608 boost converter module |
| 1 | ```pcb(Melzi)``` | Melzi electronics |
| 4 | | Micro SD card |
| 5 | | Micro SD card |
| 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 |
| 30 | ```nut(M2p5_nut, nyloc = true)``` | Nut M2.5 x 2.2mm nyloc |
| 34 | ```nut(M2p5_nut, nyloc = true)``` | Nut M2.5 x 2.2mm nyloc |
| 16 | ```nut(M3_nut, nyloc = true)``` | Nut M3 x 2.4mm nyloc |
| 12 | ```nut(M4_nut, nyloc = true)``` | Nut M4 x 3.2mm nyloc |
| 1 | ```pcb(PI_IO)``` | PI_IO V2 |
@ -2309,27 +2311,27 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 1 | ```pin_socket(2p54header, 13, 2, right_angle = true)``` | Pin socket 13 x 2 right_angle |
| 1 | ```pcb(RAMPSEndstop)``` | RAMPS Endstop Switch |
| 1 | ```pcb(RPI3)``` | Raspberry Pi 3 |
| 1 | ```pcb(RPI4)``` | Raspberry Pi 4 |
| 1 | ```pcb(RPI0)``` | Raspberry Pi Zero |
| 12 | ```screw(M2_cap_screw, 16)``` | Screw M2 cap x 16mm |
| 4 | ```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 |
| 4 | ```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 |
| 12 | ```screw(M2p5_pan_screw, 25)``` | Screw M2.5 pan x 25mm |
| 4 | ```screw(M3_cap_screw, 16)``` | Screw M3 cap x 16mm |
| 8 | ```screw(M3_cap_screw, 30)``` | Screw M3 cap x 30mm |
| 4 | ```screw(M3_cap_screw, 35)``` | Screw M3 cap x 35mm |
| 4 | ```screw(M4_cap_screw, 30)``` | Screw M4 cap x 30mm |
| 8 | ```screw(M4_cap_screw, 35)``` | Screw M4 cap x 35mm |
| 12 | ```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 |
| 1 | ```pcb(WD2002SJ)``` | WD2002SJ Buck Boost DC-DC converter |
| 16 | ```washer(M2_washer)``` | Washer M2 x 5mm x 0.3mm |
| 30 | ```washer(M2p5_washer)``` | Washer M2.5 x 5.9mm x 0.5mm |
| 34 | ```washer(M2p5_washer)``` | Washer M2.5 x 5.9mm x 0.5mm |
| 16 | ```washer(M3_washer)``` | Washer M3 x 7mm x 0.5mm |
| 12 | ```washer(M4_washer)``` | Washer M4 x 9mm x 0.8mm |
| 1 | ```pcb(ZC_A0591)``` | ZC-A0591 ULN2003 driver PCB |
@ -2348,14 +2350,15 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
| 4 | pcb_spacer25140_2.stl |
| 4 | pcb_spacer25150_2.stl |
| 4 | pcb_spacer25180.stl |
| 4 | pcb_spacer25190.stl |
| 2 | pcb_spacer2570.stl |
| 4 | pcb_spacer30160.stl |
| 4 | pcb_spacer30170.stl |
| 4 | pcb_spacer30220.stl |
| 4 | pcb_spacer30230.stl |
| 4 | pcb_spacer3050.stl |
| 4 | pcb_spacer40190.stl |
| 4 | pcb_spacer40200.stl |
| 4 | pcb_spacer40210.stl |
| 4 | pcb_spacer40220.stl |
<a href="#top">Top</a>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 KiB

After

Width:  |  Height:  |  Size: 156 KiB

View File

@ -335,6 +335,7 @@ function hdmi_thickness(type) = type[8]; //! Wall thickness of the metal
hdmi_full = [ "hdmi_full", "HDMI socket", 12, 14, 10, 3, 4.5, 6.5, 0.5 ];
hdmi_mini = [ "hdmi_mini", "Mini HDMI socket", 7.5, 10.5, 8.3, 1.28, 2.5, 3.2, 0.35 ];
hdmi_micro = [ "hdmi_micro", "Micro HDMI socket", 8.5, 5.9, 4.43, 1.4, 2.3, 3, 0.3 ];
module hdmi(type, cutout = false) { //! Draw HDMI socket
vitamin(str("hdmi(", type[0], "): ", type[1]));
@ -437,6 +438,39 @@ module usb_uA(cutout = false) { //! Draw USB micro A connector
}
}
module usb_C(cutout = false) { //! Draw USB C connector
l = 7.35;
w = 8.94;
h = 3.26;
t = 0.4;
flange_h = 3;
flange_w = 8;
module O()
translate([0, h / 2])
rounded_square([w, h], h / 2 - 0.5, center = true);
if(cutout)
rotate([90, 0, 90])
linear_extrude(100)
offset(2 * panel_clearance)
O();
else
color("silver") rotate([90, 0, 90]) {
linear_extrude(l, center = true)
difference() {
O();
offset(-t)
O();
}
translate_z(-l / 2)
linear_extrude(2.51)
O();
}
}
module usb_B(cutout = false) { //! Draw USB B connector
l = 16.4;
w = 12.2;
@ -890,10 +924,12 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
if(show(comp, "usb_Ax2")) usb_Ax2(cutouts);
if(show(comp, "usb_uA")) usb_uA(cutouts);
if(show(comp, "usb_B")) usb_B(cutouts);
if(show(comp, "usb_C")) usb_C(cutouts);
if(show(comp, "jack")) jack(cutouts);
if(show(comp, "barrel_jack")) barrel_jack(cutouts);
if(show(comp, "hdmi")) hdmi(hdmi_full, cutouts);
if(show(comp, "mini_hdmi")) hdmi(hdmi_mini, cutouts);
if(show(comp, "micro_hdmi")) hdmi(hdmi_micro, cutouts);
if(show(comp, "flex")) flex(cutouts);
if(show(comp, "flat_flex")) flat_flex(param(4, false) ? large_ff : small_ff, cutouts);
if(show(comp, "uSD")) uSD(comp[4], cutouts);

View File

@ -217,6 +217,25 @@ RPI3 = ["RPI3", "Raspberry Pi 3", 85, 56, 1.4, 3, 2.75, 6, "green"
[": Micro SD card"],
[32.5 - 9.5 * 2.54, 52.5 - 1.27, 20, 2]];
RPI4 = ["RPI4", "Raspberry Pi 4", 85, 56, 1.4, 3, 2.75, 6, "green", false, [[3.5, 3.5], [61.5, 3.5], [61.5, -3.5], [3.5, -3.5]], [
[32.5, -3.5, 0, "2p54header", 20, 2],
[-6.5, 9, 0, "usb_Ax2"],
[-6.5, 27, 0, "usb_Ax2"],
[-8.5, 45.75, 0, "rj45"],
[ 4, 28, 90, "flex"],
[11.2, 3.675 - 1.6, -90, "usb_C"],
[ 26, 2.5, -90, "micro_hdmi"],
[39.5, 2.5, -90, "micro_hdmi"],
[46.5, 11.5, -90, "flex"],
[ 54, 6, -90, "jack"],
[ 29.25, 32.5, 0, "chip", 14, 14, 2.4],
[ 60, -22.3, 0, "chip", 9, 9, 0.6],
[7.75, 28, 180, "-uSD", [12, 11.5, 1.28]]
], [": Micro SD card"], [32.5 - 9.5 * 2.54, 52.5 - 1.27, 20, 2]
];
RPI0 = ["RPI0", "Raspberry Pi Zero", 65, 30, 1.4, 3, 2.75, 6, "green", false, [[3.5, 3.5], [-3.5, 3.5], [-3.5, -3.5], [3.5, -3.5]],
[//[32.5, -3.5, 0, "2p54header", 20, 2],
[25.5, 13, 0, "chip", 12, 12, 1.2],
@ -391,7 +410,7 @@ RAMPSEndstop = ["RAMPSEndstop", "RAMPS Endstop Switch",
[]];
pcbs = [TP4056, MT3608, RAMPSEndstop, ExtruderPCB, PI_IO, ZC_A0591, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, Keyes5p1, PSU12V1A, WD2002SJ, RPI3, DuetE, Duex2, Duex5, Melzi];
pcbs = [TP4056, MT3608, RAMPSEndstop, ExtruderPCB, PI_IO, ZC_A0591, RPI0, EnviroPlus, ArduinoUno3, ArduinoLeonardo, Keyes5p1, PSU12V1A, WD2002SJ, RPI3, RPI4, DuetE, Duex2, Duex5, Melzi];
perfboards = [PERF74x51, PERF70x50, PERF60x40, PERF70x30, PERF80x20];