| 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 | // sonar sensor measurements from https://www.thingiverse.com/thing:92869, |
| 8 | |
| 9 | // 3/8 inch in mm |
| 10 | deck_depth = 4.7625; |
| 11 | sonar_plate_width = 20; |
| 12 | sonar_plate_length = 45; |
| 13 | sonar_sensor_radius = 8; |
| 14 | sonar_sensor_height = 13.8; |
| 15 | sonar_holder_length = sonar_plate_length + 10; |
| 16 | sonar_holder_width = sonar_plate_width + 3; |
| 17 | sonar_holder_depth = 3; |
| 18 | between_sensor_centers = 27; |
| 19 | |
| 20 | module sensors(){ |
| 21 | translate([between_sensor_centers / 2, 0, 0]){ |
| 22 | cylinder(r = sonar_sensor_radius, h = sonar_sensor_height);} |
| 23 | translate([-between_sensor_centers / 2, 0, 0]){ |
| 24 | cylinder(r = sonar_sensor_radius, h = sonar_sensor_height);}} |
| 25 | |
| 26 | module deck_holder(){ |
| 27 | deck_holder_length = 25; |
| 28 | deck_holder_width = sonar_holder_width; |
| 29 | cube([deck_holder_length, deck_holder_width, sonar_holder_depth]); |
| 30 | translate([0, 0, sonar_holder_depth]){ |
| 31 | cube([deck_depth, deck_holder_width, deck_depth]); |
| 32 | translate([0, 0, deck_depth]){ |
| 33 | cube([deck_holder_length, deck_holder_width, sonar_holder_depth]);}}} |
| 34 | |
| 35 | module sonar_table_top_holder(){ |
| 36 | difference(){ |
| 37 | union(){ |
| 38 | cube([sonar_holder_length, sonar_holder_width, sonar_holder_depth]); |
| 39 | translate([sonar_holder_length, 0, 0]){ |
| 40 | deck_holder();}} |
| 41 | translate([between_sensor_centers / 2 + sonar_sensor_radius + 3, |
| 42 | sonar_holder_width / 2, |
| 43 | -1]){ |
| 44 | sensors();} |
| 45 | // cut out a bit of the circle to make it 3d printable, |
| 46 | // no severe overhang |
| 47 | translate([3 + sonar_sensor_radius, |
| 48 | sonar_holder_width - 3.025, |
| 49 | sonar_holder_depth / 2 - 0.025]){ |
| 50 | cube([10, 6.1, sonar_holder_depth + .1], center = true); |
| 51 | translate([between_sensor_centers, 0, 0]){ |
| 52 | cube([10, 6.1, sonar_holder_depth + .1], center = true);}}}} |
| 53 | |
| 54 | rotate([90, 0, 0]){ |
| 55 | sonar_table_top_holder();} |