FluidSwitch/FluidSwitch_Radial.scad

Wed, 12 Sep 2018 13:46:21 +0200

author
mdd
date
Wed, 12 Sep 2018 13:46:21 +0200
changeset 2
b677773a8097
parent 1
a159ad715fe0
permissions
-rw-r--r--

added syringe mount hole

0
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
1 // fluid 1-to-N-way rotation Valve
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
2 // 1 Inlet, N Outlets
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
3
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
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
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
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
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
10
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
11 axis_dia = 5;
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
12
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
13 // for color mixer we need 3 base colors + black + white + additional 1 waste and 1 clean water and one output = 8 connectors
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
14 // cycle will be:
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
15 // 1) select color 1-5, load syringe, select output, unload syringe, repeat for each other color
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
16 // 2) select water, load syringe, select waste, unload syringe
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
17 outlets = 8;
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
18
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
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
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
22
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
23 // roundness faces
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
24 fn = 10;
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
25
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
26 // calculations:
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
27 oring_dia = (oring_outer - oring_inner) / 2;
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
28 outlet_angle = 360/outlets;
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
29 base_height = 6;
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
30 base_outer_dia = base_dia + 6;
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
31 outer_thread_height = 10;
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
32 outer_height = 15;
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
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
b677773a8097 added syringe mount hole
mdd
parents: 1
diff changeset
36 // adjust this to make the center hole look nice according to whicj oring you use
b677773a8097 added syringe mount hole
mdd
parents: 1
diff changeset
37 base_bottom_thickness = 9 - base_height - 0.001;
b677773a8097 added syringe mount hole
mdd
parents: 1
diff changeset
38
0
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
39
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
40 // START PROGRAM
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
41 use <../libs/Threading/Threading.scad>
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
42
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
43 valve_lower();
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
44
2
b677773a8097 added syringe mount hole
mdd
parents: 1
diff changeset
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
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
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
b677773a8097 added syringe mount hole
mdd
parents: 1
diff changeset
51 */
0
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
52
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
53 // MODULES
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
54
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
55 module valve_inlay() union() {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
56 difference() {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
57 translate([0,0,0.0001])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
58 cylinder(d=base_dia, h = inlay_height);
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
59
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
60 // cut out the connector tube
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
61 rotate([90,0,0])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
62 translate([outlet_circle_dia/4,0,0])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
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
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
65
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
66 // cylinder(d=oring_inner, h=inlay_height / 2, $fn=fn);
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
67 // translate([outlet_circle_dia/2,0])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
68 // cylinder(d=oring_inner, h=inlay_height / 2, $fn=fn);
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
69 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
70
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
71 // hex drive rod
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
72 translate([0,0,inlay_height])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
73 cylinder(d=axis_dia, h=20, $fn=6);
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
74 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
75
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
76 module valve_cap() {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
77 cap_sides = 50;
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
78 difference() {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
79 union() {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
80 translate([0,0,2])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
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);
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
82
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
83 cylinder(d=base_outer_dia + 6, h=2, $fn=cap_sides);
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
84 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
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
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
88 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
89 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
90
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
91 module valve_lower()
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
92 difference() {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
93 union() {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
94 valve_base();
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
95 valve_casing();
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
96 // bottom
2
b677773a8097 added syringe mount hole
mdd
parents: 1
diff changeset
97 translate([0,0,-base_bottom_thickness]) cylinder(d=base_outer_dia, h=base_bottom_thickness);
0
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
98 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
99
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
100 // cut out the OUTLET ring on the side
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
101 for(i = [1:outlets]) {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
102 a = outlet_angle * i;
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
103 rotate([90,0,a]) {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
104 translate([outlet_circle_dia/2 - hole_inner/2,tube_dia/2,0])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
105 rotate([0,90,0])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
106 cylinder(d=tube_dia, h=base_outer_dia, $fn=fn);
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
107 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
108 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
109
2
b677773a8097 added syringe mount hole
mdd
parents: 1
diff changeset
110 // cut out the syringe hole (needs to be conical to fit)
b677773a8097 added syringe mount hole
mdd
parents: 1
diff changeset
111 translate([0,0,-base_bottom_thickness - 0.001])
b677773a8097 added syringe mount hole
mdd
parents: 1
diff changeset
112 cylinder(d1 = 4.5, d2 = 4, h = 9, $fn=fn);
b677773a8097 added syringe mount hole
mdd
parents: 1
diff changeset
113
b677773a8097 added syringe mount hole
mdd
parents: 1
diff changeset
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
b677773a8097 added syringe mount hole
mdd
parents: 1
diff changeset
115
b677773a8097 added syringe mount hole
mdd
parents: 1
diff changeset
116 translate([0,0,base_height - oring_dia / 2])
b677773a8097 added syringe mount hole
mdd
parents: 1
diff changeset
117 cylinder(d=oring_inner + oring_dia, h = 2);
b677773a8097 added syringe mount hole
mdd
parents: 1
diff changeset
118
0
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
119 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
120
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
121
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
122 module valve_casing() {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
123 difference() {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
124 union() {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
125 translate([0,0,0.001])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
126 cylinder(d=base_outer_dia, h=outer_height - outer_thread_height);
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
127
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
128 translate([0,0,outer_height - outer_thread_height])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
129 threading(pitch = thread_pitch, d=base_outer_dia, windings = (outer_thread_height/thread_pitch)-1, angle = 55, full = true, $fn=fn);
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
130 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
131
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
132 cylinder(d=base_dia, h = outer_height + 0.001);
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
133 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
134 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
135
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
136 module valve_base() difference() {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
137 cylinder(d=base_dia, h=base_height);
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
138
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
139 // inlet hole
2
b677773a8097 added syringe mount hole
mdd
parents: 1
diff changeset
140 cylinder(d=hole_inner, h=base_height +0.001, $fn=fn);
0
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
141 translate([0,0,base_height])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
142 oring();
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
143
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
144 // cut Outlet holes and oring carves
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
145 for(i = [1:outlets]) {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
146 a = outlet_angle * i;
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
147 rotate([0,0,a]) {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
148 translate([outlet_circle_dia/2,0,base_height])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
149 oring();
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
150 translate([outlet_circle_dia/2,0])
2
b677773a8097 added syringe mount hole
mdd
parents: 1
diff changeset
151 cylinder(d=hole_inner, h=base_height + 0.001, $fn=fn);
0
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
152 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
153 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
154
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
155 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
156
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
157 module oring() {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
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
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
160 circle(d=oring_dia, $fn=fn);
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
161 }

mercurial