Automatic characterization via power supply: got interesting results! - Page 1
Forum section: electronics / testgear

author: HendriXML
author_rank: Super Contributor
timestamp: January 30, 2019, 10:28:48 pm
content: 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....

author: BillB
author_rank: Unknown
timestamp: January 30, 2019, 11:18:40 pm
content: Quote from: HendriXML on January 30, 2019, 10:28:48 pmWhile 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!

author: HendriXML
author_rank: Super Contributor
timestamp: January 31, 2019, 12:09:35 am
content: Quote from: BillB on January 30, 2019, 11:18:40 pmIf 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.

author: StillTrying
author_rank: Super Contributor
timestamp: January 31, 2019, 01:50:22 am
content: Quote from: HendriXML on January 30, 2019, 10:28:48 pmFor small zeners the rated voltage is @ 5mA.

author: HendriXML
author_rank: Super Contributor
timestamp: January 31, 2019, 02:14:24 am
content: 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.

author: StillTrying
author_rank: Super Contributor
timestamp: January 31, 2019, 02:30:33 am
content: You're right, it looks like a 4.1V zener.

author: BillB
author_rank: Unknown
timestamp: February 01, 2019, 04:29:16 pm
content: Is your X-E hacked to an X?

author: HendriXML
author_rank: Super Contributor
timestamp: February 01, 2019, 05:31:59 pm
content: Quote from: BillB on February 01, 2019, 04:29:16 pmBetter call it a more optimized firmware. But a non optimized seems to act the same via SCPI.

author: HendriXML
author_rank: Super Contributor
timestamp: February 06, 2019, 03:01:52 pm
content: 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 amperageIs 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 DrainOne 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.

author: tv84
author_rank: Super Contributor
timestamp: February 06, 2019, 04:24:07 pm
content: Quote from: HendriXML on February 01, 2019, 05:31:59 pm"customized"Nice work on the graphs!!!

author: HendriXML
author_rank: Super Contributor
timestamp: February 07, 2019, 02:32:03 pm
content: 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.

author: HendriXML
author_rank: Super Contributor
timestamp: February 08, 2019, 03:03:25 pm
content: 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).

author: HendriXML
author_rank: Super Contributor
timestamp: February 09, 2019, 12:23:29 am
content: 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.

author: HendriXML
author_rank: Super Contributor
timestamp: February 10, 2019, 12:30:45 am
content: 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 2000mVSay 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.

author: texaspyro
author_rank: Super Contributor
timestamp: February 10, 2019, 04:01:15 am
content: 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.

author: HendriXML
author_rank: Super Contributor
timestamp: February 10, 2019, 01:02:57 pm
content: Quote from: texaspyro on February 10, 2019, 04:01:15 amExcellent 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 + EProbably 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.

author: HendriXML
author_rank: Super Contributor
timestamp: February 13, 2019, 02:01:11 pm
content: 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/#msg2198082Will do some benchmarking later on.

author: HendriXML
author_rank: Super Contributor
timestamp: February 15, 2019, 11:05:33 pm
content: 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^xAt 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)?

author: HendriXML
author_rank: Super Contributor
timestamp: February 16, 2019, 01:00:45 am
content: 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.

author: jpb
author_rank: Super Contributor
timestamp: February 16, 2019, 11:07:37 am
content: 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).

author: HendriXML
author_rank: Super Contributor
timestamp: February 16, 2019, 02:20:20 pm
content: Quote from: jpb on February 16, 2019, 11:07:37 amWhen 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.

author: unitedatoms
author_rank: Frequent Contributor
timestamp: February 17, 2019, 10:52:21 pm
content: @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.

author: HendriXML
author_rank: Super Contributor
timestamp: February 18, 2019, 01:23:40 am
content: 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.

author: unitedatoms
author_rank: Frequent Contributor
timestamp: February 18, 2019, 01:40:02 am
content: My gut feel is that FETs will never satisfy you. They are all nanoFarads slow.Try the BJTs, they are faster.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: February 18, 2019, 02:21:50 am
content: Ah, you're moving into the general case of numerical analysis -- that is, to sample finite points of a (hopefully!) well-behaved function, and how to do it in a reasonable way, and also a stable way, while achieving some purpose (usually differentiation or integration).You want good confidence that you aren't missing points, without taking a wasteful number of points in the process. Too few points, or too naive a method, and you will find unlucky combinations spiraling out of control -- see Newton's method of root finding for a fairly simple case.In this case, you're not so much after differentiation or integration, as just plotting the function at all. But doing that is governed by the same arguments, so study of these subjects should be quite fruitful indeed.Tim

author: HendriXML
author_rank: Super Contributor
timestamp: February 18, 2019, 04:18:05 pm
content: Quote from: unitedatoms on February 18, 2019, 01:40:02 amHaven't experimented on the time related stuff yet. I've got some interesting questions that need answers!Will drive a Mosfet with the little circuit that I attached with the following testcases.R1 -> 0 ohmR1 -> 150 ohm; C1 not populatedR1 -> 150 ohm; C1 with up climbing capacity from 1nF to ?I wish to know the lowest C1 which still makes a significant difference driving the Mosfet. Maybe my other circuit can react faster this way and compensate a bit for the gate capacitance.Also it is nice to know if using 2 channels of the power supply in this way does any good. I'll be scoping the current via R2. The relay is the channel on/off relay of the power supply.Most (scope settings as well) of it should be automated via SCPI, making testing a bit more fun.

author: HendriXML
author_rank: Super Contributor
timestamp: February 18, 2019, 04:46:11 pm
content: Quote from: T3sl4co1l on February 18, 2019, 02:21:50 amIn my case only low hanging fruits! I'll leave the others hanging for those with excellent math skills!

author: HendriXML
author_rank: Super Contributor
timestamp: February 19, 2019, 11:41:06 am
content: Here're the results of the testcasesThe yellow trace is the voltage across the mosfet.The red trace is the voltage from the signal generatorThe blue trace is the voltage at the gateI had to use the signal generator to drive the gate because when the power supply channel switches on it seems that is first charges a big capacitor.Then I tried another relay, but that showed bouncing.So I used a signal generator, the scope and the signal generator are both at earths ground, so I had to use that as a ref at GND. Leaving no other choice to measure Vsd instead of the output voltage. But it should give about the same results (but inversed).

author: HendriXML
author_rank: Super Contributor
timestamp: February 19, 2019, 12:03:08 pm
content: If I had to choose a capacitor I would probably take the 10nF one. It improves the response time, but also does not change the driving signal from the signal generator to much. The signal generator has a 50 ohms output, I've got to compare that to the op amp's one. But I think just trying out will be better.During testing before these results I probably zapped the mosfet's gate. It was shown as very high oscillation, like it couldn't hold on to a certain resistance. But with a bit more Vsg it went up again, repeating this process.Seeing this I know the mosfet in my other circuit got broke as well while making modifications, hence the strange noise.https://www.eevblog.com/forum/projects/only-1x-gain-op-amp-regulated-power-supply-very-low-noise/msg2198082/#msg2198082I use an esd safe soldering station, mat, cutters, wrist band. But also have a wollen sweaterto keep warm at winter temperatures at our attic.

author: n3mmr
author_rank: Regular Contributor
timestamp: February 28, 2019, 11:23:18 am
content: PSE? Explain, please!Can we see your scripts, please?

author: HendriXML
author_rank: Super Contributor
timestamp: February 28, 2019, 01:18:49 pm
content: I made a (Windows only) tool which can execute scripts written in a xml-based programming language of my own design.Because it’s not documented I don’t think it is the best of choice. I myself find it however very useful for a lot of tasks. Follow my profile weblink to a GitHub location where a bunch of scripts can be found which do some advanced BOM reporting.The scripts for controlling the power supply are far less complicated.I think it’s worth asking what environment other people use.

author: HendriXML
author_rank: Super Contributor
timestamp: February 28, 2019, 03:04:42 pm
content: I made a screenshot of part of the script to give an idea.The class TSiglentSPD3303X is defined in another library which I also included an example of.I included also the WaitForStabilizedVoltage function, because it sounds exiting, but only waits for the voltage to stop rising/dropping (Because of the endcap).