645fd2ba2ab0f301c5ca1d5bb311aefa9adca267
[clinton/prusa3.git] / box_frame / x-end-motor.scad
1 // PRUSA iteration3
2 // X end motor
3 // GNU GPL v3
4 // Josef Průša <iam@josefprusa.cz> and contributors
5 // http://www.reprap.org/wiki/Prusa_Mendel
6 // http://prusamendel.org
7 // Alterations for reprap Wilson by Martin Rice <mrice411@gmail.com>
8
9 include <configuration.scad>
10 use <x-end.scad>
11
12 offs_adjuster_y = 5.5; // fixme: if we keep this, needs to adjust
13 // based on size of bushing_z to clear the side
14 // of the plate
15 adj_block_x = 9;
16 adj_block_y = 10;
17 adj_block_z = 32;
18 motor_offs_z = 0;
19
20 motor_y_offset = 7;
21
22 module adjustomatic() {
23 difference() {
24 translate(v=[x_base_back() - adj_block_x/2,offs_adjuster_y,x_box_height - adj_block_z/2]) cube(size=[adj_block_x,adj_block_y,adj_block_z],center=true);
25
26 // these were translated -0.5 from block in wilson
27 translate ([0, 0, -0.5]) {
28 translate(v=[x_base_back() -adj_block_x/2 - 5,offs_adjuster_y,x_box_height-adj_block_z/2-8])
29 rotate([0,-30,0]) cube(size=[adj_block_x,adj_block_y+2,adj_block_z],center=true);
30
31 translate(v=[x_base_back() -adj_block_x/2 -1,offs_adjuster_y,x_box_height-adj_block_z/2-3])
32 cube(size=[adj_block_x,adj_block_y-2,adj_block_z-2],center=true);
33
34 translate(v=[x_base_back() -adj_block_x/2,offs_adjuster_y,x_box_height-adj_block_z/2+14]) {
35 rotate([0,0,30]) #cylinder(h = 4, r = 7.0/2 , $fn = 6);
36 translate([0,0,-20]) #cylinder(h=30,r=1.6,$fn=16);
37 }
38 }
39 }
40 }
41
42 // the endstop mount will be translated by this much (negative values
43 // mean it moves away from the motor and toward the X carriage, giving
44 // more room for leads and also extra space for the auto bedleveling
45 // servo housing which is on this side of the extruder):
46 endstop_sw_offs_adjust = -0;
47
48 module pocket_endstop() // endstop holder grafted onto the side toward the rods
49 {
50 translate([-7,-45,0])
51 union() {
52 // angled wall that attaches to the endstop holder
53 translate([-1,18,0]) rotate([0,0,-30]) cube(size=[8.5,2,22]);
54 // little bit of extra support at the bottom corner
55 translate([-1.5,15.,2]) rotate([0,90,0]) cube(size=[2,3,10]);
56
57 difference() {
58 translate([-1.5,endstop_sw_offs_adjust,0]) cube(size=[9,20.5,22]);
59
60 translate([-2,endstop_sw_offs_adjust,1]) cube(size=[7,21,22]);
61 translate([0,15.5,8]) cube(size=[10,5,20]);
62
63 // screw holes for endstop switch
64 translate([-2,7+endstop_sw_offs_adjust,1.5+5.5]) rotate([0,90,0]) cylinder(r=1.5,h=15);
65 translate([-2,7+endstop_sw_offs_adjust,1.5+5.5+9.5]) rotate([0,90,0]) cylinder(r=1.5,h=15);
66 }
67 }
68 }
69
70 module x_end_motor_sr() {
71 sr_box_height = 12;
72 translate([x_base_back(),9,x_box_height - sr_box_height]) {
73 difference() {
74 cube(size=[8,14+motor_y_offset,sr_box_height]);
75 translate([4,13.5+motor_y_offset,sr_box_height-1]) rotate([0,90,0]) difference() {
76 cylinder(r=4.5,h=4,$fn=16,center=true);
77 translate([0,0,-1]) cylinder(r=2.5,h=7,$fn=16,center=true);
78 }
79 translate([9,12.6+motor_y_offset,sr_box_height]) rotate([0,45,90]) cube(size=[2,11,2]);
80 }
81 }
82 }
83
84 module x_end_motor_base(){
85 x_end_base();
86 // motor arm
87 translate(v=[-15,31,26.5+motor_offs_z]) cube(size = [17,44+motor_y_offset*2,53], center = true);
88 // z stop adjuster
89 adjustomatic();
90 // x endstop holder
91 pocket_endstop();
92 }
93
94 screw_head_r = 3.5;
95
96 module x_end_motor_holes(){
97 x_end_holes();
98 // Position to place
99 translate(v=[-1,32,30.25+motor_offs_z]){
100 // Belt hole
101 translate(v=[-14,1,0]) cube(size = [10,46,22], center = true);
102 translate ([0, motor_y_offset, 0]) {
103 // Motor mounting holes
104 translate(v=[20,-15.5,-15.5]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = 70, r=1.8, $fn=30);
105 translate(v=[1,-15.5,-15.5]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = 12, r=screw_head_r, $fn=30);
106
107
108 translate(v=[20,-15.5,15.5]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = 70, r=1.8, $fn=30);
109 translate(v=[1,-15.5,15.5]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = 12, r=screw_head_r, $fn=30);
110
111
112 translate(v=[20,15.5,-15.5]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = 70, r=1.8, $fn=30);
113 translate(v=[1,15.5,-15.5]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = 12, r=screw_head_r, $fn=30);
114
115
116 translate(v=[20,15.5,15.5]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = 70, r=1.8, $fn=30);
117 translate(v=[1,15.5,15.5]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = 12, r=screw_head_r, $fn=30);
118
119 // Material saving cutout
120 translate(v=[-10,12,10]) cube(size = [60,42,42], center = true);
121
122 // Material saving cutout
123 translate(v=[-10,40,-30]) rotate(a=[45,0,0]) cube(size = [60,42,42], center = true);
124 // Motor shaft cutout
125 translate(v=[0,0,0]) rotate(a=[0,-90,0]) rotate(a=[0,0,90]) cylinder(h = 70, r=17, $fn=6);
126 }
127 // zip tie retainer for securing end stop wiring
128 #translate([-5,-63,14]) difference() { cylinder(r=4.5,h=4,$fn=16);
129 translate([0,0,-1]) cylinder(r=2.5,h=7,$fn=16);
130 }
131 #translate([-5,-48,x_box_height-30.5]) rotate([90,0,0]) difference() { cylinder(r=4.5,h=4,$fn=16,center=true);
132 translate([0,0,-1]) cylinder(r=2.5,h=7,$fn=16,center=true);
133 }
134 }
135 }
136
137 // Final part
138 module x_end_motor(){
139 difference(){
140 x_end_motor_base();
141 x_end_motor_holes();
142 }
143 // strain relief (zip tie point) below the motor
144 x_end_motor_sr();
145 }
146
147 rotate([0,0,180])
148 x_end_motor();