Author Topic: Dave's Constant Current Load; traps for young players...  (Read 14138 times)

0 Members and 1 Guest are viewing this topic.

Offline iconTopic starter

  • Regular Contributor
  • *
  • Posts: 246
Dave's Constant Current Load; traps for young players...
« on: May 18, 2012, 08:47:27 pm »
And old farts alike.

I'm building Dave's constant current load device. Easy enough - an afternoon's work. What could go wrong?

1. Input Common-Mode Voltage Range

I made the mistake of assuming that 'rail to rail output' somehow implied 'rail to rail input' too. I'm using an LMC662 dual op-amp, though only half of it. Luckily I checked what happened if you simply connect the wiper of a pot to the + input. On a 5V supply, when the input approaches about 3.6V, the output jumps to 5V. Oops. I have to include a resistor in series with the pot, so that the input never exceeds 3.6V. In hindsight, this information is obvious on page 1 of the datasheet, where it says, under 'Features'; " Input Common-Mode Voltage Range includes V-". This can now be interpreted as saying " Input Common-Mode Voltage Range doesn't include V+". I will always read these sections in future, inverting the statements to find the true meaning.

2. Gain

So now the input swing is limited to 3.6V, I presumably need to introduce some gain, so that I get a full 5V output swing? I hope so, because that's what I've done. If I ever get it working, and need to dial it down a bit, I suppose I could.

3. Oscillation

"The output attempts to do whatever is necessary to make the voltage difference between the inputs zero". Well it does, up to some strangely shifting voltage where the two part company. You already know what the problem is, but I didn't, so it took me a while to connect an oscilloscope to it. Oscillation. Suddenly the hysteresis is explained - once it's oscillating, the voltage needs to drop back appreciably below the voltage where the oscillation started, in order to calm down.

Glancing at my circuit, how can I fix the oscillation? I have a spare half-an-opamp, if that helps. I substituted an STP36NF for the MOSFET.

Cheers
John

 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: Dave's Constant Current Load; traps for young players...
« Reply #1 on: May 18, 2012, 08:58:29 pm »
Ah yes.. the rail-to-rail myth .... has claimed another victim.
There is NO such thing as a rail to rail opamp. Despite all the claims made.
They can get within a couple 100mV from the rails but that's it. And yes, you need to look at both input and output. Some opamps are 'rail to rail' on the output but not on the input. You have to look at common mode.

The easiest way to find out what for beast you have is to look at the internal diagram. if the current source sits on top : common mode includes v-. if the current source sits at the bottom : common mode does include v+. there are very few opamps that are rail-to-rail on the input. those that do employ an input scaling mechanism and have a totally separate current pump that uses current mirror techniqies in the input transistors. since this is very hard to do ( to get it balanced and linear ) these opaps are expensive. they need individual laser trimming during production...

3: oscillation : put a 1nF cap across your 3k6. That will collapse the gain if this thing starts 'singing'.
oscillation is notorious in current sinks. i designed one a couple of days ago that uses an extra gain stage for the current measuring ( chopper opamp ) because my current sense resistor is 20milliohms ( i use an ohmite 4 wire resistor in SMD package ). that thing was a bitch to tame ... without capacitors... ( i needed a 5A/1uS step response) the solution was to mak the current sense amplifier high bandwidth and the driver opamp low bandwidth.
« Last Edit: May 18, 2012, 09:02:40 pm by free_electron »
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline Kremmen

  • Super Contributor
  • ***
  • Posts: 1289
  • Country: fi
Re: Dave's Constant Current Load; traps for young players...
« Reply #2 on: May 18, 2012, 09:11:13 pm »
The cap gives a pole to the response and should smooth at least that oscillation. I noticed that there was no gate resistor. Maybe a bit of that would do good as well, in case the op amp drives the gate heavy enough to induce oscillation. Usually that is more a problem for switchers that tend to ring badly if driven too hard, but i guess it couldn't hurt here either?
Nothing sings like a kilovolt.
Dr W. Bishop
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: Dave's Constant Current Load; traps for young players...
« Reply #3 on: May 18, 2012, 11:19:14 pm »
correct. you can isolate the opamp output from the gate cap with 47 ohm or so..

You can also add some 'feed forward' to the regulator loop by placing a resistor of , let's say 1 megaohm, between opamp out and - input ... that will reign in the opamp a bit if it starts janking too hard on that gate .... Slap a few pf across that one and it will get really tame ...
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: Dave's Constant Current Load; traps for young players...
« Reply #4 on: May 19, 2012, 12:33:02 am »
First - choice of MOSFET. I am not sure if the mosfet you have chosen has any specified SOA (safe operating area). It will work fine in switching mode when it is either hard off or hard on, but as discussed in another thread, in may not be rated for safe operation in the linear mode in between. It is usually safer picking a higher resistance mosfet, but better still, pick one with a fully specified SOA like the IRFP460.

I am puzzled by what you are trying to do. Your amplifier has a gain of 10K/13.6K = 0.735, and so when the input is 3.6V, your current will be 4.89A. That is 24W of power in your 1 ohm resistor.

What maximum current are you aiming at?

I would reduce the current sense resistor to something like 0.1 ohms or lower, and make sure it can handle the peak current. 0.1 ohms means at 5A, the maximum input voltage to your opamp is less then 1V, so your 3.6V problem goes away.

I am not sure why you have the 10K. 3k6 divider, but you can probably get rid of it - instead have a 10K resistor from the negative input to the sense resistor, and put a 1nf cap from the negative input to the opamp output. Add another 10K resistor from the positive input to the potentiometer wiper just to minimize effects of offset current. For stability, you need a resistor from the opamp output to the mosfet gate. It also helps protect the opamp from Miller effect voltages from the MOSFET gate. It can be fairly high - 1K is OK. To stop the mosfet gate breaking down when the sink is suddenly attached to a high voltage source, add a zener from the gate to ground - 5V6 or more if your opamp supply is 5V. This is only necessary if the input voltages can be over 100V.

In terms of opamp output voltage, the opamp is regulating the voltage across the sense resistor and so the opamp output will be several volts higher then the input to turn on the mosfet. If the mosfet needs 3V to conduct 1A, then with a 0.1 ohm sense resistor, the opamp output will be about 3.1v when the input is about 0.1V. To me, if the input was 3.5V, the opamp output probably should be at 5V with your current circuit. You want less input voltage, not more.

Richard.
 

Offline M. András

  • Super Contributor
  • ***
  • Posts: 1014
  • Country: hu
Re: Dave's Constant Current Load; traps for young players...
« Reply #5 on: May 19, 2012, 09:22:05 am »
http://www.ixys.com/PartSearchResults.aspx?searchStr=IXTK90N25L2&SearchSubmit=Go
damn expensive but its designed for programmable loads and linear applications
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: Dave's Constant Current Load; traps for young players...
« Reply #6 on: May 19, 2012, 10:10:51 am »
that is a 1KW mosfet though :/ that would make for one hell of a programmable load,

actually providing its rs(on) doesnt vary, it would be dissipating 300W for its 90A rating, add any voltage drop from linear mode, and its not that hard to reach :/

more realistically it would make for a very good 0-25A 0-40V constant current load,
« Last Edit: May 19, 2012, 10:14:02 am by Rerouter »
 

Offline M. András

  • Super Contributor
  • ***
  • Posts: 1014
  • Country: hu
Re: Dave's Constant Current Load; traps for young players...
« Reply #7 on: May 19, 2012, 12:03:55 pm »
i picked this one cos i was cross referencing the stock at farnell and the specific case types on this mosfet series, didnt check digikey i bet they have more from this type, but yeah would be better to get them as sample from ixys, big package big metal surface area=good contact to the heatsink
 

Offline jimmc

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: gb
Re: Dave's Constant Current Load; traps for young players...
« Reply #8 on: May 19, 2012, 12:31:13 pm »
Looking at page 6 of the LMC662 data sheet (http://www.ti.com/lit/ds/symlink/lmc662.pdf,
the device is unstable at unity gain for capacitive loads greater than about 100pF.

Turning to the ST36NF06 data sheet http://datasheetz.com/data/Discrete%20Semiconductor%20Products/MOSFETs%20-%20Single/497-3186-5-datasheetz.html the input capacity is very roughly 900pF
(For the purists this ignores feedback through the source resistor and drain gate capacity).

To remove this instability you need to isolate the high frequency feedback path from the MOSFET.
How to do this is shown in fig 3 on page 7 of the LMC662 data sheet.
Rx and Cx are the components you need to add (The 100k is the is replaced by your 10k /3k6 feedback path)

Jim
 
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16276
  • Country: za
Re: Dave's Constant Current Load; traps for young players...
« Reply #9 on: May 19, 2012, 12:44:18 pm »
To dissipate 1kW with that package you will need to cool it with lN2.
 

Offline M. András

  • Super Contributor
  • ***
  • Posts: 1014
  • Country: hu
Re: Dave's Constant Current Load; traps for young players...
« Reply #10 on: May 19, 2012, 12:48:20 pm »
To dissipate 1kW with that package you will need to cool it with lN2.
http://www.ixys.com/ProductPortfolio/PowerDevices.aspx same applies to this package too?
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16276
  • Country: za
Re: Dave's Constant Current Load; traps for young players...
« Reply #11 on: May 19, 2012, 01:34:55 pm »
The TO247 package is rated in this device for a dissipation of 960W if you can keep the case at 25C. I doubt you will find a heatsink at any ambient other than -193C that can do that other than as a pulsed load.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: Dave's Constant Current Load; traps for young players...
« Reply #12 on: May 19, 2012, 01:52:33 pm »
the main factor would be the thermal junction, getting heatsinks capable of 10's of watts per degree C is rather easy :/

for 0.85 cubic meters of airflow per second, if the junction is low enough, a sufficient heatsink could handle a continuous load of 1KW for a 1 degree rise, with a 10 degrees rise dropping it to a far more reasonable 5.1 cubic meters per minute, what a number of 140mm fans are easily capable of,
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16276
  • Country: za
Re: Dave's Constant Current Load; traps for young players...
« Reply #13 on: May 19, 2012, 01:59:16 pm »
Yes, but they are not cheap, and tend to be made of copper and have multiple heat pipes in them. Will not be able to keep the junction at 25C when the ambient is 30C or the unit is on a bench and is recirculating the air in the shop which will be in the range of 20 - 30C. Either you start with a block of copper, mill a serpentine path into it and seal it to allow a refrigerant to circulate as a cold block ( I assume that is how most of these devices are used in continuous applications) or you use multiple devices and derate a lot.
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: Dave's Constant Current Load; traps for young players...
« Reply #14 on: May 19, 2012, 02:07:25 pm »
well there is the better side of the airflow tradeoff, if the heatsink can get the heat out, the airflow will take it, now per 0.85 cubic meters of air, it will absorb roughly 1KW second per degree, and do this freely as long as the air is moving and the item its cooling is of a higher temperature (still air will saturate) obviously if your running a pourer heatsink you can generally beat it will an increase in airflow, however the tradeoff is to the end designer to make, and the heatsink at a minimum must still be able to pass along the heat, and the room must contain sufficient air to hold this heat, and radiate it elsewhere,
« Last Edit: May 19, 2012, 02:09:52 pm by Rerouter »
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: Dave's Constant Current Load; traps for young players...
« Reply #15 on: May 19, 2012, 02:12:42 pm »
on reflection, you guys can now take better guestimations on how much lab gear you can pack in a room for you to start feeling the heat, and how much air needs to move to keep it cool :)
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7547
  • Country: 00
  • +++ ATH1
Re: Dave's Constant Current Load; traps for young players...
« Reply #16 on: May 19, 2012, 02:45:21 pm »
Regarding dissipating the heat, why not parallel with multi cheaper mosfets ? Any major disadvantage ? Apart from the cost and bigger area/volume of course.


PS :
Made a thread while ago asking and discussing the "hot spot" side effect on ordinary switching mosfet when working in linear zone -> https://www.eevblog.com/forum/beginners/question-on-mosfet-in-linear-mode-does-'hot-spotting'-a-serious-problem/
« Last Edit: May 19, 2012, 03:21:46 pm by BravoV »
 

Offline T4P

  • Super Contributor
  • ***
  • Posts: 3697
  • Country: sg
    • T4P
Re: Dave's Constant Current Load; traps for young players...
« Reply #17 on: May 19, 2012, 04:00:53 pm »
Regarding dissipating the heat, why not parallel with multi cheaper mosfets ? Any major disadvantage ? Apart from the cost and bigger area/volume of course.


PS :
Made a thread while ago asking and discussing the "hot spot" side effect on ordinary switching mosfet when working in linear zone -> https://www.eevblog.com/forum/beginners/question-on-mosfet-in-linear-mode-does-'hot-spotting'-a-serious-problem/

You need to make sure to have some parallel balancing mosfets
when i just reminded myself i am replying to the guy who keeps claiming i don't know my sh*t
 

Offline iconTopic starter

  • Regular Contributor
  • *
  • Posts: 246
Re: Dave's Constant Current Load; traps for young players...
« Reply #18 on: May 19, 2012, 04:55:05 pm »
Hi

Thanks for all the suggestions - esp. to jimmc for pointing out which bits of the datasheets I should have read (though without the explanation, it wouldn't have conveyed anything to me, I'm afraid).

Armed with these suggestions, and a handful of capacitors, I've tried to fix the oscillation. Sadly, it seems very resistant to the proposed fixes. I can make it *worse*, but that's not very helpful. Just to prove I'm taking the problem seriously; there's an op amp under those wires, somewhere:



The data sheet suggest a 10pF cap between inverting and output pins; the smallest I have to hand is 22pF but I've tried that. I've tried putting a capacitor across the output > -input resistor. I've also gone back to a simple unity gain configuration and repeated the above - but still it oscillates above a few mV. I could call it a "0-30mA constant current load"...

Maybe I should go for a less touchy op amp?

And I haven't even got as far as exploring whether the MOSFET is suitable for the job...

John
 

Offline jimmc

  • Frequent Contributor
  • **
  • Posts: 304
  • Country: gb
Re: Dave's Constant Current Load; traps for young players...
« Reply #19 on: May 19, 2012, 06:25:14 pm »
Try slugging it harder, try Rx = 1k, Cx = 1n, if it's not stable with these values something else is going on.

By the way the input doesn't have to be rail-rail...
The gate threshold of the FET (VGS(th)) is given as 2 - 4V for ID = 250uA so even with the Op-Amp output hard against the positive rail, the source will be at least 2v below the positive rail for all currents >250uA.

Of course with a VGS(th)max of 4v, a 5v supply to the Op-Amp doesn't leave much headroom,
worst case you could get <1A max (1v drop across sense resistor leaves 4v for the MOSFET).

With a large MOSFET a beefier Op-Amp would be better, but all Op-Amps have reduced stability margins when driving a capacitive load. It's just that some are worst than others. :)

Jim
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11859
  • Country: us
Re: Dave's Constant Current Load; traps for young players...
« Reply #20 on: May 19, 2012, 07:17:18 pm »
A rule of thumb to try from a non-EE (and let's wait for the EE's on the forum to tell me I'm totally barking up the wrong tree  :) )

However: capacitance on the output, regulating side of a feedback amplifier/controller is bad and will reduce stability. Capacitance on the input, error detection side of a feedback amplifier/controller is good and will increase stability.

If you can't control the capacitance on the output side, you can try to compensate by putting more capacitance in suitable places on the input side. First on the power supply rails--make sure you have adequate bypassing there, at high and low frequencies. Secondly on the feedback path. Use capacitance as a filter to damp out higher frequencies (aka "noise"). Also, make sure you don't introduce an integrating element into the feedback loop when the output has a lot of capacitance. Putting integrating feedback regulation on an integrating system is a sure recipe for cycling.

There are mathematical analysis tools to describe these things, but that would take a treatise. Some general operating principles often help before you try to crunch the math.
 

Offline SeanB

  • Super Contributor
  • ***
  • Posts: 16276
  • Country: za
Re: Dave's Constant Current Load; traps for young players...
« Reply #21 on: May 19, 2012, 07:23:45 pm »
I would also add not to use too fast an opamp, you are not needing MHz response here, slow is better. A low pass filter on the output, some heavy feedback around the opamp, and you should get it stable without making a good transmitter. A higher supply voltage for the opamp allowing the output stage to run near the middle would not go amiss.
 

Offline vxp036000

  • Regular Contributor
  • *
  • Posts: 167
Re: Dave's Constant Current Load; traps for young players...
« Reply #22 on: May 19, 2012, 07:40:43 pm »
You're on the right track.  Capacitance on the output degrades the phase margin.  To stabilize the circuit, we can add a series capacitor and resistor in the negative feedback path.  Choosing the correct value capacitor and resistor pushes the 180 degree phase crossing out beyond the unity gain frequency.

My suspicion is that the feedback or output impedance do not comply with the datasheet specs in his circuit; designing the circuit with the recommended values of feedback and output impedance will ensure stability.

A rule of thumb to try from a non-EE (and let's wait for the EE's on the forum to tell me I'm totally barking up the wrong tree  :) )

However: capacitance on the output, regulating side of a feedback amplifier/controller is bad and will reduce stability. Capacitance on the input, error detection side of a feedback amplifier/controller is good and will increase stability.

If you can't control the capacitance on the output side, you can try to compensate by putting more capacitance in suitable places on the input side. First on the power supply rails--make sure you have adequate bypassing there, at high and low frequencies. Secondly on the feedback path. Use capacitance as a filter to damp out higher frequencies (aka "noise"). Also, make sure you don't introduce an integrating element into the feedback loop when the output has a lot of capacitance. Putting integrating feedback regulation on an integrating system is a sure recipe for cycling.

There are mathematical analysis tools to describe these things, but that would take a treatise. Some general operating principles often help before you try to crunch the math.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: Dave's Constant Current Load; traps for young players...
« Reply #23 on: May 19, 2012, 10:51:28 pm »
Quote

You need to make sure to have some parallel balancing mosfets

Not really. mosfets are ptc.. as they heat up their rds increases... so two paralle mosfets become self balancing ( as opposed to bipolar where the hottest one eats the most current ...


If you want to get good operation : give that opamp a negative rail .. that way the system keeps working for very low currents as well. measurng cose to the 0 volt is 'hairy'
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline amspire

  • Super Contributor
  • ***
  • Posts: 3802
  • Country: au
Re: Dave's Constant Current Load; traps for young players...
« Reply #24 on: May 20, 2012, 01:15:14 am »
Quote

You need to make sure to have some parallel balancing mosfets

Not really. mosfets are ptc.. as they heat up their rds increases... so two paralle mosfets become self balancing ( as opposed to bipolar where the hottest one eats the most current ...
The self balancing of parallel mosfets applies to switching mode, but not necessarily linear mode. It only works if you choose mosfets with a high enough channel resistance so that the resistance increases will dominate over the increases of gate sensitivity with temperature. If I pick a random device - I just happen to be looking at the FDPF12N50T mosfet right now - this only happens at a gate voltage typically above 7V and a current above 11A (it is only a 6A continuous rated mosfet). Below this, the current increases quickly with temperature at a constant gate voltage, swamping out the effect of the rising channel resistance. This means that in a constant current load, if I put these devices in parallel, one device would have thermal runaway and end up conducting most of the current.

Where you see mosfets in parallel in a linear circuit (such as linear amplifier outputs), they are mosfets carefully chosen to properly share the current. You will probably find they have a large Rds.

If you want the constant current load to be rated for a constant maximum power (eg 5v at 20A and 100v at 1A), it will probably be impossible to find mosfets that will share power properly over the whole voltage range.

My favourite way of building a a constant current load with multiple mosfets is to have a separate regulator circuit for each mosfet. The opamps cost nothing, and you get an exact equal share of power.

Richard.
« Last Edit: May 20, 2012, 02:06:13 am by amspire »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf