forked from wolfmanjm/wolfhbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
x-carriage.scad
233 lines (184 loc) · 6.41 KB
/
x-carriage.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
// new 4 wheel x carriage for openrail and dual v wheels
// Add fan for cooling hot end
use <misumi-parts-library.scad>
use <dual-v-wheel.scad>
use <myLibs.scad>
use <XGantry-wide.scad>
use <squirrel-fan.scad>
use <MCAD/boxes.scad>
mm= 25.4;
columnfudge= 0.0; //fudge factor to get columns a bit bigger
//extruder_mount();
// display it for print == 1
Xcarriage(1);
// render it for model
//XcarriageModel();
//extruder();
//Xcarriage_with_wheels();
// the dimensions of the extrusion to run on
extrusion= 20;
extrusion_width= get_xgantry_width()+extrusion; // the side that the wheels run on
extrusion_height= 20;
line_ht= 3.6; // height of line above extrusion
// the thickness of the base
thickness = 10;
mountingplate_w= 25.6+5;
mountingplate_l= 70+2;
mountingplate_h= 5;
wheel_diameter = v_wheel_dia();
wheel_width= v_wheel_width();
wheel_id= v_wheel_id();
wheel_indent= v_wheel_indent();
bearingFlangeThickness= 1;
bearingThickness= 8- bearingFlangeThickness*2;
bearingOD= 13;
bearingID= 5;
bearingFlangeDia= 15;
belt_thick= 2; // 1.45
belt_width= 6;
wheel_penetration=0; // the amount the w wheel fits in the slot
wheel_clearance= 0; // clearance between the side of the extrusion and the carriage
pillarht= 1; // the amount the bushing sticks out
bushing_ht= 0.25*mm;
bushing_dia= 8;
rounding= 22;
clearance= 0; // increase for more clearance, decrease for tighter fit
wheel_separation= extrusion_width+wheel_diameter+clearance-wheel_penetration*2; // separation of two wheels and bottom wheel for given extrusion
// calculate separation of top two wheels to make an equilateral triangle
//wheel_distance= (wheel_separation/tan(60))*2; // distance from wheel center to center of top two wheels
wheel_distance= 80;
echo("wheel distance= ", wheel_distance);
wheel_z= pillarht+wheel_width/2;
function get_wheel_z()= wheel_z;
wheelpos= [ [-wheel_distance/2, 0, 0], [wheel_distance/2, 0, 0], [-wheel_distance/2, wheel_separation, 0], [wheel_distance/2, wheel_separation, 0]];
function get_wheelpos(n) = [wheelpos[n][0], -wheel_diameter/2];
idler1ht= -wheel_z+1.5 + 2;
idler2ht= idler1ht+bearingThickness+bearingFlangeThickness*2+1;
module XcarriageModel() {
Xcarriage(0);
// show V Wheels
for(p= wheelpos) {
translate(p + [0, 0, -wheel_z]) v_wheel();
}
// show what we are riding on
translate([0, get_xgantry_width()/2+10+wheel_diameter/2, -wheel_z-20]) {
translate([0,0,-11.5]) Xgantry();
// bolt head
color("blue") translate([0,-get_xgantry_width()/2,22]) cylinder(r=10/2, h=2);
}
// show extruder and hotend
translate([0,wheel_separation/2,thickness/2]) rotate([0,0,0]) extruder();
// Idler bearings
#translate([get_xgantry_length()/2-10, get_xgantry_width()/2+wheel_diameter/2-24, idler1ht]) idler();
translate([get_xgantry_length()/2-10, get_xgantry_width()/2+wheel_diameter/2+40, idler2ht]) idler();
// belt
color("white") translate([0, get_xgantry_width()/2+wheel_diameter/2-24+bearingOD/2, idler1ht]) cube(size=[300, belt_thick, belt_width]);
color("white") translate([0, get_xgantry_width()/2+wheel_diameter/2+40-bearingOD/2- belt_thick, idler2ht]) cube(size=[300, belt_thick, belt_width]);
}
module idler() {
color("green") difference() {
union() {
cylinder(r=bearingOD/2, h=bearingThickness);
translate([0, 0, -bearingFlangeThickness]) cylinder(r=bearingFlangeDia/2, h=bearingFlangeThickness);
translate([0, 0, bearingThickness]) cylinder(r=bearingFlangeDia/2, h=bearingFlangeThickness);
}
translate([0, 0, -2]) cylinder(r=bearingID/2, h=bearingThickness+4);
}
}
module Xcarriage_with_wheels() {
translate([0,-wheel_diameter/2,wheel_z]) {
Xcarriage(0);
// show W Wheels
for(p=wheelpos)
translate(p + [0, 0, -wheel_z]) v_wheel();
// show extruder and hotend
translate([0,wheel_separation/2,thickness/2]) extruder();
}
}
module wheel_pillar(){
translate([0,0,-0.1]) cylinder(r2=8/2, r1= 18/2, h=pillarht+0.1);
}
module base() {
co= 50;
r= rounding/2;
translate([0,0,-thickness+0.05]) linear_extrude(height= thickness) hull() {
for(p= wheelpos) {
translate(p) circle(r= r);
}
}
}
module hotend_extender() {
h= 35;
difference() {
translate([0, 0, -5]) roundedBox([65, 20, h], 8, true);
#translate([0, 0, 8]) hole(16.2, 5);
}
}
module Xcarriage(print=1) {
rotate([0,180,0]) {
if(print == 1) {
union() {
Xcarriage_main(1);
// bridging support layer
//translate([0,wheel_separation/2,-5]) rotate([0,0,90]) mountingplate(4, 1);
}
}else{
Xcarriage_main(0);
}
}
}
module Xcarriage_main(print=1) {
belt_d= 5;
belt_y1= get_xgantry_width()/2+wheel_diameter/2+20 - bearingOD/2 + belt_d/2;
belt_y2= get_xgantry_width()/2+wheel_diameter/2-20 + bearingOD/2 - belt_d/2;
difference() {
union() {
base();
// extension for hotend
translate([0, wheel_separation/2, 15]) hotend_extender();
}
for(p=wheelpos) {
// bushing holes
translate(p + [0,0,-(bushing_ht-pillarht)]) hole(bushing_dia, bushing_ht);
// M5 holes for wheels
translate(p + [0,0,-50/2]) hole(5,50);
}
if(print == 1) {
for(p= [wheelpos[2], wheelpos[3]]) {
// slot for adjustable wheel
translate(p + [0,0,-50/2]) rotate([0,0,90]) slot(5,12,50);
// slot for bushing
translate(p + [0,0,-(bushing_ht-pillarht)]) rotate([0,0,90]) slot(bushing_dia,15,bushing_ht);
}
}
// grub screw at bottom for adjusting tightness of bottom wheels
for(p= [wheelpos[2], wheelpos[3]]) {
translate(p+ [0,rounding/2+2,-thickness/2+3/2]) rotate([90,0,0]) hole(3,rounding/2);
translate(p+ [0,14/2+1.0,-thickness/2+3/2]) rotate([90,30,0]) nutTrap(ffd=5.46,height=5);
translate(p+ [0,14/2,0]) cube([5.46,3,thickness], center=true);
}
// extruder mounting holes
#for (a = [-25,25]) translate([a, wheel_separation/2, -20]) rotate([0, 0, 0]) slot(4, 8, 70);
// hole for filament
#translate([0, wheel_separation/2, -100]) hole(4, 200);
// termination for belts
for(y= [belt_y1, belt_y2]) for(m= [0,1]){
mirror([m,0,0]) {
#translate([40,y,-20]) hole(5, 30);
}
}
}
}
module mountingplate(clearance=0) {
x= mountingplate_w+clearance;
y= mountingplate_l+clearance;
translate([-x/2, -y/2,0]) cube([x, y, mountingplate_h]);
}
// extruder and head
module extruder() {
h= 37;
#translate([0,0,-h])rotate([0,0,90]) mountingplate();
translate([22,-42,6]) rotate([0,0,0]) import("greg-wades-all.stl");
//translate([2,12,mountingplate_h+4.6]) rotate([90,0,0,0,0]) import("me_body_v5.2_3mm.stl");
translate([0,0,-h+9.5]) rotate([180,0,0]) import("JHead_hotend_blank/jhead.stl");
}