fix 624 idler bearing spacing
[clinton/prusa3.git] / box_frame / x-end.scad
CommitLineData
2159eed1
VAH
1// PRUSA iteration3
2// X ends
3// GNU GPL v3
dba99e69 4// Josef Průša <josefprusa@me.com>
3b7acad1 5// Václav 'ax' Hůla <axtheb@gmail.com>
2159eed1
VAH
6// http://www.reprap.org/wiki/Prusa_Mendel
7// http://github.com/prusajr/PrusaMendel
8
2fc35ca2 9include <configuration.scad>
d3618a65 10use <bushing.scad>
eff6608e 11use <inc/bearing-guide.scad>
f705c26c 12use <y-drivetrain.scad>
86c402d8 13
1e67bf0e
VAH
14//height and width of the x blocks depend on x smooth rod radius
15x_box_height = 52 + 2 * bushing_xy[0];
16x_box_width = (bushing_xy[0] <= 4) ? 17.5 : bushing_xy[0] * 2 + 9.5;
58279f58 17bearing_height = max ((bushing_z[2] > 30 ? x_box_height : (2 * bushing_z[2] + 8)), x_box_height);
d3618a65
NZ
18
19module x_end_motor(){
20
690004c7 21 mirror([0, 1, 0]) {
c7eb29ba 22
02345ac0 23 x_end_base([3, 3, min((bushing_xy[0] - 4) * 2, 3), 0], thru=false);
c7eb29ba 24
690004c7
VAH
25
26 translate([0, -z_delta - 2, 0]) difference(){
79b4b60a 27 union(){
f705c26c
VAH
28 intersection() {
29 translate([-15, -34, 30]) cube([20, 60, x_box_height], center = true);
30 union() {
31 translate([-13.75, -14 + z_delta / 2, 24]) cube_fillet([17.5, 14 + z_delta, 55], center = true, vertical=[0, 0, 3, 1.5], top=[0, 3, 6, 3], $fn=16);
32 translate([-10, -34, 9]) intersection(){
33 translate([0, 0, -5]) cube_fillet([10, 37, 28], center = true, vertical=[0, 0, 0, 0], top=[0, 3, 5, 3]);
34 translate([-10/2, 10, -26]) rotate([45, 0, 0]) cube_fillet([10, 60, 60], radius=2);
35 }
36 }
79b4b60a 37 }
f705c26c 38 translate([-15.5, -32, 30.25]) rotate([90, 0, 0]) rotate([0, 90, 0]) nema17(places=[1, 0, 1, 1], h=11);
82e9f136 39 }
c7eb29ba 40
79b4b60a 41 // motor screw holes
690004c7 42 translate([21-5, -21-11, 30.25]){
79b4b60a 43 // belt hole
f705c26c 44 translate([-30, 11, -0.25]) cube([11, 36, 24], center = true);
79b4b60a 45 //motor mounting holes
f705c26c 46 translate([-28.5, 0, 0]) rotate([0, 0, 0]) rotate([0, 90, 0]) nema17(places=[1, 1, 0, 1], holes=true, shadow=5, $fn=7, h=8);
79b4b60a 47 }
c7eb29ba 48 }
79b4b60a 49 //smooth rod caps
f7c38069
VAH
50 translate([-22, -10, 0]) cube([17, 2, 15]);
51 translate([-22, -10, 45]) cube([17, 2, 10]);
c7eb29ba 52 }
d3618a65
NZ
53}
54
f705c26c 55module x_end_base(vfillet=[3, 3, 3, 3], thru=true, len=40, offset=0){
d3618a65 56
c7eb29ba
VAH
57 difference(){
58 union(){
f705c26c 59 translate([-10 - bushing_xy[0], -10 + len / 2 + offset, 30]) cube_fillet([x_box_width, len, x_box_height], center=true, vertical=vfillet, top=[5, 3, 5, 3]);
690004c7
VAH
60
61 translate([0, 0, 4 - bushing_xy[0]]) {
62 //rotate([0, 0, 0]) translate([0, -9.5, 0])
11476b31 63 translate([z_delta, 0, 0]) render(convexity = 5) linear(bushing_z, bearing_height);
690004c7 64 // Nut trap
cc573956 65 translate([-2, 18, 5]) cube_fillet([20, 14, 10], center = true, vertical=[8, 0, 0, 5]);
690004c7 66 //}
c7eb29ba
VAH
67 }
68 }
690004c7 69 // here are bushings/bearings
11476b31 70 translate([z_delta, 0, 4 - bushing_xy[0]]) linear_negative(bushing_z, bearing_height);
d3618a65 71
c7eb29ba 72 // belt hole
f705c26c 73 translate([-5.5 - 10 + 1.5, 22 - 9 + offset, 30]) cube([max(idler_width + 2, 11), 55, 27], center = true);
690004c7 74
f705c26c 75 translate([-10 - bushing_xy[0], offset, 0]) {
690004c7
VAH
76 if(thru == true){
77 translate([0, -11, 6]) rotate([-90, 0, 0]) pushfit_rod(bushing_xy[0] * 2 + 0.2, 50);
78 translate([0, -11, xaxis_rod_distance+6]) rotate([-90, 0, 0]) pushfit_rod(bushing_xy[0] * 2 + 0.2, 50);
79 } else {
80 translate([0, -7, 6]) rotate([-90, 0, 0]) pushfit_rod(bushing_xy[0] * 2 + 0.2, 50);
81 translate([0, -7, xaxis_rod_distance+6]) rotate([-90, 0, 0]) pushfit_rod(bushing_xy[0] * 2 + 0.2, 50);
82 }
83 }
7b4231d9 84 translate([0, 0, 5 - bushing_xy[0]]) { // m5 nut insert
cc573956
VAH
85 translate([0, 17, 0]) rotate([0, 0, 10]){
86 //rod
7b4231d9 87 translate([0, 0, -1]) cylinder(h=(4.1 / 2 + 5), r=2.75);
cc573956
VAH
88 //nut
89 translate([0, 0, 9]) cylinder(r=4.6, h=14.1, center = true, $fn=6);
7b4231d9
VAH
90
91 }
c7eb29ba 92 }
c7eb29ba 93 }
c7eb29ba 94 //threaded rod
690004c7 95 translate([0, 17, 0]) %cylinder(h = 70, r=2.5+0.2);
d3618a65 96}
79b4b60a 97
79b4b60a
VAH
98module x_end_idler(){
99 difference() {
42436753 100 x_end_base(len=45 + z_delta / 3, offset=-10 - z_delta / 3);
79b4b60a 101 // idler hole
42436753 102 translate([-20, -15 - z_delta / 2, 30]) {
f705c26c
VAH
103 rotate([0, 90, 0]) cylinder(r=m4_diameter / 2, h=33, center=true, $fn=7);
104 translate([15 - 2 * single_wall_width, 0, 0]) rotate([90, 0, 90]) cylinder(r=m4_nut_diameter_horizontal / 2, h=3, $fn=6);
105
79b4b60a 106 }
b2fd8e88 107 #translate([-6 - x_box_width, 11, 29.5 - (max(idler_bearing[0], 16) / 2)]) cube([x_box_width + 1, 11, 1.5 + max(idler_bearing[0], 16)]);
79b4b60a 108 }
b2fd8e88 109 %translate([-14, -9, 30.5 - (max(idler_bearing[0], 16) / 2)]) x_tensioner();
79b4b60a
VAH
110}
111
b2fd8e88 112module x_tensioner(len=62, idler_height=max(idler_bearing[0], 16)) {
0d8b4afe 113 idlermount(len=len, rod=m4_diameter / 2, idler_height=idler_height, narrow_len=46, narrow_width=idler_width + 2 - single_wall_width);
f705c26c
VAH
114}
115
116
0d8b4afe 117translate([-40, 0, 4 - bushing_xy[0]]) x_tensioner();
99c9ea4a
VAH
118mirror([1, 0, 0]) x_end_idler(thru=true);
119mirror([1, 0, 0]) translate([-50, 0, 0]) x_end_motor();
d3618a65 120
690004c7 121module pushfit_rod(diameter, length){
c7eb29ba 122 cylinder(h = length, r=diameter/2, $fn=30);
690004c7 123 translate([0, -diameter/4, length/2]) cube([diameter, diameter/2, length], center = true);
d3618a65 124
690004c7 125 translate([0, -diameter/2-1.2, length/2]) cube([diameter, 1, length], center = true);
d3618a65 126}
eff6608e
VAH
127
128if (idler_bearing[3] == 1) {
0f6ec51a 129 translate([-25, -30 - idler_bearing[0] / 2, 0]) {
eff6608e
VAH
130 render() bearing_guide_inner();
131 translate([idler_bearing[0]+10, 0, 0])
132 render()bearing_guide_outer();
133 }
134}