mirror of
https://github.com/DJSundog/NopSCADlib.git
synced 2025-02-04 05:52:45 -05:00
Added RPi 0 model
This commit is contained in:
parent
371d274906
commit
d0d525b97a
BIN
libtest.png
BIN
libtest.png
Binary file not shown.
Before Width: | Height: | Size: 716 KiB After Width: | Height: | Size: 721 KiB |
43
readme.md
43
readme.md
@ -1657,6 +1657,13 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
### Properties
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```hdmi_depth(type)``` | Front to back depth |
|
||||
| ```hdmi_height(type)``` | Outside height above the PCB |
|
||||
| ```hdmi_height1(type)``` | Inside height at the sides |
|
||||
| ```hdmi_height2(type)``` | Inside height in the middle |
|
||||
| ```hdmi_thickness(type)``` | Wall thickness of the metal |
|
||||
| ```hdmi_width1(type)``` | Inside width at the top |
|
||||
| ```hdmi_width2(type)``` | Inside width at the bottom |
|
||||
| ```pcb_accessories(type)``` | List of accessories to go on the BOM, SD cards, USB cables, etc. |
|
||||
| ```pcb_colour(type)``` | Colour of the subtrate |
|
||||
| ```pcb_components(type)``` | List of components |
|
||||
@ -1683,8 +1690,9 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
|:--- |:--- |
|
||||
| ```barrel_jack(cutout = false)``` | Draw barrel power jack |
|
||||
| ```chip(length, width, thickness, colour, cutout = false)``` | Draw a coloured cube to represent a chip, or other rectangular component |
|
||||
| ```flat_flex(cutout = false)``` | Draw flat flexistrip connector as used on RPI0 |
|
||||
| ```flex(cutout = false)``` | Draw flexistrip connector |
|
||||
| ```hdmi(cutout = false)``` | Draw HDMI socket |
|
||||
| ```hdmi(type, cutout = false)``` | Draw HDMI socket |
|
||||
| ```jack(cutout = false)``` | Draw 3.5mm jack |
|
||||
| ```molex_254(ways)``` | Draw molex header |
|
||||
| ```pcb(type)``` | Draw specified PCB |
|
||||
@ -1719,11 +1727,11 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 1 | ```pcb(ExtruderPCB)``` | Extruder connection PCB |
|
||||
| 1 | ```pcb(Keyes5p1)``` | Keyes5.1 Arduino Uno expansion board |
|
||||
| 1 | ```pcb(Melzi)``` | Melzi electronics |
|
||||
| 3 | | Micro SD card |
|
||||
| 4 | | 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 |
|
||||
| 20 | ```nut(M2p5_nut, nyloc = true)``` | Nut M2.5 x 2.2mm nyloc |
|
||||
| 24 | ```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 |
|
||||
| 1 | ```pcb(PI_IO)``` | PI_IO V2 |
|
||||
@ -1735,19 +1743,23 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 1 | ```pcb(PERF80x20)``` | Perfboard 80 x 20mm |
|
||||
| 1 | ```pin_socket(2p54header, 13, 2, right_angle = true)``` | Pin socket 13 x 2 right_angle |
|
||||
| 1 | ```pcb(RPI3)``` | Raspberry Pi 3 |
|
||||
| 8 | ```screw(M2_cap_screw, 20)``` | Screw M2 cap x 20mm |
|
||||
| 8 | ```screw(M2_cap_screw, 25)``` | Screw M2 cap x 25mm |
|
||||
| 1 | ```pcb(RPI0)``` | Raspberry Pi Zero |
|
||||
| 4 | ```screw(M2_cap_screw, 20)``` | Screw M2 cap x 20mm |
|
||||
| 12 | ```screw(M2_cap_screw, 25)``` | Screw M2 cap x 25mm |
|
||||
| 4 | ```screw(M2p5_cap_screw, 16)``` | Screw M2.5 cap x 16mm |
|
||||
| 4 | ```screw(M2p5_cap_screw, 20)``` | Screw M2.5 cap x 20mm |
|
||||
| 12 | ```screw(M2p5_pan_screw, 20)``` | Screw M2.5 pan x 20mm |
|
||||
| 4 | ```screw(M2p5_pan_screw, 30)``` | Screw M2.5 pan x 30mm |
|
||||
| 4 | ```screw(M2p5_pan_screw, 35)``` | Screw M2.5 pan x 35mm |
|
||||
| 4 | ```screw(M3_cap_screw, 25)``` | Screw M3 cap x 25mm |
|
||||
| 8 | ```screw(M3_cap_screw, 30)``` | Screw M3 cap x 30mm |
|
||||
| 12 | ```screw(M4_cap_screw, 30)``` | Screw M4 cap x 30mm |
|
||||
| 4 | ```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, 30)``` | Screw M4 cap x 30mm |
|
||||
| 4 | ```screw(M4_cap_screw, 35)``` | Screw M4 cap x 35mm |
|
||||
| 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 |
|
||||
| 16 | ```washer(M2_washer)``` | Washer M2 x 5mm x 0.3mm |
|
||||
| 20 | ```washer(M2p5_washer)``` | Washer M2.5 x 5.9mm x 0.5mm |
|
||||
| 24 | ```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 |
|
||||
| 1 | ```pcb(ZC_A0591)``` | ZC-A0591 ULN2003 driver PCB |
|
||||
@ -1755,21 +1767,22 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
### Printed
|
||||
| Qty | Filename |
|
||||
| ---:|:--- |
|
||||
| 4 | pcb_spacer20110.stl |
|
||||
| 4 | pcb_spacer20120.stl |
|
||||
| 4 | pcb_spacer20130.stl |
|
||||
| 4 | pcb_spacer20140.stl |
|
||||
| 4 | pcb_spacer20150.stl |
|
||||
| 4 | pcb_spacer25100_2.stl |
|
||||
| 4 | pcb_spacer25210.stl |
|
||||
| 4 | pcb_spacer25110_2.stl |
|
||||
| 4 | pcb_spacer25220.stl |
|
||||
| 4 | pcb_spacer2570.stl |
|
||||
| 4 | pcb_spacer2580_2.stl |
|
||||
| 4 | pcb_spacer2580.stl |
|
||||
| 4 | pcb_spacer2590_2.stl |
|
||||
| 4 | pcb_spacer30150.stl |
|
||||
| 4 | pcb_spacer30160.stl |
|
||||
| 4 | pcb_spacer30200.stl |
|
||||
| 4 | pcb_spacer40170.stl |
|
||||
| 4 | pcb_spacer30170.stl |
|
||||
| 4 | pcb_spacer30210.stl |
|
||||
| 4 | pcb_spacer40180.stl |
|
||||
| 4 | pcb_spacer40190.stl |
|
||||
| 4 | pcb_spacer40200.stl |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 153 KiB After Width: | Height: | Size: 150 KiB |
@ -197,14 +197,27 @@ module jack(cutout = false) { //! Draw 3.5mm jack
|
||||
}
|
||||
}
|
||||
|
||||
module hdmi(cutout = false) { //! Draw HDMI socket
|
||||
l = 12;
|
||||
iw1 = 14;
|
||||
iw2 = 10;
|
||||
ih1 = 3;
|
||||
ih2 = 4.5;
|
||||
h = 6.5;
|
||||
t = 0.5;
|
||||
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
|
||||
function hdmi_height1(type) = type[5]; //! Inside height at the sides
|
||||
function hdmi_height2(type) = type[6]; //! Inside height in the middle
|
||||
function hdmi_height(type) = type[7]; //! Outside height above the PCB
|
||||
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 ];
|
||||
|
||||
module hdmi(type, cutout = false) { //! Draw HDMI socket
|
||||
vitamin(str("hdmi(", type[0], "): ", type[1]));
|
||||
|
||||
l = hdmi_depth(type);
|
||||
iw1 = hdmi_width1(type);
|
||||
iw2 = hdmi_width2(type);
|
||||
ih1 = hdmi_height1(type);
|
||||
ih2 = hdmi_height2(type);
|
||||
h = hdmi_height(type);
|
||||
t = hdmi_thickness(type);
|
||||
|
||||
module D() {
|
||||
hull() {
|
||||
@ -503,6 +516,53 @@ module flex(cutout = false) { //! Draw flexistrip connector
|
||||
}
|
||||
}
|
||||
|
||||
module flat_flex(cutout = false) { //! Draw flat flexistrip connector as used on RPI0
|
||||
l1 = 17;
|
||||
w1 = 1.4;
|
||||
h1 = 1.2;
|
||||
|
||||
l2 = 15.4;
|
||||
w2 = 1.6;
|
||||
h2 = 1.0;
|
||||
|
||||
l3 = 16;
|
||||
w3 = 1.1;
|
||||
h3 = 1.2;
|
||||
|
||||
l4 = 12;
|
||||
|
||||
slot_l = 11.8;
|
||||
slot_h = 0.9;
|
||||
|
||||
w = w1 + w2 + w3;
|
||||
if(cutout)
|
||||
;
|
||||
else {
|
||||
color(grey30) {
|
||||
translate([w / 2 - w1, 0, h1 / 2])
|
||||
rotate([90, 0, 90])
|
||||
linear_extrude(height = w1)
|
||||
difference() {
|
||||
square([l1, h1], center = true);
|
||||
|
||||
translate([0, -h1 / 2])
|
||||
square([slot_l, slot_h * 2], center = true);
|
||||
}
|
||||
|
||||
}
|
||||
color(grey90) {
|
||||
translate([-w / 2 + w3 / 2, 0, h3 / 2])
|
||||
cube([w3, l3, h3], center = true);
|
||||
|
||||
translate([-w / 2 + w3 + w2 / 2, 0, h2 / 2])
|
||||
cube([w2, l2, h2], center = true);
|
||||
|
||||
translate([-w / 2 + w3 + w2 / 2, 0, h3 / 2])
|
||||
cube([w2, l4, h3], center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module terminal_35(ways) { //! Draw 3.5mm terminal block
|
||||
vitamin(str("terminal_35(", ways, "): Terminal block ", ways, " way 3.5mm"));
|
||||
pitch = 3.5;
|
||||
@ -648,8 +708,10 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
|
||||
if(show(comp, "usb_B")) usb_B(cutouts);
|
||||
if(show(comp, "jack")) jack(cutouts);
|
||||
if(show(comp, "barrel_jack")) barrel_jack(cutouts);
|
||||
if(show(comp, "hdmi")) hdmi(cutouts);
|
||||
if(show(comp, "hdmi")) hdmi(hdmi_full, cutouts);
|
||||
if(show(comp, "mini_hdmi")) hdmi(hdmi_mini, cutouts);
|
||||
if(show(comp, "flex")) flex(cutouts);
|
||||
if(show(comp, "flat_flex")) flat_flex(cutouts);
|
||||
if(show(comp, "D_plug")) if(!cutouts) translate_z(d_pcb_offset(comp[4])) d_plug(comp[4], pcb = true);
|
||||
if(show(comp, "molex_hdr")) if(!cutouts) molex_254(comp[4]);
|
||||
if(show(comp, "term254")) if(!cutouts) green_terminal(gt_2p54,comp[4], comp[5]);
|
||||
@ -700,11 +762,12 @@ module pcb_components(type, cutouts = false, angle = undef) { //! Draw list of P
|
||||
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) {
|
||||
x0 = pcb_grid(type).x;
|
||||
y0 = pcb_grid(type).y;
|
||||
grid = pcb_grid(type);
|
||||
x0 = grid.x;
|
||||
y0 = grid.y;
|
||||
|
||||
cols = round((pcb_length(type) - 2 * x0) / inch(0.1));
|
||||
rows = round((pcb_width(type) - 2 * y0) / inch(0.1));
|
||||
cols = is_undef(grid[2]) ? round((pcb_length(type) - 2 * x0) / inch(0.1)) : grid[2] - 1;
|
||||
rows = is_undef(grid[3]) ? round((pcb_width(type) - 2 * y0) / inch(0.1)) : grid[3] - 1;
|
||||
for(x = [0 : cols], y = [0 : rows])
|
||||
pcb_grid(type, x, y)
|
||||
children();
|
||||
@ -752,7 +815,7 @@ module pcb(type) { //! Draw specified PCB
|
||||
|
||||
circle(d = 1);
|
||||
}
|
||||
if(fr4) { // oval lands at the ends
|
||||
if(fr4 && len(grid) < 3) { // 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));
|
||||
|
@ -209,7 +209,20 @@ RPI3 = ["RPI3", "Raspberry Pi 3", 85, 56, 1.4, 3, 2.75, 6, "green"
|
||||
[45, 11.5,-90, "flex"],
|
||||
[7.75, 28, 180, "-uSD", [12, 11.5, 1.28]],
|
||||
],
|
||||
[": Micro SD card"]];
|
||||
[": 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],
|
||||
[12.4, 3.4, -90, "mini_hdmi"],
|
||||
[54, 2, -90, "usb_uA"],
|
||||
[41.4, 2, -90, "usb_uA"],
|
||||
[7.25, 16.7, 180, "uSD", [12, 11.5, 1.28]],
|
||||
[-1.3, 15, 0, "flat_flex"],
|
||||
],
|
||||
[": Micro SD card"],
|
||||
[32.5 - 9.5 * 2.54, 26.5 - 1.27, 20, 2]];
|
||||
|
||||
ArduinoUno3 = ["ArduinoUno3", "Arduino Uno R3", 68.58, 53.34, 1.6, 0, 3.3, 0, "#2140BE", false, [[15.24, 50.8],[66.04, 35.56],[66.04, 7.62],[13.97, 2.54]],
|
||||
[[30.226, -2.54, 0, "2p54socket", 10, 1],
|
||||
@ -317,6 +330,6 @@ PERF74x51 = ["PERF74x51", "Perfboard 74 x 51mm", 74, 51, 1.0, 0, 3.0, 0, "sienna
|
||||
|
||||
PSU12V1A = ["PSU12V1A", "PSU 12V 1A", 67, 31, 1.7, 0, 3.9, 0, "green", true, [[3.5, 3.5], [-3.5, 3.5], [-3.5, -3.5], [3.5, -3.5]], [], []];
|
||||
|
||||
pcbs = [ExtruderPCB, PI_IO, RPI3, ArduinoUno3, ArduinoLeonardo, Keyes5p1, PERF80x20, PERF70x50, PERF70x30, PERF60x40, PERF74x51, PSU12V1A, DuetE, Duex2, Duex5, Melzi, ZC_A0591];
|
||||
pcbs = [ExtruderPCB, PI_IO, RPI0, RPI3, ArduinoUno3, ArduinoLeonardo, Keyes5p1, PERF80x20, PERF70x50, PERF70x30, PERF60x40, PERF74x51, PSU12V1A, DuetE, Duex2, Duex5, Melzi, ZC_A0591];
|
||||
|
||||
use <pcb.scad>
|
||||
|
Loading…
x
Reference in New Issue
Block a user