| 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 = 6.35 |
| 11 | // subtract a little to be a squeeze fit |
| 12 | deck_depth = 4.7625 - 0.4; |
| 13 | sonar_plate_width = 20; |
| 14 | // sonar sensor measurements taken with calipers: |
| 15 | // 10.82 in between, 42.33 outside, 15.82 diameter |
| 16 | // measured diameter of 15.82 with calipers, |
| 17 | // but when printed ends up being too small |
| 18 | sonar_sensor_radius = 15.82 / 2 + 0.3; |
| 19 | sonar_sensor_height = 13.8; |
| 20 | between_sensor_centers = sonar_sensor_radius * 2 + 10.82; |
| 21 | between_sensor_centers_variance = 2; |
| 22 | buffer = 3; |
| 23 | sonar_plate_length = |
| 24 | buffer + between_sensor_centers + sonar_sensor_radius + buffer; |
| 25 | sonar_holder_length = sonar_plate_length + 10; |
| 26 | sonar_holder_width = sonar_plate_width + 3; |
| 27 | // sonar_holder_depth is deck_depth minus a little bit to make arm fit |
| 28 | // into deck holder |
| 29 | sonar_holder_depth = deck_depth - 0.8; |
| 30 | |
| 31 | deck_holder_length = sonar_holder_depth * 2 + deck_depth + 15; |
| 32 | |
| 33 | module sensors(){ |
| 34 | translate([between_sensor_centers / 2, 0, 0]){ |
| 35 | cylinder(r = sonar_sensor_radius, h = sonar_sensor_height);} |
| 36 | translate([between_sensor_centers / 2 - between_sensor_centers_variance, |
| 37 | 0, |
| 38 | 0]){ |
| 39 | cylinder(r = sonar_sensor_radius, h = sonar_sensor_height); |
| 40 | translate([0, -sonar_sensor_radius, 0]){ |
| 41 | cube([between_sensor_centers_variance, |
| 42 | sonar_sensor_radius * 2, |
| 43 | sonar_sensor_height]);}} |
| 44 | translate([-between_sensor_centers / 2, 0, 0]){ |
| 45 | cylinder(r = sonar_sensor_radius, h = sonar_sensor_height);}} |
| 46 | |
| 47 | module sensor_holder(){ |
| 48 | arm_depth = sonar_holder_depth; |
| 49 | elbow_length = deck_depth + 0.8; |
| 50 | difference(){ |
| 51 | cube([sonar_holder_length, sonar_holder_width, sonar_holder_depth]); |
| 52 | translate([sonar_holder_length / 2, sonar_holder_width / 2, -0.05]){ |
| 53 | sensors();}} |
| 54 | translate([sonar_holder_length - 1, 0, 0]){ |
| 55 | cube([elbow_length + arm_depth + 1, deck_depth, arm_depth]); |
| 56 | translate([elbow_length + 1, 0, 0]){ |
| 57 | linear_extrude(height = arm_depth){ |
| 58 | polygon([[0, 0], |
| 59 | [arm_depth, 0], |
| 60 | [arm_depth, sonar_holder_width / 2], |
| 61 | [0, sonar_holder_width / 2 + arm_depth]]);} |
| 62 | translate([0, (sonar_holder_width + arm_depth) / 2, 0]){ |
| 63 | cube([arm_depth / 2, |
| 64 | (sonar_holder_width - arm_depth) / 2 + 0.8, |
| 65 | arm_depth]);} |
| 66 | translate([-1.7, sonar_holder_width + 0.8, 0]){ |
| 67 | linear_extrude(height = arm_depth){ |
| 68 | polygon([[0, 0], |
| 69 | [arm_depth / 2 + 1.7, 4], |
| 70 | [arm_depth / 2 + 1.7, 0]]);}}}}} |
| 71 | |
| 72 | module deck_holder(){ |
| 73 | deck_holder_width = sonar_holder_width - deck_depth; |
| 74 | linear_extrude(height = deck_holder_width){ |
| 75 | difference(){ |
| 76 | square([deck_holder_length, sonar_holder_depth * 2 + deck_depth]); |
| 77 | translate([sonar_holder_depth, sonar_holder_depth]){ |
| 78 | square(deck_depth);} |
| 79 | translate([sonar_holder_depth * 2 + deck_depth, sonar_holder_depth]){ |
| 80 | square([deck_holder_length - (sonar_holder_depth * 2 + deck_depth), |
| 81 | deck_depth]);}}}} |
| 82 | |
| 83 | translate([0, sonar_holder_depth * 2 + deck_depth + 2, 0]){ |
| 84 | sensor_holder();} |
| 85 | deck_holder(); |