-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathRAMBo.scad
211 lines (172 loc) · 5.22 KB
/
RAMBo.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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
// (c) 2013 Metamáquina <http://www.metamaquina.com.br/>
//
// Authors:
// * Felipe C. da S. Sanches <[email protected]>
// * Rafael H. de L. Moretti <[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>;
use <rounded_square.scad>;
include <spacer.h>;
include <render.h>;
RAMBo_pcb_thickness = 2;
M3_bolt_head = 3;
RAMBo_cover_thickness = 3;
RAMBo_thickness = nylonspacer_length + RAMBo_pcb_thickness + hexspacer_length + RAMBo_cover_thickness + M3_bolt_head;
RAMBo_border = 3.7;
RAMBo_width = 103;
RAMBo_height = 104;
epsilon = 0.05;
module PSU_connector(){
BillOfMaterials("Power supply connector for RAMBo board", ref="39530-0006");
//Power supply connector
//Connector dimensions
conn_thickness = 9.8;
conn_width = 30.5;
conn_height = 15.1;
epsilon = 0.05;
//Bolt slots
bolt_diameter = 3.5;
bolts_offset = -2.3;
material("rubber")
difference() {
cube([conn_thickness, conn_width, conn_height]);
for (i = [1 : 6]) {
translate([conn_thickness/2,bolts_offset + 5*i,-epsilon]) {
cylinder(conn_height+2*epsilon,r=bolt_diameter/2);
}
}
}
}
module RAMBo_cover_curves(border=0){
difference(){
translate([-border,-border])
rounded_square([RAMBo_width+2*border, RAMBo_height+2*border], corners=[3,3,3,3]);
RAMBo_holes();
}
//TODO: Add logo / labels ?
}
module RAMBo_cover(){
BillOfMaterials("Lasercut acrylic RAMBo cover", ref="MM2_RAMBO_COVER");
material("acrylic")
linear_extrude(height=RAMBo_cover_thickness)
RAMBo_cover_curves();
}
module RAMBo(){
BillOfMaterials("RAMBo board", ref="RMB_1.1b");
{ //TODO: add these parts to the CAD model
BillOfMaterials("M3x25 bolt",4, ref="H_M3x25"); //to mount the RAMBo board in the side panel
BillOfMaterials("M3x10 bolt",4, ref="H_M3x10"); //To attach the cover
}
for (x=[RAMBo_border, RAMBo_width-RAMBo_border]){
for (y=[RAMBo_border, RAMBo_height-RAMBo_border]){
translate([x,y]){
double_M3_lasercut_spacer();
translate([0,0,2*thickness+RAMBo_pcb_thickness]){
hexspacer_32mm();
translate([0,0,hexspacer_length+RAMBo_cover_thickness]){
//bolt head
material("metal")
cylinder(r=3, h=M3_bolt_head);
}
}
}
}
}
translate([0,0,2*thickness]){
RAMBo_pcb();
translate([0,0,RAMBo_pcb_thickness]){
translate([100,60])
PSU_connector();
translate([0,0,hexspacer_length])
RAMBo_cover();
}
}
}
module RAMBo_volume(){
//This is the space that is required for the RAMBo Electronics.
//We must make sure there's enough space so that the electronics doesn't
//take up part of the printer's max build volume.
%cube([RAMBo_width, RAMBo_height, RAMBo_thickness]);
}
module RAMBo_wiring_holes(){
//This is a big hole for passing all wires from one side of
// the panel to the other side:
translate([RAMBo_width/2, RAMBo_height/2])
rotate(90)
hull()
for (i=[-1,1])
translate([i*15,0])
circle(r=10);
//These are ziptie holes for making sure the individual wires
// are kept in place, near their connection point in the RAMBo PCB:
//X & Y motor cables
translate([20,10])
rotate(90)
zip_tie_holes();
//Z left and right motor cables
translate([50,10])
rotate(90)
zip_tie_holes();
//Extruder motor cable
translate([80,10])
rotate(90)
zip_tie_holes();
//Thermistor cables
translate([95,52])
zip_tie_holes(d=10);
//Power Supply cables
translate([95,80])
zip_tie_holes(d=20);
{ //Endstop cables
//TODO: Choose one before manufacturing:
// Option 1: This is closer to the connector but may leave the cables exposed in the back of the machine
# translate([10,50])
zip_tie_holes();
// Option 2: This is a bit far, but the cables would be less exposed in the upper portion of the pcb mount area
# translate([80,95])
rotate(90)
zip_tie_holes();
}
//Extruder heater cable
translate([20,95])
rotate(90)
zip_tie_holes();
//HeatedBed heater cable
translate([50,95])
rotate(90)
zip_tie_holes();
}
module RAMBo_holes(){
translate([RAMBo_border, RAMBo_border])
circle(r=m4_diameter/2);
translate([RAMBo_border, RAMBo_height-RAMBo_border])
circle(r=m4_diameter/2);
translate([RAMBo_width-RAMBo_border, RAMBo_border])
circle(r=m4_diameter/2);
translate([RAMBo_width-RAMBo_border, RAMBo_height-RAMBo_border])
circle(r=m4_diameter/2);
}
module RAMBo_pcb(){
material("pcb"){
linear_extrude(height=RAMBo_pcb_thickness){
difference(){
square([RAMBo_width, RAMBo_height]);
RAMBo_holes();
}
}
}
}
//RAMBo();