2d88ba7052dd2a2e864682022aaf53efdd80928c
[clinton/prusa3.git] / box_frame / y-drivetrain.scad
1 // PRUSA iteration3
2 // Y drivetrain (idler and stepper holders)
3 // GNU GPL v3
4 // Josef Průša <josefprusa@me.com>
5 // Václav 'ax' Hůla <axtheb@gmail.com>
6 // http://www.reprap.org/wiki/Prusa_Mendel
7 // http://github.com/josefprusa/Prusa3
8
9 // ThingDoc entry
10 /**
11 * @id yMotorHolder
12 * @name Y Axis Motor Holder
13 * @category Printed
14 */
15
16 /**
17 * @yIdler
18 * @name Y Axis Belt Idler
19 * @category Printed
20 */
21
22 include <configuration.scad>
23 use <inc/bearing-guide.scad>
24
25 module motorholder(thickness=10){
26 difference(){
27 union(){
28 // Motor holding part
29 translate([29, -21 + 50, 0])
30 {
31 //#cube([42, 42, 2], center=true);
32 difference(){
33 union(){
34 translate([-21 + 4.5, 0, 5]) cube([9, 31, thickness], center=true);
35 nema17([0, 1, 1, 0], thickness=thickness, shadow=false);
36 mirror([0, 0, 1]) translate([0, 0, -10]) nema17([0, 1, 1, 0], thickness=thickness, shadow=7);
37 // Parts joining part
38 translate([-29, -21, 0]) cube([14, 30, thickness]);
39 }
40 // Motor mounting holes
41 translate([0, 0, thickness]) mirror([0, 0, 1]) nema17([0, 1, 1, 0], thickness=thickness, holes=true);
42 }
43 }
44
45 // Front holding part
46 translate([0, 10, 0]) cylinder(h = thickness, r=8);
47 translate([0, 20, 5]) cube([16, 20, thickness], center=true);
48 translate([0, 30, 0]) cylinder(h = thickness, r=8);
49 }
50 translate([0, 10, -1]) cylinder(h = 12, r=4.5, $fn=32);
51 translate([0, 30, -1]) cylinder(h = 12, r=4.5, $fn=32);
52 }
53 }
54
55 module oval(r=4, l=14, h=2){
56 intersection() {
57 union() {
58 translate([l / 2, 0, 0]) cylinder(r=r, h=h, $fn=4);
59 //translate([-l / 2, 0, 0]) cylinder(r=r, h=h, $fn=4);
60 translate([0, 0, h / 2]) cube([l, r * 2, h], center=true);
61 }
62 translate([0, 0, h / 2]) cube([l + r * 1.2, r * 2, h], center=true);
63 }
64 }
65
66 module idlermount(len=43, narrow_len=0, narrow_width=0, rod=threaded_rod_diameter_horizontal / 2, idler_height=16){
67 difference(){
68 union(){
69 //wide part holding bearing
70 translate([- (10 + idler_width) / 2, -25 + narrow_len, 0] ) cube_fillet([10 + idler_width, len + idler_bearing[2] * 1.1 - narrow_len, idler_height]);
71 //For X there is narrow part inside the x-idler
72 if (narrow_len > 0){
73 translate([-narrow_width / 2, -25, 0] ) cube_fillet([narrow_width, len + idler_bearing[2], idler_height], vertical=[0, 0, 2, 2]);
74 mirror([1, 0, 0]) translate([-narrow_width / 2, narrow_len -25, idler_height / 2 ]) fillet(1.5, idler_height - 0.04, $fn=8);
75 translate([-narrow_width / 2, narrow_len -25, idler_height / 2]) fillet(1.5, idler_height - 0.04, $fn=8);
76 }
77 }
78 translate([-12, -8, idler_height / 2]) rotate([90, 0, 90]) oval(r=rod + 0.01, l=12, h=25);
79 translate([0, -13 - single_wall_width*2, idler_height / 2]) {
80 // nut for tensioning screw
81 translate([0,0,0]) rotate([90, 0, 0]) cylinder(r=m4_nut_diameter_horizontal / 2, h=3.8, $fn=6);
82 // nut insert
83 translate([-2, -3.8, -m4_diameter * 1.5 / 2]) cube([20, 3.8, m4_diameter * 1.5+0.3]);
84 }
85
86 // tensioning screw goes here
87 translate([0, -19, idler_height / 2]) rotate([90, 90, 0]) cylinder(r=m4_diameter / 2, h=15, $fn=small_hole_segments, center=true);
88 // bearing goes there
89 translate([0, len + idler_bearing[2] - 33, idler_height / 2]) {
90 rotate([0, 90, 0]) idler_assy(idler_bearing);
91 translate([0, 10, 0]) cube([idler_width + 1, 20, idler_height + 2], center=true);
92 }
93
94 }
95 }
96
97
98 motorholder();
99 translate([32, 25, 0]) idlermount();
100
101 if (idler_bearing[3] == 1) {
102 translate([0, -12 - idler_bearing[0] / 2, 0]) {
103 render() bearing_assy();
104 }
105 }