X-Git-Url: http://challenge-bot.com/repos/?a=blobdiff_plain;f=3d-printables%2Fsonar-table-top-holder.scad;h=5790934973b65bb36f45771c78b8675fb254dc8e;hb=a76f86535dc18d4392ab976100d60efb950a37d7;hp=42578116602547606d7927d23504471146d9f736;hpb=34e9f480eba5336401589033ce04112919c6407e;p=challenge-bot diff --git a/3d-printables/sonar-table-top-holder.scad b/3d-printables/sonar-table-top-holder.scad index 4257811..5790934 100644 --- a/3d-printables/sonar-table-top-holder.scad +++ b/3d-printables/sonar-table-top-holder.scad @@ -4,8 +4,20 @@ // https://gitorious.org/ozzloy/challenge-bot // https://github.com/waynegramlich/challenge-bot +/* + this holds an hc-sr04 sonar sensor to a 3/16 inch deck. + http://fritzing.org/projects/hc-sr04-project + it can hold the sonar sensor either facing down, or forwards. + when facing down, it can detect if it passes over the edge of a table. + when facing forwards, it can detect and follow something in front of it. + */ + $fn = 60; +use +oshw_dy = 120.366; +oshw_dx = 133.888; + // 3/16 inch in mm deck_depth = 4.7625; // 1/4 inch in mm = 6.35 // subtract a little to be a squeeze fit @@ -69,14 +81,28 @@ module sonar_holder(){ module deck_holder(){ deck_holder_width = sonar_holder_width - deck_depth; + deck_holder_height = sonar_holder_depth * 2 + deck_depth; linear_extrude(height = deck_holder_width){ difference(){ - square([deck_holder_length, sonar_holder_depth * 2 + deck_depth]); + square([deck_holder_length, deck_holder_height]); translate([sonar_holder_depth, sonar_holder_depth]){ square(deck_depth);} - translate([sonar_holder_depth * 2 + deck_depth, sonar_holder_depth]){ - square([deck_holder_length - (sonar_holder_depth * 2 + deck_depth), - deck_depth]);}}}} + translate([deck_holder_height, sonar_holder_depth]){ + square([deck_holder_length - (deck_holder_height), deck_depth]);}}} + translate([deck_holder_length - oshw_dy * 0.05, 0, deck_holder_width / 2]) + scale([0.1, 1, 0.1]) + rotate(v = [1, 0, 0], a = 90) + rotate(90) + linear_extrude(height = 0.5) + oshw(); + translate([deck_holder_length - oshw_dy * 0.05, + deck_holder_height + 0.5, + deck_holder_width / 2]) + rotate(v = [1, 0, 0], a = 90) + rotate(90) + scale([0.1, 0.1, 1]) + linear_extrude(height = 0.5) + oshw();} deck_holder(); translate([0, sonar_holder_depth * 2 + deck_depth + 2, 0]){