| 1 | // challenge-bot |
| 2 | // GNU AGPLv3 (or later at your option) |
| 3 | // project available at these locations: |
| 4 | // https://gitorious.org/ozzloy/challenge-bot |
| 5 | // https://github.com/waynegramlich/challenge-bot |
| 6 | |
| 7 | $fn = 60; |
| 8 | |
| 9 | // 3/16 inch in mm deck_depth = 4.7625; |
| 10 | // 1/4 inch in mm - a little to be a squeeze fit |
| 11 | deck_depth = 6.35 - 0.4; |
| 12 | sonar_plate_width = 20; |
| 13 | // sonar sensor measurements taken with calipers: |
| 14 | // 10.82 in between, 42.33 outside, 15.82 diameter |
| 15 | // measured diameter of 15.82 with calipers, |
| 16 | // but when printed ends up being too small |
| 17 | sonar_sensor_radius = 15.82 / 2 + 0.3; |
| 18 | sonar_sensor_height = 13.8; |
| 19 | between_sensor_centers = 15.82 + 10.82; |
| 20 | sonar_plate_length = 3 + between_sensor_centers + sonar_sensor_radius + 3; |
| 21 | sonar_holder_length = sonar_plate_length + 10; |
| 22 | sonar_holder_width = sonar_plate_width + 3; |
| 23 | sonar_holder_depth = 4; |
| 24 | |
| 25 | deck_holder_length = 30; |
| 26 | deck_holder_width = sonar_holder_width; |
| 27 | |
| 28 | module sensors(){ |
| 29 | translate([between_sensor_centers / 2, 0, 0]){ |
| 30 | cylinder(r = sonar_sensor_radius, h = sonar_sensor_height);} |
| 31 | translate([-between_sensor_centers / 2, 0, 0]){ |
| 32 | cylinder(r = sonar_sensor_radius, h = sonar_sensor_height);}} |
| 33 | |
| 34 | module sensor_holder(){ |
| 35 | difference(){ |
| 36 | cube([sonar_holder_length, sonar_holder_width, sonar_holder_depth]); |
| 37 | translate([sonar_holder_length / 2, sonar_holder_width / 2, -0.05]){ |
| 38 | sensors();}} |
| 39 | translate([sonar_holder_length, 0, 0]){ |
| 40 | cube([sonar_holder_depth + 0.3, deck_depth - 0.3, deck_depth - 0.3]); |
| 41 | translate([sonar_holder_depth + 0.3, 0, 0]){ |
| 42 | // subtract a little bit (0.3) to make it fit |
| 43 | cube([deck_depth - 0.3, sonar_holder_width, deck_depth - 0.3]);}}} |
| 44 | |
| 45 | module deck_holder(){ |
| 46 | cube([deck_holder_length, sonar_holder_depth, sonar_holder_width]); |
| 47 | cube([sonar_holder_depth, |
| 48 | sonar_holder_depth * 2 + deck_depth, |
| 49 | sonar_holder_width]); |
| 50 | translate([0, sonar_holder_depth + deck_depth, 0]){ |
| 51 | cube([deck_holder_length, sonar_holder_depth, sonar_holder_width]);} |
| 52 | translate([sonar_holder_depth + deck_depth, 0, 0]){ |
| 53 | cube([sonar_holder_depth, |
| 54 | sonar_holder_depth * 2 + deck_depth, |
| 55 | sonar_holder_width]);}} |
| 56 | |
| 57 | module sonar_table_top_holder(){ |
| 58 | difference(){ |
| 59 | union(){ |
| 60 | cube([sonar_holder_length, sonar_holder_width, sonar_holder_depth]); |
| 61 | translate([sonar_holder_length, 0, 0]){ |
| 62 | deck_holder();}} |
| 63 | translate([between_sensor_centers / 2 + sonar_sensor_radius + 3, |
| 64 | sonar_holder_width / 2, |
| 65 | -1]){ |
| 66 | sensors();} |
| 67 | // cut out a bit of the circle to make it 3d printable, |
| 68 | // no severe overhang |
| 69 | translate([3 + sonar_sensor_radius, |
| 70 | sonar_holder_width - 3.025, |
| 71 | sonar_holder_depth / 2 - 0.025]){ |
| 72 | cube([10, 6.1, sonar_holder_depth + .1], center = true); |
| 73 | translate([between_sensor_centers, 0, 0]){ |
| 74 | cube([10, 6.1, sonar_holder_depth + .1], center = true);}}}} |
| 75 | |
| 76 | sensor_holder(); |