// parametric hose pump for use with stepper motor // ball bearings used as rollers // red holes need thread cutting M4 (hole depth 10mm) // green holes need thread cutting M3 (hole depth 11mm) $fn=100; show_case = true; show_disc = true; show_lid = true; show_motor_flange = true; // ##### PARAMETERS TO ADAPT ##### // GENERAL clearance = 0.5; // clearence for moving parts // HOSE d_hose_out = 4.5; // outer hose diameter d_hose_in = 2.5; // inner hose diameter r_bending_hose = 19; // outer radius auf bent hose l_squeeze = 0.4; // distance the hose is squeezed // BALL BEARINGS d_bb_out = 14; // outer diameter of ball bearing d_bb_in = 5; // inner diameter of ball bearing h_bb = 5; // thickness of ball bearing number_of_rollers = 3; // number of rollers used wall_thickness = 6; // thickness of outer case wall hose_angle = 15; // angle of hose outlet, 0=parallel lid_thickness = 4; // thickness of lid h_disc = 10; // heigth (thickness) of rotating disc. Change carefully screwholes migth stick out d_lid_screw_borehole = 2.5; // bore hole diameter for lid screw thread cutting d_lid_screw = 3; // diameter of lid screws (must match with bore hole diameter) // MOTOR motor_width=42; // width of (stepper)motor d_motor_shaft = 5.2; // diameter of the motors shaft r_shaft_flattening = 0.4; // depth (radius) of flattening of motor shaft d_motor_flange_excess = 22.5; // diameter of circular excess on motors flange h_motor_flange_excess = 2.5; // thickness of circular excess on motors flange d_motor_screws = 3; // diameter of screws to fit in motors threads hole_in_lid = false; // puts a hole in the lid for motor shaft (when motors shaft is too long) motor_thread_distance=31; // shortest distance between two screw_holes on motor // ############################ // ##### CACULATED VALUES ##### roller_angle=360/number_of_rollers; // roller offset angle hose_wall_thickness = (d_hose_out-d_hose_in)/2; // wall thickness of hose heigth_squeezed_hose = (d_hose_out*PI-hose_wall_thickness*4+hose_wall_thickness*2)/2+l_squeeze; //max width of the sueezed hose, used for caculating the heigth of rollers d_hose_squeezed = hose_wall_thickness*2-l_squeeze; // thickness of squeezed hose ballbearings_per_roller=ceil(heigth_squeezed_hose/h_bb); // number of ball bearings to stack per roller echo("number of ball bearings to stack per roller", ballbearings_per_roller); roller_height=h_bb*ballbearings_per_roller; // total heigth of roller d_roller=d_bb_out; // outer diameter of roller r_roller_shaft_position=r_bending_hose-d_roller/2-d_hose_squeezed; // radius of roller shaft position d_motor_flange=motor_width*sqrt(2); // diameter of the motor flange, depends on motor width d_case_top=r_bending_hose*2+wall_thickness*2; // diameter of case on top, also lid diameter h_case=roller_height+clearance+h_disc; // total heigth of casing d_disc=r_bending_hose*2-clearance*2; // diameter of disc (rotating part) r_motor_flange_screws = d_motor_flange/2-4.5; // // DISC if(show_disc==true) difference() { cylinder(d=d_disc,h=h_disc); // motor shaft hole difference() { translate([0,0,-1]) cylinder(d=d_motor_shaft,h=h_disc*2); difference() { translate([d_motor_shaft*1.5-r_shaft_flattening,0,0]) cylinder(d=d_motor_shaft*2,h=h_disc); translate([h_disc/2,-h_disc,0]) cube([h_disc*2,h_disc*2,h_disc*2]); } } // holes for roller shafts for(i=[0:1:number_of_rollers-1]) { rotate(roller_angle*i,[0,0,1]) translate([r_roller_shaft_position,0,-1]) cylinder(d=d_bb_in,h=h_disc*2); } // rollers %for(i=[0:1:number_of_rollers-1]) { rotate(roller_angle*i,[0,0,1]) translate([r_roller_shaft_position,0,h_disc]) cylinder(d=d_roller,h=roller_height); } } // CASE if(show_case==true) difference() { union() { // case translate([0,0,0]) cylinder(d1=d_motor_flange,d2=d_case_top,h=h_case); // hose outlet blocks rotate(hose_angle,[0,0,1]) hull() { translate([r_bending_hose-d_hose_out/2,r_bending_hose,h_disc-d_hose_out/4]) radius_chamfer_cube(d_hose_out+d_hose_out/2,d_hose_out+wall_thickness,d_hose_out+d_hose_out/2,1,1); translate([0,0,0]) translate([r_bending_hose-d_hose_out/2,r_bending_hose,0]) radius_chamfer_cube(d_hose_out+d_hose_out/2,1,1,0,1); } rotate(-hose_angle,[0,0,1]) hull() { translate([-(r_bending_hose-d_hose_out/2),r_bending_hose,h_disc-d_hose_out/4]) radius_chamfer_cube(d_hose_out+d_hose_out/2,d_hose_out+wall_thickness,d_hose_out+d_hose_out/2,1,1); translate([0,0,0]) translate([-(r_bending_hose-d_hose_out/2),r_bending_hose,0]) radius_chamfer_cube(d_hose_out+d_hose_out/2,1,1,0,1); } } // case inside translate([0,0,-1]) cylinder(d=r_bending_hose*2,h=h_case+2); // hose outlet borings rotate(hose_angle,[0,0,1]) translate([r_bending_hose-d_hose_out/2,0,h_disc+d_hose_out/2]) rotate(-90,[1,0,0]) cylinder(d=d_hose_out,h=d_disc); rotate(-hose_angle,[0,0,1]) translate([-r_bending_hose+d_hose_out/2,0,h_disc+d_hose_out/2]) rotate(-90,[1,0,0]) cylinder(d=d_hose_out,h=d_disc); // lid screw borings (for thread cutting) for(i=[3:1:6]) { rotate((360/6)*i+0,[0,0,1]) translate([r_bending_hose+3,0,h_case-11]) cylinder(d=d_lid_screw_borehole,h=20); } color("red") %for(i=[3:1:6]) { rotate((360/6)*i+0,[0,0,1]) translate([r_bending_hose+3,0,h_case-11]) cylinder(d=d_lid_screw_borehole,h=11); } // motor flange screw borings (for thread cutting) for(i=[0:1:4]) { rotate(90*i,[0,0,1]) translate([r_motor_flange_screws,0,-2]) cylinder(d=3.25,h=10); } color("green") %for(i=[0:1:4]) { rotate(90*i,[0,0,1]) translate([r_motor_flange_screws,0,-2]) cylinder(d=3.25,h=10); } } // LID if(show_lid==true) translate([0,0,1]) // offset to separate objects difference() { // lid translate([0,0,h_case]) cylinder(d=d_case_top,h=lid_thickness); // lid screw holes for(i=[3:1:6]) { rotate((360/6)*i+0,[0,0,1]) translate([r_bending_hose+3,0,h_case+lid_thickness]) screw_hole(d_lid_screw,lid_thickness+4,6,2,false); } // hole for motor shaft in lid if(hole_in_lid==true) { translate([0,0,h_case-1]) cylinder(d=d_motor_shaft+clearance,h=lid_thickness*2); } } // MOTOR FLANGE if(show_motor_flange==true) translate([0,0,-1]) // offset to separate objects difference() { union() { // motor flange translate([0,0,-(wall_thickness)]) cylinder(d=d_motor_flange,h=wall_thickness); } // recess for disc translate([0,0,-clearance]) cylinder(d=d_disc+1,h=h_disc); //steppermotor translate([0,0,-motor_width-wall_thickness]) %radius_chamfer_cube(motor_width,motor_width,motor_width,4,1); // screw holes for attaching the motor flange to the case for(i=[0:1:4]) { rotate(90*i,[0,0,1]) translate([r_motor_flange_screws,0,-wall_thickness]) //cylinder(d=d_lid_screw_borehole,h=10); rotate(180,[1,0,0]) screw_hole(4,wall_thickness+4,8,2,false); } // screw holes for attaching the motor to the motor flange translate([0,0,0]) for(i=[0:1:3]) { rotate(90*i,[0,0,1]) translate([motor_thread_distance/2,motor_thread_distance/2,0]) screw_hole(d_motor_screws,wall_thickness+4,6,2,false); } // recess for excess on stepper motor translate([0,0,-(wall_thickness)]) cylinder(d=d_motor_flange_excess,h=h_motor_flange_excess); // hole for motor shaft translate([0,0,-(wall_thickness)]) cylinder(d=d_motor_shaft+clearance,h=wall_thickness); } // MODULES USED module screw_hole(diameter,length,head_diameter,recess_length,flathead) { head_length=head_diameter/2-diameter/2; translate([0,0,-length]) { cylinder(d=diameter,h=length); if(flathead==false) { translate([0,0,length-head_length]) cylinder(d1=diameter,d2=head_diameter,h=head_length); } else { translate([0,0,length-head_length]) cylinder(d=head_diameter,h=head_length); } if(recess_length > 0) { translate([0,0,length]) cylinder(d=head_diameter,h=recess_length); } } } module radius_chamfer_cube(x,y,z,r,center) { if(center == 0) { if(r>0) { translate([r,r,0]) minkowski() { cube([x-2*r,y-2*r,z/2]); cylinder(r=r,h=z/2); } } else { cube([x,y,z]); } } if(center == 1) { translate([-x/2,-y/2,0]) { if(r>0) { translate([r,r,0]) minkowski() { cube([x-2*r,y-2*r,z/2]); cylinder(r=r,h=z/2); } } else { cube([x,y,z]); } } } if(center == 2) { translate([-x/2,-y/2,-z/2]) { if(r>0) { translate([r,r,0]) minkowski() { cube([x-2*r,y-2*r,z/2]); cylinder(r=r,h=z/2); } } else { cube([x,y,z]); } } } }