dac38b58 |
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 | |
978bd219 |
7 | $fn = 60; |
8 | |
9 | // 3/16 inch in mm deck_depth = 4.7625; |
be16f419 |
10 | // 1/4 inch in mm = 6.35 |
11 | // subtract a little to be a squeeze fit |
8b340909 |
12 | deck_depth = 4.7625 - 0.4; |
dac38b58 |
13 | sonar_plate_width = 20; |
8ca271e9 |
14 | // sonar sensor measurements taken with calipers: |
49bffb72 |
15 | // 10.82 in between, 42.33 outside, 15.82 diameter |
8ca271e9 |
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; |
dac38b58 |
19 | sonar_sensor_height = 13.8; |
4d9ff1c6 |
20 | between_sensor_centers = sonar_sensor_radius * 2 + 10.82; |
21 | between_sensor_centers_variance = 2; |
bc750455 |
22 | buffer = 3; |
23 | sonar_plate_length = |
24 | buffer + between_sensor_centers + sonar_sensor_radius + buffer; |
74f8c088 |
25 | sonar_holder_length = sonar_plate_length + 10; |
26 | sonar_holder_width = sonar_plate_width + 3; |
bc750455 |
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; |
8ca271e9 |
30 | |
bc750455 |
31 | deck_holder_length = sonar_holder_depth * 2 + deck_depth + 15; |
74f8c088 |
32 | |
33 | module sensors(){ |
34 | translate([between_sensor_centers / 2, 0, 0]){ |
35 | cylinder(r = sonar_sensor_radius, h = sonar_sensor_height);} |
4d9ff1c6 |
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]);}} |
74f8c088 |
44 | translate([-between_sensor_centers / 2, 0, 0]){ |
45 | cylinder(r = sonar_sensor_radius, h = sonar_sensor_height);}} |
46 | |
49bffb72 |
47 | module sensor_holder(){ |
bc750455 |
48 | arm_depth = sonar_holder_depth; |
60061640 |
49 | elbow_length = deck_depth + 0.8; |
49bffb72 |
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();}} |
bc750455 |
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]){ |
60061640 |
57 | linear_extrude(height = arm_depth){ |
58 | polygon([[0, 0], |
bc750455 |
59 | [arm_depth, 0], |
60 | [arm_depth, sonar_holder_width / 2], |
61 | [0, sonar_holder_width / 2 + arm_depth]]);} |
60061640 |
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]]);}}}}} |
49bffb72 |
71 | |
74f8c088 |
72 | module deck_holder(){ |
be16f419 |
73 | deck_holder_width = sonar_holder_width - deck_depth; |
bc750455 |
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]);}}}} |
74f8c088 |
82 | |
be16f419 |
83 | translate([0, sonar_holder_depth * 2 + deck_depth + 2, 0]){ |
84 | sensor_holder();} |
85 | deck_holder(); |