209 lines
4.6 KiB
OpenSCAD
209 lines
4.6 KiB
OpenSCAD
use <inserts.scad>
|
|
|
|
STATOR_L=30;
|
|
STATOR_H=57.19;
|
|
STATOR_W=56;
|
|
STATOR_ID=4.33;
|
|
|
|
ARM_AXIS=114;
|
|
ARM_FRONT_BEAR=22.02;
|
|
ARM_FRONT_BEAR_L=6.8;
|
|
ARM_REAR_BEAR=19.09;
|
|
ARM_REAR_BEAR_L=6.6;
|
|
ARM_WIND=55;
|
|
ARM_WIND_L=64;
|
|
ARM_BRUSH_OFF=23;
|
|
ARM_REAR_OFF=23;
|
|
|
|
|
|
|
|
FAN_BAFFLE=37;
|
|
FAN_BAFFLE_L=2;
|
|
FAN=53;
|
|
FAN_L=7;
|
|
|
|
module rim(d, rw=2.5, rh=2.4, cc=25, rcolor="red", top=false) {
|
|
// Rim
|
|
rcol = $incolor ? rcolor : undef;
|
|
off = top ? rw : 0;
|
|
|
|
difference() {
|
|
linear_extrude(height=rh)
|
|
square([d.x-off, d.y-off], center=true);
|
|
translate([0,0,-.15]) linear_extrude(height=rh+.3)
|
|
offset(r=-rw) square([ARM_AXIS-.1-off, STATOR_W+8+6+5-off], center=true);
|
|
translate([0,0,(rw+1)/2]) cube([d.x+1, cc, rh+1], center=true);
|
|
}
|
|
}
|
|
|
|
module stator(sl=STATOR_L, sh=STATOR_H, sw=STATOR_W, id=STATOR_ID) {
|
|
cube([sh+.2,sw+.2,sl+.2], center=true);
|
|
rotate([0,0,0]) cylinder(d=sw-1,h=sl+7, center=true);
|
|
for (i=[-1, 1]) {
|
|
translate([0,i*-(58/2-2.5),0]) cube([36,8,58], center=true);
|
|
}
|
|
}
|
|
|
|
module arm_axis(d=0, arm_axis=ARM_AXIS,real=false, acolor="silver") {
|
|
incolor = is_undef($incolor) ? false : $incolor;
|
|
|
|
axis_color = incolor ? acolor : undef;
|
|
rotate([0,90,0]) {
|
|
if ($children < 1) {
|
|
color(axis_color) cylinder(h=arm_axis, d=1, center=true);
|
|
} else {
|
|
translate([0,0,d]) children();
|
|
}
|
|
}
|
|
}
|
|
|
|
module brush_posts() {
|
|
for (ix=[-1, 1])
|
|
translate([0,ix*(1+22.7/2+13.25/2),0]) {
|
|
cube([13.25,18+4,13.25], center=true);
|
|
// side posts
|
|
translate([3-1.5,0,0]) cube([6.1,5,20], center=true);
|
|
// Wire Clearance
|
|
translate([2,ix*12,15]) cube([8,9,22], center=true);
|
|
}
|
|
}
|
|
|
|
module armature(
|
|
aa=ARM_AXIS,
|
|
afbd=ARM_FRONT_BEAR,
|
|
afbl=ARM_FRONT_BEAR_L,
|
|
arbd=ARM_REAR_BEAR,
|
|
arbl=ARM_REAR_BEAR_L,
|
|
abo=ARM_BRUSH_OFF,
|
|
awd=ARM_WIND,
|
|
awl=ARM_WIND_L,
|
|
fbcd=FAN_BAFFLE,
|
|
fl=FAN_L,
|
|
fd=FAN,
|
|
fbd=FAN_BAFFLE,
|
|
fbl=FAN_BAFFLE_L,
|
|
sl=STATOR_L,
|
|
spd=16
|
|
) {
|
|
fo=6;
|
|
incolor = is_undef($incolor) ? false : $incolor;
|
|
bearing_color = incolor ? "green" : undef;
|
|
fan_color = incolor ? "blue" : undef;
|
|
|
|
|
|
//%arm_axis(d=0, acolor="purple");
|
|
// front bearing
|
|
arm_axis(d=aa/2 - afbl)
|
|
color(bearing_color) cylinder(d=afbd, h=afbl);
|
|
// Fan
|
|
color(fan_color) arm_axis(d=aa/2 - afbl - fl +.5) {
|
|
cylinder(d=spd+.4, h=fl+.2);
|
|
translate([0,0,-(fo)]) {
|
|
translate([0,0,-2]) cylinder(d=fd+1, h=fl+4);
|
|
// air outlets
|
|
for (r=[60:360/12:300])
|
|
rotate([0,0,270-r])
|
|
translate([0,fd/2,fl/2]) cube([fl,42,fl/2], center=true);
|
|
|
|
}
|
|
translate([0,0,-(fo+.5+fbl)-3]) cylinder(d2=fbd, d1=fd-2,h=fbl+2);
|
|
}
|
|
|
|
// Arm Clearance
|
|
arm_axis(d=4.5) cylinder(d=awd, h=awl-4, center=true);
|
|
//arm_axis(d=aa/2 - afbl) cylinder(d=afbd, h=afbl);
|
|
|
|
// Rear Clearance
|
|
arm_axis(d=-(awl/2 + abo +1)) {
|
|
translate([0,0,abo/2-.1]) cylinder(d=27,h=abo/2+8);
|
|
translate([0,0,arbl/2]) cylinder(d2=27,d1=arbd-2.5,h=abo/2-1);
|
|
|
|
// Air Inlets
|
|
for (r=[60:360/12:300])
|
|
if (270-r != 90) // Not straight up
|
|
rotate([0,0,270-r])
|
|
translate([0,arbd/2 +12,fl-4])
|
|
rotate([-30,0,0]) cube([5,45,4], center=true);
|
|
}
|
|
arm_axis(d=(aa-sl)/2 -34.5 -3) stator();
|
|
// Brush Posts
|
|
arm_axis(d=-(aa/2 - abo)) {
|
|
// communtator
|
|
cylinder(d=22.5, h=9.92, center=true);
|
|
brush_posts();
|
|
}
|
|
// rear bearing
|
|
arm_axis(d=-(aa/2))
|
|
color(bearing_color) cylinder(d=arbd, h=arbl);
|
|
|
|
}
|
|
|
|
module case(top=false)
|
|
{
|
|
$incolor=false;
|
|
ext=1.5;
|
|
extx=17.5;
|
|
bx=ARM_AXIS-.1;
|
|
by=STATOR_W+8+6+5;
|
|
bz=2+STATOR_H/2;
|
|
arot=top ? [180,0,0] : [0,0,0];
|
|
|
|
difference() {
|
|
union() {
|
|
cube([bx, by, bz], center=true);
|
|
translate([0,0,bz/2]) rim(d=[bx, by], top=top);
|
|
if (! top)
|
|
translate([-(bx/2 - ARM_BRUSH_OFF+extx/2),-by/2,bz/2]) cube([extx,by-1,ext]);
|
|
}
|
|
|
|
translate([0,0,bz/2]) rotate(arot) armature();
|
|
if (top) {
|
|
echo("top");
|
|
translate([-(bx/2 - ARM_BRUSH_OFF+extx/2),-by/2 + 2,bz/2-ext])
|
|
cube([extx,by-5,ext+1]);
|
|
}
|
|
|
|
// Case screws
|
|
csrot = top ? [0,180,0] : [0,0,0];
|
|
for(ix=[1, -1])
|
|
for(iy=[1, -1])
|
|
translate([ix*(bx/2 - 8), iy*(by/2 - 8), bz/2 +.01])
|
|
rotate(csrot) thread_insertM3(bl=40, bz=-12.8, $die=true);
|
|
|
|
// Mount Inserts
|
|
for(ix=[1, -1])
|
|
for(iy=[1, -1])
|
|
translate([ix*(bx/2 - 8), iy*(by/2 - 8), -(bz/2 +.01)])
|
|
rotate([0,180,0])
|
|
thread_insertM3(bl=40, bz=-20, $die=true);
|
|
|
|
// Input Wires hole
|
|
ho = top ? 8/2 : 0 ;
|
|
hys = top ? 1 : -1;
|
|
translate([-20,hys*(by/2-4),bz/2 + ho])
|
|
rotate([90,0,0])
|
|
cylinder(d=8, h=9, center=true);
|
|
}
|
|
}
|
|
|
|
if (! $preview) {
|
|
$fs=.1;
|
|
}
|
|
by=STATOR_W+8+6+5;
|
|
bz=2+STATOR_H/2;
|
|
|
|
module place_plate(by, bz) {
|
|
d = by/2 + 5;
|
|
translate([0,d,bz/2]) children(0);
|
|
translate([0,-d,bz/2]) children(1);
|
|
}
|
|
|
|
module place_final(bz) {
|
|
translate([0,0,bz/2]) rotate([180,0,0]) children(0) ;
|
|
translate([0,0,-bz/2]) children(1);
|
|
}
|
|
|
|
place_plate(by, bz) {
|
|
case(bz=bz, top=true);
|
|
case(bz=bz);
|
|
} |