Electronic load control feedback loop - Use  ACS712?  - Page 1
Forum section: electronics / testgear

author: SpottedDick
author_rank: Regular Contributor
timestamp: June 21, 2022, 01:01:58 pm
content: Hi All,I'm trying to build my own "open source" 20A/24V/500W max DC load.This is about the feed back loop that controls the MOSFET gate.This link:https://www.instructables.com/Arduino-Programmable-Constant-Current-Power-Resist/goes through his project in good detail building an 8A load. To get his current sense for feedback he used an array of parallel resistors to generate 100mV per amp. This gets fed into the op-amp for feedback for control of the load MOSFET.Feedback from resistor array to MOSFET gate:Is there a reason I'm missing I can't substitute the resistor array with a ACS712?I'll link the datasheet, but by coincidence, it runs up to 20A and output 100mV per amp. It's cheaper than an array of resistors and uses less heat and lowers the component count.Here's the full datasheet:https://www.allegromicro.com/-/media/files/datasheets/acs712-datasheet.pdf(I'll have to shift the output of this by 2.5V, but we'll leave that for later).I think the ACS712 is basically an analog component, so I don't see any issues. Any input on this idea?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 21, 2022, 01:13:25 pm
content: Use a lower ratio for R17/R18 and smaller resistors. No point in them being 10 freaking watts.A lower noise op-amp would be desirable, since the input signal will be that much smaller.Remember to repeat channels of these in parallel, to reach total capacity. One amp per MOSFET is required.Carefully mind any offset voltage along the ground return path, against which the op-amp is sensing. A differential configuration may be preferable.Tim

author: SpottedDick
author_rank: Regular Contributor
timestamp: June 21, 2022, 01:34:44 pm
content: Hi Tim.Those are 1W resistors, he's referencing that he has 10 in parallel.Anyway, yes, there's plenty of ways to peel a potato, but I don't want to muddy the waters at the minute for why I'm choosing this approach.I've spare op-amp channels I could use for example to amplify signals etc...While I appreciate the feedback, I want to keep this thread on the topic. Is the ACS712 suitable to just swap out for that bank of resistors.

author: Gribo
author_rank: Frequent Contributor
timestamp: June 21, 2022, 02:31:03 pm
content: Nothing wrong with the ACS712, except that it is NRND. There is the ACS730 and the ACS71240 which are in production.

author: SpottedDick
author_rank: Regular Contributor
timestamp: June 21, 2022, 02:39:45 pm
content: Thanks for letting me know it's NRND I wasn't aware. I'll assume the other parts are similar and check the datasheets shortly.I suppose under the instructible, the reason the writer states for using all analog control of the MOSFET is that doing it from the MCU using pure PID control wouldn't react quick enough. I'm worried some buffering or logic in the ACS712 (or comparable part) will make the circuit unstable. This is the guts of the question. The block diagram seems to make it appear to be a more analog part, and so it should be fine.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 21, 2022, 03:11:42 pm
content: The sensor, does what it says on the tin:It has 80kHz bandwidth, likely more than the relatively large compensation capacitor affords, so the amp won't know the difference.The voltage offset, must be reflected by the VREF input of course.The noise level on Hall effect sensors tends to be pretty awful, like ~40dB SNR, so it won't be very quiet. Probably, you won't notice, for mere PSU testing purposes, where it's unusual to have more than say 10Hz of measurement bandwidth anyway (i.e. measuring with a DMM).It's much more expensive than a small resistor and current sense amp, just as no amp at all just 10W worth of resistors; and it performs worse (lower design accuracy, higher noise). Hence my immediate reaction steering away from it entirely.Tim

author: SpottedDick
author_rank: Regular Contributor
timestamp: June 21, 2022, 03:24:01 pm
content: Quote from: T3sl4co1l on June 21, 2022, 03:11:42 pmNoted tom. I'm doing some simulations on the circuitry for the offset and to be honest, it's probably way worse than just using a load resistor and an Op-Amp, especially since I've spare op-amps available....

author: SpottedDick
author_rank: Regular Contributor
timestamp: June 21, 2022, 04:19:01 pm
content: After looking at the cost of the a 20A current shunt Vs the ACS712, their's basically no difference.The real issue is that the ACS712 will need conditioning circuitry to do what I want it to do which makes it far worse than a shunt.The shunt will need an op-amp, but we have two spare on board anyway. Circuitry using common value resistors to amplify the shunt voltage is a piece of piss to do this:So yes Tom, you where right to point me in this direction, makes much more sense

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 21, 2022, 04:37:43 pm
content: Who's Tom?Also I think you missed the part about duplicating this in parallel... you don't need one 20A path, you need three, preferably five or more. The resistor will be some $0.20 chip in 2512 or even smaller size, who cares. A dual op-amp per transistor would afford sensing gain as well as control, or diffamp as well as control, or both can be done in one I think with clever wiring.The number comes from the rated dissipation of a TO-220 or 247. You can find plenty (247+) rated >= 500W, sure -- at Tc = 25C, meaning every point on the case held at exactly that temperaturewith boiling refrigerant. Expect more like 100W on a real heatsink, especially if insulators are involved. 150, even 200W is reasonable for a direct greased joint, and if the heatsink stays fairly cool (huge size or forced air). Or figure about half this for 220s. Last I checked, 220s were cheapest per watt in low voltages. (Something like FQA9N90C being best in high voltages -- this was true some years ago and there may be newer/better options, or, subject to the perennial stocking problems everyone's been having the last couple years.)You can parallel MOSFETs okay if the source resistance is high -- enough to drop a few volts, on par with Vgs(th), thus swamping out the variation (between parts, and due to temperature imbalance) in that parameter. This increases saturation voltage of course, so maybe isn't an acceptable solution.Likewise, drain resistance can be added, to share the power dissipation at full load current, at expense of minimum operating (saturation) voltage. I did this, along with parallel switched load resistors, on a 500V 4A load dump I made some years back -- designed for a full load 100V minimum operating voltage, it needs only three FQA9N90Cs for the linear sink, while covering the whole range (100-500V 0-4A, and merely a proportionally lower current limit below 100V). (The cost of the load resistors themselves, and their hardware and assembly, maybe isn't worth the tradeoff, and a full solid state load would be fine. But I wanted to use heatsinks from my junk box, and I simply don't have 2kW of heatsinks to spare. The other advantage this approach has, is compactness: the resistors can run much, much hotter than the heatsink, in a much smaller space, nominally without need for a ventilation fan.)Tim

author: MarkF
author_rank: Super Contributor
timestamp: June 21, 2022, 04:38:00 pm
content: You are missing the elephant in the room.You will NOT be able to sink 20A through one MOSFET.More realistically 5A will be about the max for one MOSFET. Multiply your circuit by four.The limiting factor is the heat dissipation of the MOSFET.In that line, I would pick a MOSFET in a TO247 package (Much larger than a TO220 and able to handle more heat)I used an IRFP250 and limited my eLoad to 2.5A.A 0R100 ohm sense resistor with a max voltage of 0.5V for 5A would be:P = V * I = 0.5 * 5 = 2.5W resistor.A 5W sense resistor would be big enough.My 0R200 5W resistor doesn't even get warm.

author: SpottedDick
author_rank: Regular Contributor
timestamp: June 21, 2022, 04:47:08 pm
content: Quote from: MarkF on June 21, 2022, 04:38:00 pmYou're way off topic here. This topic is just on the feedback circuit. It's actually 6 MOSFETs I'm driving, but again, not relevant, I just want to understand the feedback portion of the circuit. I posted a thermal image of them recently on this forum if you'd like a look.QuoteSorry TimAlso, thanks for the info also contained in your post

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 21, 2022, 04:56:07 pm
content: Also BJTs are reasonable down here, food for thought:https://www.eevblog.com/forum/projects/why-are-mosfets-used-as-pass-elements-in-linear-power-supplies/msg3531820/#msg3531820Tim

author: MarkF
author_rank: Super Contributor
timestamp: June 21, 2022, 05:06:28 pm
content: Quote from: SpottedDick on June 21, 2022, 04:47:08 pmThe feedback circuit is simple. The op-amp will drive the MOSFET until the voltage across the sense resistor equals the voltage at (+) input of the op-amp (i.e. it will make the (+) input and (-) input equal). You calculate everything from there. I used a 10:1 voltage divider on the op-amp input giving 0v to 0.5v at the (+) input; resulting in 0.5v across the sense resistor; giving 2.5A using a 0R200 resistor.By-the-way: you're going to have issues if the DUT is not connected or powered off.PS: I saw your thermal images and it appears you are not driving the parallel MOSFETs correctly.You never show how they are paralleled.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 21, 2022, 05:14:52 pm
content: Quote from: MarkF on June 21, 2022, 05:06:28 pmI'm guessing that was naively, hence the present direction (control per).Tim

author: SpottedDick
author_rank: Regular Contributor
timestamp: June 21, 2022, 06:07:22 pm
content: Nope, I'm attempting control in parallel. I will detail my failure here if it completely falls to bits

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 21, 2022, 11:27:22 pm
content: Oh. Well, that won't take long then.Tim

author: SpottedDick
author_rank: Regular Contributor
timestamp: June 22, 2022, 08:14:29 am
content: Quote from: T3sl4co1l on June 21, 2022, 11:27:22 pmIt will be interesting anyway! With the cooling plate in place, I can't access the MOSFETs to read the voltage etc, but I can access the case through the perf board to insert thermocouples, so I can log termperature across all six to get an indication of how uneven it is.Also, that thermal image was used to decide where to place the NTC bead to detect over temperature which kicks in an external over temperature shutdown module, so hopefully it will just shutdown rather than thermal runaway as my max temp is set something like 20 degrees below where I believe Tj is in relation to Tc.

author: Kleinstein
author_rank: Super Contributor
timestamp: June 22, 2022, 08:34:55 am
content: The control loops are rather simple. So there is no real need to do the extra effort (extra protection, selecting the MOSFETS, source resistors to drop some 500 mV) of trying MOSFETs directly in parallel.The main way to use MOSFETs in linear operation in parallel is to use extra amplifier to ensure current sharing.In priciple the ACS.... sensor could be used, but they are slow, noisy and drift quite a bit. One would get better performance with relatively low value bare wire shunts and a reasonable low noise op-amp. As a useful test instrument one probably want good performance and thus a high power shunt. There is anyway quite some costs for the heat sink and FETs.If const is an issue for special uses (e.g. battery testing) one can use extra series resistors to dissipate most of the power. Power resistors can run at the higher temperature then the FETs and are more reliable (MOSFETs tend to fail short, while wire wound resistors tend to fail open, which is often safer).

author: SpottedDick
author_rank: Regular Contributor
timestamp: June 22, 2022, 09:00:58 am
content: Quote from: Kleinstein on June 22, 2022, 08:34:55 amI'm running them in raw parallel to see how it performs. I'd have no issue buying a few LM324 40c quad op amps and power resistors for a 'proper' build, but that's not the main goal of this project.My goal is an easily reproducible open-source design for anyone with a solder iron, a bit of perf board, and a few off the shelf components can build. Reproducing the feedback circuit on perf board 6 times is just too much.Going forward, I want to even try and remove the DAC from the project! However, it stays for now. The pulse to voltage RC circuit could be dodgy and I don't need that added variable this early in the design stage.QuoteA high power and accurate shunt was the same cost as the ACS and the only additional components needed (as I have a spare input on the LM324) is four off the shelf resistors, so this is the route I'm going. (see post above for the resistor values used)

author: Kleinstein
author_rank: Super Contributor
timestamp: June 22, 2022, 09:11:11 am
content: Paralleling MOSFETs in linear mode is known to not work well. Even if it does work in a few occasions it is by no way reproducible. It is more like the oppposite: usually not working except in a few exceptional cases with very well matched parts and close thermal coupling and even than usually only fo low voltage and not reliably.To make it reliable and repeatable one would need the extra control loops. This may be even in the version of cheap individual resistor and LM324 for the seprate control loops and than 1 extra look for the sum with better accuracy (e.g. higher grade shunt and low noise OP).The ACS712 does not compete with an accurate shunt - it's more like in league of a low cost shunt, maybe even just a piece of brass of bronze. Most hall sensors have quite some offset drift. They may be OK close to there rated current, but rather awful at 1% of the rated current. An electronic load as a test instrument should work over a large range - this may mean using only 1 channel for the lower currents.

author: SpottedDick
author_rank: Regular Contributor
timestamp: June 22, 2022, 10:49:17 am
content: Quote"Work well" is the issue here.First of all, these calculations where done well over a year ago. I just recently got started on this project. I didn't keep good notes. What follows is a mix of memory and some emails I found that hint at where the figures come from.I'm trying to remember exactly what way I calculated this, but emails back and forward between myself and an associate indicate we estimated around a ~20% load discrepancy between the MOSFETs when raw dog paralleled.We worked out that 3 MOSFETs of this type (can't find the part number now and they're soldered to a board) when properly controlled individually would give us 600W at 24V, and the limit on that was more the thermal constraints, which would only fully come out during thermal testing.We choose cheap MOSFETs as at the time component prices where high, and these older MOSFETs cost something like a fifth of the newer MOSFETs, that could handle higher current individually, but you still end up with the issue of getting that massive amount of heat out of a small case.6 Cheaper older MOSFETs only handling about 70W load each, would:1: Put us so far down on the SOA and °C/W curves that they should run relatively well.2: Imbalances between MOSFETs don't matter too much as from point 1, we have tons of headroom.3: 6 MOSFETs in this case style fit perfectly on easily obtainable Intel CPU coolers.4: We now have tons of thermal area to get the heat out.I'm nearly sure I calculated with the right cooling (read: Huge radiator) and controlling them individually to balance them, we could do 1.5KW.I'm not saying this is the *right* way to do this. If I was building this for a contract, it would be individually controlled and not doing things like using CPU cooler mounts or using fucking Arduinos. However, as an open source "hey, you can build and maintain this yourself using cheap off the shelf parts!" project, I like the route I'm going with it. If it fails I'll learn somethingEDIT:Oh, and something I haven't mentioned before since I wanted to do more testing on it first, but since I've gone this far with the description I might as well.I have run this on long term 15A loads, and the difference between the spots marked orange and purple on this image was only 3°C. The MOSFETs are sandwiched between a PCB and a copper heat-sink plate with good thermal paste. Also, orange was on the outside of the case, Purple was on the top beside the actual heat sink

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 22, 2022, 11:31:33 am
content: The correct way to do this, is to buy extra say 2-4x as many as needed, test Vgs(th) on every single one of them, and sort them. Select the set of 6 closest matching parts.Probably, gm needs to be matched as well; perhaps a 2-point test, doing Vgs(th) at say 1mA and 1A. Which will further narrow the pool.This is far more effort than just designing it right the first time, so it's never done this way -- except when absolutely required, which these days basically means repair of poorly-designed hi-fi audio amps.They still won't track well in operation, but well enough that capacity won't be degraded much, say -20% so you only need one extra to handle the total.A similar situation is had for paralleling diodes, or IGBTs (in switching duty) as their Vce(sat) curve is diode-like as well.At least unhooking the parallel source resistors, so they act independently to degenerate each individual transistor, and then taking the average over them by running a feedback resistor to each, helps reduce gm at high currents.Tim

author: Kleinstein
author_rank: Super Contributor
timestamp: June 22, 2022, 04:31:42 pm
content: The thermal image shows rather poor current sharing. Chances are the lower left MOSFET takes about 50% of the load, the upper middle one maybe 40% and the residual 10% is shared. It is hard to tell how much of the heating on the colder ones if just by thermal conduction from the neighbors.A circuit made to be duplicated by also less experianced persons should be reliable and not one of the maybe work if you are lucky. Trying to save a few cents for the OPs is nor really worth it - it is way to prone to failure. Even if it works in a few occasions, the failure rate will be very high. The current sharing may work at low voltage (e.g. 6 V) and it can work OK below 2 V, but the chances for failure go up with voltage.70 W from a cheap MOSFET (like TO220) sounds overly optimistic and water cooling.