2 Copyright (C) 2015 Daniel Watson
3 See the end of the file for license conditions.
6 // GNU AGPLv3 (or later at your option)
7 // project available here:
8 // https://challenge-bot.com/
11 this holds an hc-sr04 sonar sensor to a 3/16 inch deck.
12 http://fritzing.org/projects/hc-sr04-project
13 it can hold the sonar sensor either facing down, or forwards.
14 when facing down, it can detect if it passes over the edge of a table.
15 when facing forwards, it can detect and follow something in front of it.
20 include
<oshw
-data
.scad
>
22 // 3/16 inch in mm deck_depth = 4.7625;
23 // 1/4 inch in mm = 6.35
24 // subtract a little to be a squeeze fit
25 deck_depth
= 4.7625 - 0.4;
26 // sonar sensor measurements taken with calipers:
27 // 10.82 in between, 42.33 outside, 15.82 diameter
28 // measured diameter of 15.82 with calipers,
29 // but when printed ends up being too small, so add some
30 sonar_diameter
= 15.82 + 0.4;
31 sonar_radius
= sonar_diameter
/ 2;
33 between_sonar_centers
= sonar_diameter
+ 10.82;
34 // the sonar cylinders are placed on the pcb at slightly different positions
35 // from one sensor to the next, so this allows for that variance.
36 between_sonar_centers_variance
= 2;
37 // keep at least this much plastic surrounding the sonar cylinder on all sides
39 sonar_holder_length
= buffer
+ between_sonar_centers
+ sonar_diameter
+ buffer
;
40 sonar_holder_width
= buffer
+ sonar_diameter
+ buffer
;
42 // sonar_holder_depth is deck_depth minus a little bit to make arm fit
44 sonar_holder_depth
= deck_depth
- 0.7875;
46 deck_holder_length
= sonar_holder_depth
* 2 + deck_depth
+ 15;
48 module
deck_holder() {
50 deck_holder_width
= sonar_holder_width
- deck_depth
;
51 deck_holder_height
= sonar_holder_depth
* 2 + deck_depth
;
52 linear_extrude(height
= deck_holder_width
) {
54 square([deck_holder_length
, deck_holder_height
]);
55 translate([sonar_holder_depth
- 0.15, sonar_holder_depth
- 0.15]) {
58 This file is part of challenge-bot.
60 Challenge-bot is free software: you can redistribute it and/or modify
61 it under the terms of the GNU Affero General Public License as published by
62 the Free Software Foundation, either version 3 of the License, or
63 (at your option) any later version.
65 GNU Affero Emacs is distributed in the hope that it will be useful,
66 but WITHOUT ANY WARRANTY; without even the implied warranty of
67 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
68 GNU Affero General Public License for more details.
70 You should have received a copy of the GNU Affero General Public License
71 along with challenge-bot. If not, see <http://www.gnu.org/licenses/>.
73 square(deck_depth
+ 0.3); }
74 translate([deck_holder_height
, sonar_holder_depth
- 0.3]) {
75 square([deck_holder_length
- (deck_holder_height
),
76 deck_depth
+ 0.6]); } } }
77 translate([deck_holder_length
- oshw_dy
* 0.05, 0, deck_holder_width
/ 2])
79 rotate(v
= [1, 0, 0], a
= 90)
81 linear_extrude(height
= 0.5)
83 translate([deck_holder_length
- oshw_dy
* 0.05,
84 deck_holder_height
+ 0.5,
85 deck_holder_width
/ 2])
86 rotate(v
= [1, 0, 0], a
= 90)
89 linear_extrude(height
= 0.5)