Added PDIP ICS and sockets.
BIN
libtest.png
Before Width: | Height: | Size: 784 KiB After Width: | Height: | Size: 785 KiB |
93
readme.md
@ -17,29 +17,29 @@ See [usage](docs/usage.md) for requirements, installation instructions and a usa
|
||||
|
||||
## Table of Contents<a name="top"/>
|
||||
<table><tr>
|
||||
<th align="left"> Vitamins A-J </th><th align="left"> Vitamins K-Q </th><th align="left"> Vitamins R-Z </th><th align="left"> Printed </th><th align="left"> Utilities </th><th align="left"> Core Utilities </th></tr>
|
||||
<tr><td> <a href = "#Ball_bearings">Ball_bearings</a> </td><td> <a href = "#KP_pillow_blocks">KP_pillow_blocks</a> </td><td> <a href = "#Rails">Rails</a> </td><td> <a href = "#Box">Box</a> </td><td> <a href = "#Annotation">Annotation</a> </td><td> <a href = "#BOM">BOM</a> </td></tr>
|
||||
<tr><td> <a href = "#Batteries">Batteries</a> </td><td> <a href = "#LDRs">LDRs</a> </td><td> <a href = "#Ring_terminals">Ring_terminals</a> </td><td> <a href = "#Butt_box">Butt_box</a> </td><td> <a href = "#Bezier">Bezier</a> </td><td> <a href = "#Clip">Clip</a> </td></tr>
|
||||
<tr><td> <a href = "#Belts">Belts</a> </td><td> <a href = "#LEDs">LEDs</a> </td><td> <a href = "#Rockers">Rockers</a> </td><td> <a href = "#Cable_grommets">Cable_grommets</a> </td><td> <a href = "#Dogbones">Dogbones</a> </td><td> <a href = "#Global">Global</a> </td></tr>
|
||||
<tr><td> <a href = "#Blowers">Blowers</a> </td><td> <a href = "#Leadnuts">Leadnuts</a> </td><td> <a href = "#Rod">Rod</a> </td><td> <a href = "#Carriers">Carriers</a> </td><td> <a href = "#Fillet">Fillet</a> </td><td> <a href = "#Polyholes">Polyholes</a> </td></tr>
|
||||
<tr><td> <a href = "#Bulldogs">Bulldogs</a> </td><td> <a href = "#Light_strips">Light_strips</a> </td><td> <a href = "#SCS_bearing_blocks">SCS_bearing_blocks</a> </td><td> <a href = "#Corner_block">Corner_block</a> </td><td> <a href = "#Hanging_hole">Hanging_hole</a> </td><td> <a href = "#Rounded_rectangle">Rounded_rectangle</a> </td></tr>
|
||||
<tr><td> <a href = "#Buttons">Buttons</a> </td><td> <a href = "#Linear_bearings">Linear_bearings</a> </td><td> <a href = "#SK_brackets">SK_brackets</a> </td><td> <a href = "#Door_hinge">Door_hinge</a> </td><td> <a href = "#Layout">Layout</a> </td><td> <a href = "#Sphere">Sphere</a> </td></tr>
|
||||
<tr><td> <a href = "#Cable_strips">Cable_strips</a> </td><td> <a href = "#Mains_sockets">Mains_sockets</a> </td><td> <a href = "#SSRs">SSRs</a> </td><td> <a href = "#Door_latch">Door_latch</a> </td><td> <a href = "#Maths">Maths</a> </td><td> <a href = "#Teardrops">Teardrops</a> </td></tr>
|
||||
<tr><td> <a href = "#Circlips">Circlips</a> </td><td> <a href = "#Meter">Meter</a> </td><td> <a href = "#Screws">Screws</a> </td><td> <a href = "#Fan_guard">Fan_guard</a> </td><td> <a href = "#Offset">Offset</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Components">Components</a> </td><td> <a href = "#Microswitches">Microswitches</a> </td><td> <a href = "#Sealing_strip">Sealing_strip</a> </td><td> <a href = "#Fixing_block">Fixing_block</a> </td><td> <a href = "#Quadrant">Quadrant</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#D_connectors">D_connectors</a> </td><td> <a href = "#Microview">Microview</a> </td><td> <a href = "#Sheets">Sheets</a> </td><td> <a href = "#Flat_hinge">Flat_hinge</a> </td><td> <a href = "#Round">Round</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Displays">Displays</a> </td><td> <a href = "#Modules">Modules</a> </td><td> <a href = "#Spades">Spades</a> </td><td> <a href = "#Foot">Foot</a> </td><td> <a href = "#Rounded_cylinder">Rounded_cylinder</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Extrusion_brackets">Extrusion_brackets</a> </td><td> <a href = "#Nuts">Nuts</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Handle">Handle</a> </td><td> <a href = "#Rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Extrusions">Extrusions</a> </td><td> <a href = "#O_ring">O_ring</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#PCB_mount">PCB_mount</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fans">Fans</a> </td><td> <a href = "#Opengrab">Opengrab</a> </td><td> <a href = "#Stepper_motors">Stepper_motors</a> </td><td> <a href = "#PSU_shroud">PSU_shroud</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#PCB">PCB</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td> <a href = "#Printed_box">Printed_box</a> </td><td> <a href = "#Thread">Thread</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#PCBs">PCBs</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#PSUs">PSUs</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td> <a href = "#SSR_shroud">SSR_shroud</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Pin_headers">Pin_headers</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#IECs">IECs</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td> <a href = "#Washers">Washers</a> </td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Inserts">Inserts</a> </td><td></td><td> <a href = "#Wire">Wire</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Jack">Jack</a> </td><td></td><td> <a href = "#Zipties">Zipties</a> </td><td></td><td></td><td></td></tr>
|
||||
<th align="left"> Vitamins A-I </th><th align="left"> Vitamins J-Q </th><th align="left"> Vitamins R-Z </th><th align="left"> Printed </th><th align="left"> Utilities </th><th align="left"> Core Utilities </th></tr>
|
||||
<tr><td> <a href = "#Ball_bearings">Ball_bearings</a> </td><td> <a href = "#Jack">Jack</a> </td><td> <a href = "#Rails">Rails</a> </td><td> <a href = "#Box">Box</a> </td><td> <a href = "#Annotation">Annotation</a> </td><td> <a href = "#BOM">BOM</a> </td></tr>
|
||||
<tr><td> <a href = "#Batteries">Batteries</a> </td><td> <a href = "#KP_pillow_blocks">KP_pillow_blocks</a> </td><td> <a href = "#Ring_terminals">Ring_terminals</a> </td><td> <a href = "#Butt_box">Butt_box</a> </td><td> <a href = "#Bezier">Bezier</a> </td><td> <a href = "#Clip">Clip</a> </td></tr>
|
||||
<tr><td> <a href = "#Belts">Belts</a> </td><td> <a href = "#LDRs">LDRs</a> </td><td> <a href = "#Rockers">Rockers</a> </td><td> <a href = "#Cable_grommets">Cable_grommets</a> </td><td> <a href = "#Dogbones">Dogbones</a> </td><td> <a href = "#Global">Global</a> </td></tr>
|
||||
<tr><td> <a href = "#Blowers">Blowers</a> </td><td> <a href = "#LEDs">LEDs</a> </td><td> <a href = "#Rod">Rod</a> </td><td> <a href = "#Carriers">Carriers</a> </td><td> <a href = "#Fillet">Fillet</a> </td><td> <a href = "#Polyholes">Polyholes</a> </td></tr>
|
||||
<tr><td> <a href = "#Bulldogs">Bulldogs</a> </td><td> <a href = "#Leadnuts">Leadnuts</a> </td><td> <a href = "#SCS_bearing_blocks">SCS_bearing_blocks</a> </td><td> <a href = "#Corner_block">Corner_block</a> </td><td> <a href = "#Hanging_hole">Hanging_hole</a> </td><td> <a href = "#Rounded_rectangle">Rounded_rectangle</a> </td></tr>
|
||||
<tr><td> <a href = "#Buttons">Buttons</a> </td><td> <a href = "#Light_strips">Light_strips</a> </td><td> <a href = "#SK_brackets">SK_brackets</a> </td><td> <a href = "#Door_hinge">Door_hinge</a> </td><td> <a href = "#Layout">Layout</a> </td><td> <a href = "#Sphere">Sphere</a> </td></tr>
|
||||
<tr><td> <a href = "#Cable_strips">Cable_strips</a> </td><td> <a href = "#Linear_bearings">Linear_bearings</a> </td><td> <a href = "#SSRs">SSRs</a> </td><td> <a href = "#Door_latch">Door_latch</a> </td><td> <a href = "#Maths">Maths</a> </td><td> <a href = "#Teardrops">Teardrops</a> </td></tr>
|
||||
<tr><td> <a href = "#Circlips">Circlips</a> </td><td> <a href = "#Mains_sockets">Mains_sockets</a> </td><td> <a href = "#Screws">Screws</a> </td><td> <a href = "#Fan_guard">Fan_guard</a> </td><td> <a href = "#Offset">Offset</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Components">Components</a> </td><td> <a href = "#Meter">Meter</a> </td><td> <a href = "#Sealing_strip">Sealing_strip</a> </td><td> <a href = "#Fixing_block">Fixing_block</a> </td><td> <a href = "#Quadrant">Quadrant</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#DIP">DIP</a> </td><td> <a href = "#Microswitches">Microswitches</a> </td><td> <a href = "#Sheets">Sheets</a> </td><td> <a href = "#Flat_hinge">Flat_hinge</a> </td><td> <a href = "#Round">Round</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#D_connectors">D_connectors</a> </td><td> <a href = "#Microview">Microview</a> </td><td> <a href = "#Spades">Spades</a> </td><td> <a href = "#Foot">Foot</a> </td><td> <a href = "#Rounded_cylinder">Rounded_cylinder</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Displays">Displays</a> </td><td> <a href = "#Modules">Modules</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Handle">Handle</a> </td><td> <a href = "#Rounded_polygon">Rounded_polygon</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Extrusion_brackets">Extrusion_brackets</a> </td><td> <a href = "#Nuts">Nuts</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#PCB_mount">PCB_mount</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Extrusions">Extrusions</a> </td><td> <a href = "#O_ring">O_ring</a> </td><td> <a href = "#Stepper_motors">Stepper_motors</a> </td><td> <a href = "#PSU_shroud">PSU_shroud</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fans">Fans</a> </td><td> <a href = "#Opengrab">Opengrab</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td> <a href = "#Printed_box">Printed_box</a> </td><td> <a href = "#Thread">Thread</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#PCB">PCB</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
|
||||
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#PCBs">PCBs</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td> <a href = "#SSR_shroud">SSR_shroud</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#PSUs">PSUs</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Pin_headers">Pin_headers</a> </td><td> <a href = "#Washers">Washers</a> </td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#IECs">IECs</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td> <a href = "#Wire">Wire</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Inserts">Inserts</a> </td><td></td><td> <a href = "#Zipties">Zipties</a> </td><td></td><td></td><td></td></tr>
|
||||
</table>
|
||||
|
||||
---
|
||||
@ -570,6 +570,50 @@ D-connectors. Can be any number of ways, male or female, solder buckets, PCB mou
|
||||
| 6 | ```d_pillar()``` | D-type connector pillar |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="DIP"></a>
|
||||
## DIP
|
||||
Dual inline IC packages and sockets
|
||||
|
||||
|
||||
[vitamins/dip.scad](vitamins/dip.scad) Implementation.
|
||||
|
||||
[tests/DIP.scad](tests/DIP.scad) Code for this example.
|
||||
|
||||
### Properties
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```pdip_pin_W(type)``` | Pin shoulder width |
|
||||
| ```pdip_pin_h(type)``` | Pin height |
|
||||
| ```pdip_pin_n(type)``` | Pin neck |
|
||||
| ```pdip_pin_s(type)``` | Height above seating plane |
|
||||
| ```pdip_pin_t(type)``` | Pin thickness |
|
||||
| ```pdip_pin_w(type)``` | Pin width |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```dip(n, part, size, w, pitch, pin)``` | Draw DIP package |
|
||||
| ```pdip(pins, part, socketed, w = inch(0.3)``` | Draw standard 0.1" PDIP IC package |
|
||||
| ```pdip_pin(type, l, end)``` | Draw a pin |
|
||||
|
||||
![dip](tests/png/dip.png)
|
||||
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | ```dil_socket(14, 7.62)``` | DIL socket 28 x 0.3" |
|
||||
| 1 | ```pdip(14, 74HC00)``` | IC 74HC00 PDIP14 |
|
||||
| 1 | ```pdip(20, 74HC245)``` | IC 74HC245 PDIP20 |
|
||||
| 1 | ```pdip(28, ATMEGA328)``` | IC ATMEGA328 PDIP28 |
|
||||
| 1 | ```pdip(8, NE555)``` | IC NE555 PDIP8 |
|
||||
| 1 | ```pdip(6, OPTO)``` | IC OPTO PDIP6 |
|
||||
| 1 | ```pdip(16, ULN2003)``` | IC ULN2003 PDIP16 |
|
||||
| 1 | ```pdip(18, ULN2803)``` | IC ULN2803 PDIP18 |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
@ -1939,7 +1983,10 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| ---:|:--- |:---|
|
||||
| 1 | ```box_header(2p54header, 4, 2, smt = 0)``` | Box header 4 x 2 |
|
||||
| 1 | ```d_plug(DCONN9, pcb = true)``` | D-type 9 way PCB mount plug |
|
||||
| 1 | ```dil_socket(12, 15.24)``` | DIL socket 24 x 0.6" |
|
||||
| 1 | ```hdmi(hdmi_full)``` | HDMI socket |
|
||||
| 1 | ```pdip(24, 27C32, w = 15.24)``` | IC 27C32 PDIP24 |
|
||||
| 1 | ```pdip(8, NE555)``` | IC NE555 PDIP8 |
|
||||
| 1 | ```idc_transition(2p54header, 5)``` | IDC transition header 5 x 2 |
|
||||
| 1 | ```led(LED10mm, "yellow")``` | LED 10 mm yellow |
|
||||
| 1 | ```led(LED3mm)``` | LED 3 mm red |
|
||||
|
32
tests/DIP.scad
Normal file
@ -0,0 +1,32 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2020
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../vitamins/dip.scad>
|
||||
|
||||
use <../utils/layout.scad>
|
||||
|
||||
dips = [[6, "OPTO"], [8, "NE555"], [14, "74HC00"], [16, "ULN2003"], [18, "ULN2803"], [20, "74HC245"], [28, "ATMEGA328"]];
|
||||
|
||||
module dips()
|
||||
for(i = [0 : len(dips) - 1]) let(dip = dips[i])
|
||||
translate([i * inch(0.5), 0])
|
||||
pdip(dip[0], dip[1], dip[0] > 20);
|
||||
|
||||
if($preview)
|
||||
dips();
|
@ -106,6 +106,8 @@ test_pcb = ["TestPCB", "Test PCB",
|
||||
[ 50, 170, 0, "button_6mm"],
|
||||
[ 50, 185, 0, "microswitch", small_microswitch],
|
||||
[ 52, 200, 0, "pcb", 11, TMC2130 ],
|
||||
[ 80, 200, 0, "pdip", 24, "27C32", true, inch(0.6) ],
|
||||
[ 80, 170, 0, "pdip", 8, "NE555" ],
|
||||
[ 52, 206, 0, "2p54socket", 8, 1 ],
|
||||
[ 52, 194, 0, "2p54socket", 8, 1, undef, undef, undef, "red" ],
|
||||
[ 50, 220, 0, "standoff", 5, 4.5, 12.5, 2.54],
|
||||
|
BIN
tests/png/dip.png
Normal file
After Width: | Height: | Size: 61 KiB |
Before Width: | Height: | Size: 149 KiB After Width: | Height: | Size: 156 KiB |
Before Width: | Height: | Size: 160 KiB After Width: | Height: | Size: 160 KiB |
181
vitamins/dip.scad
Normal file
@ -0,0 +1,181 @@
|
||||
//
|
||||
// NopSCADlib Copyright Chris Palmer 2020
|
||||
// nop.head@gmail.com
|
||||
// hydraraptor.blogspot.com
|
||||
//
|
||||
// This file is part of NopSCADlib.
|
||||
//
|
||||
// NopSCADlib is free software: you can redistribute it and/or modify it under the terms of the
|
||||
// GNU General Public License as published by the Free Software Foundation, either version 3 of
|
||||
// the License, or (at your option) any later version.
|
||||
//
|
||||
// NopSCADlib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
// See the GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along with NopSCADlib.
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
|
||||
//
|
||||
//! Dual inline IC packages and sockets
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
|
||||
pdip_pin = [0.25, 2.54, 0.5, 3.0, 1.524, 1];
|
||||
|
||||
function pdip_pin_t(type) = type[0]; //! Pin thickness
|
||||
function pdip_pin_s(type) = type[1]; //! Height above seating plane
|
||||
function pdip_pin_w(type) = type[2]; //! Pin width
|
||||
function pdip_pin_h(type) = type[3]; //! Pin height
|
||||
function pdip_pin_W(type) = type[4]; //! Pin shoulder width
|
||||
function pdip_pin_n(type) = type[5]; //! Pin neck
|
||||
|
||||
module pdip_pin(type, l, end) { //! Draw a pin
|
||||
w = pdip_pin_w(type);
|
||||
t = pdip_pin_t(type);
|
||||
h = pdip_pin_h(type);
|
||||
W = pdip_pin_W(type);
|
||||
s = pdip_pin_s(type);
|
||||
n = pdip_pin_n(type);
|
||||
slope = (W - n);
|
||||
r = t;
|
||||
x0 = end < 0 ? -w / 2 : -W / 2;
|
||||
n0 = end < 0 ? -w / 2 : -n / 2;
|
||||
W1 = end != 0 ? W / 2 + w / 2 : W;
|
||||
n1 = end != 0 ? n / 2 + w / 2 : n;
|
||||
color("silver") {
|
||||
translate([x0, -r - t / 2 - l, s - t / 2])
|
||||
cube([W1, l, t]);
|
||||
|
||||
translate([x0, -r - t / 2, s - r - t / 2])
|
||||
rotate([90, 0, 90])
|
||||
rotate_extrude(angle = 90, $fn = 32)
|
||||
translate([r, 0])
|
||||
square([t, W1]);
|
||||
|
||||
translate_z(-h)
|
||||
rotate([90, 0, 0])
|
||||
linear_extrude(t, center = true) {
|
||||
|
||||
translate([-w / 2, 0])
|
||||
square([w, h]);
|
||||
|
||||
hull() {
|
||||
translate([x0, h + slope])
|
||||
square([W1, s - t / 2 - r - slope]);
|
||||
|
||||
translate([n0, h])
|
||||
square([n1, eps]);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module dil_pin_positions(rows, w, pitch)
|
||||
for(i = [0 : rows - 1], $side = [-1, 1], $x = i * pitch - (rows - 1) * pitch / 2)
|
||||
translate([0, $x])
|
||||
rotate($side * 90)
|
||||
translate([0, w / 2])
|
||||
children();
|
||||
|
||||
module dil_socket(rows, w, pitch = inch(0.1)) {
|
||||
vitamin(str("dil_socket(", rows, ", ", w, arg(pitch, inch(0.1), "pitch"), "): DIL socket ", rows * 2, " x ", w / inch(1), "\""));
|
||||
|
||||
h = 4;
|
||||
h2 = 6;
|
||||
t = 0.8;
|
||||
length = rows * pitch;
|
||||
width = w + pitch;
|
||||
hole = [0.8, 0.5];
|
||||
pin_l = 3;
|
||||
|
||||
color(grey20) {
|
||||
linear_extrude(h)
|
||||
difference() {
|
||||
square([width, length], center = true);
|
||||
|
||||
square([w - pitch, length - 2 * pitch], center = true);
|
||||
|
||||
dil_pin_positions(rows, w, pitch)
|
||||
square(hole, center = true);
|
||||
|
||||
translate([0, rows * pitch / 2])
|
||||
circle(d = 1.5);
|
||||
}
|
||||
rotate([90, 0, 0])
|
||||
linear_extrude(length, center = true)
|
||||
for(side = [-1, 1])
|
||||
hull() {
|
||||
t2 = pitch / 2 - hole.y / 2;
|
||||
translate([side * (width / 2 - t / 2) - t / 2, 0])
|
||||
square([t, h2]);
|
||||
|
||||
translate([side * (width / 2 - t2 / 2) - t2 / 2, 0])
|
||||
square([t2, h]);
|
||||
}
|
||||
}
|
||||
color("silver")
|
||||
dil_pin_positions(rows, w, pitch)
|
||||
translate_z(-pin_l / 2)
|
||||
cube([0.5, 0.25, pin_l], center = true);
|
||||
|
||||
translate_z(h)
|
||||
children();
|
||||
}
|
||||
|
||||
module dip(n, part, size, w, pitch, pin) { //! Draw DIP package
|
||||
D = [3, 0.6];
|
||||
|
||||
translate_z(pdip_pin_s(pin)) {
|
||||
color(grey20) {
|
||||
rotate([90, 0, 0])
|
||||
linear_extrude(size.x, center = true)
|
||||
difference() {
|
||||
hull() {
|
||||
square([size.y, pdip_pin_t(pin)], center = true);
|
||||
|
||||
square([size.y - 1, size.z], center = true);
|
||||
}
|
||||
square([D.x + 1, size.z + 1], center = true);
|
||||
}
|
||||
|
||||
translate_z(-D.y / 2)
|
||||
cube([D.x + 1 + eps, size.x, size.z - D.y], center = true);
|
||||
|
||||
linear_extrude(size.z / 2)
|
||||
difference() {
|
||||
square([D.x + 1 + eps, size.x], center = true);
|
||||
|
||||
translate([0, size.x / 2])
|
||||
circle(d = D.x);
|
||||
}
|
||||
}
|
||||
|
||||
color("white")
|
||||
translate([0, -D.x / 4, size.z / 2])
|
||||
rotate(-90)
|
||||
linear_extrude(eps)
|
||||
resize([(size.x - D.x / 2) * 0.75, size.y / 3])
|
||||
text(part, halign = "center", valign = "center");
|
||||
}
|
||||
|
||||
l = size.x / 2 - pdip_pin_W(pin) / 2;
|
||||
dil_pin_positions(n, w, pitch)
|
||||
pdip_pin(pin, w / 2, $side * (abs($x) > l ? sign($x) : 0));
|
||||
}
|
||||
|
||||
module pdip(pins, part, socketed, w = inch(0.3), pitch = inch(0.1)) { //! Draw standard 0.1" PDIP IC package
|
||||
vitamin(str("pdip(", pins, ", ", part, arg(w, inch(0.3), "w"), arg(pitch, inch(0.1), "pitch"),"): IC ", part, " PDIP", pins));
|
||||
n = ceil(pins / 2);
|
||||
k = in([4, 8], n) ? n - 1 : n;
|
||||
length = k * pitch + pitch / 2;
|
||||
width = w - pitch / 2;
|
||||
height = 3;
|
||||
if(socketed)
|
||||
dil_socket(n, w, pitch)
|
||||
dip(n, part, [length, width, height], w, pitch, pdip_pin);
|
||||
else
|
||||
dip(n, part, [length, width, height], w, pitch, pdip_pin);
|
||||
}
|
@ -34,6 +34,7 @@ use <../utils/thread.scad>
|
||||
use <../utils/tube.scad>
|
||||
use <d_connector.scad>
|
||||
use <led.scad>
|
||||
use <dip.scad>
|
||||
|
||||
function pcb_name(type) = type[1]; //! Description
|
||||
function pcb_length(type) = type[2]; //! Length
|
||||
@ -823,6 +824,7 @@ module pcb_component(comp, cutouts = false, angle = undef) { //! Draw pcb compon
|
||||
if(show(comp, "uSD")) uSD(comp[4], cutouts);
|
||||
if(show(comp, "trimpot10")) trimpot10(param(4, false), cutouts);
|
||||
if(show(comp, "led")) led(comp[4], comp[5], 2.6);
|
||||
if(show(comp, "pdip")) pdip(comp[4], comp[5], param(6, false), param(7, inch(0.3)));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -244,8 +244,9 @@ ArduinoUno3 = ["ArduinoUno3", "Arduino Uno R3", 68.58, 53.34, 1.6, 0, 3.3, 0, "#
|
||||
[64.91, 27.89, 0, "2p54header", 2, 3],
|
||||
[18.796, -7.00, 0, "2p54header", 3, 2],
|
||||
[ 6.5, -3.5, 0, "button_6mm"],
|
||||
[4.7625, 7.62, 180, "barrel_jack"],
|
||||
[1.5875, 37.7825,180,"usb_B"],
|
||||
[4.7625, 7.62, 180,"barrel_jack"],
|
||||
[1.5875, 37.78, 180,"usb_B"],
|
||||
[46.99, 17, 270,"pdip", 28, "ATMEGA328", true],
|
||||
],
|
||||
[],[],
|
||||
inch([
|
||||
@ -328,7 +329,8 @@ PI_IO = ["PI_IO", "PI_IO V2", 35.56, 25.4, 1.6, 0, 0, 0, "green", tru
|
||||
ZC_A0591 = ["ZC_A0591", "ZC-A0591 ULN2003 driver PCB", 35, 32, 1.6, 0, 2.5, 0, "green", false, [[2.25, 3.25], [-2.25, 3.25], [2.25, -3.25], [-2.25, -3.25] ],
|
||||
[ [ 12.25, 8.3, -90, "jst_xh", 5],
|
||||
[ -6.5, 10, 0, "2p54header", 1, 4],
|
||||
[-14, -4.5, 0, "2p54header", 4, 1],
|
||||
[ 20.4, -4.5, 0, "2p54header", 4, 1],
|
||||
[ 20.4, 11, 180, "pdip", 16, "ULN2803AN", true],
|
||||
[ 5.5, 6, 0, "led", LED3mm, [1,1,1, 0.5]],
|
||||
[ 5.5, 10.5, 0, "led", LED3mm, [1,1,1, 0.5]],
|
||||
[ 5.5, 15, 0, "led", LED3mm, [1,1,1, 0.5]],
|
||||
|