FluidSwitch/FluidSwitch_Radial.scad

changeset 1
a159ad715fe0
parent 0
15eac37578b7
child 2
b677773a8097
equal deleted inserted replaced
0:15eac37578b7 1:a159ad715fe0
1 // fluid 1-to-N-way rotation Valve 1 // fluid 1-to-N-way rotation Valve
2 // 1 Inlet, N Outlets 2 // 1 Inlet, N Outlets
3 3
4 // Variables: 4 // Variables:
5 oring_outer = 5.0; 5 oring_outer = 8.0;
6 oring_inner = 3.0; 6 oring_inner = 4.0;
7 7
8 tube_dia = 2; 8 tube_dia = 3;
9 hole_inner = 2;
9 10
10 hole_inner = 1.0;
11 axis_dia = 5; 11 axis_dia = 5;
12 12
13 // for color mixer we need 3 base colors + black + white + additional 1 waste and 1 clean water and one output = 8 connectors 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: 14 // cycle will be:
15 // 1) select color 1-5, load syringe, select output, unload syringe, repeat for each other color 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 16 // 2) select water, load syringe, select waste, unload syringe
17 outlets = 8; 17 outlets = 8;
18 18
19 // just fiddle around with the following variables: 19 // just fiddle around with the following variables:
20 outlet_circle_dia = 13; 20 outlet_circle_dia = 22;
21 base_dia = 20; 21 base_dia = 30;
22 22
23 // roundness faces 23 // roundness faces
24 fn = 10; 24 fn = 10;
25 25
26 // calculations: 26 // calculations:
29 base_height = 6; 29 base_height = 6;
30 base_outer_dia = base_dia + 6; 30 base_outer_dia = base_dia + 6;
31 outer_thread_height = 10; 31 outer_thread_height = 10;
32 outer_height = 15; 32 outer_height = 15;
33 thread_pitch = 2; 33 thread_pitch = 2;
34 inlay_height = outlet_circle_dia / 4 + hole_inner;
35
34 36
35 // START PROGRAM 37 // START PROGRAM
36 use <../libs/Threading/Threading.scad> 38 use <../libs/Threading/Threading.scad>
37 39
38 valve_lower(); 40 valve_lower();
39 41
40 //rotate([180,0,0]) translate([30,0,0]) 42 translate([0,0,base_height])
41 //valve_inlay(); 43 valve_inlay();
42 44
43 //rotate([180,0,0]) translate([0,0,-60]) 45 rotate([180,0,0]) translate([0,0,-outer_height - 2])
44 // valve_cap(); 46 valve_cap();
45 47
46 // MODULES 48 // MODULES
47 49
48 module valve_inlay() union() { 50 module valve_inlay() union() {
49 inlay_height = 5;
50 difference() { 51 difference() {
51 translate([0,0,0.0001]) 52 translate([0,0,0.0001])
52 cylinder(d=base_dia, h = inlay_height); 53 cylinder(d=base_dia, h = inlay_height);
53 54
54 // cut out the connector tube 55 // cut out the connector tube
55 rotate([90,0,0]) 56 rotate([90,0,0])
56 translate([outlet_circle_dia/4,0,0]) 57 translate([outlet_circle_dia/4,0,0])
57 rotate_extrude(convexity=10) 58 rotate_extrude(convexity=10)
58 translate([outlet_circle_dia/4, 0]) circle(d=oring_inner, $fn=fn); 59 translate([outlet_circle_dia/4, 0]) circle(d=hole_inner, $fn=fn);
59 60
60 // cylinder(d=oring_inner, h=inlay_height / 2, $fn=fn); 61 // cylinder(d=oring_inner, h=inlay_height / 2, $fn=fn);
61 // translate([outlet_circle_dia/2,0]) 62 // translate([outlet_circle_dia/2,0])
62 // cylinder(d=oring_inner, h=inlay_height / 2, $fn=fn); 63 // cylinder(d=oring_inner, h=inlay_height / 2, $fn=fn);
63 } 64 }
75 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); 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);
76 77
77 cylinder(d=base_outer_dia + 6, h=2, $fn=cap_sides); 78 cylinder(d=base_outer_dia + 6, h=2, $fn=cap_sides);
78 } 79 }
79 80
80 cylinder(d=axis_dia + 2, h=2 + 0.001, $fn=fn); 81 translate([0,0,-0.001])
82 cylinder(d=axis_dia + 2, h=2 + 0.002, $fn=fn);
81 } 83 }
82 } 84 }
83 85
84 module valve_lower() 86 module valve_lower()
85 difference() { 87 difference() {
139 141
140 } 142 }
141 143
142 module oring() { 144 module oring() {
143 rotate_extrude(convexity=10, $fn=fn) 145 rotate_extrude(convexity=10, $fn=fn)
144 translate([oring_inner/2 , 0, 0]) 146 translate([oring_inner/2 + oring_dia / 2 , 0, 0])
145 circle(d=oring_dia, $fn=fn); 147 circle(d=oring_dia, $fn=fn);
146 } 148 }

mercurial