Dupont connector splice lock

How about some zip ties for added security and strain relief?

// BEGIN SETTINGS

pins = 6; //ea - number of pins in connector
wall_t = 1; //mm - wall thickness for part
wire_d = 1.8; //mm - wire diameter including insulation
wire_s = 1.5; //mm - space for to snap through
tol = 0.25; //mm - for tweaking fit
zip_w = 2.54; //mm - zip tie width
zip_t = 1.27; //mm - zip tie thickness
zip_s = 4; //mm - distance between zip tie holes (center to center)
zip_d = 3.5; //mm - distance from wall to zip tie holes

// END SETTINGS


$fn = 96; // sides to a circle

d_width = 2.54; //mm - dupont housing width
d_length = 14; //mm - dupont housing length


hx = d_width*pins+tol+2*wall_t;
hy = d_length*2+tol+2*wall_t;
hz = d_width+wall_t;

union() {
    difference() {
        //draw the connector housing

        translate([-hx/2, -hy/2, 0])
            cube([hx, hy, hz]);

        //draw the negative shapes where the dupont connectors will fit
        translate([-(pins-1)*d_width/2,0, d_width/2+wall_t+tol/2]) {
            for (i = [0:pins-1]) {
                translate([i*d_width,0,0]) {
                    //let's draw a dupont housing 2x length for 2 connected together
                    dx = d_width+tol;
                    dy = d_length*2 + tol;
                    dz = dx;
                    translate([0,0,dz/2]) cube([dx, dy, dz*2], true);

                    //draw the wire
                    rotate([90,0,0]) cylinder(h=dy+4*wall_t, r=wire_d/2, center= true);

                    //draw the wire slip
                    translate([0,0,0.75*dz]) cube([wire_s, dy+4*wall_t, dz*1.5], true);
                }
            }
        }
    }


    //draw something to zip tie the wires to
    zy = hy/2 + zip_w/2 + zip_d;
    difference() {
        hull() {
            translate([zip_s/2,-(zy+zip_w/2),0]) cylinder(h=wall_t, r=2);
            translate([-zip_s/2,-(zy+zip_w/2),0]) cylinder(h=wall_t, r=2);
            translate([-(hx/2 -2),-(hy/2),0])cylinder(h=wall_t, r=2);
            translate([(hx/2 -2),-(hy/2),0])cylinder(h=wall_t, r=2);
            
            translate([zip_s/2,(zy+zip_w/2),0]) cylinder(h=wall_t, r=2);
            translate([-zip_s/2,(zy+zip_w/2),0]) cylinder(h=wall_t, r=2);
            translate([-(hx/2 -2),(hy/2),0])cylinder(h=wall_t, r=2);
            translate([(hx/2 -2),(hy/2),0])cylinder(h=wall_t, r=2);
        }
        
        //holes for zip ties
        translate([zip_s/2, -zy, 0]) cube([zip_t, zip_w, wall_t*3], true);
        translate([-zip_s/2, -zy, 0]) cube([zip_t, zip_w, wall_t*3], true);
        translate([zip_s/2, zy, 0]) cube([zip_t, zip_w, wall_t*3], true);
        translate([-zip_s/2, zy, 0]) cube([zip_t, zip_w, wall_t*3], true);
        }
}
6 Likes