2 Copyright 2016 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
21 sonar_diameter_measured
= 15.82;
22 sonar_diameter_print_fudge
= 0.5;
23 sonar_diameter
= sonar_diameter_measured
+ sonar_diameter_print_fudge
;
24 sonar_radius
= sonar_diameter
/ 2;
26 between_sonar_cans
= 10.82;
27 between_sonar_centers
= sonar_diameter
+ between_sonar_cans
;
29 // the sonar cylinders are placed on the pcb at slightly different positions
30 // from one sensor to the next, so this allows for that variance.
31 between_sonar_centers_variation
= 2;
35 screw_diameter_measured
= 3.45;
36 screw_radius_measured
= screw_diameter_measured
/ 2;
37 screw_radius_print_fudge
= 0.3;
38 screw_radius
= screw_radius_measured
+ screw_radius_print_fudge
;
40 sonar_binder_clip_holder_height
= 4;
42 module
sonar_sensor_holes_2d(sonar_radius
,
43 between_sonar_centers
,
44 between_sonar_centers_variation
) {
47 translate([between_sonar_centers_variation
, 0]){
48 circle(sonar_radius
); } }
49 translate([between_sonar_centers
, 0]) {
50 circle(sonar_radius
); } }
52 module
sonar_holder_outline_2d(holder_radius
,
53 between_sonar_centers
) {
55 circle(holder_radius
);
56 translate([between_sonar_centers
, 0]) {
57 circle(holder_radius
); } } }
59 module
binder_clip_holder_outline_2d(holder_radius
) {
60 circle(holder_radius
); }
62 module
sonar_binder_clip_holder_outline_2d(holder_radius
,
63 between_sonar_centers
) {
64 sonar_holder_length
= between_sonar_centers
+ 2 * holder_radius
;
66 sonar_holder_outline_2d(holder_radius
, between_sonar_centers
);
67 translate([sonar_holder_length
, 0]) {
68 binder_clip_holder_outline_2d(holder_radius
); } } }
70 module
binder_clip_holder_holes_2d(screw_radius
) {
71 circle(screw_radius
); }
73 module
binder_clip_holder_2d(holder_radius
,
76 binder_clip_holder_outline_2d(holder_radius
);
77 binder_clip_holder_holes_2d(screw_radius
); } }
79 module
binder_clip_holder(holder_radius
,
81 sonar_binder_clip_holder_height
) {
82 linear_extrude(height
= sonar_binder_clip_holder_height
) {
83 binder_clip_holder_2d(holder_radius
,
86 module
sonar_binder_clip_holder_holes_2d(sonar_radius
,
87 between_sonar_centers
,
88 between_sonar_centers_variation
,
91 holder_radius
= sonar_radius
+ wall_thickness
;
92 holder_diameter
= holder_radius
* 2;
93 holder_length
= between_sonar_centers
+ holder_diameter
;
94 sonar_sensor_holes_2d(sonar_radius
,
95 between_sonar_centers
,
96 between_sonar_centers_variation
);
97 translate([holder_length
, 0]){
98 binder_clip_holder_holes_2d(screw_radius
); } }
100 module
sonar_binder_clip_holder_2d(sonar_radius
,
101 between_sonar_centers
,
102 between_sonar_centers_variation
,
105 holder_radius
= sonar_radius
+ wall_thickness
;
107 sonar_binder_clip_holder_outline_2d(holder_radius
,
108 between_sonar_centers
);
109 sonar_binder_clip_holder_holes_2d(sonar_radius
,
110 between_sonar_centers
,
111 between_sonar_centers_variation
,
115 module
sonar_binder_clip_holder(sonar_radius
,
116 between_sonar_centers
,
117 between_sonar_centers_variation
,
120 sonar_binder_clip_holder_height
) {
121 linear_extrude(height
= sonar_binder_clip_holder_height
) {
122 sonar_binder_clip_holder_2d(sonar_radius
,
123 between_sonar_centers
,
124 between_sonar_centers_variation
,
129 This file is part of challenge-bot.
131 Challenge-bot is free software: you can redistribute it and/or modify
132 it under the terms of the GNU Affero General Public License as published by
133 the Free Software Foundation, either version 3 of the License, or
134 (at your option) any later version.
136 GNU Affero Emacs is distributed in the hope that it will be useful,
137 but WITHOUT ANY WARRANTY; without even the implied warranty of
138 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
139 GNU Affero General Public License for more details.
141 You should have received a copy of the GNU Affero General Public License
142 along with challenge-bot. If not, see <http://www.gnu.org/licenses/>.