define wiring in separate file
[challenge-bot] / 3d-printables / caster-standoff-data.scad
1 /*
2 Copyright (C) 2015 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 use <oshw.scad>
11
12 // use 10 ish for development, 60 or so for printing
13 $fn = 100;
14
15 /* measured with calipers */
16 ball_diameter = 11 + 0.85; // extra bit added for printing imprecision
17 ball_radius = ball_diameter / 2;
18
19 standoff_height = 60; // kyle eyeballed
20
21 /*
22 notes on printing:
23 * slow down just before top solid infill of deck flange
24 * slow down just before switching from solid to forked portion of standoff
25 */
26
27 gap = 3;
28 wall_thickness = 1;
29 holder_floor = 3;
30 holder_arms_length = 20;
31 holder_height =
32 holder_floor + holder_arms_length + (3 / 4) * ball_diameter;
33
34 holder_radius = ball_radius + wall_thickness;
35 holder_diameter = holder_radius * 2;
36
37 standoff_radius = holder_radius; // 0.580 / 2 inches from spec sheet
38 standoff_lower_portion_height = standoff_height - holder_height;
39
40 // eyeballed caster flange height, (0.580/5) inches, times 2 to be stronger
41 caster_flange_height = 5;
42 caster_flange_width = 20.32; // 0.800 inches
43
44 deck_pitch = 25.4; // measured center to center on grid on pegboard
45 deck_flange_height = 2.9464;
46 deck_flange_screw_radius = 3.556 / 2 + 0.4; // For #6 machine screws
47 deck_flange_radius = (deck_pitch) / 2 + deck_flange_screw_radius + 3;
48
49 module deck_flange() {
50 deck_pitch_diagonal = sqrt(2 * pow(deck_pitch, 2));
51 cylinder(h = deck_flange_height, r = holder_radius + 2);
52 difference() {
53 scale([0.40, 0.40, 1]) {
54 linear_extrude(height = deck_flange_height) {
55 oshw(); } }
56 for (ii = [-1, 1]) {
57 translate([deck_pitch_diagonal / 2 * ii, 0, -.1])
58 cylinder(h = deck_flange_height * 1.1,
59 r = deck_flange_screw_radius); }
60 translate([0, deck_pitch_diagonal / 2, -.1])
61 cylinder(h = deck_flange_height * 1.1,
62 r = deck_flange_screw_radius); } }
63
64 module deck_flange_reinforcement() {
65 translate([-deck_flange_radius,
66 -.5 * deck_flange_height / 2,
67 deck_flange_height]) {
68 difference() {
69 cube([deck_flange_radius, deck_flange_height / 2, deck_flange_radius]);
70 translate([-.1, -.05 * deck_flange_height, 0]) {
71 rotate([0, -45, 0]) {
72 cube([deck_flange_radius * 1.5, // 1.5 is bigger than sqrt(2)
73 deck_flange_height * 1.1, // 1.1 is bigger than 1
74 deck_flange_radius]); } } } } }
75
76 module ball_holder() {
77 difference() {
78 union() {
79 cylinder(r = holder_radius, h = holder_height);
80 translate([0, 0, holder_arms_length]) {
81 cylinder(r1 = holder_radius,
82 r2 = holder_radius + wall_thickness,
83 h = wall_thickness);
84 translate([0, 0, wall_thickness]) {
85 cylinder(r = wall_thickness + holder_radius,
86 h = holder_height
87 - holder_arms_length
88 - wall_thickness); } } }
89 translate([0, 0, ball_radius + holder_floor + holder_arms_length]) {
90 sphere(r = ball_radius); }
91 translate([0, 0, holder_floor + (holder_height - holder_floor) / 2 + 0.5]) {
92 cube([holder_diameter + wall_thickness * 2 + 0.1,
93 gap,
94 holder_height - holder_floor + 0.1],
95 center = true); } } }
96
97 module caster_standoff() {
98 cylinder(h = standoff_lower_portion_height,
99 r = standoff_radius);
100 deck_flange();
101 for (ii = [0:3]) {
102 rotate([0, 0, 45 + 90 * ii])
103 deck_flange_reinforcement(); }
104 translate([0, 0, standoff_lower_portion_height]) {
105 ball_holder(); } }
106
107 /*
108 This file is part of challenge-bot.
109
110 Challenge-bot is free software: you can redistribute it and/or modify
111 it under the terms of the GNU Affero General Public License as published by
112 the Free Software Foundation, either version 3 of the License, or
113 (at your option) any later version.
114
115 GNU Affero Emacs is distributed in the hope that it will be useful,
116 but WITHOUT ANY WARRANTY; without even the implied warranty of
117 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
118 GNU Affero General Public License for more details.
119
120 You should have received a copy of the GNU Affero General Public License
121 along with challenge-bot. If not, see <http://www.gnu.org/licenses/>.
122 */