FluidSwitch/FluidSwitch_Radial.scad

Wed, 12 Sep 2018 13:23:19 +0200

author
mdd
date
Wed, 12 Sep 2018 13:23:19 +0200
changeset 1
a159ad715fe0
parent 0
15eac37578b7
child 2
b677773a8097
permissions
-rw-r--r--

final assembly with correct oring sizes and tube diameters

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
0
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
36
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
37 // START PROGRAM
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
38 use <../libs/Threading/Threading.scad>
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
39
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
40 valve_lower();
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
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
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
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
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
47
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
48 // MODULES
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
49
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
50 module valve_inlay() union() {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
51 difference() {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
52 translate([0,0,0.0001])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
53 cylinder(d=base_dia, h = inlay_height);
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
54
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
55 // cut out the connector tube
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
56 rotate([90,0,0])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
57 translate([outlet_circle_dia/4,0,0])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
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
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
60
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
61 // cylinder(d=oring_inner, h=inlay_height / 2, $fn=fn);
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
62 // translate([outlet_circle_dia/2,0])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
63 // cylinder(d=oring_inner, h=inlay_height / 2, $fn=fn);
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
64 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
65
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
66 // hex drive rod
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
67 translate([0,0,inlay_height])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
68 cylinder(d=axis_dia, h=20, $fn=6);
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 module valve_cap() {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
72 cap_sides = 50;
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
73 difference() {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
74 union() {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
75 translate([0,0,2])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
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);
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
77
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
78 cylinder(d=base_outer_dia + 6, h=2, $fn=cap_sides);
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
79 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
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
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
83 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
84 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
85
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
86 module valve_lower()
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
87 difference() {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
88 union() {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
89 valve_base();
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
90 valve_casing();
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
91 // bottom
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
92 translate([0,0,-1.5]) cylinder(d=base_outer_dia, h=1.5);
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
93 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
94
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
95 // cut out the OUTLET ring on the side
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
96 for(i = [1:outlets]) {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
97 a = outlet_angle * i;
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
98 rotate([90,0,a]) {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
99 translate([outlet_circle_dia/2 - hole_inner/2,tube_dia/2,0])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
100 rotate([0,90,0])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
101 cylinder(d=tube_dia, h=base_outer_dia, $fn=fn);
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
102 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
103 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
104
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
105 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
106 // TODO: cut out the syringe hole (needs to be conical to fit)
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 module valve_casing() {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
110 difference() {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
111 union() {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
112 translate([0,0,0.001])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
113 cylinder(d=base_outer_dia, h=outer_height - outer_thread_height);
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
114
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
115 translate([0,0,outer_height - outer_thread_height])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
116 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
117 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
118
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
119 cylinder(d=base_dia, h = outer_height + 0.001);
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
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
123 module valve_base() difference() {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
124 cylinder(d=base_dia, h=base_height);
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
125
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
126 // inlet hole
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
127 cylinder(d=hole_inner, h=base_height, $fn=fn);
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
128 translate([0,0,base_height])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
129 oring();
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
130
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
131 // cut Outlet holes and oring carves
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
132 for(i = [1:outlets]) {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
133 a = outlet_angle * i;
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
134 rotate([0,0,a]) {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
135 translate([outlet_circle_dia/2,0,base_height])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
136 oring();
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
137 translate([outlet_circle_dia/2,0])
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
138 cylinder(d=hole_inner, h=base_height, $fn=fn);
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
139 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
140 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
141
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
142 }
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
143
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
144 module oring() {
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
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
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
147 circle(d=oring_dia, $fn=fn);
15eac37578b7 initial commit of FluidSwitch prototype
mdd
parents:
diff changeset
148 }

mercurial