// Prototype utilisant le stator d'un moteur d'ouvre porte de garage. // allviews rotor // testviews stator assemblage // testviews shafttest // Vérifie la tolérance de l'arbre // testviews rotortestmag // Comment se fixe un aimant // viewopts rotortestmag brim5mm // testviews rotortest // Vérifie tolérances include mag_thick=2.15+0.0; mag_width=5.09+0.4; mag_len=9.59; rotor_ray=75/2; rotor_thick=2+mag_len+mag_len; nbmag=14; shaft_ray=13.15/2+0.0; stator_ray1=rotor_ray+0.5; stator_ray2=stator_ray1+15; stator_thick=20; nbpole=12; lock_ray=3.88/2; // Pin to hold the rotor module rotor(){ difference(){ union(){ cylinder(r=rotor_ray,h=rotor_thick,$fn=80); cylinder(r=shaft_ray+2,h=rotor_thick+5,$fn=80); } union(){ // Trouve pour l'arbre translate([0,0,-1]) cylinder(r=shaft_ray,h=rotor_thick+20,$fn=80); // Encoche pour le lock s=shaft_ray+3; r=rotor_thick; translate([0,-s,r]) rotate([-90,0,0]) cylinder(r=lock_ray,h=20,$fn=40); translate([-lock_ray,-s,r]) cube([2*lock_ray,20,10]); // Enlève du matériel pour accélérer l'impression translate([0,0,2]) difference(){ cylinder(r=rotor_ray-4,h=rotor_thick,$fn=80); cylinder(r=shaft_ray+2,h=rotor_thick,$fn=80); } translate([0,0,2]) for (i=[1:nbmag]){ rotate([0,0,360/nbmag*i]){ for (j=[0:1]){ a=5.3; rotate([0,0,j==0?-a:+a]){ translate([rotor_ray-mag_thick-0.5,-mag_width/2,0]) cube([mag_thick,mag_width,rotor_thick+2]); rem=2; translate([rotor_ray-1,-(mag_width-rem)/2,0]) cube([mag_thick,mag_width-rem,rotor_thick+2]); } } } } } } } module stator(){ difference(){ cylinder(r=stator_ray2,h=stator_thick,$fn=80); union(){ translate([0,0,-1]) cylinder(r=stator_ray1,h=stator_thick+2,$fn=80); } } } module assemblage(){ rotor(); stator(); } module main_view(view){ if (view=="rotor"){ rotor(); }else if (view=="stator"){ stator(); }else if (view=="assemblage"){ assemblage(); }else if (view=="rotortest"){ intersection (){ r2=rotor_ray+10; w=16; translate([-r2,-w/2,0]) cube([2*r2,w,rotor_thick+10]); translate([0,0,0]) rotor(); } }else if (view=="shafttest"){ intersection (){ cylinder(r=shaft_ray+1.5,h=5,$fn=40); rotor(); } }else if (view=="rotortestmag"){ intersection (){ w=29; l=15; translate([rotor_ray-l/2,-w/2,0]) cube([l,w,10]); rotor(); } } }