Author Topic: DC dummy load circuit calibration  (Read 16294 times)

0 Members and 1 Guest are viewing this topic.

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 1949
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: DC dummy load circuit calibration
« Reply #25 on: May 14, 2018, 05:50:45 am »
Here is a quick trial in attachment.

I made 5x1R and op-amp per branch. However, there are still issues like inaccuracy for nearly all ranges. Like if I calibrate it to 1A, the 100mA will be bad.

Also, for our LM324 to output 50mV as top max voltage, I guess it is bad since it cannot deal with near rail voltages. If I want 100mA I would output something like 5mV or so! it cannot do that let alone inaccuracy.

Smallest current it could output in that simulation is about 40mA when I choose 0.001V. So it is terrible. This is where the benefit of 1R shunt comes in, where you can output 50mV to get 50mA and won't be affected too much by op-amp offset voltage.

So what to do now? should we put the divider somewhere else?

EDIT:

I have attached another diy dummy load, look at the mosfets and how they are balanced.

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 1949
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: DC dummy load circuit calibration
« Reply #26 on: May 14, 2018, 11:21:02 am »
I have tested putting the 1R back and this time put series resistors for each mosfet branch, it worked nice (nevermind the calibration) but I don't know if this will actually make a difference compared to without series resistors.

I often see this configuration or something similar but the current feedback is always taken above the final shunt.

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 1949
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: DC dummy load circuit calibration
« Reply #27 on: May 15, 2018, 05:35:09 am »
Here is a newer schematic in attachment, I used 2n2222 with 10k resistor to act as an active adjuster to each branch. If more current gets threw one branch then higher drop voltage happens across 0.2R which turns on the gate which in turns pulls the MOSFET's gate to ground to make it shut down for a moment to regulate current.

In the previously mentioned schematic, he used -5v instead of ground but I use ground since there are no negative rail here. What do you think now? should we call it the final circuit?  :-//

I need to finish this in order to make a PCB for it to complete the project and make a video about it  :popcorn:

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: DC dummy load circuit calibration
« Reply #28 on: May 15, 2018, 09:50:19 am »
Unfortunately the 2N2222 gate pulldown circuit, although it prevents any individual MOSFET drain current exceeding Vbe/0.2A (about 3.2A) will cause its own share of stability problems.  As each MOSFET goes into limiting, the loop gain of the control loop changes, which is likely to result in transient response problems, and the gate pull-down current is drawn from the control circuit, not the load circuit, and passes through the current shunt, so it introduces a small inaccuracy in the measured current.  There is also no provision to trim out the OPAMP offset voltage so accuracy (and linearity) at very low current settings is likely to be poor.

Returning to the 'classic' circuit where each MOSFET is in its own OPAMP's feedback loop, that disappointed you when you couldn't get good accuracy at low currents, the devil is in the details - unless you are using expensive precision FET input low voltage OPAMPs with guaranteed low offset, rail-to-rail outputs, and input common mode range extending down to fractionally below their negative rail, you *will* need to trim each OPAMP + MOSFET  to compensate for the OPAMP offset voltage to get them all to cut off exactly at Vctrl=0V.   However its very easy to over-trim, so the best option is to trim them for matching Id at a very low control voltage.

I've redrawn your four MOSFET schematic to add the necessary refinements using LTspice's multiple component and bussed connections notation - basically any part or thick wire with [1:4] in its name represents four separate instances of that component.   Where they are connected to a thin wire they are all connected in parallel.  When you have run the sim and you click anything with [1:4] in its name you will be asked which instance you wish to probe.   Uncomment the .step param range to see what it does at different full scale currents

Its using the diode biassed negative rail + a pull-down resistor on each OPAMP output to help the jellybean BJT OPAMPs you are using to have a reasonably good chance of staying in control right down to Vctrl=0V.   The 1K trimmers for the offset voltage should go between Vcc and Vee so they have a little negative trim range.   You *may* need to reduce Ro[1:4] to 220K  if there is insufficient trim range.

There is a small interaction between the individual offset trims and the full scale trim - you should re-trim the offsets if you make any large adjustment to the full scale trim.

To use the sense resistors in series with each MOSFET source for current measurement and display, you need to average all the source voltages.  To do that, tap off each one via a 10K resistor, all going to the in+ of an OPAMP buffer.  As the total sense resistance is 1/20 ohm (if considered all in parallel) you'll need to set up the buffer for a gain of x20 to get 1V per A.  If you want to go up to 5A, you'll need to use a lower scaling factor for current measurement e.g. x2 for 0.1V per A.
« Last Edit: May 15, 2018, 10:02:44 am by Ian.M »
 

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 1949
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: DC dummy load circuit calibration
« Reply #29 on: May 15, 2018, 10:46:01 am »
Thanks for the info.

The circuit now became complicated... I now need multiple pots for many times of calibration, will be hard for others to do it too. You didn't mention the Rs of each branch, is it 5x1R = 0.2R or what?

Can't we do it easier? like the last one I posted with some modifications to eliminate the need to calibrate 4 branches. Especially that you seem to require shorting Vgs of each other branch to do so... which will be difficult if i got a PCB done for the project, which I will.

You say that I should put 4mV in control voltage then short 3 mosfet gates to ground (or negative rail?), after that adjust it until it has 1mA. Then repeat for other 3... this is after the global trimmer which in turns I don't know how to trim and based on what?

Quote
There is a small interaction between the individual offset trims and the full scale trim - you should re-trim the offsets if you make any large adjustment to the full scale trim.

This is even harder now. Why don't we use our previous method of having all op-amps sense one resistor which is 1R power resistor? then do something about the 2n2222 circuit that you seem to dislike. I found it to be working in ltspice so I got confident, especially that Scullcom guy did it and it works perfectly with him despite using only one op-amp for the 4 mosfets.

One other minor problem is using lots of resistor values which I hate, I wanted to just stick with 1k, 10k , and so on. So 220k, 470k are hated. Plus, using 2 caps... couldn't we ditch them?

Also, the global trimmer is tricky since V_ctrl is supposed to come from the 10-turn 10k pot. So they will be the next stage after the 10-turn pot.

Quote
To use the sense resistors in series with each MOSFET source for current measurement and display, you need to average all the source voltages.  To do that, tap off each one via a 10K resistor, all going to the in+ of an OPAMP buffer.  As the total sense resistance is 1/20 ohm (if considered all in parallel) you'll need to set up the buffer for a gain of x20 to get 1V per A.  If you want to go up to 5A, you'll need to use a lower scaling factor for current measurement e.g. x2 for 0.1V per A.

The display here is the panel meter which is the 0.005R resistor before all the mosfets. Doing this measurement is a kind of nightmare compared to the straight forward one. Even with averaging there will still be an error. It is good that I am using the panel meter for this project.

_______

Scullcom project uses only one op-amp to drive 4 mosfets, is it better than using 4? Plus, it is AD8630 which is a rail-to-rail input and output so he would not worry about lower voltages like us.

However, how far can we go with LM324/358?

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: DC dummy load circuit calibration
« Reply #30 on: May 15, 2018, 12:30:54 pm »
Rs for each MOSFET is shown as {1/5} i.e. five x one ohm resistors in parallel.

The complexity is the price you pay for demanding accuracy at low currents without being willing to pay for high performance OPAMPs, or 0.1% E192 series precision resistors.     Shorting each MOSFET g-s to disable three of them is simple if you include four 0.1" pitch two pin headers to put jumpers on.  N.B. with them shorted their OPAMPs will drive a small current (limited by the 1K gate resistors) through your low-side current shunt, so you should measure the 1mA with an external meter in series with the load.  The interaction between the overall range trim  and individual offset trims is slight.   If you roughly set up the range trim with all the offset trims set to 0V at their wiper then trim the offsets, then go back and fine-tune the range it will be plenty good enough.

I assume anyone serious has E12 1/4W 5% or better  resistors between 1R and 1Meg in stock.  If not, you'll have to improvise with series/parallel combos.   The six caps (two decoupling + one per OPAMP in the feedback loop)  are unavoidable if you want to avoid it oscillating.  100pF is just a best guess for the feedback cap - you'd need to build one MOSFET + OPAMP loop and check what value gives the best step response.   In the sim, 820pF looks good, with a critically damped minimal overshoot step response.

If you are feeding Vctrl from a 10K pot, you'll need to buffer it with an OPAMP like Dave's design did if you want good linearity.   Unfortunately that takes us back to needing very good OPAMPs or a 7V or higher Vcc supply to them if you want a full 0-5V for 0-5A control range.

Averaging the voltages across the four sense resistors to get the total current would need some calibration, and possibly compensation for the offset voltage of the buffer OPAMP.   However if you were adding a MCU, that could easily be handled in software.  In fact if you were using a MCU to generate the control voltage, you could discard the individual offset trim pots and replace them with  a single one just to set 0mA at 0mV as linearisation at low control settings could be handled in software.   However, as you are using a panel meter, you don't have to worry about all that - your only concern is the panel meter accuracy.

If you decide to experiment further with the 2N2222 gate pulldown current limiting idea, to avoid the last digit jumping around as the limiting cuts in and out, you need to locate your panel meter so the gate pulldown current does *NOT* flow through it.  e.g. put it between the circuit 0V rail and the negative terminal for connecting the external supply you are testing.

A further note - rather than attempting to linearise and calibrate either circuit for very low currents, it is probably preferable to use a fifth MOSFET, OPAMP 10R sense resistor and 5:1 input divider, which gives you a basic sensitivity of  20mA per V, then use a DPDT range switch to apply the control voltage to either the high range  four MOSFET circuit or the low range single MOSFET circuit, and switch the unused circuit's input to the negative rail to guarantee its cut-off and not drawing any current.  The extra MOSFET can share a heatsink with any of the other ones, and the extra components will certainly be cheaper than the multi-pole precision high current switch that would be required to switch in different sense resistors for the main set of MOSFETS.
 

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 1949
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: DC dummy load circuit calibration
« Reply #31 on: May 15, 2018, 01:02:47 pm »
You mentioned accuracy at lower current such as <10mA, so I am asking... does it mean we cannot get these currents at all or just some error? like you want 10mA and get 11mA or so?

I need to remind you, since I am using a panel meter that means such very good accuracy is not needed. All I need to do is to calibrate the panel meter itself. As long as I can get 1 mA output and read it on the panel meter (supports only 10mA range, so it is 10mA minimum accuracy for the whole project) then I am OK.

I told you that I want 1V per 1A which is still valid, but I would not worry too much about accuracy in the < 10mA range since I am using a panel meter. So a rough 1V\1A is nice enough for this project.

Quote
I assume anyone serious has E12 1/4W 5% or better  resistors between 1R and 1Meg in stock.  If not, you'll have to improvise with series/parallel combos. 

I think I will make combos, like 1k||1K = 500. I think this 500 seems to have a relationship with 1v\1a right? I tried to make it 1k and it didn't work.

Quote
The six caps (two decoupling + one per OPAMP in the feedback loop)  are unavoidable if you want to avoid it oscillating.  100pF is just a best guess for the feedback cap - you'd need to build one MOSFET + OPAMP loop and check what value gives the best step response.   In the sim, 820pF looks good, with a critically damped minimal overshoot step response.

How about 1nF for opamp caps and 1uF for decoupling? I guess all ceramic caps will be good enough. I don't have oscilloscope (nor the knowledge) to test such circuits. 1nF seems nice value and a common one, if not, then 10nF or so.

Quote
If you are feeding Vctrl from a 10K pot, you'll need to buffer it with an OPAMP like Dave's design did if you want good linearity.   Unfortunately that takes us back to needing very good OPAMPs or a 7V or higher Vcc supply to them if you want a full 0-5V for 0-5A control range.

So only 10-turn pot and that is it.

However, 5A is gonna be massive. Like, putting 30v x 5A = 150 W -> 37.5 Watts per branch! No way the heatsink will be able to dissipate that. I think 30v\2A is very nice... 15 watts per branch -> = 0.2*2*2 = 0.8 watts in Rs which is good. If I didn't get a big heatsink (my friend promised one) then it is back to 1.5A.

I could just use a voltage divider before the 10-turn pot to make the range. simulation shows 4.3V on Vcc and it will be true since I will use 1N4001\7 diode (-0.7v drop)... then 1k + 1k divider gives 2.15 maximum voltage which means around 64.5 watts maximum in worst case.

Quote
However if you were adding a MCU

Not in this version, probably in future upgrade like Scullcom design. You still didn't comment about it BTW. :-//


Quote
If you decide to experiment further with the 2N2222 gate pulldown current limiting idea, to avoid the last digit jumping around as the limiting cuts in and out, you need to locate your panel meter so the gate pulldown current does *NOT* flow through it.  e.g. put it between the circuit 0V rail and the negative terminal for connecting the external supply you are testing.

I still don't understand why its current will interfere in the circuit. Is there anything else wrong with this method besides this?

All I understand is the gate will have a voltage, then if current is increased this voltage will increase which activates the transistor to pull the gate of mosfet down.

However, my values are different than original design (he used 47k) but I think the voltage will be Vbe/0.2 but how did you calculate it? I mean, if current makes voltage very slightly more across 0.2R then how does this equal to the amount we need to keep it regulated between all 4 branches? how to determine that?


Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 1949
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: DC dummy load circuit calibration
« Reply #32 on: May 16, 2018, 08:53:34 pm »
I've been trying to make a negative rail (using npn with resistors) to make circuit go down to 0A but I couldn't with the 5v rail supply. The positive supply will not be enough to let the op-amp drive the mosfet gate to give 1.5A. Thus, I will keep it at ground potential... Actually even by this, there is some inaccuracy at lower currents but I won't be measuring anything so it won't matter.

I am gonna build up the circuit in KiCAD now... If you have any final notes please write them

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: DC dummy load circuit calibration
« Reply #33 on: May 16, 2018, 11:01:53 pm »
I suggest you draw up and lay out the circuit as-if your OPAMP is good enough to get enough output swing to support having a negative rail, but build it without the resistor that provides the bias current to the NPN Vbe multiplier, without the Vbe multiplier resistors , without the negative rail decoupling cap and with a wirelink E-C in place of the NPN.  That lets you build it for now with a single supply for the OPAMP, but if you manage to obtain a better OPAMP, or decide to power it from a higher voltage wallwart, you can remove the wirelink and fit the parts you left out, to improve the circuit's performance at low currents.

Please feel free to post GIFs or PNGs of your PCB layout + final schematic for comment - its much quicker, easier and cheaper to get us to bug-check your design rather than finding out the hard way that the PCB you have ordered has design or layout problems.  As its only the two of us currently participating in this topic, you may wish to start a new one for the PCB design to get more opinions.
 

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 1949
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: DC dummy load circuit calibration
« Reply #34 on: May 17, 2018, 06:37:57 am »
I suggest you draw up and lay out the circuit as-if your OPAMP is good enough to get enough output swing to support having a negative rail, but build it without the resistor that provides the bias current to the NPN Vbe multiplier, without the Vbe multiplier resistors , without the negative rail decoupling cap and with a wirelink E-C in place of the NPN.  That lets you build it for now with a single supply for the OPAMP, but if you manage to obtain a better OPAMP, or decide to power it from a higher voltage wallwart, you can remove the wirelink and fit the parts you left out, to improve the circuit's performance at low currents.

Please feel free to post GIFs or PNGs of your PCB layout + final schematic for comment - its much quicker, easier and cheaper to get us to bug-check your design rather than finding out the hard way that the PCB you have ordered has design or layout problems.  As its only the two of us currently participating in this topic, you may wish to start a new one for the PCB design to get more opinions.

It is ok for me to build a final circuit now, then if I want to do a modification I will make an entirely new one. So I will build it as it is.

I guess no negative rail for now since it won't work with this op-amp and this circuit as I tested in LTSpice. Your latest simulation worked but since we don't want any complicated calibration stuff, then I don't think I will use it.

I will make the PCB schematic and post it here as .png and the whole kicad project too.

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 1949
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: DC dummy load circuit calibration
« Reply #35 on: May 18, 2018, 08:01:51 pm »
Here is the first schematic done in KiCAD.

Anything we should change?

I remember you spoke about the position of the panel meter current shunt, that we should move it from where it is now. Kindly specify why? I noticed some difference in current between it and the 1R resistor in LTSPICE (in the 1 ma to 10s of uA) so I thought of re-asking you about it.

Perhaps putting it under 1R is better?

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: DC dummy load circuit calibration
« Reply #36 on: May 19, 2018, 12:15:14 am »
Are you still using this panel meter?

If so, that schematic will *NOT* work - the meter current shunt *MUST* be on the low side so you need to move it to in series with the Gnd pin of the D.U.T. connector J4.   Be very careful of the polarity of its black and green wires - the green CS+ wire needs to go to circuit Gnd and the thick black CS-wire needs to go to J4 D.U.T. Gnd.   Its thick red wire goes to the J4 D.U.T. V+ pin.

Also if you want the meter to be accurate, as the thin and thick black wires are internally connected, to avoid it displaying its own current consumption,  you'll need a separate floating supply for it.    I would suggest a 5V to 5V 1W isolated DC-DC converter running from your main 5V rail, with its output connected to the panel meter's thin red and black wires *ONLY*.  If you don't mind it showing its own current consumption, connect circuit +5V to its thin red wire and leave its thin black wire disconnected.
 

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 1949
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: DC dummy load circuit calibration
« Reply #37 on: May 19, 2018, 12:28:56 am »
Yes, I am using that meter.

Why it must be on the low side? there is no indication that the current shunt negative terminal is shared with the negative of its power supply... unless I miss something. It says "series connect on the power supply cathode" so is it why it must be on negative side of the power supply?

The green wire is actually blue, so it is the I+ and the black is I-. If I put the meter shunt resistance on the negative side under J4 in LTspice it will have a negative current reading... so is this why I+ must be connected to ground and I- to J4 negative? so it could be the returning path of the current from our circuit (1R power resistor) -> to ground -> to J4 negative (which is the supply itself).??

The panel meter will draw approx. 15mA but it won't pass through its shunt resistance, so I don't know why you assumed it would affect our reading.

Even if it does, we can still calibrate it by its own pot... I guess this will work to zero it out right? I don't like using such dc-dc converters since they are not so common unlike all other project parts.


Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: DC dummy load circuit calibration
« Reply #38 on: May 19, 2018, 12:46:27 am »
Yes you are missing something:
Quote from: banggood
Onboard Wire Instructions:

Thin Red Wire (VCC): positive pole of power supply input (3.5-30V)
(Note: if the measuring signal is less than 30V and the power is adequate, can be the power supply of module)
Thin Black Wire (GND): negative pole of power supply input (3.5-30V, common ground with measuring signal)
Thick Red Wire (VIN): positive pole of measuring signal input (0-100V)
Thick Green Wire (I+): positive pole of current input (series connect on the power supply cathode)
Thick Black Wire (I-): negative pole of current input (series connect on the power supply cathode)
Also see http://files.banggood.com/2018/04/Direct-power-supply.jpg and note the thin black wire is not used in that configuration.

In this context, chinglish "series connect on the power supply cathode"  translates to "connect in series with the negative terminal of the power supply".

'calibrating' out its own current consumption with the display's on-board zero preset is likely to be unsatisfactory as it will vary significantly with the number of segments lit.   At best you will be able to get it zeroed at a particular voltage then as the current increases from zero it will be grossly inaccurate at small currents as the number of lit segments changes.

If you were using an AC output walllwart, you could power the meter with a quasi-floating supply using a capacitively coupled bridge rectifier.   You could also use a pair of opposite half-wave rectifiers to get + and - supply rails for the OPAMP.

If you dont have an AC output wallwart, take any old-skool heavy (i.e with a real line frequency transformer in it) unregulated DC one with a nominal output voltage between 9V and 12V, that has a case you can open, and remove its bridge rectifier circuit and any reservoir capacitor, reconnecting ite output wires to the secondary.   If it doesn't have a bridge rectifier, stop and ask with photos.  If it has any electronics on the primary side of the transformer it isn't suitable for conversion.
« Last Edit: May 19, 2018, 01:00:00 am by Ian.M »
 

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 1949
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: DC dummy load circuit calibration
« Reply #39 on: May 19, 2018, 12:54:54 am »
Ok, how about this?

Of course we can use the current adjust pot on the meter to adjust for the 5mOhm resistance of the meter.

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: DC dummy load circuit calibration
« Reply #40 on: May 19, 2018, 01:12:13 am »
That will work for the meter, but what's going on with the 2N2222 transistors?   With 10K in series with the emitters, they can only cause at most a 10% reduction in gate voltage which probably isn't going to be enough to stabilise it once the MOSFETs are hot

Also, due to differing OPAMP input offset voltages, it will be out of balance from the moment you switch it on.

I know you are very attached to the idea of using your high power 1R resistor, but its *really* not helping this design!
 

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 1949
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: DC dummy load circuit calibration
« Reply #41 on: May 19, 2018, 01:15:50 am »
That will work for the meter, but what's going on with the 2N2222 transistors?   With 10K in series with the emitters, they can only cause at most a 10% reduction in gate voltage which probably isn't going to be enough to stabilise it once the MOSFETs are hot

Also, due to differing OPAMP input offset voltages, it will be out of balance from the moment you switch it on.

I know you are very attached to the idea of using your high power 1R resistor, but its *really* not helping this design!

I thought the transistors would solve the problem, what other value do we need? I really don't understand why 10K gives 10%... thus won't be able to pick the proper value.

Ok, then give me a simple solution without the need to calibrate the entire 4 branches  :-// :-// then I will gladly ditch the power resistor  :-+


Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 1949
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: DC dummy load circuit calibration
« Reply #42 on: May 19, 2018, 01:43:15 am »
I reverted back to your version without your eternal enemy (1R power resistor), just without the calibration of each branch to get 1v per 1A since we are using the panel meter without measuring stuff.

How can this version achieve balancing without the 2n2222 circuit?

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 1949
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: DC dummy load circuit calibration
« Reply #43 on: May 19, 2018, 01:57:29 am »
Here is the schematic after doing what I said above.

Strange thing is that the least amount of current that we can get is 36mA even if V_set is 0... this is not what should we have assuming we have the negative rail.

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: DC dummy load circuit calibration
« Reply #44 on: May 19, 2018, 02:02:50 am »
There is no simple zero calibration solution if you need a 1A per V wide range linear control voltage input to set the current.

If you just want to set  the current with a pot, don't care about control linearity at low currents and don't mind say +/-5% uncertainty for its actual full scale range, because it will always be set by reading the current display on the meter,  you can use 4x the simple OPAMP + MOSFET circuit, with multiple paralleled 1/4W resistors for each MOSFET's current sense, your 10 turn 10K pot feeding all the + ins and a suitable resistor between the top end of the pot and a regulated positive supply to set an appropriate maximum current.
 
Unless you use better OPAMPs, or don't care if you cant get the current right down to zero, you'll need a negative rail for the OPAMPs, so if you want to run it all off a 5V USB charger you'll need to use a boost module to get enough voltage for the OPAMPs   Set the boost module for +12V out, connect the USB charger +5V to circuit ground and you'll have -5V and + 7V rails - perfect for the OPAMPs to give up to 5V gate drive + enough negative swing for full MOSFET cutoff, and the meter will be quite happy running from a +7V rail.

The easiest way of trimming to zero current at the bottom of the pot is to offset it a little negative.  See attached schematic.  Depending on your pot's track end resistance you may need to increase R4 e.g to 10R.   For the full scale trim resistor R5, use a fixed resistor + a 10K preset in series.   

CAUTION - The schematic is designed for a full scale load of about 5A, but your heatsinks wont be good for that with a 30V PSU D.U.T.  They would probably be OK if your D.U.T. is under 10V

To avoid difficulty with non-standard models and keep the runtime reasonable, the sim uses an ordinary voltage source to represent one of the DC-DC non-isolated boost converter modules that I remember from your previous topic.  Similarly it uses a voltage source to represent the LM317 feeding the 10 turn pot with a regulated voltage. If you want, you could substitute a Zener circuit or a voltage reference instead of the LM317 - just change R5 to get about the same voltage across the pot.  R2 is *ONLY* to satisfy the LM317 minimum load requirement. Delete it if using a different way of getting a regulated supply for the pot. 

Personally, I wouldn't use a USB charger to power it, unless I mounted it internally with no externally accessible USB socket, to remove the temptation of ever powering it from the same USB supply as another device its connected to.
« Last Edit: May 19, 2018, 03:24:18 am by Ian.M »
 

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 1949
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: DC dummy load circuit calibration
« Reply #45 on: May 19, 2018, 11:30:31 am »
Thanks for the update.

It got more complicated, I started feeling that the USB input is doing all the evil. However, powering it from a DC jack (12-24v) seems a solution but it would require another wall charger that is not as available as the USB one. I myself have a Chinese laptop charger with adjustable voltage from 12 to 24v.

I started thinking about putting two 9v batteries to get 18v from which we could get a negative rail, then make the USB charger to power the panel meter display only. How much would these batteries last?

I don't quite understand what you did. We still have a V_ctrl which I suppose it is coming from our 10-turn POT in which it is powered by a resistor divider as I mentioned earlier.

However, you put another POT which is RV1 and this one I don't seem to be able to control it. Also, we have R1 and R5 which I assume are variable resistors not pots for trimming. I hoped to get only 10k pots so I guess I can change them.

I don't like LM317, it gives extra cost for nothing. I would just put a resistor divider instead, will it work?

So we need to make it a bit simpler especially if the 2 batteries thing works fine.

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 1949
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: DC dummy load circuit calibration
« Reply #46 on: May 19, 2018, 12:28:01 pm »
Your version 3 seems nice for 12v input, which I can work with now assuming all these stuff that results from 5v. I've got to make sure it doesn't have the balancing issues. Even version 4 seems easy but without individual calibration

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: DC dummy load circuit calibration
« Reply #47 on: May 19, 2018, 12:57:25 pm »
I should have drawn a box round the Vctrl source and labelled it 'Sim only'.   All it does is provide a 0% to 100% control input for the wiper position to the symbol for the 10K pot RV1.  (The pot model takes an absolute voltage 0 to 1V, as its wiper position.)

RV1 represents your 10K ten turn pot that will be the 'master control' to set the current.  R1 and R5 are presets - you adjust them ONCE to get zero current at one end of RV1's range and your desired maximum current at the other.   However as the value won't be convenient, you'll probably use a fixed resistor + a preset in series, or if you've got a limited selection of presets available , maybe with an extra resistor in parallel to the series pair. 

As the circuit only needs about 100mA, a laptop charger would be stupid overkill.  OTOH 9V batteries will give you nothing but trouble with the voltage change as they discharge causing the set load current to drift.  They are great for quick breadboard experiments, but a horrible way of getting even a few mA for long periods unless portability is the major factor.   If it weren't for the need to provide a stable regulated voltage to the potentiometer the batteries wouldn't be such a problem, but  the 10mA minimum load current needed by the LM317 makes them impractical. 

My main objection to USB chargers for powering test equipment (apart from the generally high ripple and poor regulation of the cheap ones) is the risk of user stupidity, especially when doing something unconventional like grounding their positive output terminal  to get -5V from them.   An alternative to mounting the USB charger internally would be to take one with a permanently attached output lead, cut off its USB plug and replace it with a DC power jack.  That removes the risk of someone powering the unit from a PC or a multi-output USB charger without even thinking about it.


I don't like the LM317 either, but its essential to have a clean well stabilised supply to the control potentiometer.    Even though the positive rail is from a regulated supply, the load on it varies considerably and as its a switching supply, there will be a lot of ripple so putting it through a LM317 to clean it up and drop it to a far more convenient voltage for the pot.  Alternatively, you could use a Zener fed by a resistor from the positive rail, or even use a forward biassed LED in place of the Zener, which can also do double duty as a power LED.  If you can get TL431 shunt regulators locally, that would be great - 2.5V is more than is ideal to feed the pot, but R1 can easily be increased to compensate.

Version three powered by 12V will have its own issues - a Vbe multiplier isn't a very good shunt regulator, as its voltage changes significantly with the current through it, and with temperature and I didn't add any parts to ensure the MOSFET can be controlled right down to zero current.   Also, the display current ground return goes through the Vbe multiplier, which means neither the negative nor the positive rail will be stable enough to derive the control voltage from by a simple resistor divider.
 

Offline VEGETATopic starter

  • Super Contributor
  • ***
  • Posts: 1949
  • Country: jo
  • I am the cult of personality
    • Thundertronics
Re: DC dummy load circuit calibration
« Reply #48 on: May 19, 2018, 02:53:03 pm »
Here is my more friendly ltspice, changes are:

1- Made the 10-turn pot a friendlier version of 2 resistors to make it easier for me to see.
2- put 100k fixed upper limit which corresponds to 2.08A maximum current, which is what we want. this could be a pot but I didn't want to get other values than 10k pots and the resistors we use.
3- made the zero trimmer 10k pot, but set it to around 1k.
4- adjusted the supply options. I ditched the USB completely and put 12v DC jack from laptop\wall charger (the laptop one is 5$). Now we have apporx. 9v positive and -3 negative.
5- I kept LM317 for now since there are no better options available. TL431 will need another month to arrive so meh. Plus, I don't know how to use it yet.
6- Instead of 120 ohm for LM317, I added an LED to act as power on LED. I guess 1.25v could give us around 10mA without any series limiting resistors.

What I need to understand is :

1- how can this circuit achieve balancing better that previous methods?
2- why now choose 1k as feedback resistor?
3- Can we use ceramic only caps in this design? or should decoupling caps be electrolytic?

Can we call this the final design?

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12860
Re: DC dummy load circuit calibration
« Reply #49 on: May 19, 2018, 04:48:40 pm »
1.  The balancing is purely due to each MOSFET having its own  OPAMP and individual source current sense resistor.  The individual MOSFETs are *NOT* in parallel so one cant hog more current - its own feedback loop prevents it taking more than the voltage at its OPAMP's in+ commands.

2.  I decided to simplify the design, knowing you prefer 1K 10K 100K etc resistor values.    It makes little difference except to the -3dB bandwidth enforced by it and the 100pF cap.

3. I'd use a mix - ceramic up to whatever value a good quality electrolytic becomes significantly cheaper above.  N.B.  High K ceramics are very voltage sensitive, with the capacitance dropping as the voltage across them increases.  If you run them near their max rated voltage, you only get a small fraction of their nominal capacitance, so you'll need 50V rated ceramics to get anywhere near their nominal capacitance from them.

Its not a final design - its taken several steps backwards from the last one I posted.

The sim has major problems - you've got 10 Million Amps flowing through that LED you added, and replacing my voltage controlled  potentiometer with fixed resistors makes it impossible to do any sort of stability testing.   However as an experiment I added a behavioural current source (standard LTspice component 'bi') sinking current from the Vcc rail to Gnd to represent the current drawn by your LED panel meter using the expression
Code: [Select]
I=20mA+40mA*rand(time*100)which is a current somewhere between 20mA and 60mA randomly changing 100 times a second.   The results were horrifically bad - nearly a volt peak to peak of noise on the Vcc and Vee rails, and a lot of breakthrough to the controlled load current which will jump around like a flea with hot feet.

The LED issue is just stupid - a real LED wont draw 10mA with 1.25V across it unless you are very very lucky but it certainly wont draw 10MA - thats an artifact of it defaulting to the default diode model because you didn't select a LED.  Never the less, its Dumb with a capital D to attempt to drive a LED directly from a low impedance voltage source.  If you want to stick a LED in somewhere put it in series with R4, which keeps the Vbe multiplier biassed.   You could probably even remove the LM317 and use the voltage developed across the LED to feed the pot*.   Here are some LED models for you to sim that with:
Code: [Select]
*Typ IR LED from optocoupler: Vf=1.2V @10mA
.model LED0 D (IS=1p N=1.999644 RS=0 BV=6 IBV=10u
+ CJO=10p EG=1.424 TT=500n)

*Typ RED GaAs LED: Vf=1.7V Vr=4V If=40mA trr=3uS
.MODEL LED1 D (IS=93.2P RS=42M N=3.73 BV=4 IBV=10U
+ CJO=2.97P VJ=.75 M=.333 TT=4.32U)

*Typ RED,GREEN,YELLOW,AMBER GaAs LED: Vf=2.1V Vr=4V If=40mA trr=3uS
.MODEL LED2 D (IS=93.1P RS=42M N=4.61 BV=4 IBV=10U
+ CJO=2.97P VJ=.75 M=.333 TT=4.32U)

*Typ BLUE SiC LED: Vf=3.4V Vr=5V If=40mA trr=3uS
.MODEL LED3 D (IS=93.1P RS=42M N=7.47 BV=5 IBV=30U
+ CJO=2.97P VJ=.75 M=.333 TT=4.32U)
 
*Typ small White LED: Vf=3.2V Vr=5V If=35mA
.MODEL LED4 AKO:NSSWS108T

If you go with this design without resolving the issue with the Vbe multiplier and the meter supply current, I'm washing my hands of this whole project and ignoring this topic.   Just in case: Thank you for an interesting technical challenge so far, its been pleasant working with you.

* using the voltage across a LED as a reference isn't ideal but if you don't care much about its initial accuracy and stability it works well enough if the current through the LED is near constant.  Its even been done in commercial products - e.g. Microchip's original ICD debugger used a red LED as a reference.
« Last Edit: May 19, 2018, 05:02:48 pm by Ian.M »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf