forked from CarlosGS/Cyclone-PCB-Factory
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCycl_X_carriage.scad
271 lines (240 loc) · 14 KB
/
Cycl_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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
// This file is part of Cyclone PCB Factory: an open-source 3D printable CNC machine for PCB manufacture
// http://reprap.org/wiki/Cyclone_PCB_Factory
// Original author: Carlosgs (http://carlosgs.es)
// License: CC BY-SA 4.0 (Attribution-ShareAlike 4.0 International, http://creativecommons.org/licenses/by-sa/4.0/)
// Designed with http://www.openscad.org/
rod_nut_len = 0.8*axes_Xthreaded_rodD;
washer_D = X_backlash_washer_D;
washer_thickness = X_backlash_washer_thickness;
holderExtension = 10;
use <libs/linear_bearing.scad>
use <libs/standard_parts.scad>
module Cyclone_X_carriage() {
linearBearingLength = linearBearing_L(X_linearBearingModel);
linearBearingDiameter = linearBearing_D(X_linearBearingModel);
// Correction is needed to account for 3D printer tolerances
axes_effective_Xsmooth_separation = axes_Xsmooth_separation-axes_Xsmooth_separation_tolerance;
sideExtensions = linearBearingDiameter/3+2;
ZrodHolderLength = 30;
screwSize = X_carriage_screwSize;
screwLength = linearBearingDiameter+sideExtensions;
screwAditionalLength = 2;
screwExtension = screwSize*1.2;
linearBearingLengthExtension = 6+max(axes_Zsmooth_rodD+axes_Zsmooth_separation-2*linearBearingLength-X_linearBearingSeparation, X_linearBearingSeparation);
dimX = 2*linearBearingLength+linearBearingLengthExtension;
module Cyclone_XsubPart_ZnutHolder(holes=false) {
rodTolerance = X_threaded_rod_Tolerance;
rodSize = Z_threaded_rodNutSize; // M3, M4, etc (integers only)
dimZ = rod_nut_len+3; // Nut holder thickness
if(!holes) {
rotate([0,180,0])
hull() {
cylinder(r=axes_Zthreaded_rodD+1, h=dimZ);
translate([0,-axes_Zreference_posY-axes_ZthreadedReference_posY+axes_effective_Xsmooth_separation,dimZ/2])
cube([dimX,0.1,dimZ], center=true);
}
} else {
// Hole for the main Z nut
translate([0,0,0.1]) rotate([90,0,0]) hole_for_nut(size=rodSize,nutAddedLen=0,captiveLen=0, tolerance=0.2);
// Hole for the Z threaded rod
translate([0,0,-axes_effective_Xsmooth_separation+dimZ])
rotate([90,0,0]) standard_rod(diam=axes_Zthreaded_rodD+rodTolerance, length=axes_effective_Xsmooth_separation*2, threaded=true, renderPart=true, center=true);
translate([0,0,-dimZ-0.01]) rotate([180,0,0]) cylinder(r=axes_Zthreaded_rodD*0.9, h=axes_effective_Xsmooth_separation+dimZ*2, $fn=6);
}
}
module Cyclone_XsubPart_XnutHolder(holes=false) {
rodSize = X_threaded_rodNutSize; // M3, M4, etc (integers only)
armWidth = axes_Xthreaded_rodD*2+6;
if(!holes) {
// Main shape
translate([X_backlash_armThickness/2,0,-axes_effective_Xsmooth_separation/2+holderExtension])
rotate([0,90,0]) bcube([axes_effective_Xsmooth_separation,armWidth,X_backlash_armThickness], cr=3,cres=10);
*translate([32/2,0,0])
rotate([180,0,0]) rotate([0,0,90]) Cyclone_YsubPart_nutHolder();
} else {
if(draw_references) %frame();
translate([-rod_nut_len/2+1,0,0]) rotate([0,0,-90]) rotate([180,0,0]) {
// Hole for the main nut
hull() {
rotate([0,180,0]) hole_for_nut(size=rodSize,nutAddedLen=0,captiveLen=axes_Xthreaded_rodD*3,rot=90,tolerance=0.1);
translate([0,-3.25,0])
rotate([0,180,0]) hole_for_nut(size=rodSize-2,nutAddedLen=0,captiveLen=axes_Xthreaded_rodD*3,rot=90,tolerance=0.1);
}
translate([0,3,0])
hull() {
rotate([0,180,0]) hole_for_nut(size=rodSize,nutAddedLen=0,captiveLen=axes_Xthreaded_rodD*3,rot=90,tolerance=0.1);
translate([0,4,0])
rotate([0,180,0]) hole_for_nut(size=rodSize+2,nutAddedLen=0,captiveLen=axes_Xthreaded_rodD*3,rot=90,tolerance=0.1);
}
// Hole for the sliding nut
translate([0,-rod_nut_len-3-washer_thickness/2,0]) hull() {
rotate([0,180,0]) hole_for_nut(size=rodSize,nutAddedLen=X_backlash_armThickness,captiveLen=axes_Xthreaded_rodD*3,rot=90,tolerance=0.3);
translate([0,-2.25,0])
rotate([0,180,0]) hole_for_nut(size=rodSize,nutAddedLen=X_backlash_armThickness,captiveLen=axes_Xthreaded_rodD*3,rot=90,tolerance=0.3);
}
// Hole for the rod
rotate([0,180,0])hole_for_nut(size=rodSize-2,nutAddedLen=X_backlash_armThickness,captiveLen=axes_Xthreaded_rodD*3,rot=90,tolerance=0.1);
}
// Hole for the washer
translate([rod_nut_len/2+3+1,0,0]) rotate([0,0,-90]) rotate([180,0,0])
hull() {
hull() {
washer_single(diam=washer_D, thickness=washer_thickness, renderPart=true, tolerance=0.3);
translate([0,0,-holderExtension*2])
washer_single(diam=washer_D, thickness=washer_thickness, renderPart=true, tolerance=0.3);
}
hull() {
washer_single(diam=rodSize, thickness=4.5+washer_thickness, renderPart=true, tolerance=0.3);
translate([0,0,-holderExtension*2])
washer_single(diam=rodSize, thickness=4.5+washer_thickness, renderPart=true, tolerance=0.3);
}
}
*translate([-0.01+rod_nut_len/2+6,0,0])
hull() {
rotate([0,0,-90]) hole_for_nut(size=rodSize,nutAddedLen=-1.25,captiveLen=axes_Xthreaded_rodD*3,rot=90,tolerance=0.1);
translate([2,0,0])
rotate([0,0,-90]) hole_for_nut(size=rodSize-2,nutAddedLen=0,captiveLen=axes_Xthreaded_rodD*3,rot=90,tolerance=0.1);
}
*translate([X_backlash_armThickness+0.01,0,0])
rotate([0,0,-90]) hole_for_nut(size=rodSize-2,nutAddedLen=X_backlash_armThickness,captiveLen=axes_Xthreaded_rodD*3,rot=90,tolerance=0.1);
}
}
module Cyclone_XsubPart_XnutHolder_SINGLE_NUT(holes=false) {
rodSize = X_threaded_rodNutSize; // M3, M4, etc (integers only)
washer_D = X_backlash_washer_D;
armWidth = axes_Xthreaded_rodD*2+5;
X_backlash_armThickness = rod_nut_len*2;
if(!holes) {
translate([X_backlash_armThickness/2,0,-axes_effective_Xsmooth_separation/2+washer_D/2])
rotate([0,90,0]) bcube([axes_effective_Xsmooth_separation,armWidth,X_backlash_armThickness], cr=3,cres=10);
} else {
if(draw_references) %frame();
translate([-0.01+rod_nut_len/2+6,0,0])
hull() {
rotate([0,0,-90]) hole_for_nut(size=8,nutAddedLen=-1.25,captiveLen=axes_Xthreaded_rodD*3,rot=90,tolerance=0.1);
translate([2,0,0])
rotate([0,0,-90]) hole_for_nut(size=6,nutAddedLen=0,captiveLen=axes_Xthreaded_rodD*3,rot=90,tolerance=0.1);
}
translate([X_backlash_armThickness+0.01,0,0])
rotate([0,0,-90]) hole_for_nut(size=6,nutAddedLen=X_backlash_armThickness,captiveLen=axes_Xthreaded_rodD*3,rot=90,tolerance=0.1);
}
}
module Cyclone_XsubPart_XendstopBumper() {
XendBumper_x = 5;
XendBumper_y = 53;
XendBumper_z = 12;
XendBumper_D = 15;
translate([XendBumper_x/2, XendBumper_y/2-axes_Xsmooth_separation/2, -XendBumper_z/2-linearBearingDiameter/2]) {
rotate([0,90,0]) bcube([XendBumper_z,XendBumper_y,XendBumper_x], cr=XendBumper_z/2-0.01, cres=10);
translate([0,XendBumper_y/2-XendBumper_z/2,0])
rotate([0,90,0]) cylinder(r=XendBumper_D/2, h=XendBumper_x, center=true);
//rotate([0,90,0]) bcube([XendBumper_z,XendBumper_y,XendBumper_x], cr=XendBumper_z/2-0.01, cres=10);
}
}
color(color_movingPart) difference() {
// Main shape
union() {
hull() {
rotate([0,90,0])
bcube([linearBearingDiameter,linearBearingDiameter+sideExtensions, dimX], cr=3, cres=5);
translate([0,axes_effective_Xsmooth_separation,axes_effective_Xsmooth_separation])
rotate([0,90,0])
bcube([linearBearingDiameter+sideExtensions,linearBearingDiameter, dimX], cr=3, cres=5);
}
translate([0,0,-screwExtension/2])
rotate([0,90,0])
bcube([linearBearingDiameter+screwExtension,linearBearingDiameter+sideExtensions, dimX], cr=3, cres=5);
translate([0,axes_effective_Xsmooth_separation+screwExtension/2,axes_effective_Xsmooth_separation])
rotate([0,90,0])
bcube([linearBearingDiameter+sideExtensions,linearBearingDiameter+screwExtension, dimX], cr=3, cres=5);
// Bottom right screw
translate([-linearBearingLength/2-X_linearBearingSeparation/2,0,-linearBearingDiameter/2-screwExtension/2])
rotate([90,0,0]) cylinder(r=screwSize*2,h=screwLength, center=true, $fn=6);
// Bottom left screw
translate([linearBearingLength/2+X_linearBearingSeparation/2,0,-linearBearingDiameter/2-screwExtension/2])
rotate([90,0,0]) cylinder(r=screwSize*2,h=screwLength, center=true, $fn=6);
// Top screw
translate([0,axes_effective_Xsmooth_separation+screwExtension/2+linearBearingDiameter/2,axes_effective_Xsmooth_separation])
cylinder(r=screwSize*2,h=screwLength, center=true, $fn=6);
// Z nut holder
translate([0,axes_Zreference_posY+axes_ZthreadedReference_posY,axes_effective_Xsmooth_separation+(linearBearingDiameter+sideExtensions)/2])
Cyclone_XsubPart_ZnutHolder(holes=false);
// X nut holder
translate([-dimX/2,axes_effective_Xsmooth_separation,0])
rotate([-135,0,0]) Cyclone_XsubPart_XnutHolder(holes=false);
// X endstop bumper
translate([-dimX/2,axes_effective_Xsmooth_separation,axes_effective_Xsmooth_separation])
Cyclone_XsubPart_XendstopBumper();
}
// ----- Hole for the Z carriage space ------
difference() {
translate([-dimX/2-0.5,0,-sideExtensions+ZrodHolderLength])
cube([dimX+1,axes_Zreference_posY+axes_ZthreadedReference_posY,axes_effective_Xsmooth_separation]);
translate([0,axes_Zreference_posY+axes_ZthreadedReference_posY,axes_effective_Xsmooth_separation+(linearBearingDiameter+sideExtensions)/2])
Cyclone_XsubPart_ZnutHolder(mainPart=true);
}
// ----- Hole for the spindle tool ------
translate([0,-35+8.5,0])
cylinder(r=34/2, h=100, center=true);
// ----- Holes for the linear bearings ------
// Bottom right linear bearing
translate([-linearBearingLength/2-X_linearBearingSeparation/2,0,0])
rotate([0,0,90]) linearBearingHole(model=X_linearBearingModel, lateralExtension=sideExtensions*2+screwExtension*2, pressureFitTolerance=LinearBearingPressureFitTolerance, lengthExtension=linearBearingLengthExtension);
// Bottom left linear bearing
translate([linearBearingLength/2+X_linearBearingSeparation/2,0,0])
rotate([0,0,90]) linearBearingHole(model=X_linearBearingModel, lateralExtension=sideExtensions*2+screwExtension*2, pressureFitTolerance=LinearBearingPressureFitTolerance, lengthExtension=linearBearingLengthExtension);
// Top linear bearing
translate([0,axes_effective_Xsmooth_separation,axes_effective_Xsmooth_separation])
rotate([90,0,0]) rotate([0,0,90]) linearBearingHole(model=X_linearBearingModel, lateralExtension=sideExtensions*2+screwExtension*2, pressureFitTolerance=LinearBearingPressureFitTolerance, lengthExtension=linearBearingLength+linearBearingLengthExtension+X_linearBearingSeparation);
// ----- Holes for the screws ------
// Bottom right screw
translate([-linearBearingLength/2-X_linearBearingSeparation/2,-screwLength/2-screwAditionalLength/2,-linearBearingDiameter/2-screwExtension/2])
rotate([0,0,180]) hole_for_screw(size=screwSize,length=screwLength+screwAditionalLength,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance);
// Bottom left screw
translate([linearBearingLength/2+X_linearBearingSeparation/2,-screwLength/2-screwAditionalLength/2,-linearBearingDiameter/2-screwExtension/2])
rotate([0,0,180]) hole_for_screw(size=screwSize,length=screwLength+screwAditionalLength,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance);
// Top screw
translate([0,axes_effective_Xsmooth_separation+screwExtension/2+linearBearingDiameter/2,axes_effective_Xsmooth_separation+screwLength/2+screwAditionalLength/2])
rotate([90,0,0]) hole_for_screw(size=screwSize,length=screwLength+screwAditionalLength,nutDepth=0,nutAddedLen=0,captiveLen=0,tolerance=screwHoleTolerance);
// ----- Hole for the Z nut ------
translate([0,axes_Zreference_posY+axes_ZthreadedReference_posY,axes_effective_Xsmooth_separation+(linearBearingDiameter+sideExtensions)/2])
Cyclone_XsubPart_ZnutHolder(holes=true);
// ----- Hole for the X nut ------
translate([-dimX/2,axes_effective_Xsmooth_separation,0])
rotate([-135,0,0]) Cyclone_XsubPart_XnutHolder(holes=true);
// ----- Holes for the rods ------
// TRANSLATE REFERENCE POSITION to the Z axis origin (right smooth rod)
translate([-axes_Zsmooth_separation/2,axes_Zreference_posY,axes_Zreference_height]) {
// Z smooth rod (right)
cylinder(r=axes_Zsmooth_rodD/2, h=axes_Zsmooth_rodLen);
// Z smooth rod (left)
translate([axes_Zsmooth_separation,0,0])
cylinder(r=axes_Zsmooth_rodD/2, h=axes_Zsmooth_rodLen);
}
}
// Draw linear bearings
rotate([0,90,0]) linearBearing_single(model=X_linearBearingModel, echoPart=true);
rotate([0,-90,0]) linearBearing_single(model=X_linearBearingModel, echoPart=true);
translate([linearBearingLength/2,axes_effective_Xsmooth_separation,axes_effective_Xsmooth_separation])
rotate([0,-90,0]) linearBearing_single(model=X_linearBearingModel, echoPart=true);
// Draw nuts and screws
translate([0,axes_Zreference_posY+axes_ZthreadedReference_posY,axes_effective_Xsmooth_separation+(linearBearingDiameter+sideExtensions)/2])
rotate([180,0,0])
nut(size=8, echoPart=true);
translate([-dimX/2,axes_effective_Xsmooth_separation,0]) rotate([-135,0,0]){
translate([-rod_nut_len/2+1,0,0]) rotate([90,90,90])
nut(size=8, echoPart=true);
translate([rod_nut_len/2+3+1+holderExtension,0,0]) rotate([90,90,90])
nut(size=8, echoPart=true);
translate([rod_nut_len/2+3+1,0,0]) rotate([0,0,-90]) rotate([180,0,0])
washer_single(diam=washer_D, thickness=washer_thickness, echoPart=true);
}
translate([-linearBearingLength/2-X_linearBearingSeparation/2,-screwLength/2-screwAditionalLength/2,-linearBearingDiameter/2-screwExtension/2])
rotate([0,0,180]) screw_and_nut(size=screwSize,length=screwLength+screwAditionalLength,nutDepth=0,nutAddedLen=0,captiveLen=0,echoPart=true);
// Bottom left screw
translate([linearBearingLength/2+X_linearBearingSeparation/2,-screwLength/2-screwAditionalLength/2,-linearBearingDiameter/2-screwExtension/2])
rotate([0,0,180]) screw_and_nut(size=screwSize,length=screwLength+screwAditionalLength,nutDepth=0,nutAddedLen=0,captiveLen=0,echoPart=true);
// Top screw
translate([0,axes_effective_Xsmooth_separation+screwExtension/2+linearBearingDiameter/2,axes_effective_Xsmooth_separation+screwLength/2+screwAditionalLength/2])
rotate([90,0,0]) screw_and_nut(size=screwSize,length=screwLength+screwAditionalLength,nutDepth=0,nutAddedLen=0,captiveLen=0,echoPart=true);
}