From ad72818ad728bff832396c7b8a80638189cfcd08 Mon Sep 17 00:00:00 2001 From: Stephen Carpenter Date: Mon, 27 Nov 2023 16:12:35 -0500 Subject: [PATCH] Cleanup of core Setup Alignment/orientation. --- core_uy1658-60.scad | 70 ++++++++++++++++----------------------------- 1 file changed, 24 insertions(+), 46 deletions(-) diff --git a/core_uy1658-60.scad b/core_uy1658-60.scad index f981e1b..1883f62 100644 --- a/core_uy1658-60.scad +++ b/core_uy1658-60.scad @@ -10,6 +10,8 @@ LegDiameter=16; BoltDiameter=7.06; CoreGap=0; NumberCoils=10; +YokeHeight=12.14; +YokeLen=28.00; /* [Render Options] */ render_fs=.1; @@ -22,8 +24,16 @@ $fn= ($preview) ? $fn : render_fn; $fa= ($preview) ? $fa : render_fa; -// Bobbin -Bobbin_Length=LegLength+CoreGap/2; +// Area Info +leg_a1 = PI * (LegDiameter/2)^2; +leg_a2 = PI * (BoltDiameter/2)^2/2; + +echo("Leg Len:", 2*LegLength, "mm"); +echo("Bobbin_Max:", 2*LegLength-2*YokeHeight, "mm"); +echo("Leg Cross Section Area: ", leg_a1-leg_a2, "mm^2"); +yoke_a = LegDiameter * YokeHeight; +echo("Yoke A: ", yoke_a); +echo("Magnetic Path: ", 2*(YokeLen+LegDiameter)+2*(LegLength-YokeHeight), "mm"); module core_leg(d=LegDiameter, l=LegLength, bd=BoltDiameter) { difference() { @@ -32,53 +42,21 @@ module core_leg(d=LegDiameter, l=LegLength, bd=BoltDiameter) { } } -module core_uy1658(ld=16, ll=29, bz=12.14, w=60) { - echo("Leg Len:", ll-bz); - xflip_copy() { - left(w/2) core_leg(d=ld, l=ll); - fwd(ld/2) cube([w/2,16,bz]); +module core_uy1658(ld=LegDiameter, ll=LegLength, yoke_z=YokeHeight, yokelen=YokeLen, orient=ORIENT_X, align=V_CENTER) { + legx = yokelen + ld; + orient_and_align([legx+2*ld,ld,LegLength],orient,align,orig_orient=ORIENT_X) xflip_copy() down(ll/2) { + left(legx/2) core_leg(d=ld, l=ll); + fwd(ld/2) cube([legx/2,ld,yoke_z]); } } -module bobbin(ld=LegDiameter, ll=LegLength, lb=12.14, tg=CoreGap, lc=.15, t=.4, sn=NumberCoils+1, st=.6, sd=50) { - bl=2*(ll-lb) + tg; - inner=ld+2*lc; - outer=inner+2; - - conNeck = 5; - conHead = 5; - conThick = 12; - conWidth = 15; - pinLen = 2* conThick + bl; - difference() { - union() { - cylinder(d=outer,h=bl, center=true); - zspread(n=sn,l=bl-st) { - cylinder(d=sd,h=st,center=true); - left(sd/4)cube([sd/2,sd,st], center=true); - } - // connector - left(inner/2+(conNeck+conHead)/2) zflip_copy() - down(conThick/2) - up((pinLen)/2) { - xflip() half_joiner(h=conWidth, w=conThick,l=conThick/2,orient=ORIENT_X_90); - } - } - cylinder(d=inner,h=bl+2*conThick+2,center=true); - // Wire Channels - yspread(n=2, l=5+sd/2 ) - left(sd/2) cylinder(d=2,h=bl+2,center=true); +// Full Core, both halfs. +module core(gap=CoreGap, orient=ORIENT_X, align=V_CENTER) { + orient_and_align([YokeLen+2*LegDiameter,LegDiameter,2*LegLength], + orient=orient,align=align,orig_orient=ORIENT_X) xflip_copy() { + up(gap/2) core_uy1658(align=V_TOP, orient=ORIENT_X_180); + down(gap/2) core_uy1658(align=V_BOTTOM); } - left(2*lc+inner/2) intersection() { - cylinder(d=6,h=pinLen, center=true); - right(2*lc+inner/2) cylinder(d=inner, h=pinLen+2, center=true); - } - echo("Coil_ID = ", outer); - echo("Coil_len = ", bl-sn*st); } -rotate([0,-90,0]) - bobbin(sn=2, sd=26); - - -//core_uy1658(); +core();