make oshw logo stick out a little more
[challenge-bot] / 3d-printables / deck-holder-data.scad
CommitLineData
25cd00a6 1/*
2 Copyright (C) 2015 Daniel Watson
3 See the end of the file for license conditions.
4*/
3d90aff0 5// challenge-bot
6// GNU AGPLv3 (or later at your option)
25cd00a6 7// project available here:
8// https://challenge-bot.com/
3d90aff0 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 of it.
16 */
17
18$fn = 60;
19
78a38e00 20include <oshw-data.scad>
21
3d90aff0 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
25deck_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
30sonar_diameter = 15.82 + 0.4;
31sonar_radius = sonar_diameter / 2;
32sonar_height = 13.8;
33between_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.
36between_sonar_centers_variance = 2;
37// keep at least this much plastic surrounding the sonar cylinder on all sides
38buffer = 3;
39sonar_holder_length = buffer + between_sonar_centers + sonar_diameter + buffer;
40sonar_holder_width = buffer + sonar_diameter + buffer;
3d90aff0 41
3d90aff0 42// sonar_holder_depth is deck_depth minus a little bit to make arm fit
43// into deck holder
44sonar_holder_depth = deck_depth - 0.7875;
45
46deck_holder_length = sonar_holder_depth * 2 + deck_depth + 15;
47
3d90aff0 48module deck_holder() {
b2015e06 49 oshw_height = 0.75;
3d90aff0 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) {
53 difference() {
54 square([deck_holder_length, deck_holder_height]);
55 translate([sonar_holder_depth - 0.15, sonar_holder_depth - 0.15]) {
25cd00a6 56
57/*
58 This file is part of challenge-bot.
59
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.
64
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.
69
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/>.
72*/
3d90aff0 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])
78 scale([0.1, 1, 0.1])
79 rotate(v = [1, 0, 0], a = 90)
80 rotate(90)
81 linear_extrude(height = 0.5)
82 oshw();
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)
87 rotate(90)
88 scale([0.1, 0.1, 1])
89 linear_extrude(height = 0.5)
90 oshw(); }