-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathNEMA.scad
116 lines (97 loc) · 2.98 KB
/
NEMA.scad
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
// (c) 2013 Metamáquina <http://www.metamaquina.com.br/>
//
// Author:
// * Felipe C. da S. Sanches <[email protected]>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
include <Metamaquina2.h>;
include <BillOfMaterials.h>;
include <NEMA.h>;
include <bolts.h>;
include <washers.h>;
use <rounded_square.scad>;
include <render.h>;
module NEMA17(){
BillOfMaterials("NEMA17 stepper motor", ref="SM1.8A1740CHSE");
material("rubber"){
translate([-NEMA17_width/2, -NEMA17_height/2, -0.1])
intersection(){
cube([NEMA17_width, NEMA17_height, NEMA17_length]);
translate ([NEMA17_width/2, NEMA17_height/2]) cylinder(r=0.87*NEMA17_width*sqrt(2)/2, h=100);
}
}
material("metal"){
translate([0, 0, -motor_shaft_length])
cylinder(r=motor_shaft_diameter/2, h=motor_shaft_length);
translate([0,0,-3])
cylinder(r1=6, r2=8, h=2);
translate([0,0,-0.2]){
difference(){
linear_extrude(height=NEMA17_length/5)
rounded_square([NEMA17_width+2, NEMA17_height+2], center=true, corners= [5,5,5,5]);
translate([0,0,-0.2])
linear_extrude(height=1)
NEMA17_holes(central_hole=false);
}
//connector detail
translate([-15.6/2,NEMA17_width/2 + 1, NEMA17_length - 4])
cube([15.6, 4.6, 4]);
}
translate([0,0,NEMA17_length - NEMA17_length/5])
linear_extrude(height=NEMA17_length/5)
rounded_square([NEMA17_width+2, NEMA17_height+2], center=true, corners=[5,5,5,5]);
}
translate([0,0, NEMA17_length - 12.5])
connector();
}
module connector(){
//This is very hacky and someone should clean it up
translate([-15/2,NEMA17_width/2 + 1, 4]){
material("nylon")
difference(){
cube([15, 6, 4]);
translate([1,1,0.5]) cube([13, 6, 3]);
translate([3.5,4,-1]) cube([8, 10, 3]);
}
material("metal")
for (i=[0:3]){
translate([4+i*2.3,6, 2])
rotate([90,0])
cylinder(r=0.5, h=5);
}
}
}
module NEMA17_holes(l=15.5, r=12, central_hole=true){
if (central_hole)
circle(r=r);
for (i=[-l,l]){
for (j=[-l,l]){
translate([i, j])
circle(r=m3_diameter/2, $fn=20);
}
}
}
module NEMA17_subassembly(l=15.5, r=12, th=thickness){
NEMA17();
for (i=[-l,l]){
for (j=[-l,l]){
translate([i, j, -th - m3_washer_thickness]){
M3_washer();
rotate([180,0])
M3x10();
}
}
}
}
NEMA17_subassembly();