Tweaks to the example.

This commit is contained in:
Chris Palmer 2019-06-10 15:50:05 +01:00
parent 197f5332bb
commit 7811fa380e
9 changed files with 95 additions and 61 deletions

View File

@ -35,10 +35,9 @@
} }
], ],
"vitamins": { "vitamins": {
": Wire green & yellow 30/0.25 length 150mm": 1, ": Wire green & yellow 30/0.25mm strands, length 150mm - not shown": 1,
": Wire blue 30/0.25 length 150mm": 1, ": Wire blue 30/0.25mm strands, length 150mm - not shown": 1,
": Wire brown 30/0.25 length 150mm": 1, ": Wire brown 30/0.25mm strands, length 150mm - not shown": 2,
": Wire brown 7/0.2 length 150mm": 1,
"tubing(HSHRNK32): Heatshrink sleeving ID 3.2mm x 15mm - not shown": 3, "tubing(HSHRNK32): Heatshrink sleeving ID 3.2mm x 15mm - not shown": 3,
"iec(IEC_inlet_atx): IEC inlet for ATX": 1, "iec(IEC_inlet_atx): IEC inlet for ATX": 1,
"screw(M3_cs_cap_screw, 12): Screw M3 cs cap x 12mm": 2, "screw(M3_cs_cap_screw, 12): Screw M3 cs cap x 12mm": 2,
@ -50,10 +49,10 @@
} }
], ],
"vitamins": { "vitamins": {
": Wire green & yellow 30/0.25 length 150mm": 1, ": Wire green & yellow 30/0.25mm strands, length 150mm - not shown": 1,
": Wire blue 30/0.25 length 150mm": 1, ": Wire blue 30/0.25mm strands, length 150mm - not shown": 1,
"tubing(HSHRNK32): Heatshrink sleeving ID 3.2mm x 15mm - not shown": 5, "tubing(HSHRNK32): Heatshrink sleeving ID 3.2mm x 15mm - not shown": 5,
": Ferrule for 1.5mm^2 wire": 3, ": Ferrule for 1.5mm^2 wire - not shown": 3,
"mains_socket(Contactum): Mains socket 13A": 1, "mains_socket(Contactum): Mains socket 13A": 1,
"screw(M3_cs_cap_screw, 20): Screw M3 cs cap x 20mm": 2, "screw(M3_cs_cap_screw, 20): Screw M3 cs cap x 20mm": 2,
"jack_4mm_shielded(\"blue\", 3, \"royalblue\"): 4mm shielded jack socket blue": 2, "jack_4mm_shielded(\"blue\", 3, \"royalblue\"): 4mm shielded jack socket blue": 2,

View File

@ -7,11 +7,10 @@ Vitamins:
a e a a e a
s e i i s e i i
e t n n e t n n
| | 3| | 3 Ferrule for 1.5mm^2 wire | | 3| | 3 Ferrule for 1.5mm^2 wire - not shown
| | 1| 1| 2 Wire blue 30/0.25 length 150mm | | 1| 1| 2 Wire blue 30/0.25mm strands, length 150mm - not shown
| | | 1| 1 Wire brown 30/0.25 length 150mm | | | 2| 2 Wire brown 30/0.25mm strands, length 150mm - not shown
| | | 1| 1 Wire brown 7/0.2 length 150mm | | 1| 1| 2 Wire green & yellow 30/0.25mm strands, length 150mm - not shown
| | 1| 1| 2 Wire green & yellow 30/0.25 length 150mm
| | | 1| 1 IEC inlet for ATX | | | 1| 1 IEC inlet for ATX
2| | | | 2 Heatfit insert M3 2| | | | 2 Heatfit insert M3
| | 2| | 2 4mm shielded jack socket blue | | 2| | 2 4mm shielded jack socket blue

View File

@ -1,8 +1,8 @@
main_assembly: main_assembly:
Vitamins: Vitamins:
3 Ferrule for 1.5mm^2 wire 3 Ferrule for 1.5mm^2 wire - not shown
1 Wire blue 30/0.25 length 150mm 1 Wire blue 30/0.25mm strands, length 150mm - not shown
1 Wire green & yellow 30/0.25 length 150mm 1 Wire green & yellow 30/0.25mm strands, length 150mm - not shown
2 4mm shielded jack socket blue 2 4mm shielded jack socket blue
1 4mm shielded jack socket brown 1 4mm shielded jack socket brown
2 4mm shielded jack socket green 2 4mm shielded jack socket green

View File

@ -1,9 +1,8 @@
mains_in_assembly: mains_in_assembly:
Vitamins: Vitamins:
1 Wire blue 30/0.25 length 150mm 1 Wire blue 30/0.25mm strands, length 150mm - not shown
1 Wire brown 30/0.25 length 150mm 2 Wire brown 30/0.25mm strands, length 150mm - not shown
1 Wire brown 7/0.2 length 150mm 1 Wire green & yellow 30/0.25mm strands, length 150mm - not shown
1 Wire green & yellow 30/0.25 length 150mm
1 IEC inlet for ATX 1 IEC inlet for ATX
2 Nut M3 nyloc 2 Nut M3 nyloc
2 Screw M3 cs cap x 12mm 2 Screw M3 cs cap x 12mm

View File

@ -1,6 +1,17 @@
# MainsBreakOutBox # MainsBreakOutBox
13A socket break out box with 4mm jacks to measure voltage and / or load current and earth leakage current. 13A socket break out box with 4mm jacks to measure voltage and / or load current and earth leakage current.
Intended as a simple example of NopSCADlib use. Don't build it unless you understand the safety implications of working with mains electricity. In the words of
the great [Paul Carlson](https://www.youtube.com/channel/UCU9SoQxJewrWb_3GxeteQPA), "if you are following along, you are doing so at your own risk".
In normal use the neutral jack sockets are linked with a short lead and so are the two earth jacks. Current can be safely measured using a clamp ammeter around the neutral link.
Voltage and current waveforms can be measured simultaneously with a [Mooshimeter](https://moosh.im/) CAT III multimeter connected to the bottom three jacks.
Earth leakage current can be measured by connecting an AC milliampere meter between the two earth jacks. The DUT must be mounted on an insulated substrate and must not be touched
while its earth is disconnected. Don't be tempted to float the earth of an oscilloscope this way, use a mains isolation transformer to power the DUT instead.
Earth leakage can be measured Canadian CSA style by disconnected the neutral link from the left socket and linking the central neutral to the live.
![Main Assembly](assemblies/main_assembled.png) ![Main Assembly](assemblies/main_assembled.png)
@ -17,7 +28,7 @@
|   .  |   .  |   .  |   2  |   2  |    4mm shielded jack socket blue | |   .  |   .  |   .  |   2  |   2  |    4mm shielded jack socket blue |
|   .  |   .  |   .  |   1  |   1  |    4mm shielded jack socket brown | |   .  |   .  |   .  |   1  |   1  |    4mm shielded jack socket brown |
|   .  |   .  |   .  |   2  |   2  |    4mm shielded jack socket green | |   .  |   .  |   .  |   2  |   2  |    4mm shielded jack socket green |
|   .  |   .  |   .  |   3  |   3  |    Ferrule for 1.5mm^2 wire | |   .  |   .  |   .  |   3  |   3  |    Ferrule for 1.5mm^2 wire - not shown |
|   2  |   .  |   .  |   .  |   2  |    Heatfit insert M3 | |   2  |   .  |   .  |   .  |   2  |    Heatfit insert M3 |
|   .  |   .  |   3  |   5  |   8  |    Heatshrink sleeving ID 3.2mm x 15mm - not shown | |   .  |   .  |   3  |   5  |   8  |    Heatshrink sleeving ID 3.2mm x 15mm - not shown |
|   .  |   .  |   1  |   .  |   1  |    IEC inlet for ATX | |   .  |   .  |   1  |   .  |   1  |    IEC inlet for ATX |
@ -27,10 +38,9 @@
|   .  |   .  |   .  |   2  |   2  |    Screw M3 cs cap x 20mm | |   .  |   .  |   .  |   2  |   2  |    Screw M3 cs cap x 20mm |
|   .  |   4  |   .  |   .  |   4  |    Screw M3 dome x 10mm | |   .  |   4  |   .  |   .  |   4  |    Screw M3 dome x 10mm |
|   .  |   8  |   2  |   .  |   10  |    Washer M3 x 7mm x 0.5mm | |   .  |   8  |   2  |   .  |   10  |    Washer M3 x 7mm x 0.5mm |
|   .  |   .  |   1  |   1  |   2  |    Wire blue 30/0.25 length 150mm | |   .  |   .  |   1  |   1  |   2  |    Wire blue 30/0.25mm strands, length 150mm - not shown |
|   .  |   .  |   1  |   .  |   1  |    Wire brown 30/0.25 length 150mm | |   .  |   .  |   2  |   .  |   2  |    Wire brown 30/0.25mm strands, length 150mm - not shown |
|   .  |   .  |   1  |   .  |   1  |    Wire brown 7/0.2 length 150mm | |   .  |   .  |   1  |   1  |   2  |    Wire green & yellow 30/0.25mm strands, length 150mm - not shown |
|   .  |   .  |   1  |   1  |   2  |    Wire green & yellow 30/0.25 length 150mm |
| | | | | | **3D Printed parts** | | | | | | | **3D Printed parts** |
|   .  |   4  |   .  |   .  |   4  |    foot.stl | |   .  |   4  |   .  |   .  |   4  |    foot.stl |
|   1  |   .  |   .  |   .  |   1  |    socket_box.stl | |   1  |   .  |   .  |   .  |   1  |    socket_box.stl |
@ -102,10 +112,9 @@
### Vitamins ### Vitamins
|Qty|Description| |Qty|Description|
|--:|:----------| |--:|:----------|
|1| Wire green & yellow 30/0.25 length 150mm| |1| Wire green & yellow 30/0.25mm strands, length 150mm - not shown|
|1| Wire blue 30/0.25 length 150mm| |1| Wire blue 30/0.25mm strands, length 150mm - not shown|
|1| Wire brown 30/0.25 length 150mm| |2| Wire brown 30/0.25mm strands, length 150mm - not shown|
|1| Wire brown 7/0.2 length 150mm|
|3| Heatshrink sleeving ID 3.2mm x 15mm - not shown| |3| Heatshrink sleeving ID 3.2mm x 15mm - not shown|
|1| IEC inlet for ATX| |1| IEC inlet for ATX|
|2| Screw M3 cs cap x 12mm| |2| Screw M3 cs cap x 12mm|
@ -124,11 +133,12 @@
### Assembly instructions ### Assembly instructions
![mains_in_assembly](assemblies/mains_in_assembly_tn.png) ![mains_in_assembly](assemblies/mains_in_assembly_tn.png)
1. Solder wires to the IEC terminals and cover the joints with heatshrink sleeving. 1. Solder wires to the IEC terminals: -
* Use wire rated for 13A, e.g. 1.5mm<sup>2</sup>, the easiest source is stripping 13A rated flex. * Use wire rated for 13A, e.g. 1.5mm<sup>2</sup>, the easiest source is stripping 13A rated flex.
* Attach one green & yellow to the earth, one blue to neutral and two brown to the live. The second brown one can be thinner because it is only for voltage measurement. * Attach one green & yellow to the earth, one blue to neutral and two brown to the live.
* The earth, neutral and thin live wires should be long enough to protrude through the appropriate 4mm jack holes far enough to be able to strip and solder them to the jacks. * The earth, neutral and one of the live wires should be long enough to protrude through the appropriate 4mm jack holes far enough to be able to strip and solder them to the jacks.
* The thick brown needs to be long enough to reach the socket. * The second brown needs to be long enough to reach the socket.
1. Cover the the joints with heatshrink sleeving and shrink it with a hot air gun.
1. Attach the IEC inlet using two 12mm M3 countersunk cap screws, washers and nyloc nuts on the back. 1. Attach the IEC inlet using two 12mm M3 countersunk cap screws, washers and nyloc nuts on the back.
![mains_in_assembled](assemblies/mains_in_assembled_tn.png) ![mains_in_assembled](assemblies/mains_in_assembled_tn.png)
@ -140,10 +150,10 @@
### Vitamins ### Vitamins
|Qty|Description| |Qty|Description|
|--:|:----------| |--:|:----------|
|1| Wire green & yellow 30/0.25 length 150mm| |1| Wire green & yellow 30/0.25mm strands, length 150mm - not shown|
|1| Wire blue 30/0.25 length 150mm| |1| Wire blue 30/0.25mm strands, length 150mm - not shown|
|5| Heatshrink sleeving ID 3.2mm x 15mm - not shown| |5| Heatshrink sleeving ID 3.2mm x 15mm - not shown|
|3| Ferrule for 1.5mm^2 wire| |3| Ferrule for 1.5mm^2 wire - not shown|
|1| Mains socket 13A| |1| Mains socket 13A|
|2| Screw M3 cs cap x 20mm| |2| Screw M3 cs cap x 20mm|
|2| 4mm shielded jack socket blue| |2| 4mm shielded jack socket blue|

View File

@ -1,11 +1,35 @@
// //
//! 13A socket break out box with 4mm jacks to measure voltage and / or load current and earth leakage current. // NopSCADlib Copyright Chris Palmer 2018
//
// GNU GPL v2
// nop.head@gmail.com // nop.head@gmail.com
// hydraraptor.blogspot.com // hydraraptor.blogspot.com
// //
// Top level model // 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/>.
//
//
//! 13A socket break out box with 4mm jacks to measure voltage and / or load current and earth leakage current.
//!
//! Intended as a simple example of NopSCADlib use. Don't build it unless you understand the safety implications of working with mains electricity. In the words of
//! the great [Paul Carlson](https://www.youtube.com/channel/UCU9SoQxJewrWb_3GxeteQPA), "if you are following along, you are doing so at your own risk".
//!
//! In normal use the neutral jack sockets are linked with a short lead and so are the two earth jacks. Current can be safely measured using a clamp ammeter around the neutral link.
//!
//! Voltage and current waveforms can be measured simultaneously with a [Mooshimeter](https://moosh.im/) CAT III multimeter connected to the bottom three jacks.
//!
//! Earth leakage current can be measured by connecting an AC milliampere meter between the two earth jacks. The DUT must be mounted on an insulated substrate and must not be touched
//! while its earth is disconnected. Don't be tempted to float the earth of an oscilloscope this way, use a mains isolation transformer to power the DUT instead.
//! Earth leakage can be measured Canadian CSA style by disconnected the neutral link from the left socket and linking the central neutral to the live.
// //
$extrusion_width = 0.5; $extrusion_width = 0.5;
$pp1_colour = "dimgrey"; $pp1_colour = "dimgrey";
@ -13,7 +37,6 @@ $pp2_colour = [0.9, 0.9, 0.9];
include <NopSCADlib/lib.scad> include <NopSCADlib/lib.scad>
use <NopSCADlib/foot.scad> use <NopSCADlib/foot.scad>
include <NopSCADlib/vitamins/mains_sockets.scad>
echo(extrusion_width = extrusion_width, layer_height = layer_height); echo(extrusion_width = extrusion_width, layer_height = layer_height);
wall = 2.5; wall = 2.5;
@ -160,24 +183,26 @@ assembly("feet") {
foot_assembly(base_thickness, foot); foot_assembly(base_thickness, foot);
} }
// //
//! 1. Solder wires to the IEC terminals and cover the joints with heatshrink sleeving. //! 1. Solder wires to the IEC terminals: -
//! * Use wire rated for 13A, e.g. 1.5mm<sup>2</sup>, the easiest source is stripping 13A rated flex. //! * Use wire rated for 13A, e.g. 1.5mm<sup>2</sup>, the easiest source is stripping 13A rated flex.
//! * Attach one green & yellow to the earth, one blue to neutral and two brown to the live. The second brown one can be thinner because it is only for voltage measurement. //! * Attach one green & yellow to the earth, one blue to neutral and two brown to the live.
//! * The earth, neutral and thin live wires should be long enough to protrude through the appropriate 4mm jack holes far enough to be able to strip and solder them to the jacks. //! * The earth, neutral and one of the live wires should be long enough to protrude through the appropriate 4mm jack holes far enough to be able to strip and solder them to the jacks.
//! * The thick brown needs to be long enough to reach the socket. //! * The second brown needs to be long enough to reach the socket.
//! 1. Cover the the joints with heatshrink sleeving and shrink it with a hot air gun.
//! 1. Attach the IEC inlet using two 12mm M3 countersunk cap screws, washers and nyloc nuts on the back. //! 1. Attach the IEC inlet using two 12mm M3 countersunk cap screws, washers and nyloc nuts on the back.
// //
module mains_in_assembly() pose([ 35.40, 0.00, 144.20 ], [ -13.10, 0.00, 13.75 ]) module mains_in_assembly() pose([ 35.40, 0.00, 144.20 ], [ -13.10, 0.00, 13.75 ])
assembly("mains_in") { assembly("mains_in") {
feet_assembly(); feet_assembly();
wire("green & yellow", 30, 150, 0.25); hidden() {
wire("blue", 30, 150, 0.25); wire("green & yellow", 30, 150, 0.25);
wire("brown", 30, 150, 0.25); wire("blue", 30, 150, 0.25);
wire("brown", 7, 150); wire("brown", 30, 150, 0.25);
for(i = [1:3]) wire("brown", 30, 150, 0.25);
hidden() tubing(HSHRNK32); for(i = [1:3])
tubing(HSHRNK32);
}
translate([iec_x, iec_y, iec_z]) translate([iec_x, iec_y, iec_z])
rotate([90, 0, -90]) rotate([90, 0, -90])
iec_assembly(iec, wall); iec_assembly(iec, wall);
@ -197,14 +222,15 @@ assembly("mains_in") {
// //
module main_assembly() module main_assembly()
assembly("main") { assembly("main") {
wire("green & yellow", 30, 150, 0.25); hidden() {
wire("blue", 30, 150, 0.25); wire("green & yellow", 30, 150, 0.25);
for(i = [1:5]) wire("blue", 30, 150, 0.25);
hidden() tubing(HSHRNK32); for(i = [1:5])
hidden() tubing(HSHRNK32);
for(i = [1:3])
vitamin(": Ferrule for 1.5mm^2 wire");
for(i = [1:3])
vitamin(": Ferrule for 1.5mm^2 wire");
}
echo(screw_length = screw_length); echo(screw_length = screw_length);
mains_in_assembly(); mains_in_assembly();

View File

@ -743,7 +743,7 @@ Needs updating as mostly obsolete versions.
| 1 | ```resistor(RIE1212UB5C5R6)``` | Resistor UB5C 5R6F 5R6 3W vitreous enamel | | 1 | ```resistor(RIE1212UB5C5R6)``` | Resistor UB5C 5R6F 5R6 3W vitreous enamel |
| 1 | | Tape self amalgamating silicone 110mm x 25mm | | 1 | | Tape self amalgamating silicone 110mm x 25mm |
| 1 | ```resistor(Epcos)``` | Thermistor Epcos B57560G104F 100K 1% | | 1 | ```resistor(Epcos)``` | Thermistor Epcos B57560G104F 100K 1% |
| 2 | | Wire Red PTFE 16/0.2 length 170mm | | 2 | | Wire Red PTFE 16/0.2mm strands, length 170mm |
| 4 | ```ziptie(small_ziptie, 8)``` | Ziptie 100mm min length | | 4 | ```ziptie(small_ziptie, 8)``` | Ziptie 100mm min length |

View File

@ -68,4 +68,5 @@ def print_times():
colour = Fore.GREEN colour = Fore.GREEN
print(colour + "%5.1f %5.1f %s" % (new, delta, key)) print(colour + "%5.1f %5.1f %s" % (new, delta, key))
total += new total += new
print(Fore.WHITE + "%5.1f" % total) if sorted_times:
print(Fore.WHITE + "%5.1f" % total)

View File

@ -25,7 +25,7 @@ include <../core.scad>
include <zipties.scad> include <zipties.scad>
module wire(color, strands, length, strand = 0.2) module wire(color, strands, length, strand = 0.2)
vitamin(str(": Wire ", color, " ", strands, "/", strand, " length ",length, "mm")); vitamin(str(": Wire ", color, " ", strands, "/", strand, "mm strands, length ",length, "mm"));
module ribbon_cable(ways, length) module ribbon_cable(ways, length)
vitamin(str(": Ribbon cable ", ways, " way ", length, "mm")); vitamin(str(": Ribbon cable ", ways, " way ", length, "mm"));