]> www.fi.muni.cz Git - things.git/commitdiff
hc-sr04: even bigger space for connector
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Fri, 17 Apr 2015 19:07:35 +0000 (21:07 +0200)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Fri, 17 Apr 2015 19:07:35 +0000 (21:07 +0200)
hc-sr04.scad

index 13d9fa3e0d8c522e67ec071295aba59c21e4a895..dc5b789f8abf691d168e326e5f3a311c03725761 100644 (file)
@@ -7,24 +7,27 @@ cyl_r = 8 + 0.5;
 cyl_x = 27 / 2;
 cyl_h = 8; // above pcb, max 13.8;
 
-pcb_x = 45 + 0.5;
-pcb_y = 20 + 0.5;
+pcb_x = 45 + 1.0;
+pcb_y = 20 + 1.0;
 xtal_h = 5;
 pcb_supp = 3; // side support thickness
 pcb_h = 8; // 1.2 + space for connector etc
-pcb_thick = 2;
+pcb_thick = 2.5;
 
 cyl_base = pcb_x/2 + wall - cyl_x;
 
-conn_x = 12.5;
-conn_y = 12;
+conn_x = 10 + 0.5;
+conn_y = 15;
 
 cable_w = 7;
-cable_h = 3;
+cable_h = 3.5;
 
 mount_h = 3;
 screw_sp = 5;
 
+clip_r = 1;
+clip_h = 8;
+
 module sensor() {
        hull() {
                // space above pcb
@@ -63,7 +66,7 @@ module case_body() {
 
                // connector
                translate([-conn_x/2-wall, pcb_y/2-wall, 0])
-                       cube([conn_x+2*wall, conn_y+2*wall, pcb_h+wall]);
+                       cube([conn_x+2*wall, conn_y+2*wall, pcb_h-pcb_thick+wall]);
        }
        for (x = [0, 180]) rotate([0, 0, x]) hull() {
                // eps-wide cube
@@ -81,9 +84,9 @@ difference() {
        difference() {
                sensor();
                // pcb clip
-               translate([-8/2, -pcb_y/2, pcb_h-pcb_thick-wall/2])
+               translate([-clip_h/2, -pcb_y/2, pcb_h-pcb_thick-clip_r/2])
                rotate([0, 90, 0])
-               cylinder(r=wall/2, h = 8, $fn = 4);
+               cylinder(r=clip_r, h = clip_h, $fn = 4);
        }
        // mount holes
        for (x = [0, 180]) rotate([0, 0, x]) {