1
0
mirror of https://github.com/nophead/NopSCADlib.git synced 2025-09-03 20:32:35 +02:00

Compare commits

...

13 Commits

Author SHA1 Message Date
Chris Palmer
d0d525b97a Added RPi 0 model 2019-09-14 23:26:26 +01:00
Chris Palmer
371d274906 Fixed missing include for hygrometer. 2019-09-14 23:09:21 +01:00
Chris Palmer
7118e6eb03 Typo in comment. 2019-09-06 11:28:49 +01:00
Chris Palmer
46004381b7 Merge branch 'master' into Execute_attributes 2019-08-21 22:04:27 +01:00
Chris Palmer
cfdf759a49 Added missing files from last push. 2019-08-21 18:51:45 +01:00
Chris Palmer
aeded1b807 Added a hygrometer module. 2019-08-21 18:50:15 +01:00
Chris Palmer
79f1c95136 Insert lug made more flexible and insert_boss made faster.
Both added to the insert test.
2019-08-21 17:31:23 +01:00
Chris Palmer
9bb84593be Added two more projects to the gallery. 2019-08-21 16:50:00 +01:00
Chris Palmer
ab91defcd2 Added Arduino Leonardo 2019-08-21 16:28:32 +01:00
Chris Palmer
6f4859a4b5 Merge branch 'master' into Execute_attributes 2019-08-18 18:42:42 +01:00
Chris Palmer
3a087be0e9 Merge branch 'master' into Execute_attributes 2019-08-18 15:22:47 +01:00
Chris Palmer
77aa8fe44d Merge branch 'master' into Execute_attributes 2019-08-18 14:30:28 +01:00
Chris Palmer
6fe4548213 Set execute attributes on scripts for Linux. 2019-08-18 14:29:15 +01:00
30 changed files with 396 additions and 94 deletions

BIN
gallery/FilamentDryBox.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

BIN
gallery/SunBot.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

View File

@@ -6,6 +6,13 @@ Arduino thermostat to control a beer fridge to use it as an environmental chambe
![](ArduinoThermostat.png)
<a name="TOP"></a>
## FilamentDryBox
A small fan oven with a spool holder to keep the filament warm and dry.
![](FilamentDryBox.png)
<a name="TOP"></a>
## HydraBot
Current state of HydraRaptor after being modified for laser engraving.
@@ -68,6 +75,13 @@ Mains isolated and variable supply with metering.
![](Mains_Box.png)
<a name="TOP"></a>
## SunBot
A solar tracker to keep solar powerbanks pointing at the sun.
![](SunBot.png)
<a name="TOP"></a>
## Turntable
WiFi enabled remote control turntable for photography

View File

@@ -66,6 +66,7 @@ include <vitamins/geared_steppers.scad>
use <vitamins/jack.scad>
use <vitamins/meter.scad>
use <vitamins/fuseholder.scad>
use <vitamins/hygrometer.scad>
use <vitamins/opengrab.scad>
use <vitamins/wire.scad>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 708 KiB

After

Width:  |  Height:  |  Size: 721 KiB

View File

@@ -313,7 +313,10 @@ translate([x3, iecs_y])
translate([x3 + 15, modules_y])
microview();
translate([x3 + 40, modules_y])
translate([x3 + 60, modules_y])
hygrometer();
translate([x3 + 90, modules_y])
modules();
translate([x3, ssrs_y]) {

View File

@@ -139,8 +139,8 @@ module psu_shroud(type, cable_d, name, cables = 1) { //! Generate the STL file f
mirror([0, 1, 0])
psu_shroud_hole_positions(type)
translate_z(height)
rotate(90)
insert_lug(insert, wall, $side, counter_bore);
rotate($side * 90)
insert_lug(insert, wall, counter_bore);
}
module psu_shroud_assembly(type, cable_d, name, cables = 1) //! The printed parts with inserts fitted

View File

@@ -103,8 +103,8 @@ module ssr_shroud(type, cable_d, name) { //! Generate the STL file for a spec
ssr_shroud_hole_positions(type)
vflip()
translate_z(height)
rotate(90)
insert_lug(insert, wall, $side, counter_bore);
rotate($side * 90)
insert_lug(insert, wall, counter_bore);
}
module ssr_shroud_assembly(type, cable_d, name) //! The printed parts with inserts fitted

128
readme.md
View File

@@ -17,25 +17,26 @@ 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-N </th><th align="left"> Vitamins O-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 = "#O_ring">O_ring</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 = "#Opengrab">Opengrab</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 = "#Pcbs">Pcbs</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 = "#Pillars">Pillars</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 = "#Pin_headers">Pin_headers</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 = "#Psus">Psus</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 = "#Pulleys">Pulleys</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 = "#Components">Components</a> </td><td> <a href = "#Rails">Rails</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 = "#D_connectors">D_connectors</a> </td><td> <a href = "#Ring_terminals">Ring_terminals</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 = "#Displays">Displays</a> </td><td> <a href = "#Rockers">Rockers</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 = "#Fans">Fans</a> </td><td> <a href = "#Rod">Rod</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 = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Screws">Screws</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 = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#Sealing_strip">Sealing_strip</a> </td><td> <a href = "#Psu_shroud">Psu_shroud</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr>
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Sheets">Sheets</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Spades">Spades</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
<tr><td> <a href = "#Iecs">Iecs</a> </td><td> <a href = "#Spools">Spools</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Inserts">Inserts</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#Ssr_shroud">Ssr_shroud</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Jack">Jack</a> </td><td> <a href = "#Ssrs">Ssrs</a> </td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
<th align="left"> Vitamins A-M </th><th align="left"> Vitamins N-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 = "#Nuts">Nuts</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 = "#O_ring">O_ring</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 = "#Opengrab">Opengrab</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 = "#Pcbs">Pcbs</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 = "#Pillars">Pillars</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 = "#Pin_headers">Pin_headers</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 = "#Psus">Psus</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 = "#Components">Components</a> </td><td> <a href = "#Pulleys">Pulleys</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 = "#D_connectors">D_connectors</a> </td><td> <a href = "#Rails">Rails</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 = "#Displays">Displays</a> </td><td> <a href = "#Ring_terminals">Ring_terminals</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 = "#Fans">Fans</a> </td><td> <a href = "#Rockers">Rockers</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 = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#Rod">Rod</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 = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#Screws">Screws</a> </td><td> <a href = "#Psu_shroud">Psu_shroud</a> </td><td> <a href = "#Sector">Sector</a> </td><td></td></tr>
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Sealing_strip">Sealing_strip</a> </td><td> <a href = "#Ribbon_clamp">Ribbon_clamp</a> </td><td> <a href = "#Sweep">Sweep</a> </td><td></td></tr>
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Sheets">Sheets</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td> <a href = "#Tube">Tube</a> </td><td></td></tr>
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Spades">Spades</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 = "#Spools">Spools</a> </td><td> <a href = "#Ssr_shroud">Ssr_shroud</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Inserts">Inserts</a> </td><td> <a href = "#Springs">Springs</a> </td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
<tr><td> <a href = "#Jack">Jack</a> </td><td> <a href = "#Ssrs">Ssrs</a> </td><td></td><td></td><td></td></tr>
<tr><td> <a href = "#Ldrs">Ldrs</a> </td><td> <a href = "#Stepper_motors">Stepper_motors</a> </td><td></td><td></td><td></td></tr>
<tr><td> <a href = "#Leadnuts">Leadnuts</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td></td><td></td><td></td></tr>
<tr><td> <a href = "#Leds">Leds</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td></td><td></td><td></td></tr>
@@ -46,7 +47,6 @@ See [usage](docs/usage.md) for requirements, installation instructions and a usa
<tr><td> <a href = "#Microswitches">Microswitches</a> </td><td> <a href = "#Wire">Wire</a> </td><td></td><td></td><td></td></tr>
<tr><td> <a href = "#Microview">Microview</a> </td><td> <a href = "#Zipties">Zipties</a> </td><td></td><td></td><td></td></tr>
<tr><td> <a href = "#Modules">Modules</a> </td><td></td><td></td><td></td><td></td></tr>
<tr><td> <a href = "#Nuts">Nuts</a> </td><td></td><td></td><td></td><td></td></tr>
</table>
---
@@ -851,6 +851,37 @@ Needs updating as mostly obsolete versions.
| 4 | ```ziptie(small_ziptie, 8)``` | Ziptie 2.5mm x 100mm min length |
<a href="#top">Top</a>
---
<a name="Hygrometer"></a>
## Hygrometer
Mini LCD Celsius Digital Thermometer Hygrometer Temperature Humidity Meter Gauge on eBay
[vitamins/hygrometer.scad](vitamins/hygrometer.scad) Implementation.
[tests/hygrometer.scad](tests/hygrometer.scad) Code for this example.
### Functions
| Function | Description |
|:--- |:--- |
| ```hygrometer_or()``` | The outside radius of a hygrometer |
### Modules
| Module | Description |
|:--- |:--- |
| ```hygrometer()``` | Draw a hygrometer |
| ```hygrometer_hole(h = 0)``` | Drill the hole for a hygrometer |
![hygrometer](tests/png/hygrometer.png)
### Vitamins
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 1 | ```hygrometer()``` | Mini LCD Digital Thermometer / Hygrometer |
<a href="#top">Top</a>
---
@@ -955,7 +986,7 @@ Heatfit threaded inserts. Can be pushed into thermoplastics using a soldering ir
| ```insert(type)``` | Draw specified insert |
| ```insert_boss(type, z, wall = 2 * extrusion_width)``` | Make a boss to take an insert |
| ```insert_hole(type, counterbore = 0, horizontal = false)``` | Make a hole to take an insert, ```counterbore``` is the extra length for the screw |
| ```insert_lug(insert, wall, side, counter_bore = 0)``` | Make a flying insert lug, see [ssr_shroud](#Ssr_shroud) |
| ```insert_lug(insert, wall, counter_bore = 0, extension = 0, corner_r = 0, flying = true)``` | Make a flying insert lug, see [ssr_shroud](#Ssr_shroud) |
![inserts](tests/png/inserts.png)
@@ -1626,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 |
@@ -1652,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 |
@@ -1678,6 +1717,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
### Vitamins
| Qty | Module call | BOM entry |
| ---:|:--- |:---|
| 1 | ```pcb(ArduinoLeonardo)``` | Arduino Leonardo |
| 1 | ```pcb(ArduinoUno3)``` | Arduino Uno R3 |
| 1 | | Cat 5 patch cable 300mm |
| 1 | ```d_plug(DCONN15, pcb = true)``` | D-type 15 way PCB mount plug |
@@ -1687,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 |
| 16 | ```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 |
@@ -1703,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 |
| 12 | ```screw(M2_cap_screw, 20)``` | Screw M2 cap x 20mm |
| 4 | ```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 |
| 8 | ```screw(M2p5_pan_screw, 20)``` | Screw M2.5 pan x 20mm |
| 4 | ```screw(M2p5_pan_screw, 30)``` | Screw M2.5 pan x 30mm |
| 8 | ```screw(M3_cap_screw, 25)``` | Screw M3 cap x 25mm |
| 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, 35)``` | Screw M2.5 pan x 35mm |
| 4 | ```screw(M3_cap_screw, 25)``` | Screw M3 cap x 25mm |
| 4 | ```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, 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 |
| 16 | ```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 |
@@ -1723,20 +1767,22 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
### Printed
| Qty | Filename |
| ---:|:--- |
| 4 | pcb_spacer20100.stl |
| 4 | pcb_spacer20110.stl |
| 4 | pcb_spacer20120.stl |
| 4 | pcb_spacer20130.stl |
| 4 | pcb_spacer25200.stl |
| 4 | pcb_spacer20140.stl |
| 4 | pcb_spacer20150.stl |
| 4 | pcb_spacer25100_2.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_spacer30140.stl |
| 4 | pcb_spacer30150.stl |
| 4 | pcb_spacer30190.stl |
| 4 | pcb_spacer40160.stl |
| 4 | pcb_spacer40170.stl |
| 4 | pcb_spacer30160.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>
@@ -4250,7 +4296,7 @@ Layout objects in a line with equal gaps given a vector of their widths.
---
<a name="Maths"></a>
## Maths
Maths utilities for minapulating vectors and matrices.
Maths utilities for manipulating vectors and matrices.
[utils/maths.scad](utils/maths.scad) Implementation.

0
scripts/bom.py Normal file → Executable file
View File

0
scripts/doc_scripts.py Normal file → Executable file
View File

0
scripts/dxfs.py Normal file → Executable file
View File

0
scripts/gallery.py Normal file → Executable file
View File

0
scripts/make_all.py Normal file → Executable file
View File

0
scripts/render.py Normal file → Executable file
View File

0
scripts/set_config.py Normal file → Executable file
View File

0
scripts/stls.py Normal file → Executable file
View File

2
scripts/tests.py Normal file → Executable file
View File

@@ -138,7 +138,7 @@ def tests(tests):
print("Can't find implementation!")
continue
vsplit = "N"
vsplit = "M"
vtype = locations[0][1]
types = [vtype + ' A-' + vsplit[0], vtype + ' ' + chr(ord(vsplit) + 1) + '-Z'] + [loc[1] for loc in locations[1 :]]
if type == vtype:

0
scripts/views.py Normal file → Executable file
View File

22
tests/hygrometer.scad Normal file
View File

@@ -0,0 +1,22 @@
//
// NopSCADlib Copyright Chris Palmer 2018
// 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/>.
//
use <../vitamins/hygrometer.scad>
if($preview)
hygrometer();

View File

@@ -21,10 +21,20 @@ use <../utils/layout.scad>
include <../vitamins/inserts.scad>
module inserts()
module inserts() {
for(i = [0: len(inserts) -1])
translate([10 * i, 0])
insert(inserts[i]);
color(pp1_colour)
translate([len(inserts) * 10, 0]) {
insert_lug(inserts[0], 2, 1);
translate([10, 0])
insert_boss(inserts[0], z = 10, wall = 2);
}
}
if($preview)
inserts();

View File

@@ -23,7 +23,7 @@ include <../vitamins/d_connectors.scad>
include <../vitamins/pcbs.scad>
module pcbs()
layout([for(p = pcbs) pcb_width(p)], 15)
layout([for(p = pcbs) pcb_width(p)], 10)
translate([0, pcb_length(pcbs[$i]) / 2])
rotate(90)
pcb_assembly(pcbs[$i], 5 + $i, 3);

BIN
tests/png/hygrometer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 KiB

After

Width:  |  Height:  |  Size: 150 KiB

View File

@@ -18,7 +18,7 @@
//
//
//! Maths utilities for minapulating vectors and matrices.
//! Maths utilities for manipulating vectors and matrices.
//
function sqr(x) = x * x;

87
vitamins/hygrometer.scad Normal file
View File

@@ -0,0 +1,87 @@
//
// NopSCADlib Copyright Chris Palmer 2018
// 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/>.
//
//
//! Mini LCD Celsius Digital Thermometer Hygrometer Temperature Humidity Meter Gauge on eBay
//
include <../core.scad>
use <../utils/round.scad>
od = 40.9;
h = 14;
flange_d = 45.5;
flange_t = 1.5;
flange_d2 = 32;
flange_t2 = 2;
apperture_d = 24.7;
hygrometer_hole_r = 21.3;
slot_w = 5.5;
module hygrometer_hole(h = 0) { //! Drill the hole for a hygrometer
round(cnc_bit_r) {
intersection() {
drill(hygrometer_hole_r, h);
rotate(30)
square([slot_w + 2 * cnc_bit_r, 100], center = true);
}
drill((od + 0.2) / 2, h);
}
}
function hygrometer_or() = flange_d / 2; //! The outside radius of a hygrometer
module hygrometer() { //! Draw a hygrometer
vitamin("hygrometer(): Mini LCD Digital Thermometer / Hygrometer");
explode(40) {
color(grey30)
rotate_extrude()
polygon([
[0, 0],
[apperture_d / 2, 0],
[apperture_d / 2, flange_t],
[flange_d2 / 2, flange_t2],
[flange_d / 2, flange_t],
[flange_d / 2, 0],
[od / 2, 0],
[od / 2, -h],
[0, -h]
]);
color("#94A7AB")
cylinder(d = apperture_d, h = eps);
color("black")
linear_extrude(height = 0.2, center = true) {
translate([0, 3])
text("20_4", font = "7 segment", valign = "bottom", halign = "center", size = apperture_d / 6);
translate([7, 3])
text("C", font = "7 segment", valign = "bottom", halign = "center", size = apperture_d / 8);
translate([-1.9, 0.5])
text("50", font = "7 segment", valign = "top", halign = "center", size = apperture_d / 2.7);
translate([0, -apperture_d / 6])
text(" %", font = "Arial", valign = "center", halign = "center", size = apperture_d / 6);
}
}
}

View File

@@ -21,6 +21,7 @@
//! Heatfit threaded inserts. Can be pushed into thermoplastics using a soldering iron with a conical bit set to 200&deg;C.
//
include <../core.scad>
use <../utils/quadrant.scad>
function insert_length(type) = type[1]; //! Length
function insert_outer_d(type) = type[2]; //! Outer diameter at the top
@@ -96,31 +97,52 @@ module insert_hole(type, counterbore = 0, horizontal = false) { //! Make a hole
function insert_boss_radius(type, wall) = corrected_radius(insert_hole_radius(type)) + wall; //! Compute the outer radius of an insert boss
module insert_boss(type, z, wall = 2 * extrusion_width) { //! Make a boss to take an insert
render(convexity = 3)
difference() {
ir = insert_hole_radius(type);
linear_extrude(height = z)
hull()
poly_ring(corrected_radius(ir) + wall, ir);
ir = insert_hole_radius(type);
or = corrected_radius(ir) + wall;
translate_z(z)
insert_hole(type, max(0, z - insert_hole_length(type) - 2 * layer_height));
module shape()
hull()
poly_ring(or, ir);
linear_extrude(height = z)
poly_ring(or, ir);
linear_extrude(height = z - insert_hole_length(type))
difference() {
shape();
poly_circle(insert_screw_diameter(type) / 2 + 0.1);
}
if(z > insert_hole_length(type) + 2 * layer_height)
linear_extrude(height = 2 * layer_height) // cap the end if room
shape();
}
module insert_lug(insert, wall, side, counter_bore = 0) { //! Make a flying insert lug, see [ssr_shroud](#Ssr_shroud)
module insert_lug(insert, wall, counter_bore = 0, extension = 0, corner_r = 0, flying = true) { //! Make a flying insert lug, see [ssr_shroud](#Ssr_shroud)
boss_r = insert_boss_radius(insert, wall);
boss_h = insert_hole_length(insert);
boss_h2 = boss_h + counter_bore;
module shape()
intersection() {
hull() {
circle(boss_r);
translate([boss_r + extension - eps, 0])
square([eps, 2 * boss_r], center = true);
}
if(corner_r)
translate([boss_r + extension - corner_r, 0])
rotate(-45)
quadrant(w = 100, r = corner_r - eps, center = true);
}
translate_z(-boss_h)
linear_extrude(height = boss_h)
difference() {
hull() {
circle(boss_r);
shape();
translate([side * (boss_r - 1), 0])
square([eps, 2 * boss_r], center = true);
}
poly_circle(insert_hole_radius(insert));
}
@@ -128,24 +150,19 @@ module insert_lug(insert, wall, side, counter_bore = 0) { //! Make a flying inse
translate_z(-boss_h2) {
linear_extrude(height = counter_bore + eps)
difference() {
hull() {
circle(boss_r);
shape();
translate([side * (boss_r - 1), 0])
square([eps, 2 * boss_r], center = true);
}
poly_circle(insert_screw_diameter(insert) / 2 + 0.1);
}
// support cones
hull() {
cylinder(h = eps, r = boss_r - eps);
// support cone
if(flying)
hull() {
linear_extrude(height = eps)
shape();
translate([side * (boss_r - 1), 0])
cube([eps, 2 * boss_r, eps], center = true);
translate([side * (boss_r - wall + eps), 0, - (2 * boss_r - wall)])
cube(eps, center = true);
}
translate([boss_r + extension - wall - eps, 0, - (2 * boss_r + extension - wall)])
cube(eps, center = true);
}
}
}

View File

@@ -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));

View File

@@ -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],
@@ -237,6 +250,32 @@ ArduinoUno3 = ["ArduinoUno3", "Arduino Uno R3", 68.58, 53.34, 1.6, 0, 3.3, 0, "#
M2p5_pan_screw
];
ArduinoLeonardo = ["ArduinoLeonardo", "Arduino Leonardo", 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],
[54.61, -2.54, 0, "2p54socket", 8, 1],
[36.83, 2.54, 0, "2p54socket", 8, 1],
[57.15, 2.54, 0, "2p54socket", 6, 1],
[64.91, 27.89, 0, "2p54header", 2, 3],
[ 6.5, -3.5, 0, "button_6mm"],
[4.7625, 7.62, 180, "barrel_jack"],
[1.5875, 38.1, 180,"usb_uA"],
],
[],[],
inch([
[-1.35, -1.05],
[-1.35, 1.05],
[ 1.19, 1.05],
[ 1.25, 0.99],
[ 1.25, 0.54],
[ 1.35, 0.44],
[ 1.35, -0.85],
[ 1.25, -0.95],
[ 1.25, -1.05],
]),
M2p5_pan_screw
];
Keyes5p1 = ["Keyes5p1", "Keyes5.1 Arduino Uno expansion board", 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, "-2p54header", 10, 1],
[54.61, -2.54, 0, "-2p54header", 8, 1],
@@ -291,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, 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>