How to Calc # of Toroid Turns to get L when AL is known - Page 1
Forum section: electronics / projects

author: SuzyC
author_rank: Frequent Contributor
timestamp: January 24, 2016, 12:36:58 am
content: I have a toriodal core mfg spec sheet and it shows AL in units of nH/N*NAL seems to confuse me.I have a T80-26 toroidal core and AL =46nH/(N*N) and I want 30uH.So how to find N?

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: January 24, 2016, 12:43:25 am
content: Hi,Divide the inductance that you want by the AL. This gives the number of turns squared.Then take the square root to get the number of turns.N= SQRT(L / AL)Your requirement 30uHN= SQRT (30uH / 46nH)=SQRT (652)= 25.5 TurnsSince you can not have fractional turns use 26 Turns.Regards,Jay_Diddy_B

author: SuzyC
author_rank: Frequent Contributor
timestamp: January 24, 2016, 12:51:58 am
content: Jay_Diddy_B Many Thanks.What if AL is specified as uH/100 turns, which seems to be a more common form of spec???

author: IanB
author_rank: Super Contributor
timestamp: January 24, 2016, 01:21:10 am
content: Quote from: SuzyC on January 24, 2016, 12:51:58 amThen you use a similar formula to above, except this time:N/100 = SQRT(L / AL)(where L is in µH and AL is in µH/100 turns)

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: January 24, 2016, 01:24:58 am
content: Hi,If they give the AL as X uH per 100 turns.I would convert as follows.X / 1002= uH /N2Then convert to the more usual number of nH / N2by multiplying by 1000exampleAl = 200uH / 100 turnsAL = 200u / (100 x 100) = 0.02 uH / N20.02 uH = 20 nH / N2Does that make sense?This is because inductance is proportional to the number of turns squared.Regards,Jay_Diddy_B

author: SuzyC
author_rank: Frequent Contributor
timestamp: January 24, 2016, 01:26:30 am
content: Many Thanks, IanB and thanks again, Jay_Diddy_BIt makes sense and I thank you both for making it make sense to me.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: January 24, 2016, 01:42:51 am
content: Hi,The toroid numbers refer to the size and the mix.The T80 refers to OD 0.800 inchesThe -26 means 26 materialMicrometals is the company that pioneered this. They have a software tool on their website and more information than you would ever want to know.Link:http://www.micrometals.com/The software is here:http://www.micrometals.com/software_index.htmlWhat are you using the inductor for?Regards,Jay_Diddy_B

author: SuzyC
author_rank: Frequent Contributor
timestamp: January 24, 2016, 01:55:11 am
content: Jay_Diddy_B:I am using this core to wind an inductor for use in a battery charger using a step-down/buck converter of my own design.It will charge a 1800mAH Li-Ion battery at a rate between .3 and 1Amp from any 8V to 20V DC wallwart/brick.I got the one in question and a few other cores(wire already included!) from ravaging an old PC ATX power supply. I am just guessing the actual identity of this core from the physical measurements of these otherwise unmarked cores. The one in question is yellow and the other two are yellow and white respectively and quite larger in diam.From the rating of the power supply and the AWG of the wire wound on them I think I can safely assume that any of these cores are more than adequate to handle the current I require.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 24, 2016, 02:21:11 am
content: Yes, but beware they are very lossy materials, so a low ripple design is required. You need an average current mode controller to work with that.Tim

author: xygor
author_rank: Regular Contributor
timestamp: January 24, 2016, 02:34:23 am
content: Quote from: Jay_Diddy_B on January 24, 2016, 12:43:25 amTo be pedantic, you can have half-turns on some non-toroidal core shapes such as EE, EI, PQ, etc.

author: SuzyC
author_rank: Frequent Contributor
timestamp: January 24, 2016, 02:39:21 am
content: Thanks Tim, but I'd like to think that my circuit is an "above average" voltage mode converter using a MCU as the controller.Specifically, I am using the 10-bit PWM capability of a MCU operating at 8MHz to kick the coil, so to speak.In operation, the PWM DCyc increases in slow steps from 0 to what is required to deliver the charging current desired to the battery while not exceeding 4.2V at the battery. Charge current is .3 amp to 1 Amp and is determined by code that detects Vin (wallwart) drop in relationship to charging current before charging starts. In other words, if the powering wallwart/brick can stay in regulation up to a certain charge current, then this max. charging current is used during the middle phase of charging, while using lower currents at complete discharge and upon reaching 4.15V.If the charging supply does not drop more than .5V then I can safely assume the charger is being powered by a regulated brick. On the other hand, if I detect large ripple I assume an unregulated wallwart is attempting to do the job and so my code then only allows a max. charge current that does not cause the wallwart ripple P-P to exceed 30% of the O.C.V. to prevent overheating of the wallwart.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 24, 2016, 02:02:26 pm
content: Ewww...So what happens if, say, the output gets slightly overloaded? Pffst, BANG!You can still do current mode PWM with an MCU, but you must have a current sensor.I don't know what counts for "adjusting slowly", but if it's not a PID loop, strongly consider implementing one! It gives the most predictable response and best stability (once properly adjusted).A current mode converter, of course, only makes current. You'll run two PID loops, where the output from one (which controls voltage with respect to the reference voltage) drives the input to the other (which controls PWM with respect to current error).Tim

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 24, 2016, 02:07:18 pm
content: Quote from: xygor on January 24, 2016, 02:34:23 amAlthough achieving this isn't necessarily obvious: you need to put a flux balancing winding on the core limbs, otherwise that extra "half" could be all kinds of nonsense (indeed, in standard gapped core designs it will add about 1uH to the total, rather than whatever an ideal half turn would've given!).By using other flux balancing ratios (1:2, 1:3, 1:4, 1:5, 2:5, 3:5, etc.), and some extra core size, you can achieve even finer fractions (1/3, 1/4, 1/5, 1/6, 1/7, 1/8, etc.).Tim

author: SuzyC
author_rank: Frequent Contributor
timestamp: January 24, 2016, 05:18:33 pm
content: Tim: Thanks for the warning, but I am using the MCU to sense my buck converter input voltage, output voltage(~battery voltage) and output current in a continuous loop.Charge current is slowly ramped-up in DCyc (increments every 3 mSec) to reach the target charge current and the A2D is fedback charge current using a .01-ohm sense resistor feeding a X200 gain op-amp to normalize current measurement amplitude to achieve best use of the MCU's 10-bit A2D resolution. Charge current and battery voltage are monitored in my code about 50x/sec and PWM is adj'd as necessary to dither around the charging setpoint. In case of cosmic screw-up, WDT is careful to reset the whole game.So, in any case, my code charges the battery by continuously measuring charge current and battery voltage and adj's PWM DCyc to keep things in tight control, and no complicated PID code is necessary, fast slam-bang is fine for this, dithering current around the optimal charge current relative to the battery voltage measured.

author: Jay_Diddy_B
author_rank: Super Contributor
timestamp: January 24, 2016, 05:46:48 pm
content: Suzy,You can avoid some of the problems if you use 'constant on time' instead of PWM. In this method of control you measure the diode current in the buck regulator. If the current is less than a target value turn the MOSFET on for a fixed amount of time. The current will ramp up when the MOSFET is on, but the change in current is limited by Vin, the on time and the inductance.This mechanism prevents the inductor from running away if the output is shorted.Regards,Jay_Diddy_B

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 24, 2016, 06:43:32 pm
content: "DCyc"??Yabbut... in 20ms, the switching circuit could have already blown up. A thousand times over. That's not very safe, is it?Tim

author: Phoenix
author_rank: Frequent Contributor
timestamp: January 24, 2016, 10:58:02 pm
content: Quote from: SuzyC on January 24, 2016, 05:18:33 pmIn power electronic designs that I work on current is monitored using hardware comparators (for peak mode current control or for trip in average control). Anything slower you're asking for trouble.50x per sec is incredibly slow protection monitoring. Consider the equation V=Ldi/dt. Enter your V, L and saturation current or MOSFET current rating (di) and see just how quick (dt) problems will happen.

author: SuzyC
author_rank: Frequent Contributor
timestamp: January 25, 2016, 03:05:20 am
content: The subject of protection is about a balance between cost of implementation, probability of failure versus setting a tripping point in the max number of lives that could be affordably lost in order to justify more protection against fault. At least, this is the case with car and passenger jet safety.In the case of a charger, consider the following consumer items that employ rechargeable Li-Ion batteries for power:(1) a handheld electric screwdriver or drill.(2) a laptop PC.(3) A handheld vacuum cleaner.(4) A wallwart or brick for charging the above.Do I see a user-acessable fuseholder or panel-mount circuit breaker on any of these?A wallwart will usually have an internal one-time blow thermal/electric fuse.A power brick will usually have overload sense and burp-mode self-resetting cutout.So what about the my charging circuit itself?In my case, the only dangerous situation would be for the switching P-Chan MOSFET to short or a MCU crash to cause the charging current/voltage to be unregulated so as to cause the Li-Ion battery to overheat, overcharge and possibly rupture.To protect against MOSFET failure I have zener-diode protection of Vgs and the MOSFET sw is heatsinked by PCB area and is rated at 30-amp continuous and 30V. I don't anticipate or protect by fuse any likely condition that would apply a voltage to the device exceeding the 30V max. voltage of the MOSFET, but my MCU measures Vin to ensure it is in proper range before charging begins.Finally, I have a 2-amp tripping Polyfuse in series with the MOSFET Sw. and a SCR that will crowbar the input voltage at this circuit point in the case battery voltage somehow becomes >4.4V (the battery voltage OV trip point is detected using an op-amp section external to the MCU whose other half-section amplifies the current sense resistor voltage.)With this protection, in the case of the worse case scenario would it be that a wallwart would be overloaded and fail, or a brick would burp itself safely silly in the case of a shorted pass MOSFET.Otherwise, the WDT code ensures a HW reset which first checks for undervoltage/overvoltage and overload conditions and also checks the power (Output voltage versus ripple current under load) capability of the power supply device attached before allowing charging to start, and only if all is well does the code then slowly ramp up charge current to the correct charging value and allows normal monitoring in the code loop that manages safe charging.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: January 25, 2016, 04:19:00 am
content: We're not talking about personal safety here -- a much weaker thing, safety for your own device. Do you want to be replacing the switching transistor, its driver (microcontroller?), various burned out resistors and whatnot, every time it fails? Do you want it taking out the wall adaptor and/or battery at the same time? (The battery could be a very real fire hazard actually, if it ends up overcharged.)I don't want to give you the impression that you're doing something stupid. Indeed, this is a good introductory sort of project, and I congratulate you for attempting it, rather than just throwing an all-in-one chip at it (which is still a learning opportunity, if not as in-depth), or god forbid, getting one of those cheap and horrible premade Chinese modules.But I have to convey, somehow, that what I guess you'veread aboutis dumb, in a sense.No, it's not at all wrong that PWM makes variable output voltage -- that remains incontrovertibly true! But what does matter ishow you get there.To me, it comes down to three things:1. While the general aspects of switching supplies are interesting (and challenging) all their own, this isn't about that: it's aboutcontrol systems. Which, to be fair, is a field of study all its own, but we only need the tip of the iceberg, and that's fine.2. In this type of switching supply, the one free variable in the system isinductor current. The sin of omission is committed here: an explanation in terms of PWM alone, will simplify, because they are only attempting to explain one property, and one alone: that the output voltage (at DC, under static, ideal, eternal, useless conditions!) is proportional. But there is so much more to the system than this, and we must introduce these ideas so you can work with them.3. A personal connection. This may not make sense, but as a skilled expert in this art, it is my business to know: what feels good, what feels right, what feelselegant; to know the heart of a problem, and to work with that first and foremost, if it is at all possible.As technical as the art of electronics may seem, it still remains open to a vast scope of personal, artistic, decisions. And this is one that I cannot compromise my art with, and strongly encourage others to follow! On the upside, anyone who knows the art deep enough to understand my reason, will also agree with my instruction (as you see, perhaps?), so an appeal to the majority or to the experts would have similar results!So, what do you really need to know?The system isdynamic. The whole point, of course, of having a switching waveform, is to use an inductor for energy storage. Energy is constantly moving around, and so, it is almost meaningless to speak of "DC", because nothing interesting happens at DC!You can look at it in the time domain. That is, as time goes on, the switch turns on and off, and the inductor current goes up and down respectively. Indeed, the current follows the inductor equation:V = L * dI/dtWhere V is the voltage applied to the inductor (which will be about (Vin - Vout) while the switch is on, or about (-Vout) while off), and 'd' means 'change', but if you don't know calculus, then it's sufficient to say deltas, i.e., after a time interval dt, the current rose/fell by dI. (This assumes V and L remain constant during that time interval, but fortunately we can reasonably make these assumptions -- and, we have convenient time events (switch-on and -off) to sample things at!)This is a differential equation. You have to take the integral to get actual current (rather than just the relative change). But when you integrate, it's "plus a constant".The average value of current through an inductor, due to an applied voltage, is undefined.This is the hazard of which you must be aware. If the input and output voltages are precisely fixed, then the inductor current need not be at all related to the output / load current! If that current gets ratcheted up and up and up, pretty soon (maybe 0.0001 second) your switching transistor simply dies, and now you get full power flowing across the circuit, and things can only get worse from here.Inductor current varies in the normal course of events (as PWM varies), so we must control this parameter first and foremost, in order to prevent the transistor from failing.And yes, sure, if you ramp up and down very slowly, you can avoid your driver from delivering excessive current. By the (still overly) simplified statements above, this has no reason to work, but the reality is, the inductor current will eventually equal the load current, quite exactly.But what's missing is, how do you reach this conclusion? You've jumped from t=10us when the switch turned on and off once, to t=20000us when the microcontroller finally polls the output V/I. What's happened inbetween? A few thousand cycles, but how do you know they were okay?Dynamics are all about answering that. The full analysis is rather involved (not only calculus, but indeed, differential equations!), but the reduced form of it is this: if the source or load is unstable (prone to changing voltages or currents), you cannot tell that the inductor current will level out smoothly in those intervening 19990 microseconds. It could be up or down, by unlimited amounts in either direction*, at a rate (dI/dt) limited by the voltage difference and the inductance.(*If you use an "ideal diode" in the converter, otherwise a regular diode of course won't allow < 0A.)So again -- it is absolutely possible to do this with a microcontroller, but you will have to do quite a lot more than you were hoping for:a. Current sensor, with a fairly rapid polling rate (preferably once every cycle)b. Voltage sensor, with a modest polling rate (doesn't need to be > 1/3 the previous rate, actually, but it's usually easier to set up with equal rate anyway)c. Two PID loops (it sounds like you might've been planning on zero, just an open-loop ramp command)d. The switching converter itselfe. And some filtering and support circuitry to make everything work.If you're not opposed to the idea of op-amps, I might suggest building it discrete instead -- this at least saves you the trouble of programming a PID loop (which is actually a DSP (digital signal processing) topic -- a part of control theory, but complicated by the digital part!), and is much easier to debug (you can watch the voltages and currents on an oscilloscope in real time, rather than having to sprintf or debug your way through code).Tim

author: SuzyC
author_rank: Frequent Contributor
timestamp: January 25, 2016, 09:47:43 am
content: Thanks Tim for that exhaustive explanation of control systems.I think though you are overly paranoid about using a MCU for PWM control in charging a Li-Ion battery. My charging circuit is quite simple, a MOSFET, a catch diode, three resistors, an over-sized inductor, a zener diode in series with another diode for Vgs protection, a small but capable BJT to turn on the P-Chan MOSFET and generous input and output filter caps, and of course, crowbar/Polyfuse protection using an op-amp/SCR. The rest of the job is done by the MCU A2D measuring Vin, Ichg, and Vout.First of all, I have some doubt that there exists some mysterious actor that can vary the charging current or charging voltage beyond safe limits just because the MCU measurements are in fact, samples of a dynamic process not governed by the orthodoxy of PID control in a feedback loop that is correcting itself on a cycle to cycle basis in a PWM charging system.I really think this idea is quite absurd because of averaging inherent in good charging circuit design.Another point is that the MOSFET sw is quite over-rated(IdsMax>180Amp), has a very low RdsOn (.018-ohm) and is adequately heat-sinked and switching times are carefully set to enable high efficiency and low dissipation. So the MOSFET is quite capable to endure any overcurrent abuse in the unlikely but short interval prior to crowbar shutting down of charging.The current measuring op-amp has a low-frequency roll-off that integrates/averages PWM cycles. So any anomalous funny business that would cause excess current would give the MCU feedback to very quickly a adjust down the DCyc to a safe level.Secondly, if there was anomalous behavior causing very excess current, both the measured current and the voltage of the battery must rise and this would cause PWM to be reduced by my code to bring the excess current back to a safe/normal level or else trigger the crowbar.With MCU PWM control, Ton of the DCyc is precisely controlling the on-time kicking the inductor and inductor current is charging the output filtering capacitors and the battery in a linear ramp, so the average battery voltage is being measured. During Toff of the DCyc, the catch diode and the inductor discharge the energy stored during the on-time ramp up of charge current, but in both sides of an instantaneous charge cycle, the output voltage is filtered/averaged by the large electrolytic filter capacitors post inductor/battery and the charge current is integrated by the current sensing op-amp and and so both current and output voltage are averaged.Again, if there was any surge of battery voltage, possibly due to MOSFET failure, the op-amp sensing excessive battery voltage would trigger the crowbar SCR and the polyfuse shuts things down.And I would not be satisfied with my MCU PWM charging circuit without it being verified under different battery and Vin conditions, by scoping the waveforms at Vin filter cap, the catch diode/inductor junction and at the output/battery point and at the current sense outputs to the MCU. And what I see is a completely expected and boringly consistent PWM cycle by cycle behavior.Finally, my MCU code checks to see that no out of range values of Vin, Vin ripple, Vout, Vout(battery) ripple, charging current and even that the range of values of DCyc are within expected values to achieve a given charge current with the inductor used and Vin, else the MCU knows it is crowbar time.Any system should be no more complex nor simple than it needs to be. Paranoia must be balanced against common sense, careful engineering design and conservative component choice must govern probability of failure and in a practical and economic conscious world nothing can ensure anything to be 100% protected against failure within the constraints of available budget and space.There is more than one way to skin a cat.