omdl  v1.0
OpenSCAD Mechanical Design Library
Power Strip

Electrical receptacle power strip generator. More...

+ Collaboration diagram for Power Strip:

Files

file  power_strip.scad
 A power strip maker for electrical receptacles and/or devices.
 

Configuration

 power_strip_box_default
 <map> A single gang electrical device box configuration. More...
 
 power_strip_mount_default
 <map> A single gang electrical device mount configuration. More...
 
 power_strip_cover_default
 <map> A single gang duplex receptacle cover configuration. More...
 

Modules

module power_strip_sg (cols=1, rows=1, mode=7, verb=1, cm_box=power_strip_box_default, cm_mount=power_strip_mount_default, cm_cover=power_strip_cover_default)
 A power strip generator for single gang electrical receptacles. More...
 

Usage Details

Electrical receptacle power strip generator.

Requires:
include <omdl-base.scad>;
include <transforms/base_cs.scad>;
include <models/3d/misc/omdl_logo.scad>;
include <models/3d/fastener/screws.scad>;
include <parts/3d/fastener/clamps.scad>;
include <parts/3d/fastener/mounts.scad>;
include <parts/3d/enclosure/project_box_rectangle.scad>;
include <parts/3d/enclosure/power_strip.scad>;

Function and/or Module Documentation

◆ power_strip_sg()

module power_strip_sg ( cols  = 1,
rows  = 1,
mode  = 7,
verb  = 1,
cm_box  = power_strip_box_default,
cm_mount  = power_strip_mount_default,
cm_cover  = power_strip_cover_default 
)

A power strip generator for single gang electrical receptacles.

Parameters
cols<integer> device column count.
rows<integer> device row count.
mode<integer> part mode.
verb<integer> console output verbosity {0|1|2}.
cm_box<map> box configuration map.
cm_mount<map> device mount configuration map.
cm_cover<map> cover configuration map.

This module constructs a power strip grid of standard NEMA electrical power receptacles. The number of columns and rows in the power strip are configurable as well as most aspects of the power strip enclosure box, receptacle device mounts, and device cover. The default configuration of the enclosure box, device mount, and device cover are specified in global variable maps.

part mode

Integer value is binary encoded.

b description
0 generate enclosure box
1 generate clamp top
2 generate enclosure cover

The default configuration maps can be completely replaced with a user supplied maps or may be partially updated as shown in the following example.

Custom power strip example script

include <omdl-base.scad>;
include <transforms/base_cs.scad>;
include <models/3d/misc/omdl_logo.scad>;
include <models/3d/fastener/screws.scad>;
include <parts/3d/fastener/clamps.scad>;
include <parts/3d/fastener/mounts.scad>;
include <parts/3d/enclosure/project_box_rectangle.scad>;
include <parts/3d/enclosure/power_strip.scad>;
box_conf =
[
["iscl", 15.0],
["oscl", 15.0],
["pwcd", [8.6, 3.6]],
["pwsh", [6]],
["pwco", [0, 2]],
["pwcp", 20],
["mtabs", [[0]]]
];
custom_box = map_merge(box_conf, power_strip_box_default);
map_check(custom_box);
power_strip_sg(cm_box=custom_box);
// end_include
module map_check(m, verbose=false)
Perform basic format checks on a map and output errors to console.
Definition: map.scad:788
function map_merge(m1, m2)
Merge the unique key-value pairs of a second map with those of a first.
module omdl_logo(r=5, c=false, b=false, t=false, td="ltr", a=0, d)
Standard omdl logo.
Definition: omdl_logo.scad:328
module power_strip_sg(cols=1, rows=1, mode=7, verb=1, cm_box=power_strip_box_default, cm_mount=power_strip_mount_default, cm_cover=power_strip_cover_default)
A power strip generator for single gang electrical receptacles.
power_strip_box_default
<map> A single gang electrical device box configuration.
module project_box_rectangle(wth, h, size, vr, vrm, inset, lid, lip, rib, wall, post, hole, shape, align, mode=0, verb=0)
A rectangular box maker for project boxes, enclosures and housings.

Custom power strip example diagram
bottomfrontdiag
expand bottomexpand frontexpand diag

Definition at line 881 of file power_strip.scad.

+ Here is the call graph for this function:

Variable Documentation

◆ power_strip_box_default

power_strip_box_default

<map> A single gang electrical device box configuration.

The default electrical device box configuration map.

Default device box configuration map table

keyvaluedescription
boxd25Box internal depth
cdmsfalseCover uses device mount screws: {true|false}
dlogotrueDetail logo on box rear: {true|false}
dlts108Device length tab-to-tab space
drimbtrueDetail rim on box rear: {true|false}
drimctrueDetail rim on cover top: {true|false}
evr4Box & cover rounding radius
evrm2Box & cover rounding mode: {0|1|2}
fins[3, 270, 3, 0.75]Post fins: [number, angle, width, length]
iscl15Input space: cord, switch, surge, etc
iwdotrueInternal wall divisions on: {true|false}
iwpd10Internal wall wire pass diameter
iwps1Internal wall wire pass side: {+1|-1}
lefb2Box lid edge finish: {0|1|2|3|4}
lefc2Cover lid edge finish: {0|1|2|3|4}
lscl0Left-side extra space
mpc2btrueMirror cover post additions in box: {true|false}
mphda0Mirrored post hole diameter adjustment
mslot[4, [1, 1, 4]]Mount slot: [screw, cover, size, scale, wth]: see mount_screw_slot()
mslotsundefMount slot instances: [[move, rotate, align], ...]
mtab[4, 25, 4]Mount tab: [screw, brace, vrm, vr, wth, size]: see mount_screw_tab()
mtabsundefMount tab instances: [[edge, zero, move], ...]
oscl0Output space: wire-nuts, led, aux board, etc
piabundefBox post instance additions: see project_box_rectangle()
piacundefCover post instance additions: see project_box_rectangle()
pmode138Box post mode (b7=1 required): see project_box_rectangle()
pwcd7Power cord dimensions: {d|[w,h]}
pwco[0, 0]Power cord connections offset: [x, z]
pwcpundefPower cord clamp pinch bar percentage: [h, w]
pwcs0Power cord clamp side: {0|1}
pwct10.5Power cord clamp tab width
pwsd3.5Power cord clamp screw diameter
pwsh[6, 3.5]Power cord clamp screw head spec: see screw_bore()
pwsn[5.75, 2.5]Power cord clamp screw nut spec: see screw_bore()
ribs[0, 1.75]Box ribs configuration: see project_box_rectangle()
roww50Receptacle row width
rscl0Right-side extra space
wiabundefBox wall instance additions: see project_box_rectangle()
wmode426Box wall mode: see project_box_rectangle()
wth2Box wall thickness

Map key description is available in source. See the map

Definition at line 331 of file power_strip.scad.

◆ power_strip_mount_default

power_strip_mount_default

<map> A single gang electrical device mount configuration.

The default electrical device mount configuration map.

Default device mount configuration map table

keyvaluedescription
mss83.3438Device mount screw separation
rmsd3.175Mount screw hole diameter
rmsh2.38125Mount screw head height
rmth1.5875Mount tab height
rshc7.9375Mount screw head clearance

Map key description is available in source. See the map

Definition at line 520 of file power_strip.scad.

◆ power_strip_cover_default

power_strip_cover_default

<map> A single gang duplex receptacle cover configuration.

The default electrical device cover configuration map.

Default device cover configuration map table

keyvaluedescription
drpo38.1Receptacle offset
rcsd[3.51, 7.5, 2.5, 0.5]Cover center hole screw: [diameter, head-diameter, head-height, tolerance]
rpd34.925Receptacle diameter
rpfl29.3688Receptacle flat-to-flat height

Map key description is available in source. See the map

Definition at line 654 of file power_strip.scad.