Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
5f72a12125 | ||
|
82502eb470 | ||
|
b541298eae | ||
|
9884160ed5 | ||
|
7b111c016a | ||
|
38c973b316 | ||
|
042d809ed0 | ||
|
3864839e52 | ||
|
2ba2c2c115 | ||
|
e3716ce8f9 |
15
CHANGELOG.md
@@ -3,6 +3,21 @@
|
||||
This changelog is generated by `changelog.py` using manually added semantic version tags to classify commits as breaking changes, additions or fixes.
|
||||
|
||||
|
||||
#### [v17.0.1](https://github.com/nophead/NopSCADlib/releases/tag/v17.0.1 "show release") Fixes [...](https://github.com/nophead/NopSCADlib/compare/v17.0.0...v17.0.1 "diff with v17.0.0")
|
||||
* 2021-10-01 [`38c973b`](https://github.com/nophead/NopSCADlib/commit/38c973b316a853fcbef3ccb857d99404a772d9dd "show commit") [C.P.](# "Chris Palmer") FR4 veroboard made the correct colour.
|
||||
veroboard track cuts made slightly bigger.
|
||||
|
||||
* 2021-10-01 [`042d809`](https://github.com/nophead/NopSCADlib/commit/042d809ed056ba55c32f1d850b81dcf559fe9134 "show commit") [C.P.](# "Chris Palmer") Resistor and thermistor wires made more round.
|
||||
|
||||
* 2021-10-01 [`3864839`](https://github.com/nophead/NopSCADlib/commit/3864839e521eb64189cba8453ea8835d6ffadd75 "show commit") [C.P.](# "Chris Palmer") Fixed encoder breakout descripion typo.
|
||||
|
||||
* 2021-10-01 [`2ba2c2c`](https://github.com/nophead/NopSCADlib/commit/2ba2c2c115d4ab6c2371c662a3e54d7c77aa7785 "show commit") [C.P.](# "Chris Palmer") Removed some unused dependencies.
|
||||
|
||||
## [v17.0.0](https://github.com/nophead/NopSCADlib/releases/tag/v17.0.0 "show release") Breaking Changes [...](https://github.com/nophead/NopSCADlib/compare/v16.2.0...v17.0.0 "diff with v16.2.0")
|
||||
* 2021-09-28 [`a5c4bf0`](https://github.com/nophead/NopSCADlib/commit/a5c4bf05adbf53cb7eb113db1139b65eb616a2e0 "show commit") [M.B.](# "Martin Budden") Added hot end style string literals following discussion.
|
||||
|
||||
* 2021-09-28 [`a65add6`](https://github.com/nophead/NopSCADlib/commit/a65add65acdfeb97a657e03b9398d5376f497e85 "show commit") [M.B.](# "Martin Budden") Removed hotend global enums.
|
||||
|
||||
### [v16.2.0](https://github.com/nophead/NopSCADlib/releases/tag/v16.2.0 "show release") Additions [...](https://github.com/nophead/NopSCADlib/compare/v16.1.0...v16.2.0 "diff with v16.1.0")
|
||||
* 2021-09-29 [`bab4c8e`](https://github.com/nophead/NopSCADlib/commit/bab4c8e8afcc9e96ada5ae8d7636f3f203c36a2c "show commit") [C.P.](# "Chris Palmer") `TO247_size()` now also returns lead height and the length of the wide bit.
|
||||
TO247 leads fixed at 3.
|
||||
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 121 KiB |
BIN
gallery/IOT_LOAD.png
Normal file
After Width: | Height: | Size: 245 KiB |
Before Width: | Height: | Size: 287 KiB After Width: | Height: | Size: 287 KiB |
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 121 KiB |
BIN
gallery/PSU_cover.png
Normal file
After Width: | Height: | Size: 279 KiB |
BIN
gallery/PotBox.png
Normal file
After Width: | Height: | Size: 231 KiB |
Before Width: | Height: | Size: 202 KiB After Width: | Height: | Size: 202 KiB |
@@ -25,6 +25,11 @@ WiFi controllable PSU
|
||||
|
||||

|
||||
|
||||
## IOT LOAD
|
||||
WiFi controllable programmable load
|
||||
|
||||

|
||||
|
||||
## Lab ATX PSU
|
||||
Bench power supply built around an ATX PSU.
|
||||
|
||||
@@ -65,6 +70,16 @@ Mains isolated and variable supply with metering.
|
||||
|
||||
|
||||
|
||||
## PSU Cover
|
||||
A base and shroud to make PSU safe to sit on a desk
|
||||
|
||||

|
||||
|
||||
## PotBox
|
||||
Potentiometer box with course and fine controls and three 4mm binding posts
|
||||
|
||||

|
||||
|
||||
## SunBot
|
||||
A solar tracker to keep a solar panel pointing at the sun.
|
||||
|
||||
|
BIN
libtest.png
Before Width: | Height: | Size: 932 KiB After Width: | Height: | Size: 932 KiB |
@@ -31,9 +31,11 @@
|
||||
//!
|
||||
//! Normally the side sheets are the same type but they can be overridden individually as long as the substitute has the same thickness.
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../utils/core/core.scad>
|
||||
use <../vitamins/sheet.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
use <../vitamins/screw.scad>
|
||||
use <../vitamins/washer.scad>
|
||||
use <../utils/quadrant.scad>
|
||||
use <../utils/round.scad>
|
||||
|
||||
@@ -52,8 +54,8 @@ function box_width(type) = type[7]; //! Internal width
|
||||
function box_depth(type) = type[8]; //! Internal depth
|
||||
function box_height(type) = type[9]; //! Internal height
|
||||
|
||||
function box(screw, wall, sheets, top_sheet, base_sheet, size, feet = false, shelf_screw = M3_dome_screw) = //! Construct a property list for a box.
|
||||
concat([screw, shelf_screw, wall, sheets, top_sheet, base_sheet, feet], size);
|
||||
function box(screw, wall, sheets, top_sheet, base_sheet, size, feet = false, shelf_screw = undef) = //! Construct a property list for a box.
|
||||
concat([screw, is_undef(shelf_screw) ? screw : shelf_screw, wall, sheets, top_sheet, base_sheet, feet], size);
|
||||
|
||||
function box_bezel_clearance(type) = bezel_clearance;
|
||||
|
||||
|
@@ -67,18 +67,18 @@ module foot(type = foot) { //! Generate STL
|
||||
}
|
||||
}
|
||||
|
||||
module foot_assembly(t = 0, type = foot, flip = false) { //! Assembly with fasteners in place for specified sheet thickness
|
||||
module foot_assembly(t = 0, type = foot, flip = false, no_washer = false) { //! Assembly with fasteners in place for specified sheet thickness
|
||||
screw = foot_screw(type);
|
||||
nut = screw_nut(screw);
|
||||
squeeze = 0.5;
|
||||
screw_length = screw_length(screw, foot_thickness(type) + t - squeeze, 2, nyloc = true);
|
||||
screw_length = screw_length(screw, foot_thickness(type) + t - squeeze, no_washer ? 1 : 2, nyloc = true);
|
||||
|
||||
vflip() explode(15, true) {
|
||||
stl_colour(pp4_colour) foot(type);
|
||||
|
||||
if(t)
|
||||
explode(15, true)
|
||||
translate_z(foot_thickness(type))
|
||||
translate_z(foot_thickness(type) - squeeze)
|
||||
if(flip)
|
||||
nut_and_washer(nut, true);
|
||||
else
|
||||
@@ -87,9 +87,15 @@ module foot_assembly(t = 0, type = foot, flip = false) { //! Assembly with faste
|
||||
if(t)
|
||||
translate_z(t)
|
||||
if(flip)
|
||||
screw_and_washer(screw, screw_length);
|
||||
if(no_washer)
|
||||
screw(screw, screw_length);
|
||||
else
|
||||
screw_and_washer(screw, screw_length);
|
||||
else
|
||||
nut_and_washer(nut, true);
|
||||
if(no_washer)
|
||||
nut(nut, true);
|
||||
else
|
||||
nut_and_washer(nut, true);
|
||||
}
|
||||
|
||||
module insert_foot(type = insert_foot) { //! Generate STL for foot with insert
|
||||
|
@@ -22,7 +22,7 @@
|
||||
//!
|
||||
//! Add solvent or glue to make a permanent fixture.
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../utils/core/core.scad>
|
||||
|
||||
interference = 0.0;
|
||||
|
||||
|
@@ -26,7 +26,9 @@
|
||||
//!
|
||||
//! It can also have printed feet on the base with the screws doubling up to hold the base on.
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../utils/core/core.scad>
|
||||
use <../vitamins/screw.scad>
|
||||
use <../vitamins/washer.scad>
|
||||
use <../vitamins/insert.scad>
|
||||
use <foot.scad>
|
||||
|
||||
|
@@ -21,8 +21,8 @@
|
||||
//! Creative Commons - Attribution - Share Alike license (see <https://creativecommons.org/licenses/by-sa/3.0/>)
|
||||
//
|
||||
|
||||
include <../core.scad>
|
||||
include <../vitamins/pulleys.scad>
|
||||
include <../utils/core/core.scad>
|
||||
use <../vitamins/pulley.scad>
|
||||
|
||||
printed_pulley_GT2_profile = [[0.747183,-0.5],[0.747183,0],[0.647876,0.037218],[0.598311,0.130528],[0.578556,0.238423],[0.547158,0.343077],[0.504649,0.443762],[0.451556,0.53975],[0.358229,0.636924],[0.2484,0.707276],[0.127259,0.750044],[0,0.76447],[-0.127259,0.750044],[-0.2484,0.707276],[-0.358229,0.636924],[-0.451556,0.53975],[-0.504797,0.443762],[-0.547291,0.343077],[-0.578605,0.238423],[-0.598311,0.130528],[-0.648009,0.037218],[-0.747183,0],[-0.747183,-0.5]];
|
||||
|
||||
|
11
readme.md
@@ -2543,7 +2543,7 @@ PCBs and perfboard with optional components. The shape can be a rectangle with o
|
||||
| 1 | `pcb(ESP32_DOIT_V1)` | ESP32 DOIT DEV KIT V1 |
|
||||
| 1 | `pcb(EnviroPlus)` | Enviro+ |
|
||||
| 1 | `pcb(ExtruderPCB)` | Extruder connection PCB - not shown |
|
||||
| 1 | `pcb(KY_040)` | KY_-040 rotart encoder breakout |
|
||||
| 1 | `pcb(KY_040)` | KY-040 rotart encoder breakout |
|
||||
| 1 | `pcb(Keyes5p1)` | Keyes5.1 Arduino Uno expansion board - not shown |
|
||||
| 1 | `pcb(LIPO_fuel_gauge)` | LIPO fuel gauge |
|
||||
| 1 | `pcb(MP1584EN)` | MP1584EN 3A buck converter |
|
||||
@@ -2799,6 +2799,7 @@ Potentiometers and rotary encoders
|
||||
| `pot_face(type)` | Faceplate rib width, plate depth and plate height |
|
||||
| `pot_gangs(type)` | Number of gangs for mult-gang pot |
|
||||
| `pot_neck(type)` | Diameter and length of the shaft neck |
|
||||
| `pot_nut(type)` | Across flat diameter and thickness of the nut |
|
||||
| `pot_shaft(type)` | Diameter, flat diameter, length and flat/slot length and colour. If flat diameter is less than the radius then it is a slot width |
|
||||
| `pot_spigot(type)` | Spigot width, length and height above the boss |
|
||||
| `pot_spigot_x(type)` | Spigot offset from the shaft centre |
|
||||
@@ -2806,16 +2807,18 @@ Potentiometers and rotary encoders
|
||||
| `pot_thread_h(type)` | Height of threaded part |
|
||||
| `pot_thread_p(type)` | Thread pritch |
|
||||
| `pot_wafer(type)` | Width, diameter and thickness of the track wafer plus true if curved |
|
||||
| `pot_washer(type)` | Outside diameter and thickness of the washer |
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `pot_size(type)` | Get pot body dimensions |
|
||||
| `pot_z(type)` | Ideal distance behind panel surface to get the nut on comfortably |
|
||||
| `pot_z(type, washer = true)` | Ideal distance behind panel surface to get the nut and washer on comfortably |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| `pot_nut(type, washer = true)` | Draw the nut for a potentiometer and possibly a washer |
|
||||
| `potentiometer(type, thickness = 3, shaft_length = undef)` | Draw a potentiometer with nut spaced by specified thickness |
|
||||
|
||||

|
||||
@@ -4410,7 +4413,7 @@ Normally the side sheets are the same type but they can be overridden individual
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| `box(screw, wall, sheets, top_sheet, base_sheet, size, feet = false, shelf_screw = M3_dome_screw)` | Construct a property list for a box. |
|
||||
| `box(screw, wall, sheets, top_sheet, base_sheet, size, feet = false, shelf_screw = undef)` | Construct a property list for a box. |
|
||||
| `box_bezel_height(type, bottom)` | Bezel height for top or bottom |
|
||||
| `box_corner_gap(type)` | Gap between box_sheets at the corners to connect inside and outside profiles |
|
||||
| `box_inset(type)` | How much the bezel intrudes on the specified width and length, away from the corners |
|
||||
@@ -5189,7 +5192,7 @@ inserts don't grip well in rubber.
|
||||
|:--- |:--- |
|
||||
| `fastened_insert_foot_assembly(t = 3, type = insert_foot)` | Assembly with fasteners in place for specified sheet thickness |
|
||||
| `foot(type = foot)` | Generate STL |
|
||||
| `foot_assembly(t = 0, type = foot, flip = false)` | Assembly with fasteners in place for specified sheet thickness |
|
||||
| `foot_assembly(t = 0, type = foot, flip = false, no_washer = false)` | Assembly with fasteners in place for specified sheet thickness |
|
||||
| `insert_foot(type = insert_foot)` | Generate STL for foot with insert |
|
||||
| `insert_foot_assembly(type = insert_foot)` | Printed part with insert in place |
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
// 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 <../utils/core/core.scad>
|
||||
use <../utils/layout.scad>
|
||||
|
||||
include <../vitamins/7_segments.scad>
|
||||
|
@@ -16,7 +16,7 @@
|
||||
// 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 <../utils/core/core.scad>
|
||||
use <../vitamins/dip.scad>
|
||||
|
||||
dips = [[6, "OPTO"], [8, "NE555"], [14, "74HC00"], [16, "ULN2003"], [18, "ULN2803"], [20, "74HC245"], [28, "ATMEGA328"]];
|
||||
|
@@ -16,7 +16,7 @@
|
||||
// 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 <../utils/core/core.scad>
|
||||
include <../vitamins/ldrs.scad>
|
||||
|
||||
use <../utils/layout.scad>
|
||||
|
@@ -16,7 +16,7 @@
|
||||
// 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 <../utils/core/core.scad>
|
||||
include <../vitamins/ssrs.scad>
|
||||
|
||||
use <../utils/layout.scad>
|
||||
|
@@ -16,7 +16,7 @@
|
||||
// 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 <../utils/core/core.scad>
|
||||
use <../utils/layout.scad>
|
||||
|
||||
include <../vitamins/ball_bearings.scad>
|
||||
|
@@ -16,7 +16,7 @@
|
||||
// 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 <../utils/core/core.scad>
|
||||
use <../utils/layout.scad>
|
||||
|
||||
use <../printed/camera_housing.scad>
|
||||
|
@@ -19,7 +19,6 @@
|
||||
|
||||
include <../core.scad>
|
||||
include <../vitamins/pulleys.scad>
|
||||
include <../vitamins/screws.scad>
|
||||
include <../vitamins/stepper_motors.scad>
|
||||
include <../vitamins/washers.scad>
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
// 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 <../utils/core/core.scad>
|
||||
use <../vitamins/microview.scad>
|
||||
|
||||
microview(!$preview);
|
||||
|
Before Width: | Height: | Size: 113 KiB After Width: | Height: | Size: 115 KiB |
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 116 KiB |
@@ -23,9 +23,13 @@ include <../vitamins/potentiometers.scad>
|
||||
|
||||
module potentiometers()
|
||||
layout([for(p = potentiometers) pot_size(p).x])
|
||||
hflip()
|
||||
hflip() {
|
||||
potentiometer(potentiometers[$i], shaft_length = 30);
|
||||
|
||||
translate_z(-3)
|
||||
pot_nut(potentiometers[$i]);
|
||||
}
|
||||
|
||||
if($preview)
|
||||
let($show_threads = true)
|
||||
potentiometers();
|
||||
|
@@ -16,7 +16,7 @@
|
||||
// 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 <../utils/core/core.scad>
|
||||
use <../printed/press_fit.scad>
|
||||
|
||||
module press_fits()
|
||||
|
@@ -29,7 +29,7 @@
|
||||
//! 4. The drive pulleys may be offset in the X and Y directions. If this is done, extra idler pulleys are added. This
|
||||
//! allows flexible positioning of the motors.
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../utils/core/core.scad>
|
||||
include <../vitamins/belts.scad>
|
||||
include <../vitamins/pulleys.scad>
|
||||
|
||||
|
@@ -54,9 +54,9 @@ module resistor(type) { //! Draw specified type of resitor
|
||||
for(side= [-1,1])
|
||||
translate([side * dia / 6, 0, length / 2])
|
||||
rotate([0, splay_angle * side, 0])
|
||||
cylinder(r = resistor_wire_diameter(type) / 2, h = resistor_wire_length(type), center = false);
|
||||
cylinder(r = resistor_wire_diameter(type) / 2, h = resistor_wire_length(type), center = false, $fn = 16);
|
||||
else
|
||||
cylinder(r = resistor_wire_diameter(type) / 2, h = length + 2 * resistor_wire_length(type), center = true);
|
||||
cylinder(r = resistor_wire_diameter(type) / 2, h = length + 2 * resistor_wire_length(type), center = true, $fn = 16);
|
||||
//
|
||||
// Sleeving
|
||||
//
|
||||
@@ -66,7 +66,7 @@ module resistor(type) { //! Draw specified type of resitor
|
||||
for(side= [-1, 1])
|
||||
translate([side * resistor_diameter(type) / 6, 0, length / 2]) {
|
||||
rotate([0, splay_angle * side, 0])
|
||||
cylinder(r = resistor_wire_diameter(type) / 2 + 0.1, h = resistor_wire_length(type) - 5, center = false); }
|
||||
cylinder(r = resistor_wire_diameter(type) / 2 + 0.1, h = resistor_wire_length(type) - 5, center = false, $fn = 16); }
|
||||
//
|
||||
// Body
|
||||
//
|
||||
|
@@ -27,7 +27,7 @@ RIE1212UB5C5R6 = [ "RIE1212UB5C5R6", "Resistor UB5C 5R6F 5R6 3W vitreous enamel"
|
||||
//
|
||||
Honewell = [ "Honewell", "Thermistor Honeywell 135-104LAC-J01 100K 1%", 4.75, 1.8, 0.5, 28.6, 2, "red", false];
|
||||
Epcos = [ "Epcos", "Thermistor Epcos B57560G104F 100K 1%", 4.6, 2.5, 0.3, 67, 2.5, [0.8, 0.8, 0.8, 0.25], true, false];
|
||||
EpcosBlue = [ "EpcosBlue", "Thermistor Epcos B57861S104F40 100K 1%", 6.5, 2.41,0.25, 43.5,2.5, "black", true, true];
|
||||
EpcosBlue = [ "EpcosBlue", "Thermistor Epcos B57861S104F40 100K 1%", 4.5, 2.41,0.25, 43.5,2.5, "black", true, true];
|
||||
|
||||
resistors = [Honewell, Epcos, EpcosBlue, RWM04106R80J, RIE1212UB5C5R6];
|
||||
//
|
||||
|
@@ -68,7 +68,7 @@ module fuseholder(thickness) { //! Fuseholder with nut in place for specified pa
|
||||
colour = grey(40);
|
||||
vflip()
|
||||
translate_z(thickness)
|
||||
explode(height) {
|
||||
explode(height, explode_children = true) {
|
||||
color(colour) {
|
||||
tube(or = nut_d / 2, ir = thread_d / 2, h = nut_flange_t, center = false);
|
||||
|
||||
@@ -79,7 +79,7 @@ module fuseholder(thickness) { //! Fuseholder with nut in place for specified pa
|
||||
circle(d = thread_d);
|
||||
}
|
||||
}
|
||||
if(show_threads)
|
||||
if(show_threads && exploded())
|
||||
female_metric_thread(thread_d, thread_p, nut_t, false, colour = colour);
|
||||
}
|
||||
//
|
||||
|
@@ -20,7 +20,7 @@
|
||||
//
|
||||
//! IEC mains inlets and outlet.
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../utils/core/core.scad>
|
||||
use <screw.scad>
|
||||
use <nut.scad>
|
||||
use <washer.scad>
|
||||
|
@@ -77,12 +77,12 @@ module jack_4mm(colour, thickness, display_colour = false) { //! Draw a 4mm jack
|
||||
spade(spade4p8l, spade);
|
||||
}
|
||||
translate_z(-thickness)
|
||||
explode(-length)
|
||||
explode(-length, explode_children = true)
|
||||
vflip() {
|
||||
color(silver)
|
||||
tube(ir = thread_d / 2, or = nut_d / 2, h = nut_t, center = false);
|
||||
|
||||
if(show_threads)
|
||||
if(show_threads && exploded())
|
||||
female_metric_thread(thread_d, thread_p, nut_t, false, colour = silver);
|
||||
}
|
||||
}
|
||||
|
@@ -20,7 +20,9 @@
|
||||
//
|
||||
//! Random screw down modules. Currently just DROK buck converters.
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../utils/core/core.scad>
|
||||
use <screw.scad>
|
||||
use <nut.scad>
|
||||
|
||||
function mod_part(type) = type[1]; //! Description
|
||||
function mod_length(type) = type[2]; //! Body length
|
||||
|
@@ -868,7 +868,7 @@ ArduinoNano = let(l = 43.18, w = 17.78, pitch = inch(0.6), pins = 15, poffset =
|
||||
[(l - inch(pins - 1) / 10) / 2 + poffset, (w - pitch) / 2, pins, 2, silver, 2.54, pitch], // 15x2 grid of holes
|
||||
];
|
||||
|
||||
KY_040 = ["KY_040", "KY_-040 rotart encoder breakout",
|
||||
KY_040 = ["KY_040", "KY-040 rotart encoder breakout",
|
||||
26.3, 19.5, 1.6, 0, 3, 0, grey(20), false,
|
||||
[
|
||||
[3.23 + 1.5, 1.3 + 1.5],
|
||||
|
@@ -40,12 +40,52 @@ function pot_spigot(type) = type[9]; //! Spigot width, length and height abov
|
||||
function pot_spigot_x(type) = type[10]; //! Spigot offset from the shaft centre
|
||||
function pot_shaft(type) = type[11]; //! Diameter, flat diameter, length and flat/slot length and colour. If flat diameter is less than the radius then it is a slot width
|
||||
function pot_neck(type) = type[12]; //! Diameter and length of the shaft neck
|
||||
function pot_nut(type) = type[13]; //! Across flat diameter and thickness of the nut
|
||||
function pot_washer(type) = type[14]; //! Outside diameter and thickness of the washer
|
||||
|
||||
function pot_size(type) = let(d = pot_body(type)) len(d) > 3 ? [d.x , d.y, d.z] : [d.x, d.x, d.y]; //! Get pot body dimensions
|
||||
|
||||
function pot_z(type) = pot_thread_h(type) - pot_nut_t - pot_proud; //! Ideal distance behind panel surface to get the nut on comfortably
|
||||
function pot_z(type, washer = true) = pot_thread_h(type) - pot_nut(type)[1] - pot_proud - (washer ? pot_washer(type)[1] : 0); //! Ideal distance behind panel surface to get the nut and washer on comfortably
|
||||
function pot_spigot_r(type) = let(sp = pot_spigot(type)) sp.x > 2 * spigot_r ? spigot_r : 0;
|
||||
|
||||
module pot_nut(type, washer = true) { //! Draw the nut for a potentiometer and possibly a washer
|
||||
nut = pot_nut(type);
|
||||
washer = washer ? pot_washer(type) : false;
|
||||
nut_z = washer ? washer[1] : 0;
|
||||
thread_d = pot_thread_d(type);
|
||||
vflip() explode(23, explode_children = true) {
|
||||
if(washer)
|
||||
color(washer[2])
|
||||
linear_extrude(washer[1])
|
||||
difference() {
|
||||
circle(d = washer.x);
|
||||
|
||||
circle(d = thread_d);
|
||||
|
||||
serations = washer[3];
|
||||
if(serations)
|
||||
for(i = [1 : serations])
|
||||
rotate(i * 360 / serations)
|
||||
translate([thread_d / 2, 0])
|
||||
square([(washer.x - thread_d) / 2, PI * thread_d / (2 * serations)], center = true);
|
||||
}
|
||||
|
||||
if(nut)
|
||||
color(nut[2])
|
||||
translate_z(nut_z + exploded() * 10) {
|
||||
linear_extrude(nut[1])
|
||||
difference() {
|
||||
circle(d = nut.x / cos(30), $fn = 6);
|
||||
|
||||
circle(d = thread_d);
|
||||
}
|
||||
|
||||
if(show_threads && exploded())
|
||||
female_metric_thread(thread_d, pot_thread_p(type), nut[1], center = false, colour = nut[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module potentiometer(type, thickness = 3, shaft_length = undef) {//! Draw a potentiometer with nut spaced by specified thickness
|
||||
bh = pot_boss_h(type);
|
||||
s = pot_size(type);
|
||||
|
@@ -17,11 +17,11 @@
|
||||
// If not, see <https://www.gnu.org/licenses/>.
|
||||
//
|
||||
//! Potentiometers and rotary encoders
|
||||
// body h r face wafer gangs thread d pitch h boss h spigot w, l, h offset shaft d flat h flat h colour neck
|
||||
imperial_pot_x2 = [[24, 22.5, 1.5], [5.7, 15.33, 0.8], [20, 28, 1.6, true], 2, inch(3/8), inch(1/32), 6.35, 13.6, 2.4, [1.12, 3.03, 2], 11, [6.27, 5.5, 44.3, 44.3, silver], [0, 0]];
|
||||
imperial_pot = [[24, 12, 1.5], [5.7, 15.33, 0.8], [20, 28, 1.6, true], 1, inch(3/8), inch(1/32), 6.35, 13.6, 2.4, [1.12, 3.03, 2], 11, [6.27, 5.5, 44.3, 44.3, grey(95)], [0, 0]];
|
||||
metric_pot = [[23, 11, 1.0], [0, 15.33, 0.8], [18, 27, 1.2, false], 1, 10, 0.75, 7.32, 13.9, 2.5, [1.12, 2.88, 1.26], 11, [6.27, 5.5, 43.8, 43.5, grey(50)], [0, 0]];
|
||||
KY_040_encoder = [[12, 12, 6.5, 1.0], false, false, 1, 7, 0.75, 7, 0, 0, [0.4, 2, 0.8],5.8, [6, 4.5, 13, 10, grey(60)], [4, 0.5]];
|
||||
// body h r face wafer gangs thread d pitch h boss h spigot w, l, h offset shaft d flat d shaft h flat h colour neck nut washer
|
||||
imperial_pot_x2 = [[24, 22.5, 1.5], [5.7, 15.33, 0.8], [20, 28, 1.6, true], 2, inch(3/8), inch(1/32), 6.35, 13.6, 2.4, [1.12, 3.03, 2], 11, [6.27, 5.5, 44.3, 44.3, silver], [0, 0], [13.3, 2.4, brass], [17.4, 0.8, grey(20), 9]];
|
||||
imperial_pot = [[24, 12, 1.5], [5.7, 15.33, 0.8], [20, 28, 1.6, true], 1, inch(3/8), inch(1/32), 6.35, 13.6, 2.4, [1.12, 3.03, 2], 11, [6.27, 5.5, 44.3, 44.3, grey(95)], [0, 0], [13.3, 2.4, brass], [17.4, 0.8, grey(20), 9]];
|
||||
metric_pot = [[23, 11, 1.0], [0, 15.33, 0.8], [18, 27, 1.2, false], 1, 10, 0.75, 7.32, 13.9, 2.5, [1.12, 2.88, 1.26], 11, [6.27, 5.5, 43.8, 43.5, grey(50)], [0, 0], [12.8, 2, silver], [17.7, 0.8, grey(20), 10]];
|
||||
KY_040_encoder = [[12, 12, 6.5, 1.0], false, false, 1, 7, 0.75, 7, 0, 0, [0.4, 2, 0.8],5.8, [6, 4.5, 13, 10, grey(60)], [4, 0.5],[9.8, 2.2, silver], [11.5, 0.4, silver]];
|
||||
BTT_encoder = [[12, 11, 6, 0.5], false, false, 1, 6, 0.8, 4.5, 0, 0, false, 0, [5, 0.75, 9.5, 9, silver], [3, 0.5]];
|
||||
|
||||
potentiometers = [BTT_encoder, KY_040_encoder, metric_pot, imperial_pot, imperial_pot_x2];
|
||||
|
@@ -19,7 +19,7 @@
|
||||
//! BLDC servos for CNC machines
|
||||
//
|
||||
|
||||
include <../core.scad>
|
||||
include <../utils/core/core.scad>
|
||||
include <../utils/tube.scad>
|
||||
include <../utils/round.scad>
|
||||
include <../utils/quadrant.scad>
|
||||
|
@@ -20,9 +20,8 @@
|
||||
//! SK shaft support brackets
|
||||
//
|
||||
include <../core.scad>
|
||||
include <../utils/fillet.scad>
|
||||
use <../utils/fillet.scad>
|
||||
|
||||
use <washer.scad>
|
||||
|
||||
sk_bracket_colour = grey(70);
|
||||
|
||||
|
@@ -27,7 +27,6 @@ include <../vitamins/pin_headers.scad>
|
||||
use <../utils/tube.scad>
|
||||
use <../utils/thread.scad>
|
||||
use <../utils/round.scad>
|
||||
use <washer.scad>
|
||||
use <rod.scad>
|
||||
|
||||
function NEMA_width(type) = type[1]; //! Width of the square face
|
||||
|
@@ -82,7 +82,7 @@ module veroboard(type) { //! Draw specified veroboard with missing tracks and tr
|
||||
width = strips * pitch;
|
||||
hole_d = 1;
|
||||
tw = vero_track_width(type);
|
||||
colour = vero_fr4(type) ? "green" : "goldenrod";
|
||||
colour = vero_fr4(type) ? "#BEB564" : "goldenrod";
|
||||
tc = vero_fr4(type) ? "silver" : copper;
|
||||
no_track = vero_no_track(type);
|
||||
|
||||
@@ -124,9 +124,9 @@ module veroboard(type) { //! Draw specified veroboard with missing tracks and tr
|
||||
for(p = vero_breaks(type))
|
||||
vero_grid_pos(type, p.x, p.y)
|
||||
if(ceil(p.x) == p.x)
|
||||
circle(d = pitch);
|
||||
circle(d = pitch * 1.1);
|
||||
else
|
||||
square([pitch * 0.2, pitch], center = true);
|
||||
square([pitch * 0.3, pitch], center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|