Wed, 12 Sep 2018 13:23:19 +0200
final assembly with correct oring sizes and tube diameters
0 | 1 | // fluid 1-to-N-way rotation Valve |
2 | // 1 Inlet, N Outlets | |
3 | ||
4 | // Variables: | |
1
a159ad715fe0
final assembly with correct oring sizes and tube diameters
mdd
parents:
0
diff
changeset
|
5 | oring_outer = 8.0; |
a159ad715fe0
final assembly with correct oring sizes and tube diameters
mdd
parents:
0
diff
changeset
|
6 | oring_inner = 4.0; |
0 | 7 | |
1
a159ad715fe0
final assembly with correct oring sizes and tube diameters
mdd
parents:
0
diff
changeset
|
8 | tube_dia = 3; |
a159ad715fe0
final assembly with correct oring sizes and tube diameters
mdd
parents:
0
diff
changeset
|
9 | hole_inner = 2; |
0 | 10 | |
11 | axis_dia = 5; | |
12 | ||
13 | // for color mixer we need 3 base colors + black + white + additional 1 waste and 1 clean water and one output = 8 connectors | |
14 | // cycle will be: | |
15 | // 1) select color 1-5, load syringe, select output, unload syringe, repeat for each other color | |
16 | // 2) select water, load syringe, select waste, unload syringe | |
17 | outlets = 8; | |
18 | ||
19 | // just fiddle around with the following variables: | |
1
a159ad715fe0
final assembly with correct oring sizes and tube diameters
mdd
parents:
0
diff
changeset
|
20 | outlet_circle_dia = 22; |
a159ad715fe0
final assembly with correct oring sizes and tube diameters
mdd
parents:
0
diff
changeset
|
21 | base_dia = 30; |
0 | 22 | |
23 | // roundness faces | |
24 | fn = 10; | |
25 | ||
26 | // calculations: | |
27 | oring_dia = (oring_outer - oring_inner) / 2; | |
28 | outlet_angle = 360/outlets; | |
29 | base_height = 6; | |
30 | base_outer_dia = base_dia + 6; | |
31 | outer_thread_height = 10; | |
32 | outer_height = 15; | |
33 | thread_pitch = 2; | |
1
a159ad715fe0
final assembly with correct oring sizes and tube diameters
mdd
parents:
0
diff
changeset
|
34 | inlay_height = outlet_circle_dia / 4 + hole_inner; |
a159ad715fe0
final assembly with correct oring sizes and tube diameters
mdd
parents:
0
diff
changeset
|
35 | |
0 | 36 | |
37 | // START PROGRAM | |
38 | use <../libs/Threading/Threading.scad> | |
39 | ||
40 | valve_lower(); | |
41 | ||
1
a159ad715fe0
final assembly with correct oring sizes and tube diameters
mdd
parents:
0
diff
changeset
|
42 | translate([0,0,base_height]) |
a159ad715fe0
final assembly with correct oring sizes and tube diameters
mdd
parents:
0
diff
changeset
|
43 | valve_inlay(); |
0 | 44 | |
1
a159ad715fe0
final assembly with correct oring sizes and tube diameters
mdd
parents:
0
diff
changeset
|
45 | rotate([180,0,0]) translate([0,0,-outer_height - 2]) |
a159ad715fe0
final assembly with correct oring sizes and tube diameters
mdd
parents:
0
diff
changeset
|
46 | valve_cap(); |
0 | 47 | |
48 | // MODULES | |
49 | ||
50 | module valve_inlay() union() { | |
51 | difference() { | |
52 | translate([0,0,0.0001]) | |
53 | cylinder(d=base_dia, h = inlay_height); | |
54 | ||
55 | // cut out the connector tube | |
56 | rotate([90,0,0]) | |
57 | translate([outlet_circle_dia/4,0,0]) | |
58 | rotate_extrude(convexity=10) | |
1
a159ad715fe0
final assembly with correct oring sizes and tube diameters
mdd
parents:
0
diff
changeset
|
59 | translate([outlet_circle_dia/4, 0]) circle(d=hole_inner, $fn=fn); |
0 | 60 | |
61 | // cylinder(d=oring_inner, h=inlay_height / 2, $fn=fn); | |
62 | // translate([outlet_circle_dia/2,0]) | |
63 | // cylinder(d=oring_inner, h=inlay_height / 2, $fn=fn); | |
64 | } | |
65 | ||
66 | // hex drive rod | |
67 | translate([0,0,inlay_height]) | |
68 | cylinder(d=axis_dia, h=20, $fn=6); | |
69 | } | |
70 | ||
71 | module valve_cap() { | |
72 | cap_sides = 50; | |
73 | difference() { | |
74 | union() { | |
75 | translate([0,0,2]) | |
76 | Threading(D = base_outer_dia + 6, pitch = thread_pitch, d=base_outer_dia, windings = (outer_thread_height/thread_pitch), angle = 55, full = true, step = 50, $fn=cap_sides); | |
77 | ||
78 | cylinder(d=base_outer_dia + 6, h=2, $fn=cap_sides); | |
79 | } | |
80 | ||
1
a159ad715fe0
final assembly with correct oring sizes and tube diameters
mdd
parents:
0
diff
changeset
|
81 | translate([0,0,-0.001]) |
a159ad715fe0
final assembly with correct oring sizes and tube diameters
mdd
parents:
0
diff
changeset
|
82 | cylinder(d=axis_dia + 2, h=2 + 0.002, $fn=fn); |
0 | 83 | } |
84 | } | |
85 | ||
86 | module valve_lower() | |
87 | difference() { | |
88 | union() { | |
89 | valve_base(); | |
90 | valve_casing(); | |
91 | // bottom | |
92 | translate([0,0,-1.5]) cylinder(d=base_outer_dia, h=1.5); | |
93 | } | |
94 | ||
95 | // cut out the OUTLET ring on the side | |
96 | for(i = [1:outlets]) { | |
97 | a = outlet_angle * i; | |
98 | rotate([90,0,a]) { | |
99 | translate([outlet_circle_dia/2 - hole_inner/2,tube_dia/2,0]) | |
100 | rotate([0,90,0]) | |
101 | cylinder(d=tube_dia, h=base_outer_dia, $fn=fn); | |
102 | } | |
103 | } | |
104 | ||
105 | } | |
106 | // TODO: cut out the syringe hole (needs to be conical to fit) | |
107 | ||
108 | ||
109 | module valve_casing() { | |
110 | difference() { | |
111 | union() { | |
112 | translate([0,0,0.001]) | |
113 | cylinder(d=base_outer_dia, h=outer_height - outer_thread_height); | |
114 | ||
115 | translate([0,0,outer_height - outer_thread_height]) | |
116 | threading(pitch = thread_pitch, d=base_outer_dia, windings = (outer_thread_height/thread_pitch)-1, angle = 55, full = true, $fn=fn); | |
117 | } | |
118 | ||
119 | cylinder(d=base_dia, h = outer_height + 0.001); | |
120 | } | |
121 | } | |
122 | ||
123 | module valve_base() difference() { | |
124 | cylinder(d=base_dia, h=base_height); | |
125 | ||
126 | // inlet hole | |
127 | cylinder(d=hole_inner, h=base_height, $fn=fn); | |
128 | translate([0,0,base_height]) | |
129 | oring(); | |
130 | ||
131 | // cut Outlet holes and oring carves | |
132 | for(i = [1:outlets]) { | |
133 | a = outlet_angle * i; | |
134 | rotate([0,0,a]) { | |
135 | translate([outlet_circle_dia/2,0,base_height]) | |
136 | oring(); | |
137 | translate([outlet_circle_dia/2,0]) | |
138 | cylinder(d=hole_inner, h=base_height, $fn=fn); | |
139 | } | |
140 | } | |
141 | ||
142 | } | |
143 | ||
144 | module oring() { | |
145 | rotate_extrude(convexity=10, $fn=fn) | |
1
a159ad715fe0
final assembly with correct oring sizes and tube diameters
mdd
parents:
0
diff
changeset
|
146 | translate([oring_inner/2 + oring_dia / 2 , 0, 0]) |
0 | 147 | circle(d=oring_dia, $fn=fn); |
148 | } |