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