add extension with hole for screw
[challenge-bot] / 3d-printables / sonar-binder-clip-holder-data.scad
CommitLineData
d899cf8b 1/*
2 Copyright 2016 Daniel Watson
3 See the end of the file for license conditions.
4*/
5/* challenge-bot
6// GNU AGPLv3 (or later at your option)
7// project available here:
8// https://challenge-bot.com/ */
9
10/*
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
16 of it.
17*/
18
ba144414 19$fn = 50;
d899cf8b 20
21sonar_diameter_measured = 15.82;
22sonar_diameter_print_fudge = 0.5;
23sonar_diameter = sonar_diameter_measured + sonar_diameter_print_fudge;
24sonar_radius = sonar_diameter / 2;
25
ba144414 26between_sonar_cans = 10.82;
27between_sonar_centers = sonar_diameter + between_sonar_cans;
28
8d53fefd 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.
31between_sonar_centers_variation = 2;
32
d7732ded 33wall_thickness = 3;
34
bfdc15e7 35screw_radius_measured = 2.8;
36screw_radius_print_fudge = 0.3;
37screw_radius = screw_radius_measured + screw_radius_print_fudge;
38
d7732ded 39module sonar_sensors_2d(sonar_radius,
40 between_sonar_centers,
41 between_sonar_centers_variation) {
42 hull(){
43 circle(sonar_radius);
44 translate([between_sonar_centers_variation, 0]){
45 circle(sonar_radius); } }
46 translate([between_sonar_centers, 0]) {
47 circle(sonar_radius); } }
48
49module sonar_holder_outline_2d(sonar_radius,
50 between_sonar_centers,
51 wall_thickness) {
52 holder_radius = sonar_radius + wall_thickness;
bfdc15e7 53 holder_diameter = holder_radius * 2;
d7732ded 54 hull() {
55 circle(holder_radius);
56 translate([between_sonar_centers, 0]) {
bfdc15e7 57 circle(holder_radius); }
58 translate([sonar_radius + between_sonar_centers, -holder_radius]) {
59 square([holder_diameter * 2, holder_diameter]); } } }
d7732ded 60
ba144414 61module sonar_binder_clip_holder(sonar_radius,
d7732ded 62 between_sonar_centers,
63 between_sonar_centers_variation,
64 wall_thickness) {
65 difference() {
66 sonar_holder_outline_2d(sonar_radius,
67 between_sonar_centers,
68 wall_thickness);
69 sonar_sensors_2d(sonar_radius,
70 between_sonar_centers,
bfdc15e7 71 between_sonar_centers_variation);
72 translate([sonar_radius +
73 between_sonar_centers +
74 3 * (wall_thickness + sonar_radius),
75 0,
76 0]) {
77 circle(screw_radius); } } }
d899cf8b 78
79/*
80 This file is part of challenge-bot.
81
82 Challenge-bot is free software: you can redistribute it and/or modify
83 it under the terms of the GNU Affero General Public License as published by
84 the Free Software Foundation, either version 3 of the License, or
85 (at your option) any later version.
86
87 GNU Affero Emacs is distributed in the hope that it will be useful,
88 but WITHOUT ANY WARRANTY; without even the implied warranty of
89 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
90 GNU Affero General Public License for more details.
91
92 You should have received a copy of the GNU Affero General Public License
93 along with challenge-bot. If not, see <http://www.gnu.org/licenses/>.
94*/