fit #2 screw head for interlock
[challenge-bot] / 3d-printables / caster-standoff.scad
1 // challenge-bot
2 // GNU AGPLv3 (or later at your option)
3 // project available at these locations:
4 // https://gitorious.org/ozzloy/challenge-bot
5 // https://github.com/waynegramlich/challenge-bot
6
7 // use 10 ish for development, 60 or so for printing
8 $fn = 60;
9
10 standoff_radius = 14.732 / 2; // 0.580 / 2 inches from spec sheet
11 standoff_height = 55; // eyeballed
12
13 nut_short_side = 4.7; // from calipers
14 nut_height = 1.6; // from calipers
15
16 // eyeballed caster flange height, (0.580/5) inches, times 2 to be stronger
17 caster_flange_height = 5;
18 caster_flange_width = 20.32; // 0.800 inches
19 caster_flange_screw_radius = 2.286 / 2; // 0.090 inches
20 caster_flange_screw_length = 8; // eyeballed
21
22 deck_grid_width = 25.4; // measured center to center on grid on pegboard
23 deck_flange_height = 2.9464;
24 deck_flange_screw_radius = 3.556 / 2; // For #6 machine screws
25 deck_flange_radius = (deck_grid_width) / 2 + deck_flange_screw_radius + 3;
26
27 module deck_flange(){
28 difference(){
29 cylinder(h = deck_flange_height, r = deck_flange_radius);
30 for(ii = [-1, 1]){
31 translate([deck_grid_width / 2 * ii, 0, -.1])
32 cylinder(h = deck_flange_height * 1.1,
33 r = deck_flange_screw_radius);
34 translate([0, deck_grid_width / 2 * ii, -.1])
35 cylinder(h = deck_flange_height * 1.1,
36 r = deck_flange_screw_radius);}}}
37
38 module deck_flange_reinforcement(){
39 translate([-deck_flange_radius,
40 -.5 * deck_flange_height / 2,
41 deck_flange_height]){
42 difference (){
43 cube([deck_flange_radius, deck_flange_height / 2, deck_flange_radius]);
44 translate([-.1, -.05 * deck_flange_height, 0]){
45 rotate([0, -45, 0]){
46 cube([deck_flange_radius * 1.5, // 1.5 is bigger than sqrt(2)
47 deck_flange_height * 1.1, // 1.1 is bigger than 1
48 deck_flange_radius]);}}}}}
49
50 module caster_flange_screws(){
51 translate([standoff_radius, 0, 0])
52 cylinder(h = caster_flange_screw_length,
53 r = caster_flange_screw_radius);
54 translate([-standoff_radius, 0, 0])
55 cylinder(h = caster_flange_screw_length,
56 r = caster_flange_screw_radius);}
57
58 module caster_flange(){
59 side_radius = caster_flange_width / 2 - standoff_radius;
60 hull(){
61 cylinder(h = caster_flange_height, r = standoff_radius);
62 translate([standoff_radius, 0, 0])
63 cylinder(h = caster_flange_height, r = side_radius);
64 translate([-standoff_radius, 0, 0])
65 cylinder(h = caster_flange_height, r = side_radius);}}
66
67 module nut(size, height){
68 width = size/1.75;
69 for (r = [-60, 0, 60]) rotate([0,0,r]) cube([width, size, height], true);}
70
71 module nuts(){
72 translate([standoff_radius, 0, nut_height/2])
73 nut(nut_short_side, nut_height + .1);
74 translate([-standoff_radius, 0, nut_height/2])
75 nut(nut_short_side, nut_height + .1);}
76
77 module _2_screw(){
78 //measured with calipers
79 screw_length = 8;
80 thread_radius = 2.17 / 2 - 0.1; // subtract 0.1 to make squeeze fit
81 head_height = 1.8;
82 head_radius = 4.1 / 2 + 0.2; // add 0.2 to allow head to fit
83 cylinder(r = thread_radius, h = screw_length);
84 cylinder(r = head_radius, h = head_height);}
85
86 module caster_deck_interlock_solid(){
87 translate([-1, standoff_radius - 2.1, 0]){
88 cube([2, 2, standoff_height]);}
89 translate([-1, -standoff_radius + 0.1, 0]){
90 cube([2, 2, standoff_height]);}}
91
92 module caster_deck_interlock_hole(){
93 translate([0, standoff_radius - 1, -0.1]){
94 cube([2.5, 2.5, standoff_height], center = true);}
95 translate([0, -standoff_radius + 1, -0.1]){
96 cube([2.5, 2.5, standoff_height], center = true);}}
97
98 module caster_standoff_deck_side(){
99 difference(){
100 cylinder(h = standoff_height - caster_flange_height,
101 r = standoff_radius);
102 translate([0, 0, standoff_height - caster_flange_screw_length * 1.1 + 0.1])
103 scale([1, 1, 1.1])
104 caster_flange_screws();
105 translate([0, 0, standoff_height - (caster_flange_height + nut_height)])
106 nuts();
107 translate([0, 0, standoff_height]){
108 // make hole to get to screw head depth
109 cylinder(r = 4.1 / 2 + 0.2, h = 3, center = true);
110 translate([0, 0, -0.7])
111 rotate([180, 0, 0])
112 _2_screw(r = 0.5, h = 5);}}
113 deck_flange();
114 for(ii = [0:3]){
115 rotate([0, 0, 45 + 90 * ii])
116 deck_flange_reinforcement();}
117 caster_deck_interlock_solid();}
118
119 module caster_standoff_caster_side(){
120 difference(){
121 caster_flange();
122 translate([0, 0, caster_flange_height - 0.7]){
123 rotate([180, 0, 0]){
124 _2_screw();}}
125 // make hole to get to screw head
126 translate([0, 0, caster_flange_height - 0.8]){
127 cylinder(r = 4.1 / 2 + 0.2, h = 10);}
128 translate([0, 0, -.1]){
129 caster_flange_screws();}
130 caster_deck_interlock_hole();}}
131
132 caster_standoff_deck_side();
133 translate([caster_flange_width / 2 + deck_flange_radius + 1, 0, 0]){
134 caster_standoff_caster_side();}