Author Topic: Constant current dummy load, ran a gutter...  (Read 14263 times)

0 Members and 1 Guest are viewing this topic.

Offline bsodmikeTopic starter

  • Regular Contributor
  • *
  • Posts: 228
  • Country: lk
Re: Constant current dummy load, ran a gutter...
« Reply #50 on: August 11, 2020, 04:15:08 pm »
Hey Mark / pqass --

After posting the video, I went back and spent sometime going through everything and finally - a wiring screwup!! But I learned a lot in the process (more on that later). I had the inverting input STILL tied to the RSense resistor!!

So, as per that video, all those issues I was showing you at 3VDC.  Now, totally gone!!
However, I am now seeing some oscillations at 5Vdc (with the 1Ohm resistor) and testing at 1A through the load I(d).  That said, this is still the minimum requirement for V(ds), so I tried 10V.

Nope, things look nice and clean now!  See attached image.

Other things wrong in the video
(1) I had a Fluke showing V(g), yes it was the "Gate voltage", but I also have that on the 'scope (brown colour).  I've replaced that scope to monitor V(gs).
(2) Second photo shows the fixed circuit.

However...
Remember Peter Oaks' video from your earlier comment (https://www.eevblog.com/forum/projects/constant-current-dummy-load-ran-a-gutter/msg3181972/#msg3181972) - He talks about using a signal generator and he managed to get a DC-square wave from his "AWG".  He mentioned running "500ms pulse, 100Hz, with 2A shift in voltage"?

So it sounds like he's doing something similar to what one would call a "step-response", where we simulate an Input load turning on.  Any tips on how to get this going and get _that_ square wave on to the my 'scope?

I'll check my PSU manual on getting its duty-cycle feature working. 

In watching your video, it made me wonder how you have the scope probes connected.  Especially, the yellow trace and ground. 
Do you mean, you have one probe on the 'drain' and another on the 'source'?

(1) Yellow trace is simply the LOAD input voltage, so it is connected to the PSU supply at +/-.
(2) No... I cannot connect the 'scope to Drain/Source as that would cause a short due to mains-earth termination in the Scope probe.  I need a differential-probe for that, so thankfully I was cautious and used the Fluke 289 (backlit display) to monitor V(ds).
(3) Green trace: Rshunt.
(4) Brown trace: (Orange really). MOSFET gate voltage, taken right after the 100 Ohm resistor from the Opamp output.

Try shortening the wires (to the power source, to any meters).

I just tested this on my DIY CC load and found that if I had my bench meter (with long leads) measuring DC current in the load-source loop (12V battery as source), that I had terrible oscillations of 4V@54kHz (scope between +load-in and GND) when drawing 2A.  But then I replaced the meter with a short 30cm wire (passing through a DC clamp ammeter), the oscillations went away.   If I elongated the pair of wires to the battery source by 60cm, the oscillation came back to 2V@54kHz when drawing 2A.   

This was the first time I've looked at it with my scope; was relying only on [lying, averaging] meters to inform me when it was built.  I only have a 100ohm gate resistor and not the low-pass filter in the feedback loop.  I'll be sure to add it later and retest.  At worst, maybe this will be another condition of use like any other specification; ie. that shall use only short fat leads. 

Also, I think the usual bench setup (with breadboards and all sorts of meters with long leads) lends itself to generating phantom problems (oscillations and ringing). Maybe this is an opportunity to do it the Jim Williams way; air-wire prototyping, using ground planes, short fat wires with higher current lines, [kelvin] sense wires, twisted pairs, etc.  Damn parasites!

That makes sense, earlier today before I fixed my wiring blunter, I was seeing oscillation around 62 - 90kHz, possibly in the 2V region.

Cheers for the tip on air-wiring, mmm that sounds interesting!

I should be up in about 8 hours time and will share further info on the oscillations I'm seeing.  I'll also use my free time to sort out the CPU cooler heatsink hack.
« Last Edit: August 11, 2020, 04:48:35 pm by bsodmike »
 

Offline bsodmikeTopic starter

  • Regular Contributor
  • *
  • Posts: 228
  • Country: lk
Re: Constant current dummy load, ran a gutter...
« Reply #51 on: August 11, 2020, 04:25:59 pm »
I replaced the 10:1 divider with a 10-turn pot, is that OK?
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2644
  • Country: us
Re: Constant current dummy load, ran a gutter...
« Reply #52 on: August 12, 2020, 01:08:53 am »
However...
Remember Peter Oaks' video from your earlier comment (https://www.eevblog.com/forum/projects/constant-current-dummy-load-ran-a-gutter/msg3181972/#msg3181972) - He talks about using a signal generator and he managed to get a DC-square wave from his "AWG".  He mentioned running "500ms pulse, 100Hz, with 2A shift in voltage"?

So it sounds like he's doing something similar to what one would call a "step-response", where we simulate an Input load turning on.  Any tips on how to get this going and get _that_ square wave on to the my 'scope?

I'll check my PSU manual on getting its duty-cycle feature working. 
It's simple.
Just connect a function generator to the 'external input' of my eLoad circuit. 
Making sure the amplitude is between 0V and 5v. 
Also, make sure you set the DC offset so it does not go negative
The max frequency I was able to switch my load was 5KHz.

Quote
I should be up in about 8 hours time and will share further info on the oscillations I'm seeing.  I'll also use my free time to sort out the CPU cooler heatsink hack.
See Peter's performance testing video at timestamp 19:35 where he shows his computer heatsink and fan.
 

Offline bsodmikeTopic starter

  • Regular Contributor
  • *
  • Posts: 228
  • Country: lk
Re: Constant current dummy load, ran a gutter...
« Reply #53 on: August 12, 2020, 05:12:01 am »
Awesome, thanks Mark!

Here's my current circuit on the Bench (see attached).
- Final Fix: Adding a 1uF capacitor between the MOSFET gate and ground, clearing up all oscillations.  :clap:
- This currently can drive the Opamp non-inverting (max) voltage as high as 12Vdc.  This is not-needed and totally overkill as V(gs) does not need to be > 5Vdc. Note: IRL640A has V(gs) max @ 20Vdc.
- Finally, the loop is oscillation free throughout the 0-15Vdc range. (Tested 0-10Vdc@2A)

Changes that I will be making.

- In my case, I will use my PSU's signal generator feature by providing a 5Vdc square wave with a low-current Over-current limit as the Ext. input.
- Will limit Opamp non-inverting (max) voltage to 5Vdc.
- I will also remove the 10K trim pot and instead use a 10:1 divider as suggested (in the final PCB).
- Fuse on the Drain.

Here's a quick overview:
https://www.youtube.com/watch?v=TY5WDcn3OoA&feature=youtu.be

Another quick Q: Is there a difference if the Ammeter is placed in series before the Drain, rather than just before the Rsense resistor? I can't recall from my old lectures (almost a decade ago) if any current flows into the Gate (from the Drain); current should only flow Drain to Source across the channel.
« Last Edit: August 12, 2020, 05:26:09 am by bsodmike »
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3247
  • Country: us
Re: Constant current dummy load, ran a gutter...
« Reply #54 on: August 12, 2020, 05:42:28 am »
Hi Mike,

In your schematic, what's the purpose of the 12 V -- 1 K ohm -- R sense -- GND part of the circuit?

(btw, I would screw the MOSFET into one of the hard drive mounting screw holes for better thermal contact and rigidity)
« Last Edit: August 12, 2020, 05:48:01 am by ledtester »
 
The following users thanked this post: bsodmike

Offline bsodmikeTopic starter

  • Regular Contributor
  • *
  • Posts: 228
  • Country: lk
Re: Constant current dummy load, ran a gutter...
« Reply #55 on: August 12, 2020, 06:10:13 am »
Hi Mike,

In your schematic, what's the purpose of the 12 V -- 1 K ohm -- R sense -- GND part of the circuit?

(btw, I would screw the MOSFET into one of the hard drive mounting screw holes for better thermal contact and rigidity)

Thanks for the tip!

See original explanation by MarkF:

  • No one has mentioned the 1KΩ resistor to 12V at the sense resistor...
    That's a kludge, pure and simple!

    The problem is that without a device-under-test(DUT) connected or the DUT that is powered 'OFF', the op-amp can NOT develop any current through the sense resistor.  Therefore, it will drive VGATE of the MOSFET to the maximum possible voltage.  The result is that when the DUT is then turned 'ON', the MOSFET will be fully 'ON' and present a brief short to the DUT.

    The 1KΩ resistor provides a minimum current through the sense resistor and will allow you to turn 'OFF' the MOSFET in this situation by setting the set current to 0A (i.e. Adjust the 10-turn pot to minimum)

 
The following users thanked this post: ledtester

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2644
  • Country: us
Re: Constant current dummy load, ran a gutter...
« Reply #56 on: August 12, 2020, 08:08:09 am »
Another quick Q: Is there a difference if the Ammeter is placed in series before the Drain, rather than just before the Rsense resistor? I can't recall from my old lectures (almost a decade ago) if any current flows into the Gate (from the Drain); current should only flow Drain to Source across the channel.

No.

The critical thing here is that the op-amp will do what it needs to do in order to have its inputs at the same voltage.

In other words:
  - Your 10:1 voltage divider applies a 0V to 500mV voltage (with respect to the ground (i.e. the low side of the sense resistor)) to the (+) input.
  - The op-amp will drive the MOSFET until the (-) input matches the (+) input.  Essentially, making the voltage across the sense resistor equal to the (+) input.
  - Therefore, controlling the current by maintaining a constant voltage across the constant value sense resistor.

The voltage out of the 10:1 voltage divider is maintained across the sense resistor.  This sets the current.
 
The following users thanked this post: bsodmike

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2644
  • Country: us
Re: Constant current dummy load, ran a gutter...
« Reply #57 on: August 12, 2020, 08:23:58 am »
Hi Mike,

In your schematic, what's the purpose of the 12 V -- 1 K ohm -- R sense -- GND part of the circuit?

(btw, I would screw the MOSFET into one of the hard drive mounting screw holes for better thermal contact and rigidity)

Thanks for the tip!

See original explanation by MarkF:

This is only a partial fix.
That 1KΩ resistor ONLY allows you to turn 'OFF' the MOSFET by setting the current (10-turn pot) to zero.
If you don't turn the level down, the MOSFET will still be driven to 'full ON' until some current is available from the DUT.

I often wondered if Jay_Diddy_B's circuit, where the set value is summed into the (-) input of the op-amp, doesn't suffer the same sight voltage reference issue. 
But, I opted for a single power supply over a complete fix.  Frankly, it's not a big deal to me to turn the level down until the DUT is powered up. 
Or just let the DUT see the brief short while it's powering up.
 
The following users thanked this post: bsodmike

Offline bsodmikeTopic starter

  • Regular Contributor
  • *
  • Posts: 228
  • Country: lk
Re: Constant current dummy load, ran a gutter...
« Reply #58 on: August 12, 2020, 10:04:54 am »
No.

The critical thing here is that the op-amp will do what it needs to do in order to have its inputs at the same voltage.

The voltage out of the 10:1 voltage divider is maintained across the sense resistor.  This sets the current.

Great, that was my initial understanding.  Having checked the datasheet again, I noticed we are in fact applying a charge to the gate (hence the Opamp provides a current to the gate).  I only asked this as on my bench I placed the Ammeter at the Drain connection with the assumption that the I(d) set via the 10:1 divider (or Vcontrol) stayed within the V(ds) to GND path through the Rsense shunt.

With regards to the current applied by the Opamp to the MOSFET gate, typically how many mA is this (~30mA?), I suppose it can be inferred via I = dQ/dt (I digress!).
 

Offline bsodmikeTopic starter

  • Regular Contributor
  • *
  • Posts: 228
  • Country: lk
Re: Constant current dummy load, ran a gutter...
« Reply #59 on: August 12, 2020, 01:36:33 pm »
1046062-0Here's my modified sketch of the bench setup.

ERRATA:
  • IC1 & IC2: LM324N
« Last Edit: August 13, 2020, 06:27:39 am by bsodmike »
 

Offline MarkF

  • Super Contributor
  • ***
  • Posts: 2644
  • Country: us
Re: Constant current dummy load, ran a gutter...
« Reply #60 on: August 12, 2020, 05:27:55 pm »
No.

The critical thing here is that the op-amp will do what it needs to do in order to have its inputs at the same voltage.

The voltage out of the 10:1 voltage divider is maintained across the sense resistor.  This sets the current.

Great, that was my initial understanding.  Having checked the datasheet again, I noticed we are in fact applying a charge to the gate (hence the Opamp provides a current to the gate).  I only asked this as on my bench I placed the Ammeter at the Drain connection with the assumption that the I(d) set via the 10:1 divider (or Vcontrol) stayed within the V(ds) to GND path through the Rsense shunt.

With regards to the current applied by the Opamp to the MOSFET gate, typically how many mA is this (~30mA?), I suppose it can be inferred via I = dQ/dt (I digress!).

A BJT transistor is a 'current' controlled device.  The current from 'collector' is controlled by the 'base' current and transistor gain.

A MOSFET transistor is a 'voltage' controlled device.  The 'drain' current is controlled by the 'gate' voltage.  The 'gate' of a MOSFET applies a field which allows the 'drain' current.  The 'gate' essentially looks like a capacitor.

Some visual aids:



« Last Edit: August 12, 2020, 05:38:25 pm by MarkF »
 
The following users thanked this post: bsodmike

Offline Vovk_Z

  • Super Contributor
  • ***
  • Posts: 1454
  • Country: ua
Re: Constant current dummy load, ran a gutter...
« Reply #61 on: August 12, 2020, 09:13:28 pm »
I replaced the 10:1 divider with a 10-turn pot, is that OK?
Ok.
Here is an one more example how to do el. load:
« Last Edit: August 12, 2020, 09:22:57 pm by Vovk_Z »
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2764
  • Country: ca
Re: Constant current dummy load, ran a gutter...
« Reply #62 on: August 12, 2020, 10:14:06 pm »
Hi,

I have been half following this thread. Can the OP give a summary of the requirements:

1) Maximum Voltage?

2) Maximum Current?

3) Maximum Power?, not necessarily Imax x Vmax

4) Do you need a static load or do you want to be able to step the load current?

5) Do you have any MOSFETs that you would like to use?

6) Would you prefer to work a single supply or are you open to using +/- power supplies?

7) Are you concerned about the transient that is caused if the load is turned on before the power supply (or hot plugging)?

I measured the hot-plugging event on my dynamic load project. The results are in this message:
https://www.eevblog.com/forum/projects/dynamic-electronic-load-project/msg2725634/#msg2725634

Regards,
Jay_Diddy_B

 

Offline bsodmikeTopic starter

  • Regular Contributor
  • *
  • Posts: 228
  • Country: lk
Re: Constant current dummy load, ran a gutter...
« Reply #63 on: August 13, 2020, 09:29:52 am »
Can the OP give a summary of the requirements:
1) Maximum Voltage?
2) Maximum Current?
3) Maximum Power?, not necessarily Imax x Vmax
4) Do you need a static load or do you want to be able to step the load current?
5) Do you have any MOSFETs that you would like to use?
6) Would you prefer to work a single supply or are you open to using +/- power supplies?

1) Maximum Voltage?
15Vdc
2) Maximum Current?
2.5A. I will be using a 0R1 sense resistor in the PCB version.
3) Maximum Power?, not necessarily Imax x Vmax
The 0R1 is a TO-247AC package although I've designed around the 65W limitation of TO-220.
4) Do you need a static load or do you want to be able to step the load current?
Load current can be stepped using the Ext. input using a Microcontroller.
5) Do you have any MOSFETs that you would like to use?
Right now I'm aiming at the IRL640A, but later I may design a separate version for higher current handling around the Infineon HEXFET series, i.e IRFP250MPBF
6) Would you prefer to work a single supply or are you open to using +/- power supplies?
Single supply.

I added a 1uF across the MOSFET gate and ground, this seems excessive.  I will later test my breadboarded version with a smaller cap.

7) Are you concerned about the transient that is caused if the load is turned on before the power supply (or hot plugging)?

I measured the hot-plugging event on my dynamic load project. The results are in this message:
https://www.eevblog.com/forum/projects/dynamic-electronic-load-project/msg2725634/#msg2725634

In your thread you've said it backwards "This is 'hot plugging'. Turning the supply on first before connecting the load."??.

Hot-plugging should be the scenario where the DC Load is turned on with the MOSFET allowing I(d) to flow and the DUT "Hot-plugged", turned on after the fact.  As Mark described, this presents a short to the DUT?

I'm ok with Mark's approach of adding the Rmin_resist 1k Ohm and dialing the input pot down to 0V.

Attached my current breadboard version for testing.
« Last Edit: August 13, 2020, 09:37:08 am by bsodmike »
 

Offline bsodmikeTopic starter

  • Regular Contributor
  • *
  • Posts: 228
  • Country: lk
Re: Constant current dummy load, ran a gutter...
« Reply #64 on: August 13, 2020, 09:42:43 am »
A MOSFET transistor is a 'voltage' controlled device.  The 'drain' current is controlled by the 'gate' voltage.  The 'gate' of a MOSFET applies a field which allows the 'drain' current.  The 'gate' essentially looks like a capacitor.

Yes, this brings back memories.  The canal is also called the channel at times.  Given that the gate acts like a capacitor means it is being charged, which means current must flow into the gate (for it to charge).  Hence a small current must be drawn from the Opamp.

If I have time I'll try and measure this with a DMM.
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2764
  • Country: ca
Re: Constant current dummy load, ran a gutter...
« Reply #65 on: August 13, 2020, 11:57:31 am »
Hi,

Based on your input I have built a quick LTspice for your load using the IRL640A MOSFET.

I got the Crss, Ciss and Gm numbers from the On-Semi datasheet. I could not find a SPICE model for the IRL640A.

The LT1014 is essentially 'a better' LM324. It has similar characteristics but lower offset voltages. The GBW and all other parameters are similar.



I have included the lead inductance between the load and the power supply under test. I have included the damping network that is needed to 'tame' the lead inductance. You will find this network in all commercial loads.
The lead inductance, you get for 'free', the damping circuit you have to add.

Loop gain



The loop should be stable with a 1nF capacitor between the op-amp output and the inverting input.

The loop bandwidth is a very respectable 90kHz.

Start up transient

If you hot-plug this load there will be a transient lasting about 15 to 20us while the op-amp slews from the positive rail to the operating point.

Start up transient suppression

The start up transient can be suppressed by adding a circuit that turns the load off if the input voltage is less than a certain value. I have selected 1V.



With this circuit added the load starts at zero current and ramps up when the voltage is applied:



Regards,
Jay_Diddy_B
 
The following users thanked this post: bsodmike

Offline bsodmikeTopic starter

  • Regular Contributor
  • *
  • Posts: 228
  • Country: lk
Re: Constant current dummy load, ran a gutter...
« Reply #66 on: August 13, 2020, 12:10:21 pm »
Hi,

Based on your input I have built a quick LTspice for your load using the IRL640A MOSFET.

I got the Crss, Ciss and Gm numbers from the On-Semi datasheet. I could not find a SPICE model for the IRL640A.

The LT1014 is essentially 'a better' LM324. It has similar characteristics but lower offset voltages. The GBW and all other parameters are similar.

(Attachment Link)

I have included the lead inductance between the load and the power supply under test. I have included the damping network that is needed to 'tame' the lead inductance. You will find this network in all commercial loads.
The lead inductance, you get for 'free', the damping circuit you have to add.

Loop gain

(Attachment Link)

The loop should be stable with a 1nF capacitor between the op-amp output and the inverting input.

The loop bandwidth is a very respectable 90kHz.

Start up transient

If you hot-plug this load there will be a transient lasting about 15 to 20us while the op-amp slews from the positive rail to the operating point.

Start up transient suppression

The start up transient can be suppressed by adding a circuit that turns the load off if the input voltage is less than a certain value. I have selected 1V.

(Attachment Link)

With this circuit added the load starts at zero current and ramps up when the voltage is applied:

(Attachment Link)

Regards,
Jay_Diddy_B

Nice, can you share the plot of the startup-transient without the suppression circuitry?

Been a while since I read Bode plots: how do you read the phase margin, given -180deg is off the chart?  What's considered a respectable phase-margin?
 

Offline Jay_Diddy_B

  • Super Contributor
  • ***
  • Posts: 2764
  • Country: ca
Re: Constant current dummy load, ran a gutter...
« Reply #67 on: August 13, 2020, 02:06:22 pm »

Nice, can you share the plot of the startup-transient without the suppression circuitry?





For two different values of feedback capacitor on the opamp.




Been a while since I read Bode plots: how do you read the phase margin, given -180deg is off the chart?  What's considered a respectable phase-margin?

The way I drew the Bode plot and the way I measured loop gain, the phase axis is phase margin. This is how you read it:



You have to allow some extra margins, because the transconductance of the MOSFET and the MOSFET capacitances change with the operating point.

Regards,
Jay_Diddy_B
 
The following users thanked this post: bsodmike

Offline bsodmikeTopic starter

  • Regular Contributor
  • *
  • Posts: 228
  • Country: lk
Re: Constant current dummy load, ran a gutter...
« Reply #68 on: October 20, 2020, 02:27:54 pm »
Hi all,

With limited time available, I have been able to test the first run of prototype PCBs with a design based on a 40x100mm PCB, so that it can slide into the Hammond box.

Decided to make some improvements and changes and v0.5 of the PCB is now being made and that's the version I will be using in my build.

I'm still working out some changes on the Hammond box design and will post an update once further progress is made with the CAD modelling.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf