Author Topic: Automatic characterization via power supply: got interesting results!  (Read 5597 times)

0 Members and 1 Guest are viewing this topic.

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Hi,

When I buy something that says programmable I know it's gonna cost me a lot of frustration, cause nothing ever works the way it supposed to in the consumer price range.

So I started with my Siglent SPD3303X-E power supply. My job was to enhance my PSE (personal scripting engine) with SCPI/VISA capabilities. That's quite easy because there's a COM interface, for which I can generate wrappers. Nice and snug. That was also the fun part.

Debugging strange behaviour and the installing and uninstalling many versions of VISA components made the fun go away just as fast.

But now I have finally an automated characterization of a zener diode! :-+

(It uses up climbing constant current.)

The last thing I have to figure out is why it says 3V3 on the package.  :-//

Many reasons why this graph brings tears to my eyes, but most of all: the possibilities it represents....
« Last Edit: February 10, 2019, 12:36:48 am by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 
The following users thanked this post: tautech

Offline BillB

  • Supporter
  • ****
  • Posts: 615
  • Country: us
Re: This graph brings tears to my eye
« Reply #1 on: January 30, 2019, 11:18:40 pm »
So I started with my Siglent SPD3303X-E power supply. My job was to enhance my PSE (personal scripting engine) with SCPI/VISA capabilities. That's quite easy because there's a COM interface, for which I can generate wrappers. Nice and snug. That was also the fun part.

Debugging strange behaviour and the installing and uninstalling many versions of VISA components made the fun go away just as fast.

While I agree that wrangling the VISA runtime is a pain, I'm not quite sure I'd consider writing COM wrappers fun.   ;)

Nice job on the graphing, though!
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: This graph brings tears to my eye
« Reply #2 on: January 31, 2019, 12:09:35 am »

While I agree that wrangling the VISA runtime is a pain..   ;)


If I run my stuff in the IDE / debugger it stops on a access violation in some DLL, when I push continue it gives quite unexpected a valid response. So someone writing a part of the interface catches such a crude exception and continues like nothing happened. Because it is a multi layered interface, I think the same someone took a shortcut just to be done with the frustration.  :palm:
« Last Edit: January 31, 2019, 12:30:30 am by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline BillB

  • Supporter
  • ****
  • Posts: 615
  • Country: us
Re: This graph brings tears to my eye
« Reply #3 on: January 31, 2019, 12:32:19 am »
 :-/O
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: This graph brings tears to my eye
« Reply #4 on: January 31, 2019, 01:50:22 am »
The last thing I have to figure out is why it says 3V3 on the package.  :-//

For small zeners the rated voltage is @ 5mA.
.  That took much longer than I thought it would.
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: This graph brings tears to my eye
« Reply #5 on: January 31, 2019, 02:14:24 am »
It is a 1N4728A 1W, The test current is 76mA (I wrote it on yhe package). Maybe Chinese quality? Sometimes I wonder if wrong or very old batches are sold cheap.
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline StillTrying

  • Super Contributor
  • ***
  • Posts: 2850
  • Country: se
  • Country: Broken Britain
Re: This graph brings tears to my eye
« Reply #6 on: January 31, 2019, 02:30:33 am »
You're right, it looks like a 4.1V zener.
.  That took much longer than I thought it would.
 

Offline BillB

  • Supporter
  • ****
  • Posts: 615
  • Country: us
Is your X-E hacked to an X?
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Is your X-E hacked to an X?
Better call it a more optimized firmware :). But a non optimized seems to act the same via SCPI.
« Last Edit: February 01, 2019, 08:51:06 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
IRLZ44N characterization via power supply
« Reply #9 on: February 06, 2019, 03:01:52 pm »
My next little project uses the low voltage drop possibilities of a power Mosfet.

I wanted to make sure I understood things well, so a good reason to do a characterization of a IRLZ44N.

The questions I wanted to be answered where:
  • How high should Vgs be to sustain a certain drop voltage at a certain amperage
  • Is the calculated resistance consistent between different drop voltages (200 mV-500 mV)

In this setup I used two of the supply channels, one for constant voltage directly at the Source and Drain
One channel for controlling the GS voltage.

I incremented the GS voltage with 1 mV each sample starting with 1.8 V and then measuring the current until 1 amp was reached. In Excel I applied ohm's law. (Drop voltage / current)

To conclude: within the ranges being tested the dropvoltage does not affect the resistance curve of the Mosfet much. At the lowest drop voltage (200 mV) an extra 40 mV Vgs or so is needed to get 1 A.
« Last Edit: February 06, 2019, 03:29:00 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline tv84

  • Super Contributor
  • ***
  • Posts: 3221
  • Country: pt
Better call it a more optimized firmware :).

"customized"

Nice work on the graphs!!!  :clap:
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Thanks!

The next step I'm taking was thinking of a way to actually use the graph data in calculations via interpolation. In that process I also saw a dump mistake I made in calculating the resistor values. I used Vsg instead of Vsd.
Now that I've corrected that, the graphs look different and more apart from each other.

New conclusion: within the ranges being tested the dropvoltage does affect the resistance curve of the mosfet a lot. One might almost say it is proportional. Taking the resistance curve as a spec is not handy, because it depends to much on the drop voltage. The attached current curve does a better job.
« Last Edit: February 07, 2019, 04:03:37 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
A new day, a new graph. I always say.

The previous graphs had some serious quantization effect, on the Y values. In the first graphs there was also quantization on the X values, because I took the measured Vsg (output of the supply). In later graphs I went for the set voltage, although they might differ a bit it is hard to say which one is closest to the actual voltage. At least the set voltage always increments. The increment is set as 1 mV, but the actual increment depends on the resolution of the DAC. (I'm learned to take that in account using the device this way)

So I made a script that deletes points that form a range of equal Y values, except for the middle one.

I will now try to get a fitting function for the curves. I'm interested in the steepness, the derivative of that function. My reasoning is as follows:

When the mosfet is regulating at 2.1 V Vsg it has a resistance of about 10 ohms. When more current is drawn voltage will drop (raise over the mosfet) with 10V/A. To maintain a steady Vsd a circuit has to increase Vsg. The graph I would like to show is how many Vsg/A that is. And also show the ratio between Vsg/A to keep Vsd steady and the “resistive drop” V/A.

If I'm correct this determines what the minimum amplification should be to counterbalance a voltage drop. (Keeping time related stuff, capacitance etc. out of the picture, just yet).
« Last Edit: February 09, 2019, 01:13:30 am by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
I had some "fun" with Maxima a opensource calculus application.

The application eventually found a good curve fit for the 2000mV curve.

Up to the next phase but that's for another day.
« Last Edit: February 09, 2019, 01:17:59 am by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Hi,

Using math is not really my comfortzone so I calculated one example with the measured values of what I would like to show in a graph.

Calculating example 2000mV
Say we want stabilize an output voltage, which delivers initially 0,2030 A current.
The voltage drop over source drain is 2,0000 V and source gate is 2,2770 V at that moment.
The static resistance of the mosfet would be 9,8522 Ohm (2,0000 V/0,2030 A).

If 0,0010 A more current is drawn making a total of 0,2040 A, the voltage over the mosfet would raise to 2,0099 V (9,8522 Ohm * 0,2040 A), this is a 0,0099 V increase.
For small current differences this is equal to the resistance x amps, in this case also 0,0099 V.

Our circuit wants to maintain a constant voltage output, and therefore a constant Vsd.
It should therefore increase Vgs, but to what voltage?
In our sample points the next Vsg / current combination with a Vsd of 2,0000 V is 0,2110 A at 2,2810 Vsg.
That is a 0,0080 A difference, 8,0x more than the raise in amperage we assumed.
So we can say that required Vsg increment should be 8,0x less.
The Vsg increment is 0,0040 V for 0,0080 A, which would result in a 0,0005 V required increment for 0,0010 A.
So the increase of 0,0099 V can be counterbalanced with an increase of 0,0005 V on the gate, this is a gain of only 0,0508x.

The same calculations are done for a range of Vsg's which also correspond to a matching current.
In "IRLZ44N Characterization - AV curves 2000mV" we see the resistance curve which matches the data points. We also see the curve which shows how much Vsg should rise to counterbalance to get a steady voltage drop.

In "IRLZ44N Characterization - required gain 2000mV" we see the ratio between those. What it says is that between 0..1A one needs a total gain less than 1! (0.1) The example value can also be found in the graph. :-+
I know that the 2.5V offset must be reached as well, and that there're rise and fall times. But I find this very interesting, and will use this knowledge in further exploration. I will then also measure how fast a low gain solution is.
« Last Edit: February 10, 2019, 05:31:37 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline texaspyro

  • Super Contributor
  • ***
  • Posts: 1407
Re: Automatic characterization via power supply: got interesting results!
« Reply #15 on: February 10, 2019, 04:01:15 am »
There is a website called zunzun.com that lets you submit a data set and it runs zillions of curve fitting algorithms against it and reports back the best ones.   They can even spit out code to generate the various curve fit algorithms.
 
The following users thanked this post: HendriXML

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Automatic characterization via power supply: got interesting results!
« Reply #16 on: February 10, 2019, 01:02:57 pm »
There is a website called zunzun.com that lets you submit a data set and it runs zillions of curve fitting algorithms against it and reports back the best ones.   They can even spit out code to generate the various curve fit algorithms.
Excellent site, automated function finding!

I had to figure out my own function: log(y) = A*x + B*x^2 + C*x^3 + D*x^-1 + E
Probably a bit of luck that it fits quite nice.

Made the same plots with the proposed best function. My guess is that they're not equally suited, but the site gives lots of options to get a better one.
« Last Edit: February 10, 2019, 01:23:06 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Automatic characterization via power supply: got interesting results!
« Reply #17 on: February 13, 2019, 02:01:11 pm »
I finished a circuit which uses a 1x gain differential amplification to regulate a constant voltage:

https://www.eevblog.com/forum/projects/only-1x-gain-op-amp-regulated-power-supply-very-low-noise/msg2198082/#msg2198082

Will do some benchmarking later on.
« Last Edit: February 13, 2019, 02:58:40 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Automatic characterization via power supply: got interesting results!
« Reply #18 on: February 15, 2019, 11:05:33 pm »
I think I found a way to unravel the mystery of what gain is needed when an "amperage jump" is made.

First I will translate the problem to one that for me is simpler to understand.

Say someone walked with a steady 1 m/s pace how far did he go in 10 sec?
Easy peasy, 10 meters.
The following day this guy is tired, he starts at 1m/s, but every second he walks 10% slower. How far will he go?
Because his velocity isn’t constant we need a formula for it.
velocity = 0.9^x
At any moment we can get the velocity, but it is only valid for that single moment. If we want to answer the question: how far does he travel the first 10 seconds? We have to do an integration on the integral  -9.49*0.9^x.
-9.49*Power(0.9, 10) - -9.49*Power(0.9, 0) = 6.18 meters.

I found a function which gives a ratio at a certain Vgs, if we wish to know the ratio from a VgsA-VgsB we have to integrate as well. But I don’t think we are allowed to integrate the ratio this way. Some vague memory says it has got to do something with the variable you wish to integrate over.
But what brought us to this ratio? It was the ∆voltage/∆amp (Rsd) and the needed ∆voltage (Vsg) / ∆amp to balance it. If we integrate those we get a total voltage raise on Rsd and the Vsg difference needed to balance it.

But first we need to get the amperage on the x-axis. Would also be a more appealing variable.
 
That sounds great to me. (Any objections?) After this is done I think we can have ratio’s = (gain) once more.

P.S.
I've still some serious doubts about this. In my simple example every second has the same amount of "influence": they are equally long. Shouldn't that be also the case when integrating over amperages? What if some "amperage moments" have more "influence" (in the analogy:what if some "seconds" could be longer than others, for instance if the formula was based on a non lineair clock)?
« Last Edit: February 17, 2019, 08:47:14 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Automatic characterization via power supply: got interesting results!
« Reply #19 on: February 16, 2019, 01:00:45 am »
I thought about it and I think my doubts are true. One cannot assume that the amperage is evenly spread or even assume that it only rises.

Look at the purple current graph. This is how my circuit reacts (from a 1mA to 1A rise) in reality (without endcaps). The current even drops. One can in my understanding never try to explain this behaviour with a model that makes the assumptions that current is experienced linear (or however Mathematicians would call it).

So in a way I got my answer. The ratio curve still can be used, by looking at the max and min ratios of a range. How the values in between are experienced by the circuit is (I guess) impossible to say. Also adding an end capacitor changes all the rules.

Integrating the ratio's makes to my understanding of the moment no sense.

To me (not much experience) seems designing a circuit that is stable without a capacitor and still uses one to be more optimal is better, than one that cannot go without. In my little circuit I had to go under 1x diff amp. gain (0.13x) to make that happen. If I find any downsides later on I'll mention them.

Without this exercise I wouldn't have tried it out.  :popcorn:
« Last Edit: February 16, 2019, 02:36:54 pm by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline jpb

  • Super Contributor
  • ***
  • Posts: 1771
  • Country: gb
Re: Automatic characterization via power supply: got interesting results!
« Reply #20 on: February 16, 2019, 11:07:37 am »
I used to work in the area of modelling semiconductor devices (FETs and HEMTs for use at microwave frequencies).

Measuring them is not as straight forward as it seems as the behaviour of many devices depends on the speed at which you measure them. This is because charge (electrons) get trapped in surface states and other traps which they take time to get out of. The effect is that the effective voltage on the gate can't change quickly enough at RF. So you measure a FET at DC or low frequency and get a nice set of curves and calculate that you'll get good power out in class A mode. But when the RF is measured it has much less gain and power. If you then measure the curves under pulsed conditions (returning to the bias point between each measurement) you then see that the curves above the bias point are all collapsed together. SiC devices were particularly bad which is why they don't seem to be used for RF anymore (I think - I'm way out of date since it has been about 15 years since I worked in the field!)

The other thing is for models, curve fitting to I(V) curves is also problematic. This is because for gain you want the differential dI/dV (gm) and you can get an apparently excellent fit to the I(V) curves but when the fitted function is differentiated to get the small signal characteristics then it is wavy and looks bad (especially for polynomial fits).
 
The following users thanked this post: HendriXML

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Automatic characterization via power supply: got interesting results!
« Reply #21 on: February 16, 2019, 02:20:20 pm »
I used to work in the area of modelling semiconductor devices (FETs and HEMTs for use at microwave frequencies).

Measuring them is not as straight forward as it seems as the behaviour of many devices depends on the speed at which you measure them. This is because charge (electrons) get trapped in surface states and other traps which they take time to get out of. The effect is that the effective voltage on the gate can't change quickly enough at RF. So you measure a FET at DC or low frequency and get a nice set of curves and calculate that you'll get good power out in class A mode. But when the RF is measured it has much less gain and power. If you then measure the curves under pulsed conditions (returning to the bias point between each measurement) you then see that the curves above the bias point are all collapsed together. SiC devices were particularly bad which is why they don't seem to be used for RF anymore (I think - I'm way out of date since it has been about 15 years since I worked in the field!)

The other thing is for models, curve fitting to I(V) curves is also problematic. This is because for gain you want the differential dI/dV (gm) and you can get an apparently excellent fit to the I(V) curves but when the fitted function is differentiated to get the small signal characteristics then it is wavy and looks bad (especially for polynomial fits).
When designing a power supply one can add end caps to (the way I see it) delay/slow down the circuit. Giving the components more time to do their thing in a way you anticipated. I guess in other designs things can get even more complicated. I worked as a software engineer where systems are much more predictable. Designing (simple) analog systems is a totally different experience.
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline unitedatoms

  • Frequent Contributor
  • **
  • !
  • Posts: 324
  • Country: us
Re: Automatic characterization via power supply: got interesting results!
« Reply #22 on: February 17, 2019, 10:52:21 pm »
@HendrixXmL.
I am adoring your passion. As far as understood, you are trying to reach high dynamic range of single variable. And you have stability beaten, but sacrificed the accuracy.

My look at it that any scalar with high dynamic range should be split into subranges. At least two subranges. I'd approach the problem with ultra low range path merged with high end range path and commutate between low end of range and high end. That is what most of designs are inevitably end.
Interested in all design related projects no matter how simple, or complicated, slow going or fast, failures or successes
 

Offline HendriXMLTopic starter

  • Super Contributor
  • ***
  • Posts: 1085
  • Country: nl
    • KiCad-BOM-reporter
Re: Automatic characterization via power supply: got interesting results!
« Reply #23 on: February 18, 2019, 01:23:40 am »
Thanks!
In the more practical thread doing an experiment using these static measurements on a IRLZ44N one can see how different (low) gains change the response on fast loads.
The circuit was not good enough to function beyond the experimental setting (using a bench power supply as a source).
However it did show dat a very low gain (0.13) solution did almost evenly well with end capacitors in the circuit. Without the endcaps the static measured values did not mean much, dynamic (time based) behavior takes over.
Creating the graphs I realized how high the Rsd resistance at lets’s say a mA is. And how incredible fast the voltage would rise when it jumps to 1A with no regulation. That is easily a thousand V (if it could). So any delay in reacting to that is funest for the output. But battling any delay/slowness with more gain than necessary will probably create it’s own problems, so hence the experiment,
However its seems there more things to consider like the op amp used. Maybe there’s some low open loop gain one, which excels on the properties my experimental circuit needs.
« Last Edit: March 20, 2019, 02:01:08 am by HendriXML »
“I ‘d like to reincarnate as a dung beetle, ‘cause there’s nothing wrong with a shitty life, real misery comes from high expectations”
 

Offline unitedatoms

  • Frequent Contributor
  • **
  • !
  • Posts: 324
  • Country: us
Re: Automatic characterization via power supply: got interesting results!
« Reply #24 on: February 18, 2019, 01:40:02 am »
My gut feel is that FETs will never satisfy you. They are all nanoFarads slow.
Try the BJTs, they are faster.
Interested in all design related projects no matter how simple, or complicated, slow going or fast, failures or successes
 
The following users thanked this post: HendriXML


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf