From 7811fa380e556e9fd1b4fbfa34ac79d296a0adfc Mon Sep 17 00:00:00 2001 From: Chris Palmer Date: Mon, 10 Jun 2019 15:50:05 +0100 Subject: [PATCH] Tweaks to the example. --- examples/MainsBreakOutBox/bom/bom.json | 13 ++-- examples/MainsBreakOutBox/bom/bom.txt | 9 ++- .../MainsBreakOutBox/bom/main_assembly.txt | 6 +- .../bom/mains_in_assembly.txt | 7 +- examples/MainsBreakOutBox/readme.md | 42 ++++++----- examples/MainsBreakOutBox/scad/bob_main.scad | 72 +++++++++++++------ readme.md | 2 +- scripts/times.py | 3 +- vitamins/wire.scad | 2 +- 9 files changed, 95 insertions(+), 61 deletions(-) diff --git a/examples/MainsBreakOutBox/bom/bom.json b/examples/MainsBreakOutBox/bom/bom.json index b22c7bd..46e1716 100644 --- a/examples/MainsBreakOutBox/bom/bom.json +++ b/examples/MainsBreakOutBox/bom/bom.json @@ -35,10 +35,9 @@ } ], "vitamins": { - ": Wire green & yellow 30/0.25 length 150mm": 1, - ": Wire blue 30/0.25 length 150mm": 1, - ": Wire brown 30/0.25 length 150mm": 1, - ": Wire brown 7/0.2 length 150mm": 1, + ": Wire green & yellow 30/0.25mm strands, length 150mm - not shown": 1, + ": Wire blue 30/0.25mm strands, length 150mm - not shown": 1, + ": Wire brown 30/0.25mm strands, length 150mm - not shown": 2, "tubing(HSHRNK32): Heatshrink sleeving ID 3.2mm x 15mm - not shown": 3, "iec(IEC_inlet_atx): IEC inlet for ATX": 1, "screw(M3_cs_cap_screw, 12): Screw M3 cs cap x 12mm": 2, @@ -50,10 +49,10 @@ } ], "vitamins": { - ": Wire green & yellow 30/0.25 length 150mm": 1, - ": Wire blue 30/0.25 length 150mm": 1, + ": Wire green & yellow 30/0.25mm strands, length 150mm - not shown": 1, + ": Wire blue 30/0.25mm strands, length 150mm - not shown": 1, "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, "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, diff --git a/examples/MainsBreakOutBox/bom/bom.txt b/examples/MainsBreakOutBox/bom/bom.txt index 692fab0..a3271b9 100644 --- a/examples/MainsBreakOutBox/bom/bom.txt +++ b/examples/MainsBreakOutBox/bom/bom.txt @@ -7,11 +7,10 @@ Vitamins: a e a s e i i e t n n - | | 3| | 3 Ferrule for 1.5mm^2 wire - | | 1| 1| 2 Wire blue 30/0.25 length 150mm - | | | 1| 1 Wire brown 30/0.25 length 150mm - | | | 1| 1 Wire brown 7/0.2 length 150mm - | | 1| 1| 2 Wire green & yellow 30/0.25 length 150mm + | | 3| | 3 Ferrule for 1.5mm^2 wire - not shown + | | 1| 1| 2 Wire blue 30/0.25mm strands, length 150mm - not shown + | | | 2| 2 Wire brown 30/0.25mm strands, length 150mm - not shown + | | 1| 1| 2 Wire green & yellow 30/0.25mm strands, length 150mm - not shown | | | 1| 1 IEC inlet for ATX 2| | | | 2 Heatfit insert M3 | | 2| | 2 4mm shielded jack socket blue diff --git a/examples/MainsBreakOutBox/bom/main_assembly.txt b/examples/MainsBreakOutBox/bom/main_assembly.txt index 663c380..cb59dfc 100644 --- a/examples/MainsBreakOutBox/bom/main_assembly.txt +++ b/examples/MainsBreakOutBox/bom/main_assembly.txt @@ -1,8 +1,8 @@ main_assembly: Vitamins: - 3 Ferrule for 1.5mm^2 wire - 1 Wire blue 30/0.25 length 150mm - 1 Wire green & yellow 30/0.25 length 150mm + 3 Ferrule for 1.5mm^2 wire - not shown + 1 Wire blue 30/0.25mm strands, length 150mm - not shown + 1 Wire green & yellow 30/0.25mm strands, length 150mm - not shown 2 4mm shielded jack socket blue 1 4mm shielded jack socket brown 2 4mm shielded jack socket green diff --git a/examples/MainsBreakOutBox/bom/mains_in_assembly.txt b/examples/MainsBreakOutBox/bom/mains_in_assembly.txt index 93a2d1a..1e5b5ed 100644 --- a/examples/MainsBreakOutBox/bom/mains_in_assembly.txt +++ b/examples/MainsBreakOutBox/bom/mains_in_assembly.txt @@ -1,9 +1,8 @@ mains_in_assembly: Vitamins: - 1 Wire blue 30/0.25 length 150mm - 1 Wire brown 30/0.25 length 150mm - 1 Wire brown 7/0.2 length 150mm - 1 Wire green & yellow 30/0.25 length 150mm + 1 Wire blue 30/0.25mm strands, length 150mm - not shown + 2 Wire brown 30/0.25mm strands, length 150mm - not shown + 1 Wire green & yellow 30/0.25mm strands, length 150mm - not shown 1 IEC inlet for ATX 2 Nut M3 nyloc 2 Screw M3 cs cap x 12mm diff --git a/examples/MainsBreakOutBox/readme.md b/examples/MainsBreakOutBox/readme.md index 046c4ab..8579df2 100644 --- a/examples/MainsBreakOutBox/readme.md +++ b/examples/MainsBreakOutBox/readme.md @@ -1,6 +1,17 @@ # MainsBreakOutBox 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) @@ -17,7 +28,7 @@ |   .  |   .  |   .  |   2  |   2  |    4mm shielded jack socket blue | |   .  |   .  |   .  |   1  |   1  |    4mm shielded jack socket brown | |   .  |   .  |   .  |   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 | |   .  |   .  |   3  |   5  |   8  |    Heatshrink sleeving ID 3.2mm x 15mm - not shown | |   .  |   .  |   1  |   .  |   1  |    IEC inlet for ATX | @@ -27,10 +38,9 @@ |   .  |   .  |   .  |   2  |   2  |    Screw M3 cs cap x 20mm | |   .  |   4  |   .  |   .  |   4  |    Screw M3 dome x 10mm | |   .  |   8  |   2  |   .  |   10  |    Washer M3 x 7mm x 0.5mm | -|   .  |   .  |   1  |   1  |   2  |    Wire blue 30/0.25 length 150mm | -|   .  |   .  |   1  |   .  |   1  |    Wire brown 30/0.25 length 150mm | -|   .  |   .  |   1  |   .  |   1  |    Wire brown 7/0.2 length 150mm | -|   .  |   .  |   1  |   1  |   2  |    Wire green & yellow 30/0.25 length 150mm | +|   .  |   .  |   1  |   1  |   2  |    Wire blue 30/0.25mm strands, length 150mm - not shown | +|   .  |   .  |   2  |   .  |   2  |    Wire brown 30/0.25mm strands, length 150mm - not shown | +|   .  |   .  |   1  |   1  |   2  |    Wire green & yellow 30/0.25mm strands, length 150mm - not shown | | | | | | | **3D Printed parts** | |   .  |   4  |   .  |   .  |   4  |    foot.stl | |   1  |   .  |   .  |   .  |   1  |    socket_box.stl | @@ -102,10 +112,9 @@ ### Vitamins |Qty|Description| |--:|:----------| -|1| Wire green & yellow 30/0.25 length 150mm| -|1| Wire blue 30/0.25 length 150mm| -|1| Wire brown 30/0.25 length 150mm| -|1| Wire brown 7/0.2 length 150mm| +|1| Wire green & yellow 30/0.25mm strands, length 150mm - not shown| +|1| Wire blue 30/0.25mm strands, length 150mm - not shown| +|2| Wire brown 30/0.25mm strands, length 150mm - not shown| |3| Heatshrink sleeving ID 3.2mm x 15mm - not shown| |1| IEC inlet for ATX| |2| Screw M3 cs cap x 12mm| @@ -124,11 +133,12 @@ ### Assembly instructions ![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.5mm2, 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. - * 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 thick brown needs to be long enough to reach the socket. + * Attach one green & yellow to the earth, one blue to neutral and two brown to the live. + * 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 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. ![mains_in_assembled](assemblies/mains_in_assembled_tn.png) @@ -140,10 +150,10 @@ ### Vitamins |Qty|Description| |--:|:----------| -|1| Wire green & yellow 30/0.25 length 150mm| -|1| Wire blue 30/0.25 length 150mm| +|1| Wire green & yellow 30/0.25mm strands, length 150mm - not shown| +|1| Wire blue 30/0.25mm strands, length 150mm - 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| |2| Screw M3 cs cap x 20mm| |2| 4mm shielded jack socket blue| diff --git a/examples/MainsBreakOutBox/scad/bob_main.scad b/examples/MainsBreakOutBox/scad/bob_main.scad index 3e78181..cb42361 100644 --- a/examples/MainsBreakOutBox/scad/bob_main.scad +++ b/examples/MainsBreakOutBox/scad/bob_main.scad @@ -1,11 +1,35 @@ // -//! 13A socket break out box with 4mm jacks to measure voltage and / or load current and earth leakage current. -// -// GNU GPL v2 +// NopSCADlib Copyright Chris Palmer 2018 // nop.head@gmail.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 . +// + +// +//! 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; $pp1_colour = "dimgrey"; @@ -13,7 +37,6 @@ $pp2_colour = [0.9, 0.9, 0.9]; include use -include echo(extrusion_width = extrusion_width, layer_height = layer_height); wall = 2.5; @@ -160,24 +183,26 @@ assembly("feet") { 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.5mm2, 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. -//! * 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 thick brown needs to be long enough to reach the socket. +//! * Attach one green & yellow to the earth, one blue to neutral and two brown to the live. +//! * 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 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. // module mains_in_assembly() pose([ 35.40, 0.00, 144.20 ], [ -13.10, 0.00, 13.75 ]) assembly("mains_in") { feet_assembly(); - wire("green & yellow", 30, 150, 0.25); - wire("blue", 30, 150, 0.25); - wire("brown", 30, 150, 0.25); - wire("brown", 7, 150); - for(i = [1:3]) - hidden() tubing(HSHRNK32); - + hidden() { + wire("green & yellow", 30, 150, 0.25); + wire("blue", 30, 150, 0.25); + wire("brown", 30, 150, 0.25); + wire("brown", 30, 150, 0.25); + for(i = [1:3]) + tubing(HSHRNK32); + } translate([iec_x, iec_y, iec_z]) rotate([90, 0, -90]) iec_assembly(iec, wall); @@ -197,14 +222,15 @@ assembly("mains_in") { // module main_assembly() assembly("main") { - wire("green & yellow", 30, 150, 0.25); - wire("blue", 30, 150, 0.25); - for(i = [1:5]) - hidden() tubing(HSHRNK32); - - for(i = [1:3]) - vitamin(": Ferrule for 1.5mm^2 wire"); + hidden() { + wire("green & yellow", 30, 150, 0.25); + wire("blue", 30, 150, 0.25); + for(i = [1:5]) + hidden() tubing(HSHRNK32); + for(i = [1:3]) + vitamin(": Ferrule for 1.5mm^2 wire"); + } echo(screw_length = screw_length); mains_in_assembly(); diff --git a/readme.md b/readme.md index 1a3f98a..fa93047 100644 --- a/readme.md +++ b/readme.md @@ -743,7 +743,7 @@ Needs updating as mostly obsolete versions. | 1 | ```resistor(RIE1212UB5C5R6)``` | Resistor UB5C 5R6F 5R6 3W vitreous enamel | | 1 | | Tape self amalgamating silicone 110mm x 25mm | | 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 | diff --git a/scripts/times.py b/scripts/times.py index f6e7acf..331c399 100644 --- a/scripts/times.py +++ b/scripts/times.py @@ -68,4 +68,5 @@ def print_times(): colour = Fore.GREEN print(colour + "%5.1f %5.1f %s" % (new, delta, key)) total += new - print(Fore.WHITE + "%5.1f" % total) + if sorted_times: + print(Fore.WHITE + "%5.1f" % total) diff --git a/vitamins/wire.scad b/vitamins/wire.scad index 9550ece..e60562a 100644 --- a/vitamins/wire.scad +++ b/vitamins/wire.scad @@ -25,7 +25,7 @@ include <../core.scad> include 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) vitamin(str(": Ribbon cable ", ways, " way ", length, "mm"));