Fix missing tensioner
[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;
82bba690 17echo(x_box_width);
58279f58 18bearing_height = max ((bushing_z[2] > 30 ? x_box_height : (2 * bushing_z[2] + 8)), x_box_height);
d3618a65
NZ
19
20module x_end_motor(){
21
690004c7 22 mirror([0, 1, 0]) {
c7eb29ba 23
82bba690 24 x_end_base([3, 3, min((bushing_xy[0] - 3) * 2, 3), 2], len=42, offset=-5, thru=false);
c7eb29ba 25
690004c7
VAH
26
27 translate([0, -z_delta - 2, 0]) difference(){
79b4b60a 28 union(){
f705c26c
VAH
29 intersection() {
30 translate([-15, -34, 30]) cube([20, 60, x_box_height], center = true);
31 union() {
82bba690
VAH
32 translate([-14, -16 + z_delta / 2, 24]) cube_fillet([17.5, 10.5 + z_delta, 55], center = true, vertical=[0, 0, 3, 3], top=[0, 3, 6, 3], $fn=16);
33 //lower arm holding outer stepper screw
34 translate([-10.25, -34, 9]) intersection(){
f705c26c
VAH
35 translate([0, 0, -5]) cube_fillet([10, 37, 28], center = true, vertical=[0, 0, 0, 0], top=[0, 3, 5, 3]);
36 translate([-10/2, 10, -26]) rotate([45, 0, 0]) cube_fillet([10, 60, 60], radius=2);
37 }
38 }
79b4b60a 39 }
82bba690 40 translate([-16, -32, 30.25]) rotate([90, 0, 0]) rotate([0, 90, 0]) nema17(places=[1, 0, 1, 1], h=11);
82e9f136 41 }
c7eb29ba 42
79b4b60a 43 // motor screw holes
690004c7 44 translate([21-5, -21-11, 30.25]){
79b4b60a 45 // belt hole
82bba690 46 translate([-30, 11, -0.25]) cube_fillet([11, 36, 22], vertical=0, top=[0, 1, 0, 1], bottom=[0, 1, 0, 1], center = true, $fn=4);
79b4b60a 47 //motor mounting holes
82bba690 48 translate([-29.5, 0, 0]) rotate([0, 0, 0]) rotate([0, 90, 0]) nema17(places=[1, 1, 0, 1], holes=true, shadow=5.5, $fn=small_hole_segments, h=8);
79b4b60a 49 }
c7eb29ba 50 }
79b4b60a 51 //smooth rod caps
82bba690
VAH
52 //translate([-22, -10, 0]) cube([17, 2, 15]);
53 //translate([-22, -10, 45]) cube([17, 2, 10]);
c7eb29ba 54 }
d3618a65
NZ
55}
56
f705c26c 57module x_end_base(vfillet=[3, 3, 3, 3], thru=true, len=40, offset=0){
d3618a65 58
c7eb29ba
VAH
59 difference(){
60 union(){
f705c26c 61 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
62
63 translate([0, 0, 4 - bushing_xy[0]]) {
64 //rotate([0, 0, 0]) translate([0, -9.5, 0])
11476b31 65 translate([z_delta, 0, 0]) render(convexity = 5) linear(bushing_z, bearing_height);
690004c7 66 // Nut trap
cc573956 67 translate([-2, 18, 5]) cube_fillet([20, 14, 10], center = true, vertical=[8, 0, 0, 5]);
690004c7 68 //}
c7eb29ba
VAH
69 }
70 }
690004c7 71 // here are bushings/bearings
11476b31 72 translate([z_delta, 0, 4 - bushing_xy[0]]) linear_negative(bushing_z, bearing_height);
d3618a65 73
c7eb29ba 74 // belt hole
82bba690 75 translate([-5.5 - 10 + 1.5, 22 - 9 + offset, 30]) cube_fillet([max(idler_width + 2, 11), 55, 27], center = true, vertical=0, top=[0, 1, 0, 1], bottom=[0, 1, 0, 1], $fn=4);
690004c7 76
82bba690 77 //smooth rods
f705c26c 78 translate([-10 - bushing_xy[0], offset, 0]) {
690004c7
VAH
79 if(thru == true){
80 translate([0, -11, 6]) rotate([-90, 0, 0]) pushfit_rod(bushing_xy[0] * 2 + 0.2, 50);
81 translate([0, -11, xaxis_rod_distance+6]) rotate([-90, 0, 0]) pushfit_rod(bushing_xy[0] * 2 + 0.2, 50);
82 } else {
83 translate([0, -7, 6]) rotate([-90, 0, 0]) pushfit_rod(bushing_xy[0] * 2 + 0.2, 50);
84 translate([0, -7, xaxis_rod_distance+6]) rotate([-90, 0, 0]) pushfit_rod(bushing_xy[0] * 2 + 0.2, 50);
85 }
86 }
7b4231d9 87 translate([0, 0, 5 - bushing_xy[0]]) { // m5 nut insert
cc573956
VAH
88 translate([0, 17, 0]) rotate([0, 0, 10]){
89 //rod
82bba690 90 translate([0, 0, -1]) cylinder(h=(4.1 / 2 + 5), r=3, $fn=32);
cc573956
VAH
91 //nut
92 translate([0, 0, 9]) cylinder(r=4.6, h=14.1, center = true, $fn=6);
7b4231d9
VAH
93
94 }
c7eb29ba 95 }
c7eb29ba 96 }
c7eb29ba 97 //threaded rod
690004c7 98 translate([0, 17, 0]) %cylinder(h = 70, r=2.5+0.2);
d3618a65 99}
79b4b60a 100
79b4b60a
VAH
101module x_end_idler(){
102 difference() {
82bba690 103 x_end_base(len=48 + z_delta / 3, offset=-10 - z_delta / 3);
79b4b60a 104 // idler hole
42436753 105 translate([-20, -15 - z_delta / 2, 30]) {
1f623fc7 106 rotate([0, 90, 0]) cylinder(r=m4_diameter / 2, h=33, center=true, $fn=small_hole_segments);
f705c26c
VAH
107 translate([15 - 2 * single_wall_width, 0, 0]) rotate([90, 0, 90]) cylinder(r=m4_nut_diameter_horizontal / 2, h=3, $fn=6);
108
79b4b60a 109 }
82bba690 110 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 111 }
b2fd8e88 112 %translate([-14, -9, 30.5 - (max(idler_bearing[0], 16) / 2)]) x_tensioner();
79b4b60a
VAH
113}
114
b2fd8e88 115module x_tensioner(len=62, idler_height=max(idler_bearing[0], 16)) {
0d8b4afe 116 idlermount(len=len, rod=m4_diameter / 2, idler_height=idler_height, narrow_len=46, narrow_width=idler_width + 2 - single_wall_width);
f705c26c
VAH
117}
118
119
ebec6b3c 120translate([-40, 0, 4 - bushing_xy[0]]) x_tensioner();
82bba690
VAH
121translate([0, -80, 0]) mirror([1, 0, 0]) x_end_idler(thru=true);
122translate([-50, 0, 0]) mirror([1, 0, 0]) translate([-50, 0, 0])
123 x_end_motor();
d3618a65 124
690004c7 125module pushfit_rod(diameter, length){
c7eb29ba 126 cylinder(h = length, r=diameter/2, $fn=30);
82bba690 127 translate([0, -diameter/4, length/2]) cube_fillet([diameter, diameter/2, length], vertical = [0, 0, 1, 1], center = true, $fn=4);
d3618a65 128
82bba690 129 translate([0, -diameter/2-1.2, length/2]) cube([diameter - 1, 1, length], center = true);
d3618a65 130}
eff6608e
VAH
131
132if (idler_bearing[3] == 1) {
0f6ec51a 133 translate([-25, -30 - idler_bearing[0] / 2, 0]) {
eff6608e
VAH
134 render() bearing_guide_inner();
135 translate([idler_bearing[0]+10, 0, 0])
136 render()bearing_guide_outer();
137 }
138}