Limiting the máximum power draw of an electronic load - Page 1
Forum section: electronics / beginners

author: dazz
author_rank: Frequent Contributor
timestamp: August 05, 2022, 02:50:55 am
content: Hi everyone.In my DIY group of friends we're building a simple electronic load to test batteries, power supplies and stuff. This is the schematicVload is supposed to be in the 5 to 20V range. The thing is the current control section has a fixed range that goes up to 6A, so obviously if the load voltage increases, the máximum power draw at the load does so too. I'd like to limit the power draw to 50W regardless of load voltage. I can achieve that manually by reducing Vctrl for higher load voltages, or by increasing the value of R5, but thought it would be kind of neat if I could add something to do it automatically. I thought about using a mosfet as a voltage controlled resistor, but that proved very difficult (or impossible) to fine tune in LTSpice. Something like this:Any ideas on how to achieve this, please? Thanks

author: Whales
author_rank: Super Contributor
timestamp: August 05, 2022, 03:03:35 am
content: A constant current load is relatively easy, just like your first diagram.Proper/accurate constant power is more complex, I don't think there is a simple solution for this (?). I think I've only seen solutions involving microcontrollers in the feedback loop. It's theoretically possible to do it analog, but it would require lots of parts (including an analog multiplier) and end up quiet messy.EDIT: Removed silly extra bit. It looks like you might not be after actual constant-power load behaviour.Would summing together a current measurement signal and a voltage measurement signal help? Some diodes and resistors might be a solution that works if your only goal is to avoid things catching fire. I'm not sure why you want to use a mosfet to do this?

author: dazz
author_rank: Frequent Contributor
timestamp: August 05, 2022, 03:08:48 am
content: Quote from: Whales on August 05, 2022, 03:03:35 amI see. One of the guys in the group noted that the proper way to do it is to use a microcontroller.Seems a bit overkill for a simple design like this. Thanks, Whales.

author: Whales
author_rank: Super Contributor
timestamp: August 05, 2022, 03:09:45 am
content: Sorry, Ininja-editedelephant-edited my reply.Are you trying to make a proper constant-power load, or just add a safety mechanism/trip/threshold to your existing constant current load that tells it to use a different current draw setting?

author: dazz
author_rank: Frequent Contributor
timestamp: August 05, 2022, 03:20:33 am
content: Quote from: Whales on August 05, 2022, 03:09:45 amNo need to apologiseMore like the latter. The initial plan was to have some voltage controlled resistor, or some voltage controlled voltage source, to vary R5 (make it larger al the load voltage increases) or vary Vload (make it smaller as Vload increases) I got a few data points to get an idea of what it'd need to do:With a 5V load, Vctrl would need to be about 13V to max out at 10A / 50WWith a 10V load, Vctrl would need to be about 8V to max out at 6.3A / 50WWith a 15V load, Vctrl would need to be about 5.5V to max out at 3.3A / 50WWith a 20V load, Vctrl would need to be about 4V to max out at 2.5A / 50WSo I thought I might be able to get that conversion with a mosfet for some reason, but it doesn't seem to work.

author: ledtester
author_rank: Super Contributor
timestamp: August 05, 2022, 03:39:48 am
content: It seems that under your scheme the amount of current the load will attempt to draw will vary based on Vload. That is:- the non-inverting input of the LM358 is some fraction of Vcntrl, the fraction being the potentiometer setting- Vcntrl depends on Vload via some circuitry- Vload itself can vary based on the current draw and also time -- for instance if the power supply is a battery which gets depleted as you draw power from itDo you really want to have this kind of feedback loop?

author: dazz
author_rank: Frequent Contributor
timestamp: August 05, 2022, 03:44:54 am
content: Quote from: ledtester on August 05, 2022, 03:39:48 amI understand now it's much more difficult than i anticipated. I don't think it's worth it if it's going to add tons of complexity to the circuit.In my mind it was as simple as "input this voltage, output this other voltage", but alas, it's not.

author: Whales
author_rank: Super Contributor
timestamp: August 05, 2022, 08:01:53 am
content: Quote from: dazz on August 05, 2022, 03:20:33 amThat's potentially doable.Basically a controllable voltage divider. Turn on each NPN transistor using a comparator that kicks in at a certain voltage.There are some more details than what I show here:- Those resistors get turned on in parallel, so you have to do some calculations to get them right.- Your battery isn't ground referenced, so you will probably need a differential amplifier between the battery and the comparators.- Comparators like the lm293/lm393 have the NPN transistors built in so you won't need extra parts.- Fully-on NPN transistors still have a bit of a voltage drop, so the actual performance will be a little off from calculations.

author: EPAIII
author_rank: Super Contributor
timestamp: August 05, 2022, 10:20:01 am
content: Power is Voltage times current.There are analog multiplier ICs availabe: two Voltages in and their product out.Current can be sensed as a Voltage by a simple resistor.Op amps may be used to scale the inputs as needed to set the output power range. A pot can be used on a comparator (unused op amp in a quad package) to set the trip value.https://www.mouser.com/c/semiconductors/amplifier-ics/special-purpose-amplifiers/?q=multiplier%20ic&amplifier%20type=Analog%20MultiplierOne data sheet (just the first on the page):https://www.mouser.com/datasheet/2/609/AD633-1501827.pdfhttps://www.digikey.com/en/products/filter/linear-analog-multipliers-dividers/772?s=N4IgTCBcDaIIYDs4BsD2BzABAWwK7IBcBLAB2SIFMAnTASQGEQBdAXyAI seem to recall an RCA part that performed the same function. I used them to build a Voltage controlled level control for an audio mixer - decades ago. I can't remember the part number. I used them because I could use cheap pots with capacitor (10 uF?) filters for the level controls. That eliminated any possibility of noise from the inexpensive pots as they only handled DC.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: August 05, 2022, 10:53:52 am
content: Quote from: dazz on August 05, 2022, 03:08:48 amIt's not, actually.The alternative is a rather pricey bit of kit (see above!), and will still only be so accurate (not that a lot of accuracy should be needed here). Plus you can hang an LCD off it and get V/I/P readouts live. Maybe you don't need those either, but given the opportunity, hey why not?The other way is, if you well and truly don't need much accuracy, do foldback current limiting.This is where a fraction of the load voltage, is fed back to the current sense signal, so that, while the opamp holds this signal constant, it means current drops as voltage rises. Think of the see-saw or lever action between the resistors doing this. (Also, you need a resistor between R4 and -IN anyway, for compensation. More on that later.) Basically, make a voltage divider from D to -IN to S, the top resistor being rather large (100s k?) so it has fairly little effect.Note this raises the minimum control input, so if you want near-zero current at non-zero drain voltage, you have to bias it up a bit.This gives a downward-sloping V(I) characteristic, which is not the hyperbolic curve of constant-power, but can be positioned to cut through it in two places, giving an approximated curve fit. The maximum dissipation is in the middle (half the design/maximum rating V, I) and can simply be positioned tangent to maximum power, or a slightly larger transistor can be used to handle the excess, and you can call it "50W capacity" on the nameplate, and just cheat that it'll sometimes be more, sometimes less.Doing this as a limit rather than a continuous behavior, is harder; the feedback signal is small, so you can't just use two dividers and diode-OR their outputs (i.e., giving a kinked V(I) curve, flat below the power limit, but foldback above). You'll need another op-amp or two for that (precision rectifier type circuit; actually, a max(a, b) circuit, but same thing with suitable choice of reference voltages). Which also means having two op-amps in a loop, which definitely will need compensation. Which...Compensation:The series resistor mentioned above, is also so a capacitor can be placed from OUT to -IN; say 1k and 2.2nF are likely values, give or take a factor of 10 say (so, test values in coarse steps e.g. 1n, 2.2n, 4.7n, etc...). Also add some resistance from OUT to M2, because op-amps don't like driving capacitive loads.Final evolution: some R+C may be desirable for the feedback capacitor, i.e. giving it substantial ESR, on the order of 1k, and again, adjusted by wide steps until you find optimal response. The goal is generally to get fast response, with little overshoot, while also being stable under all conditions. Performance shall be tested by monitoring the current response for a step (control) input, or load voltage step.Don't expect accurate results from the simulator -- you'll want to do this IRL, for a series of load voltages.You'll want to do this for a series of load impedances, as well! The MOSFET has significant Cdg, meaning there's feedback from the output. Load inductance in the 1-100uH range can be especially tricky. Usually an R+C from D-S or D-GND will do the job; ballpark 10R + 10nF say should be a good start.Also for step turning-off response, you may find the drain voltage shoots up dangerously high (again, given an inductive load). A TVS from GND to D easily handles this. Something like SMAJ30A is no problem, an even smaller device is possible at these currents maybe. That's just kind of the smallest usual TVS family, heh.Reference: I made this current limiting fuse, which features an analog current limiting function, for a brief duration (a few ms), so is doing essentially the same thing.https://www.seventransistorlabs.com/Images/LimitingFuseSch.pngThe discrete circuit is rather hard to understand, but notice the common parts: Q7 power transistor, R15 shunt, P1-2 load terminals. R9/C4/D5 are output damping and protection respectively. R14 is the series resistor from the shunt (though this does not implement foldback, so there is no connection to drain voltage here). C7/R26 provide some feedback to the control circuit, though I think they ended up being unused in the physical build. (I do have simulation sources in here to try it out virtually -- it got pretty close, only a little tweaking was needed.)The rest of the circuit acts as an op-amp, R18/R20 being the +IN voltage reference, R19/C5 being the compensation R+C (it's not from OUT to -IN, just because it's a bit better here in discrete form; when using IC op-amps, we simply aren't given this choice!), and Q5B/Q4A are the amp output transistors, controlling the gate (with fairly low currents, and compensation comes from an internal node, so a series resistor from OUT to G isn't necessary in this case). The rest is bias and timer logic, implementing a latching fuse behavior, also overtemp and a blinking LED for status.Tim

author: Psi
author_rank: Super Contributor
timestamp: August 05, 2022, 11:09:06 am
content: yeah, i was pretty much going to post the same.A MCU is probably the best option.Is it overkill considering how powerful an MCU is vs what you need to do. Yes.Is it overkill considering cost and how easy it is to implement, no, defiantly not.A MCU will be cheap, trivial to setup and easy to change should you want to adjust the limits in the future.Some people find it sad to dedicate a computer faster than what we used to go to the moon just to flash an LED.I just find it funny.

author: dazz
author_rank: Frequent Contributor
timestamp: August 05, 2022, 05:23:20 pm
content: Oh boy, so much information there to process, thanks so much, guys, I'll need to read all that carefully, and several times