Merge branch 'martinbudden-pcb_jst_xh'
This commit is contained in:
commit
8db4cc2cb5
BIN
libtest.png
BIN
libtest.png
Binary file not shown.
Before Width: | Height: | Size: 759 KiB After Width: | Height: | Size: 764 KiB |
|
@ -1803,7 +1803,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
|||
| 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 |
|
||||
| 28 | ```nut(M2p5_nut, nyloc = true)``` | Nut M2.5 x 2.2mm nyloc |
|
||||
| 32 | ```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 |
|
||||
|
@ -1814,11 +1814,13 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
|||
| 1 | ```pcb(PERF74x51)``` | Perfboard 74 x 51mm |
|
||||
| 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(RAMPSEndstop)``` | RAMPS Endstop Switch |
|
||||
| 1 | ```pcb(RPI3)``` | Raspberry Pi 3 |
|
||||
| 1 | ```pcb(RPI0)``` | Raspberry Pi Zero |
|
||||
| 16 | ```screw(M2_cap_screw, 25)``` | Screw M2 cap x 25mm |
|
||||
| 4 | ```screw(M2p5_cap_screw, 16)``` | Screw M2.5 cap x 16mm |
|
||||
| 8 | ```screw(M2p5_cap_screw, 20)``` | Screw M2.5 cap x 20mm |
|
||||
| 4 | ```screw(M2p5_cap_screw, 35)``` | Screw M2.5 cap x 35mm |
|
||||
| 8 | ```screw(M2p5_pan_screw, 20)``` | Screw M2.5 pan x 20mm |
|
||||
| 4 | ```screw(M2p5_pan_screw, 25)``` | Screw M2.5 pan x 25mm |
|
||||
| 4 | ```screw(M2p5_pan_screw, 35)``` | Screw M2.5 pan x 35mm |
|
||||
|
@ -1830,7 +1832,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
|||
| 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 |
|
||||
| 28 | ```washer(M2p5_washer)``` | Washer M2.5 x 5.9mm x 0.5mm |
|
||||
| 32 | ```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 |
|
||||
|
@ -1846,6 +1848,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
|||
| 4 | pcb_spacer25110_2.stl |
|
||||
| 4 | pcb_spacer25120_2.stl |
|
||||
| 4 | pcb_spacer25230.stl |
|
||||
| 4 | pcb_spacer25240.stl |
|
||||
| 4 | pcb_spacer2570.stl |
|
||||
| 4 | pcb_spacer2580.stl |
|
||||
| 4 | pcb_spacer2590.stl |
|
||||
|
@ -1935,6 +1938,7 @@ Pin headers and sockets, etc.
|
|||
|:--- |:--- |
|
||||
| ```box_header(type, cols = 1, rows = 1, smt = false, cutout = false)``` | Draw box header |
|
||||
| ```idc_transition(type, cols = 5, skip = [], cutout = false)``` | Draw IDC transition header |
|
||||
| ```jst_xh_header(type, pin_count, right_angle=false, colour, pin_colour)``` | Draw JST XH connector |
|
||||
| ```pin(type, length = undef)``` | Draw a header pin |
|
||||
| ```pin_header(type, cols = 1, rows = 1, smt = false, right_angle = false, cutout = false)``` | Draw pin header |
|
||||
| ```pin_socket(type, cols = 1, rows = 1, right_angle = false, height = 0, smt = false, cutout = false)``` | Draw pin socket |
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 145 KiB |
|
@ -718,6 +718,7 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
|
|||
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, "jst_xh")) if(!cutouts) jst_xh_header(jst_xh_header, comp[4], param(5, false), param(6, "white"), param(7, undef));
|
||||
if(show(comp, "term254")) if(!cutouts) green_terminal(gt_2p54,comp[4], comp[5]);
|
||||
if(show(comp, "gterm35")) if(!cutouts) green_terminal(gt_3p5, comp[4], comp[5]);
|
||||
if(show(comp, "gterm635")) if(!cutouts) green_terminal(gt_6p35, comp[4], comp[5]);
|
||||
|
|
|
@ -339,6 +339,20 @@ 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, RPI0, EnviroPlus, RPI3, ArduinoUno3, ArduinoLeonardo, Keyes5p1, PERF80x20, PERF70x50, PERF70x30, PERF60x40, PERF74x51, PSU12V1A, DuetE, Duex2, Duex5, Melzi, ZC_A0591];
|
||||
RAMPSEndstop = ["RAMPSEndstop", "RAMPS Endstop Switch",
|
||||
40.0, 16.0, 1.6, 0, 2.54, 0, "red", false,
|
||||
[
|
||||
[2, 2], [2, 13.5], [17, 13.5], [36, 13.5]
|
||||
],
|
||||
[
|
||||
[ 12, 8, -90, "jst_xh", 3, true, "white", "silver"],
|
||||
[ 26, 13.5, 0, "chip", 12, 4, 5.5],
|
||||
[ 26, 10.5, 0, "chip", 12, 2, 5.5, "white"],
|
||||
[ 27.5, 17, 15, "chip", 15, 0.5, 4.5, "silver"],
|
||||
],
|
||||
[]];
|
||||
|
||||
|
||||
pcbs = [ExtruderPCB, PI_IO, RPI0, EnviroPlus, RPI3, ArduinoUno3, ArduinoLeonardo, Keyes5p1, PERF80x20, PERF70x50, PERF70x30, PERF60x40, PERF74x51, PSU12V1A, DuetE, Duex2, Duex5, Melzi, ZC_A0591, RAMPSEndstop];
|
||||
|
||||
use <pcb.scad>
|
||||
|
|
|
@ -205,3 +205,71 @@ module pin_socket(type, cols = 1, rows = 1, right_angle = false, height = 0, smt
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
module jst_xh_header(type, pin_count, right_angle=false, colour, pin_colour) { //! Draw JST XH connector
|
||||
colour = colour ? colour : hdr_base_colour(type);
|
||||
pin_colour = pin_colour ? pin_colour : hdr_pin_colour(type);
|
||||
sizeY = 5.75;
|
||||
pitch = hdr_pitch(type);
|
||||
|
||||
module jst_xh_socket(type, pin_count) {
|
||||
socketSizeZ = hdr_socket_depth(type);
|
||||
pinOffsetX = 2.45;
|
||||
sizeY = 5.75;
|
||||
wallThickness = 0.8;
|
||||
size = [pinOffsetX * 2 + (pin_count - 1) * pitch, sizeY, socketSizeZ];
|
||||
translate([-size[0] / 2, -size[1] / 2, 0]) {
|
||||
// the base
|
||||
cube([size[0], size[1], wallThickness]);
|
||||
// the three full sides
|
||||
translate([0, size[1] - wallThickness, 0])
|
||||
cube([size[0], wallThickness, size[2]]);
|
||||
cube([wallThickness, size[1], size[2]]);
|
||||
translate([size[0] - wallThickness, 0, 0])
|
||||
cube([wallThickness, size[1], size[2]]);
|
||||
// the sides with cutouts
|
||||
cube([size[0], wallThickness, 2]);
|
||||
cutoutWidth = 1;
|
||||
cutoutOffset = pinOffsetX - cutoutWidth / 2;
|
||||
cube([cutoutOffset, wallThickness, size[2]]);
|
||||
translate([size[0] - cutoutOffset, 0, 0])
|
||||
cube([cutoutOffset, wallThickness, size[2]]);
|
||||
cube([cutoutOffset, wallThickness, size[2]]);
|
||||
translate([size[0]-cutoutOffset, 0, 0])
|
||||
cube([cutoutOffset, wallThickness, size[2]]);
|
||||
translate([cutoutOffset + cutoutWidth, 0, 0])
|
||||
cube([size[0] - 2 * (cutoutWidth + cutoutOffset), wallThickness, size[2]]);
|
||||
}
|
||||
} // end module
|
||||
|
||||
|
||||
color(colour)
|
||||
if(right_angle)
|
||||
translate([0, -1, sizeY / 2])
|
||||
rotate([-90, 0, 180])
|
||||
jst_xh_socket(type, pin_count);
|
||||
else
|
||||
jst_xh_socket(type, pin_count);
|
||||
|
||||
color(pin_colour)
|
||||
for(x = [0 : pin_count - 1]) {
|
||||
pinWidth = hdr_pin_width(type);
|
||||
verticalPinLength = right_angle ? hdr_pin_below(type) + sizeY / 2 : hdr_pin_length(type);
|
||||
translate([pitch * (x - (pin_count - 1) / 2), 0, 0]) {
|
||||
pin(type, verticalPinLength);
|
||||
|
||||
if(right_angle) {
|
||||
translate([0, -pinWidth / 2, sizeY / 2 - pinWidth / 2])
|
||||
rotate([0, -90, 0])
|
||||
rotate_extrude(angle = 90, $fn = 32)
|
||||
translate([0, -pinWidth / 2])
|
||||
square(pinWidth);
|
||||
|
||||
translate([0, -sizeY / 2 - 3 * pinWidth / 4, sizeY / 2])
|
||||
rotate([90,0,0])
|
||||
pin(type, hdr_pin_length(type) - hdr_pin_below(type));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
// c
|
||||
//
|
||||
2p54header = ["2p54header", 2.54, 11.6, 3.2, 0.66, "gold", grey20, 8.5];
|
||||
jst_xh_header = ["JST XH header",2.5,10,3.4, 0.64, "gold", grey90, 7];
|
||||
|
||||
pin_headers = [ 2p54header ];
|
||||
|
||||
|
|
Loading…
Reference in New Issue