Wed, 12 Sep 2018 13:46:21 +0200
added syringe mount hole
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 | |
2 | 36 | // adjust this to make the center hole look nice according to whicj oring you use |
37 | base_bottom_thickness = 9 - base_height - 0.001; | |
38 | ||
0 | 39 | |
40 | // START PROGRAM | |
41 | use <../libs/Threading/Threading.scad> | |
42 | ||
43 | valve_lower(); | |
44 | ||
2 | 45 | /* |
1
a159ad715fe0
final assembly with correct oring sizes and tube diameters
mdd
parents:
0
diff
changeset
|
46 | translate([0,0,base_height]) |
a159ad715fe0
final assembly with correct oring sizes and tube diameters
mdd
parents:
0
diff
changeset
|
47 | valve_inlay(); |
0 | 48 | |
1
a159ad715fe0
final assembly with correct oring sizes and tube diameters
mdd
parents:
0
diff
changeset
|
49 | 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
|
50 | valve_cap(); |
2 | 51 | */ |
0 | 52 | |
53 | // MODULES | |
54 | ||
55 | module valve_inlay() union() { | |
56 | difference() { | |
57 | translate([0,0,0.0001]) | |
58 | cylinder(d=base_dia, h = inlay_height); | |
59 | ||
60 | // cut out the connector tube | |
61 | rotate([90,0,0]) | |
62 | translate([outlet_circle_dia/4,0,0]) | |
63 | rotate_extrude(convexity=10) | |
1
a159ad715fe0
final assembly with correct oring sizes and tube diameters
mdd
parents:
0
diff
changeset
|
64 | translate([outlet_circle_dia/4, 0]) circle(d=hole_inner, $fn=fn); |
0 | 65 | |
66 | // cylinder(d=oring_inner, h=inlay_height / 2, $fn=fn); | |
67 | // translate([outlet_circle_dia/2,0]) | |
68 | // cylinder(d=oring_inner, h=inlay_height / 2, $fn=fn); | |
69 | } | |
70 | ||
71 | // hex drive rod | |
72 | translate([0,0,inlay_height]) | |
73 | cylinder(d=axis_dia, h=20, $fn=6); | |
74 | } | |
75 | ||
76 | module valve_cap() { | |
77 | cap_sides = 50; | |
78 | difference() { | |
79 | union() { | |
80 | translate([0,0,2]) | |
81 | 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); | |
82 | ||
83 | cylinder(d=base_outer_dia + 6, h=2, $fn=cap_sides); | |
84 | } | |
85 | ||
1
a159ad715fe0
final assembly with correct oring sizes and tube diameters
mdd
parents:
0
diff
changeset
|
86 | translate([0,0,-0.001]) |
a159ad715fe0
final assembly with correct oring sizes and tube diameters
mdd
parents:
0
diff
changeset
|
87 | cylinder(d=axis_dia + 2, h=2 + 0.002, $fn=fn); |
0 | 88 | } |
89 | } | |
90 | ||
91 | module valve_lower() | |
92 | difference() { | |
93 | union() { | |
94 | valve_base(); | |
95 | valve_casing(); | |
96 | // bottom | |
2 | 97 | translate([0,0,-base_bottom_thickness]) cylinder(d=base_outer_dia, h=base_bottom_thickness); |
0 | 98 | } |
99 | ||
100 | // cut out the OUTLET ring on the side | |
101 | for(i = [1:outlets]) { | |
102 | a = outlet_angle * i; | |
103 | rotate([90,0,a]) { | |
104 | translate([outlet_circle_dia/2 - hole_inner/2,tube_dia/2,0]) | |
105 | rotate([0,90,0]) | |
106 | cylinder(d=tube_dia, h=base_outer_dia, $fn=fn); | |
107 | } | |
108 | } | |
109 | ||
2 | 110 | // cut out the syringe hole (needs to be conical to fit) |
111 | translate([0,0,-base_bottom_thickness - 0.001]) | |
112 | cylinder(d1 = 4.5, d2 = 4, h = 9, $fn=fn); | |
113 | ||
114 | // in my case the oring inner diameter corresponds to the syringe tip diameter (4 mm) - so I remove the inner unprintable walls of the center oring grove | |
115 | ||
116 | translate([0,0,base_height - oring_dia / 2]) | |
117 | cylinder(d=oring_inner + oring_dia, h = 2); | |
118 | ||
0 | 119 | } |
120 | ||
121 | ||
122 | module valve_casing() { | |
123 | difference() { | |
124 | union() { | |
125 | translate([0,0,0.001]) | |
126 | cylinder(d=base_outer_dia, h=outer_height - outer_thread_height); | |
127 | ||
128 | translate([0,0,outer_height - outer_thread_height]) | |
129 | threading(pitch = thread_pitch, d=base_outer_dia, windings = (outer_thread_height/thread_pitch)-1, angle = 55, full = true, $fn=fn); | |
130 | } | |
131 | ||
132 | cylinder(d=base_dia, h = outer_height + 0.001); | |
133 | } | |
134 | } | |
135 | ||
136 | module valve_base() difference() { | |
137 | cylinder(d=base_dia, h=base_height); | |
138 | ||
139 | // inlet hole | |
2 | 140 | cylinder(d=hole_inner, h=base_height +0.001, $fn=fn); |
0 | 141 | translate([0,0,base_height]) |
142 | oring(); | |
143 | ||
144 | // cut Outlet holes and oring carves | |
145 | for(i = [1:outlets]) { | |
146 | a = outlet_angle * i; | |
147 | rotate([0,0,a]) { | |
148 | translate([outlet_circle_dia/2,0,base_height]) | |
149 | oring(); | |
150 | translate([outlet_circle_dia/2,0]) | |
2 | 151 | cylinder(d=hole_inner, h=base_height + 0.001, $fn=fn); |
0 | 152 | } |
153 | } | |
154 | ||
155 | } | |
156 | ||
157 | module oring() { | |
158 | rotate_extrude(convexity=10, $fn=fn) | |
1
a159ad715fe0
final assembly with correct oring sizes and tube diameters
mdd
parents:
0
diff
changeset
|
159 | translate([oring_inner/2 + oring_dia / 2 , 0, 0]) |
0 | 160 | circle(d=oring_dia, $fn=fn); |
161 | } |