Electronics > Beginners
LM317 Dummy load circuit
<< < (4/9) > >>
VEGETA:

--- Quote from: Ian.M on April 15, 2018, 12:15:40 am ---MOSFETs typically have too much Vgs threshold variation to be easy to parallel in linear mode without a lot of derating.   It would be preferable to give each its own OPAMP for gate drive and current sense resistor for feedback.   

However its easy enough to test your MOSFETs for matching at the max current you want to run them at: Start by writing an ID number on every one. Mount one on a heatsink (clip and silpad is good - you'll be changing it a lot!) and connect it to a PSU with a suitable drain resistor: 1R 10W would be a good choice.  Use a pot to bias the gate and ramp it up to the current you want to run at.   Measure the Vgs.   Repeat with the next one,  till you have them all.   Sort the results into Vgs order, then try the MOSFET with the highest Vgs for the desired current at the Vgs of the lowest and see what current you get - that's how much imbalance they'll have.   

Run one for a while starting from cold, initially at 80% of your desired current and monitor the current, Vgs and heatsink temperature to get some idea of their thermal behaviour.

If you are very lucky and they are all from the center region of the same die, they may all have very similar Vgs at the desired current and you'll be able to get away with directly paralleling them, though even then its better to keep the drain resistors separate if they are large enough to provide a voltage drop greater than the Vgs variation.

--- End quote ---

So what if they have some imbalance and yet I paralleled them? isn't the final current what is important? If someone has 5% more than the other, it will still be generally ok and won't blow it up.

I want 30v5a which is 150 watts, so getting 3 mosfets for 50w each is kinda suitable for the choices that I mentioned (55~60W). Worst case scenario according to your post is that I will have to put 3 sense resistors but I may be able to get away with just one opamp. For me, I prefer 3 opamps and 1 sense resistor but I don't know if it is possible or not. Absolute worst case is 3 opamps and 3 resistors which is still doable! So no worries! only problem is heatsink size.

I got 2 pieces of this one: https://www.aliexpress.com/item/2-x-Black-Aluminum-Radiator-Heat-Sink-Heat-Sink-40-x-40-mm-x-11-mm/32811370283.html?spm=a2g0s.9042311.0.0.hBwCTC

Can 2 of them be able to hold that much power (with 12v fan)? or should I get a bigger one?

this is the case that i bought: https://www.aliexpress.com/item/Black-Extruded-Aluminum-Enclosures-PCB-Instrument-Electronic-Project-Box-Case-100x76x35mm/32813597400.html?spm=a2g0s.9042311.0.0.WL1OPg

Aluminum is nice cuz I can mount the heatsinks inside to it via this thermal paste:

https://www.aliexpress.com/item/GD900-Thermal-Conductive-Grease-Paste-Silicone-Plaster-Heat-Sink-Compound-5-Pieces-High-Performance-Gray-Net/1283572161.html?spm=a2g0s.9042311.0.0.WL1OPg

so it will act as yet another heatsink!

How about 2 heatsinks for 2 mosfets while the other one is mounted directly at the case?

___

To tell you the truth I am weak at getting required parts in general... I need your advise about getting powerful logic level mosfets if you know one possible to use at this power. The items that I got for this project (and in general too):

IRL640A
IRLIZ44N
BD437
BD438
LM324
LM358

Cliff Matthews:
If you parallel them, use ballast power resistors.. Why? The one with lowest Rds conducts more and heats-up faster causing less current to the the others (thermal runaway..). Eg: Here's a DIY 100-watt load anyone can make in an hour (even me  :)  )
VEGETA:
I have tested your ltspice simulation by putting lm324 mode and asy at the same folder, it always go to 1 second of simulation and stops there. current still raises above 2A because voltage raises above 200mv on opamp positive input.

Anyway, I have tested the same circuit but with lt1013 (i don't actually have it, but i choose it for simulation only) and put resistor divider instead of potentiometer (i forgot how to deal with it in ltspice) and most importantly I put 160mv source as the input to the divider instead of the zener diode simply because I want to use an arduino pro mini to drive an lcd so I thought of using its pwm output to create 160mv output (+ rc filter) to act as the upper limit of 1.6A which worked well in simulation.

however, I used transient mode of simulation rather than dc op... I don't know why you use it. If I switch to transient in your circuit, then weird simulation results happens.
Ian.M:
You do a .dc and/or .op analysis to confirm there is a suitable operating point within the voltage range you need, then a .tran analysis to see if its got stability problems - which in this case it has.   As .tran has the startup option, we don't need to use .loadbias to get a rapid operating point solution to avoid excessive sim runtime when stepping.

The simulation is stalling because its breaking into HF oscillation at low load voltages#.  This isn't really surprising because a LM317 has a lot more gain than an ordinary BJT or power MOSFET and the OPAMP is running 'flat-out'.   The fix is to roll off the HF gain of the OPAMP and LM317 with some very small capacitors.   I made an educated guess that 100pF would do the job, but that's probably not optimal.   As we don't know how realistic the OPAMP and LM317 models are at HF, there is little point in doing a full loop stability analysis* using .ac in LTspice - you'll just have to suck it and see in the real circuit.

I've redrawn the pot as two parametric resistors with a function to vary them with respect to time as a pair so its as close as possible to my previous sim,  because the potentiometer subcircuit in that doesn't support varying the wiper with respect to time.  The control function wR4() ramps up to 100% over 4 seconds then blips down to 30% and back up to 70% to check the step response.   LTspice sim attached - drop in in the same directory as the previous one as it needs most of the same models

N.B. if you rapidly step the load for real, clamp the input of the LM317 with a 27V Zener so cable inductance doesn't spike it above its max voltage rating.

Feel free to replace the pot with a PWL source + whatever RC network you are planning to use on the Arduino output to filter and scale it.

# The oscillation problem didn't occur at 12.5V, which is why it slipped past my initial .tran sanity check of the previous sim.   *ALWAYS* treat mysterious sim slowdowns or stalls as an indication of potential trouble.  Stop the sim or pause the marching waveforms and zoom in on the time its stalled at, then look for oscillations or chaotic behaviour *SOMEWHERE* in your circuit

* LTspice: Stability of Op Amp Circuits http://www.linear.com/solutions/4449 also on Youtube: youtu.be/YYWlPFBebfc?t=0 if the Analog Devices takeover has borked it!
VEGETA:

--- Quote from: Ian.M on April 16, 2018, 03:19:53 am ---You do a .dc and/or .op analysis to confirm there is a suitable operating point within the voltage range you need, then a .tran analysis to see if its got stability problems - which in this case it has.   As .tran has the startup option, we don't need to use .loadbias to get a rapid operating point solution to avoid excessive sim runtime when stepping.

The simulation is stalling because its breaking into HF oscillation at low load voltages#.  This isn't really surprising because a LM317 has a lot more gain than an ordinary BJT or power MOSFET and the OPAMP is running 'flat-out'.   The fix is to roll off the HF gain of the OPAMP and LM317 with some very small capacitors.   I made an educated guess that 100pF would do the job, but that's probably not optimal.   As we don't know how realistic the OPAMP and LM317 models are at HF, there is little point in doing a full loop stability analysis* using .ac in LTspice - you'll just have to suck it and see in the real circuit.

I've redrawn the pot as two parametric resistors with a function to vary them with respect to time as a pair so its as close as possible to my previous sim,  because the potentiometer subcircuit in that doesn't support varying the wiper with respect to time.  The control function wR4() ramps up to 100% over 4 seconds then blips down to 30% and back up to 70% to check the step response.   LTspice sim attached - drop in in the same directory as the previous one as it needs most of the same models

N.B. if you rapidly step the load for real, clamp the input of the LM317 with a 27V Zener so cable inductance doesn't spike it above its max voltage rating.

Feel free to replace the pot with a PWL source + whatever RC network you are planning to use on the Arduino output to filter and scale it.

# The oscillation problem didn't occur at 12.5V, which is why it slipped past my initial .tran sanity check of the previous sim.   *ALWAYS* treat mysterious sim slowdowns or stalls as an indication of potential trouble.  Stop the sim or pause the marching waveforms and zoom in on the time its stalled at, then look for oscillations or chaotic behaviour *SOMEWHERE* in your circuit

* LTspice: Stability of Op Amp Circuits http://www.linear.com/solutions/4449 also on Youtube: http://www.youtu.be/YYWlPFBebfc if the Analog Devices takeover has borked it!

--- End quote ---

I am at work now so I cannot view the simulation file! I can't wait to get back and see it. I just wanna make sure it works this time. I've been into this compensation of op-amp feedback loop when I designed (with the help of others) my linear low dropout (1v) lab supply and I still not too good with it. I thought it won't be needed here but looks like it is!

Basically, all we have to deal with is the opamp loop right? nothing else is there to bother stability if I remember. However, why this is not the case with classic opamp + Nmosfet circuit? I try to answer this by quoting your words on lm317 gain... is it the cause?

you mentioned opamp running "flat-out", my guess is that it is without compensation rc-network? I always guess the value by trial and error but something like 10k + 100nF seems to work.
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod