Added panel_meters for panel mount digital meters.
Before Width: | Height: | Size: 230 KiB After Width: | Height: | Size: 232 KiB |
Before Width: | Height: | Size: 242 KiB After Width: | Height: | Size: 242 KiB |
Before Width: | Height: | Size: 199 KiB After Width: | Height: | Size: 202 KiB |
1
lib.scad
@ -44,6 +44,7 @@ include <vitamins/led_meter.scad>
|
||||
include <vitamins/light_strips.scad>
|
||||
include <vitamins/mains_sockets.scad>
|
||||
include <vitamins/modules.scad>
|
||||
include <vitamins/panel_meters.scad>
|
||||
include <vitamins/pillars.scad>
|
||||
include <vitamins/pin_headers.scad>
|
||||
include <vitamins/pulleys.scad>
|
||||
|
BIN
libtest.png
Before Width: | Height: | Size: 788 KiB After Width: | Height: | Size: 794 KiB |
10
libtest.scad
@ -54,6 +54,7 @@ use <tests/modules.scad>
|
||||
use <tests/nuts.scad>
|
||||
use <tests/o_ring.scad>
|
||||
use <tests/opengrab.scad>
|
||||
use <tests/panel_meters.scad>
|
||||
use <tests/PCBs.scad>
|
||||
use <tests/pillars.scad>
|
||||
use <tests/PSUs.scad>
|
||||
@ -321,7 +322,8 @@ ssrs_y = modules_y + 80;
|
||||
blowers_y = ssrs_y + 60;
|
||||
batteries_y = blowers_y + 100;
|
||||
steppers_y = batteries_y + 70;
|
||||
extrusions_y = steppers_y + 100;
|
||||
panel_meters_y = steppers_y + 70;
|
||||
extrusions_y = panel_meters_y + 80;
|
||||
|
||||
translate([x3, veroboard_y])
|
||||
veroboard_test();
|
||||
@ -362,9 +364,11 @@ translate([x3, batteries_y])
|
||||
translate([x2, steppers_y]) // interloper
|
||||
stepper_motors();
|
||||
|
||||
translate([x2, extrusions_y]) {
|
||||
translate([x2, panel_meters_y])
|
||||
panel_meters();
|
||||
|
||||
translate([x2, extrusions_y])
|
||||
extrusions();
|
||||
}
|
||||
|
||||
translate([x3, transformers_y])
|
||||
transformers();
|
||||
|
62
readme.md
@ -36,10 +36,10 @@ See [usage](docs/usage.md) for requirements, installation instructions and a usa
|
||||
<tr><td> <a href = "#Fans">Fans</a> </td><td> <a href = "#PCB">PCB</a> </td><td> <a href = "#Swiss_clips">Swiss_clips</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 = "#Fuseholder">Fuseholder</a> </td><td> <a href = "#PCBs">PCBs</a> </td><td> <a href = "#Toggles">Toggles</a> </td><td> <a href = "#SSR_shroud">SSR_shroud</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Geared_steppers">Geared_steppers</a> </td><td> <a href = "#PSUs">PSUs</a> </td><td> <a href = "#Transformers">Transformers</a> </td><td> <a href = "#Screw_knob">Screw_knob</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Pillars">Pillars</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td> <a href = "#Socket_box">Socket_box</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hot_ends">Hot_ends</a> </td><td> <a href = "#Pin_headers">Pin_headers</a> </td><td> <a href = "#Variacs">Variacs</a> </td><td> <a href = "#Strap_handle">Strap_handle</a> </td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Hygrometer">Hygrometer</a> </td><td> <a href = "#Pulleys">Pulleys</a> </td><td> <a href = "#Veroboard">Veroboard</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#IECs">IECs</a> </td><td></td><td> <a href = "#Washers">Washers</a> </td><td></td><td></td><td></td></tr>
|
||||
<tr><td> <a href = "#Green_terminals">Green_terminals</a> </td><td> <a href = "#Panel_meters">Panel_meters</a> </td><td> <a href = "#Tubings">Tubings</a> </td><td> <a href = "#Socket_box">Socket_box</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 = "#Strap_handle">Strap_handle</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></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></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></td><td></td><td> <a href = "#Zipties">Zipties</a> </td><td></td><td></td><td></td></tr>
|
||||
</table>
|
||||
@ -1947,6 +1947,60 @@ A permanent magnet that can be magnatized and de-magnatized electronically.
|
||||
| 1 | ```opengrab()``` | OpenGrab V3 electro permanent magnet |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
<a name="Panel_meters"></a>
|
||||
## Panel_meters
|
||||
Panel mounted digital meter modules
|
||||
|
||||
Notes on the DSN_VC288:
|
||||
|
||||
* The tabs aren't modelled because they can be fully retracted if the PCB is removed.
|
||||
* The current connector isn't moddelled as it is awkwardly tall. I remove it and solder wires instead.
|
||||
|
||||
|
||||
[vitamins/panel_meters.scad](vitamins/panel_meters.scad) Object definitions.
|
||||
|
||||
[vitamins/panel_meter.scad](vitamins/panel_meter.scad) Implementation.
|
||||
|
||||
[tests/panel_meters.scad](tests/panel_meters.scad) Code for this example.
|
||||
|
||||
### Properties
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```pmeter_aperture(type)``` | Aperture length, width and bevel |
|
||||
| ```pmeter_bevel(type)``` | Bezel bevel inset and start height |
|
||||
| ```pmeter_bezel(type)``` | Bezel size |
|
||||
| ```pmeter_bezel_r(type)``` | Bezel radius |
|
||||
| ```pmeter_pcb(type)``` | Optional PCB for open types |
|
||||
| ```pmeter_pcb_z(type)``` | Distance of PCB from the back |
|
||||
| ```pmeter_size(type)``` | Body size including bezel height |
|
||||
| ```pmeter_tab(type)``` | Tab size |
|
||||
| ```pmeter_tab_z(type)``` | Tab vertical position |
|
||||
| ```pmeter_thickness(type)``` | Wall thickness if not closed |
|
||||
|
||||
### Functions
|
||||
| Function | Description |
|
||||
|:--- |:--- |
|
||||
| ```pmeter_depth(type)``` | Depth below bezel |
|
||||
|
||||
### Modules
|
||||
| Module | Description |
|
||||
|:--- |:--- |
|
||||
| ```panel_meter(type)``` | Draw panel mounted LCD meter module |
|
||||
| ```panel_meter_cutout(type, h = 0)``` | Make panel cutout |
|
||||
|
||||
![panel_meters](tests/png/panel_meters.png)
|
||||
|
||||
### Vitamins
|
||||
| Qty | Module call | BOM entry |
|
||||
| ---:|:--- |:---|
|
||||
| 1 | ```panel_meter(DSN_VC288)``` | DSN-VC288 DC 100V 10A Voltmeter ammeter |
|
||||
| 1 | ```panel_meter(PZEM001)``` | Peacefair PZEM-001 AC digital multi-function meter |
|
||||
| 1 | ```panel_meter(PZEM021)``` | Peacefair PZEM-021 AC digital multi-function meter |
|
||||
|
||||
|
||||
<a href="#top">Top</a>
|
||||
|
||||
---
|
||||
|
29
tests/panel_meters.scad
Normal file
@ -0,0 +1,29 @@
|
||||
//
|
||||
// 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>
|
||||
use <../utils/layout.scad>
|
||||
|
||||
include <../vitamins/panel_meters.scad>
|
||||
|
||||
module panel_meters()
|
||||
layout([for(p = panel_meters) pmeter_size(p).x], 20)
|
||||
panel_meter(panel_meters[$i]);
|
||||
|
||||
if($preview)
|
||||
panel_meters();
|
BIN
tests/png/panel_meters.png
Normal file
After Width: | Height: | Size: 55 KiB |
@ -128,6 +128,7 @@ module meter_bezel(type) { //! Generate the STL for the meter bezel
|
||||
|
||||
square([l + 2 * clearance, w + 2 * clearance], center = true);
|
||||
}
|
||||
|
||||
translate([0, -meter_pos(type)])
|
||||
meter_hole_positions(type)
|
||||
cylinder(r = meter_hole_radius(type), h = h + meter_pcb_size(type).z * 2);
|
||||
|
110
vitamins/panel_meter.scad
Normal file
@ -0,0 +1,110 @@
|
||||
//
|
||||
// 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/>.
|
||||
//
|
||||
|
||||
//
|
||||
//! Panel mounted digital meter modules
|
||||
//!
|
||||
//! Notes on the DSN_VC288:
|
||||
//!
|
||||
//! * The tabs aren't modelled because they can be fully retracted if the PCB is removed.
|
||||
//! * The current connector isn't moddelled as it is awkwardly tall. I remove it and solder wires instead.
|
||||
//
|
||||
include <../utils/core/core.scad>
|
||||
|
||||
use <../utils/dogbones.scad>
|
||||
use <pcb.scad>
|
||||
|
||||
function pmeter_size(type) = type[2]; //! Body size including bezel height
|
||||
function pmeter_bezel(type) = type[3]; //! Bezel size
|
||||
function pmeter_bezel_r(type) = type[4]; //! Bezel radius
|
||||
function pmeter_bevel(type) = type[5]; //! Bezel bevel inset and start height
|
||||
function pmeter_aperture(type) = type[6]; //! Aperture length, width and bevel
|
||||
function pmeter_tab(type) = type[7]; //! Tab size
|
||||
function pmeter_tab_z(type) = type[8]; //! Tab vertical position
|
||||
function pmeter_thickness(type) = type[9]; //! Wall thickness if not closed
|
||||
function pmeter_pcb(type) = type[10]; //! Optional PCB for open types
|
||||
function pmeter_pcb_z(type) = type[11]; //! Distance of PCB from the back
|
||||
|
||||
function pmeter_depth(type) = pmeter_size(type).z - pmeter_bezel(type).z; //! Depth below bezel
|
||||
|
||||
module panel_meter(type) { //! Draw panel mounted LCD meter module
|
||||
vitamin(str("panel_meter(", type[0], "): ", type[1]));
|
||||
size = pmeter_size(type);
|
||||
bezel = pmeter_bezel(type);
|
||||
bevel = pmeter_bevel(type);
|
||||
t = pmeter_thickness(type);
|
||||
r = pmeter_bezel_r(type);
|
||||
h = size.z - bezel.z;
|
||||
app = pmeter_aperture(type);
|
||||
tab = pmeter_tab(type);
|
||||
tab_z = pmeter_tab_z(type);
|
||||
pcb = pmeter_pcb(type);
|
||||
|
||||
color("#94A7AB")
|
||||
cube([app.x, app.y, 3 * eps], center = true);
|
||||
|
||||
color(grey30) union() {
|
||||
difference() {
|
||||
hull() {
|
||||
rounded_rectangle([bezel.x - 2 * bevel.x, bezel.y - 2 * bevel.x, bezel.z], r - bevel.x, center = false);
|
||||
rounded_rectangle([bezel.x, bezel.y, bevel[1]],r, center = false);
|
||||
}
|
||||
hull() {
|
||||
translate_z(bezel.z + eps) {
|
||||
cube([app.x + app.z, app.y + app.z, eps], center = true);
|
||||
|
||||
cube([app.x, app.y, bezel.z * 2], center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
translate_z(-h)
|
||||
linear_extrude(h)
|
||||
difference() {
|
||||
square([size.x, size.y], center = true);
|
||||
|
||||
if(t)
|
||||
square([size.x - 2 * t, size.y - 2 * t], center = true);
|
||||
}
|
||||
|
||||
if(tab)
|
||||
for(end = [-1, 1])
|
||||
translate([end * (size.x / 2 + tab.x / 2), 0, -size.z + tab_z])
|
||||
rotate([0, end * 10, 0])
|
||||
translate_z(tab.z / 2)
|
||||
cube([tab.x, tab.y, tab.z], center = true);
|
||||
|
||||
}
|
||||
if(pcb)
|
||||
vflip()
|
||||
translate_z(h - pcb_thickness(pcb) - pmeter_pcb_z(type))
|
||||
pcb(pcb);
|
||||
}
|
||||
|
||||
module panel_meter_cutout(type, h = 0) { //! Make panel cutout
|
||||
size = pmeter_size(type);
|
||||
tab = pmeter_tab(type);
|
||||
extrude_if(h)
|
||||
offset(0.2) {
|
||||
dogbone_square([size.x, size.y]);
|
||||
|
||||
if(tab)
|
||||
rounded_square([size.x + 2 * tab.x, tab.y + 2 * cnc_bit_r], r = cnc_bit_r, center = true);
|
||||
}
|
||||
}
|
38
vitamins/panel_meters.scad
Normal file
@ -0,0 +1,38 @@
|
||||
//
|
||||
// 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/>.
|
||||
//
|
||||
|
||||
//
|
||||
//! Panel mounted digital meter modules
|
||||
//
|
||||
|
||||
PZEM021 = ["PZEM021", "Peacefair PZEM-021 AC digital multi-function meter", [84.6, 44.7, 24.4], [89.6, 49.6, 2.3], 1.5, [1, 1], [51, 30, 5], [1.3, 10, 6], 15.5, 0];
|
||||
PZEM001 = ["PZEM001", "Peacefair PZEM-001 AC digital multi-function meter", [62 , 52.5, 24.4], [67, 57.5, 2.0], 1.5, [1, 1], [36, 36, 0], [1.2, 10, 6], 15.5, 0];
|
||||
|
||||
DSN_VC288PCB = ["", "", 41, 21, 1, 0, 0, 0, "green", false, [],
|
||||
[ [ 5, -3, 0, "jst_xh", 3],
|
||||
|
||||
],
|
||||
[]];
|
||||
|
||||
DSN_VC288 = ["DSN_VC288","DSN-VC288 DC 100V 10A Voltmeter ammeter", [45.3, 26, 17.4], [47.8, 28.8, 2.5], 0, [1, 1.8], [36, 18, 2.5], [], 0, 2,
|
||||
DSN_VC288PCB, 5];
|
||||
|
||||
panel_meters = [DSN_VC288, PZEM021, PZEM001];
|
||||
|
||||
use <panel_meter.scad>
|