Dupont connector splice lock

Hello, I’m OP from the included thingiverse design in the first post. I would like to ask you if you could publish your openSCAD to thingiverse as a remix or if you don’t want to hassle with an account I could post it for you and add credit you you.

As I wrote in my design I suggested for somebody to recreate it in openSCAD as it should be parametric to fit different clearances etc. but all I can do so far is to add parameters and their descriptions :sweat_smile:.

Thanks for popping in! This is a neat idea. Thank you for sharing it.

Asking is always a good idea. I’m glad you’re the kind of designer that would appreciate suggestions like that. It looks like this is your first time here, so let me just say that this forum is pretty friendly (unlike a lot of the Internet). I’m sure @kd2018 will get back to you on the subject of remixing. He’s here all the time.

Thanks again!

Your welcome to post my code, I think the latest was on post 6. I haven’t tested it though, dunno if it needs tweaking.

I’d do it myself but I’m dealing with snowmageddon right now here in North Texas right now and electricity and more so internet is very touch and go.

1 Like

I took the code from Your post and cleaned it up a bit.

I have 1 request though, I would like add a base_thickness parameter that will determine how high the base will be, independent of wall_thickness, but I’m quite confused by the complexity of the code. I will also try to add fillets/chamfers but I want to do that myself. Other than that I think everything is ok, I will do some test prints first before making default parameters and publishing the code.

Do you have any wishes as how to attribute the code to you?

/* 
 * Dupont connector holder generator by Kyle (kd2018, https://forum.v1e.com/u/kd2018)
 */


/* [Print] */
//ea - number of pins in connector
pins = 6;
//mm - wall thickness
wall_thickness = 1.2;
//mm - thickness of the base
base_thickness = 0.6;
//mm - for tweaking fit
tolerance = 0.25;
//resolution
$fn = 50;

/* [Dupont] */
//mm - dupont housing width
dupont_width = 2.54;
//mm - dupont housing length
dupont_length = 14.1;
//mm - wire diameter including insulation
wire_diameter = 1.8;
//mm - space for wire to snap through
wire_space = 1.5;

/* [Zip tie] */
//true/false - zip tie presence
zip_present = true;
//mm - zip tie width
zip_width = 2.54;
//mm - zip tie thickness
zip_thickness = 1.27;
//mm - distance between zip tie holes (center to center)
zip_spacing = 4.5;
//mm - distance from wall to zip tie holes
zip_distance = 3.5;


hx = dupont_width*pins+tolerance+2*wall_thickness;
hy = dupont_length*2+tolerance+2*wall_thickness;
hz = dupont_width+wall_thickness;

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)*dupont_width/2,0, dupont_width/2+wall_thickness+tolerance/2]) {
            for (i = [0:pins-1]) {
                translate([i*dupont_width,0,0]) {
                    //let's draw a dupont housing 2x length for 2 connected together
                    dx = dupont_width+tolerance;
                    dy = dupont_length*2 + tolerance;
                    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_thickness, r=wire_diameter/2, center= true);

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

    if (zip_present == true) {
        //draw something to zip tie the wires to
        zy = hy/2 + zip_width/2 + zip_distance;
        difference() {
            hull() {
                translate([zip_spacing/2,-(zy+zip_width/2),0]) cylinder(h=wall_thickness, r=2);
                translate([-zip_spacing/2,-(zy+zip_width/2),0]) cylinder(h=wall_thickness, r=2);
                translate([-(hx/2 -2),-(hy/2),0])cylinder(h=wall_thickness, r=2);
                translate([(hx/2 -2),-(hy/2),0])cylinder(h=wall_thickness, r=2);
                
                translate([zip_spacing/2,(zy+zip_width/2),0]) cylinder(h=wall_thickness, r=2);
                translate([-zip_spacing/2,(zy+zip_width/2),0]) cylinder(h=wall_thickness, r=2);
                translate([-(hx/2 -2),(hy/2),0])cylinder(h=wall_thickness, r=2);
                translate([(hx/2 -2),(hy/2),0])cylinder(h=wall_thickness, r=2);
            }
            
                //holes for zip ties
                translate([zip_spacing/2, -zy, 0]) cube([zip_thickness, zip_width, wall_thickness*3], true);
                translate([-zip_spacing/2, -zy, 0]) cube([zip_thickness, zip_width, wall_thickness*3], true);
                translate([zip_spacing/2, zy, 0]) cube([zip_thickness, zip_width, wall_thickness*3], true);
                translate([-zip_spacing/2, zy, 0]) cube([zip_thickness, zip_width, wall_thickness*3], true);
        }
    }
}

I tweaked our code to account for the base thickness per your request. I hope I didn’t break anything:

/* 
 * Dupont connector holder generator by Kyle (kd2018, https://forum.v1e.com/u/kd2018)
 */


/* [Print] */
//ea - number of pins in connector
pins = 6;
//mm - wall thickness
wall_thickness = 1.2;
//mm - thickness of the base
base_thickness = 1.2;
//mm - for tweaking fit
tolerance = 0.25;
//resolution
$fn = 50;

/* [Dupont] */
//mm - dupont housing width
dupont_width = 2.54;
//mm - dupont housing length
dupont_length = 14.1;
//mm - wire diameter including insulation
wire_diameter = 1.8;
//mm - space for wire to snap through
wire_space = 1.5;

/* [Zip tie] */
//true/false - zip tie presence
zip_present = true;
//mm - zip tie width
zip_width = 2.54;
//mm - zip tie thickness
zip_thickness = 1.27;
//mm - distance between zip tie holes (center to center)
zip_spacing = 4.5;
//mm - distance from wall to zip tie holes
zip_distance = 3.5;


hx = dupont_width*pins+tolerance+2*wall_thickness;
hy = dupont_length*2+tolerance+2*wall_thickness;
//hz = dupont_width+wall_thickness;
hz = dupont_width+base_thickness;

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

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

        //draw the negative shapes where the dupont connectors will fit
        translate([-(pins-1)*dupont_width/2,0, dupont_width/2+wall_thickness+tolerance/2]) {
            for (i = [0:pins-1]) {
                translate([i*dupont_width,0,0]) {
                    //let's draw a dupont housing 2x length for 2 connected together
                    dx = dupont_width+tolerance;
                    dy = dupont_length*2 + tolerance;
                    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_thickness, r=wire_diameter/2, center= true);

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

    if (zip_present == true) {
        //draw something to zip tie the wires to
        zy = hy/2 + zip_width/2 + zip_distance;
        translate([0,0,wall_thickness-base_thickness]) difference() {
            hull() {
                translate([zip_spacing/2,-(zy+zip_width/2),0]) cylinder(h=base_thickness, r=2);
                translate([-zip_spacing/2,-(zy+zip_width/2),0]) cylinder(h=base_thickness, r=2);
                translate([-(hx/2 -2),-(hy/2),0])cylinder(h=base_thickness, r=2);
                translate([(hx/2 -2),-(hy/2),0])cylinder(h=base_thickness, r=2);
                
                translate([zip_spacing/2,(zy+zip_width/2),0]) cylinder(h=base_thickness, r=2);
                translate([-zip_spacing/2,(zy+zip_width/2),0]) cylinder(h=base_thickness, r=2);
                translate([-(hx/2 -2),(hy/2),0])cylinder(h=base_thickness, r=2);
                translate([(hx/2 -2),(hy/2),0])cylinder(h=base_thickness, r=2);
            }
            
                //holes for zip ties
                translate([zip_spacing/2, -zy, 0]) cube([zip_thickness, zip_width, base_thickness*3], true);
                translate([-zip_spacing/2, -zy, 0]) cube([zip_thickness, zip_width, base_thickness*3], true);
                translate([zip_spacing/2, zy, 0]) cube([zip_thickness, zip_width, base_thickness*3], true);
                translate([-zip_spacing/2, zy, 0]) cube([zip_thickness, zip_width, base_thickness*3], true);
        }
    }
}

All credit goes to my idol and mentor: Zero Cool aka Crash Override

Time to put on your rollerblades!

1 Like

Hack the Planet!

1 Like

I’ve released a “final” version. I’ve learnt a lot from reading Your code and removing lines to see how You got it to work.

I rewrote all the code from scratch and added Your zip tie mounting module.