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_radius_measured
= 2.8;
36 screw_radius_print_fudge
= 0.3;
37 screw_radius
= screw_radius_measured
+ screw_radius_print_fudge
;
39 sonar_binder_clip_holder_height
= 2;
41 module
sonar_sensors_2d(sonar_radius
,
42 between_sonar_centers
,
43 between_sonar_centers_variation
) {
46 translate([between_sonar_centers_variation
, 0]){
47 circle(sonar_radius
); } }
48 translate([between_sonar_centers
, 0]) {
49 circle(sonar_radius
); } }
51 module
sonar_holder_outline_2d(sonar_radius
,
52 between_sonar_centers
,
54 holder_radius
= sonar_radius
+ wall_thickness
;
55 holder_diameter
= holder_radius
* 2;
57 circle(holder_radius
);
58 translate([between_sonar_centers
, 0]) {
59 circle(holder_radius
); } } }
61 module
binder_clip_holder_outline_2d(holder_radius
) {
62 circle(holder_radius
); }
64 module
sonar_binder_clip_holder_outline_2d() {
66 sonar_holder_outline_2d();
68 binder_clip_holder_outline_2d(); } } }
70 module
sonar_holder_holes_2d() { }
72 module
binder_clip_holder_holes_2d() { }
74 module
sonar_binder_clip_holder_holes_2d(){ }
76 module
sonar_binder_clip_holder_2d() {
78 sonar_binder_clip_holder_outline_2d();
79 sonar_binder_clip_holder_holes(); } }
81 module
sonar_holder_2d(sonar_radius
,
82 between_sonar_centers
,
83 between_sonar_centers_variation
,
86 sonar_holder_outline_2d(sonar_radius
,
87 between_sonar_centers
,
89 sonar_sensors_2d(sonar_radius
,
90 between_sonar_centers
,
91 between_sonar_centers_variation
); } }
93 module
binder_clip_holder_2d(binder_clip_holder_length
,
97 circle(holder_radius
);
98 circle(screw_radius
); } }
100 module
sonar_binder_clip_holder_2d(sonar_radius
,
101 between_sonar_centers
,
102 between_sonar_centers_variation
,
104 sonar_holder_2d(sonar_radius
,
105 between_sonar_centers
,
106 between_sonar_centers_variation
,
108 holder_radius
= sonar_radius
+ wall_thickness
;
109 binder_clip_holder_length
= 2 * holder_radius
;
110 translate([between_sonar_centers
+ holder_radius
* 2, 0]){
111 binder_clip_holder_2d(binder_clip_holder_length
,
115 module
sonar_binder_clip_holder(sonar_radius
,
116 between_sonar_centers
,
117 between_sonar_centers_variation
,
119 sonar_binder_clip_holder_height
) {
120 linear_extrude(height
= sonar_binder_clip_holder_height
) {
121 sonar_binder_clip_holder_2d(sonar_radius
,
122 between_sonar_centers
,
123 between_sonar_centers_variation
,
126 module
binder_clip_holder(binder_clip_holder_length
,
129 binder_clip_holder_height
) {
130 linear_extrude(height
= binder_clip_holder_height
) {
131 binder_clip_holder_2d(binder_clip_holder_length
,
136 This file is part of challenge-bot.
138 Challenge-bot is free software: you can redistribute it and/or modify
139 it under the terms of the GNU Affero General Public License as published by
140 the Free Software Foundation, either version 3 of the License, or
141 (at your option) any later version.
143 GNU Affero Emacs is distributed in the hope that it will be useful,
144 but WITHOUT ANY WARRANTY; without even the implied warranty of
145 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
146 GNU Affero General Public License for more details.
148 You should have received a copy of the GNU Affero General Public License
149 along with challenge-bot. If not, see <http://www.gnu.org/licenses/>.