Measuring leakage current of diodes, and other devices.

Thread Starter

dcbingaman

Joined Jun 30, 2021
1,065
The following circuit measures leakage current:

1697465003934.png
The 1N4148 is the 'test' item.
The brightness of the LED will change from one 'test' item to another and is very low power. A mechanical switch would go between the 9V battery and the power rail.

Here is a plot of the current in D3:

1697465390858.png
The current will be different for different devices being tested. The diode current must also be looked at so as to not exceeds it's max current specification.
 

k1ng 1337

Joined Sep 11, 2020
1,038
What is the leakage at D1 and is current through D3 linear relative to the leakage?

Have you built this circuit or just simulated it? I'd like to adapt the circuit for a microcontroller so I can view the transfer function graphically with python.

Would be a cool test as I have more 1n4148 diodes than nose hairs!
 

BobTPH

Joined Jun 5, 2013
9,335
How is that supposed to work?

Max leakage current of a 1N4148 at 20V is 25nA.

That means 25nV across the resistor.

But the max offset voltage of the opamp is 6mV, totally swamping the input signal.
 

Thread Starter

dcbingaman

Joined Jun 30, 2021
1,065
What is the leakage at D1 and is current through D3 linear relative to the leakage?

Have you built this circuit or just simulated it? I'd like to adapt the circuit for a microcontroller so I can view the transfer function graphically with python.

Would be a cool test as I have more 1n4148 diodes than nose hairs!
I have not built it, just simulated it. Feel free to use it anyway you want to. :)
 

Thread Starter

dcbingaman

Joined Jun 30, 2021
1,065
How is that supposed to work?

Max leakage current of a 1N4148 at 20V is 25nA.

That means 25nV across the resistor.

But the max offset voltage of the opamp is 6mV, totally swamping the input signal.
You are correct, this is a general conception idea. I treated the op-amp as an ideal op-amp. Will it work in the real world? Well it simulated good. But as we all know the real world is a totally different thing. :)
 

WBahn

Joined Mar 31, 2012
30,339
The following circuit measures leakage current:

View attachment 305097
The 1N4148 is the 'test' item.
The brightness of the LED will change from one 'test' item to another and is very low power. A mechanical switch would go between the 9V battery and the power rail.

Here is a plot of the current in D3:

View attachment 305098
The current will be different for different devices being tested. The diode current must also be looked at so as to not exceeds it's max current specification.
How is this supposed to "measure" anything?

Your opamp has NO feedback -- so it is just a comparator.

Your LED is only rated for a max forward current of 30 mA, so you are abusing it significantly.

Your simulation shows an LED current of 55 mA. If the LED voltage is 3.6 V at that current, that would have 54 mA of current flowing in R2. So basically nothing is flowing in R3.

If the opamp is railed at the high output (and assuming the LED doesn't burn up), the LED would have well over 500 mA flowing in it, the vast majority of which would be coming from the opamp, thus far exceeding it's maximum current output spec.

While the AD8030 has rail-to-rail inputs, that's not the only consideration.

The input bias current and offset currents are on the order of a microamp and the input offset voltage is about 5 mV.

The 1n4148 diode is spec'ed to have a max reverse leakage current (at room temperature and with 20 V across it) of 25 nA, so the input bias and offset currents are going to completely swamp it, and even if those were zero, the signal voltage from a 1 Ω resistor would only be 25 nV, which is five orders of magnitude less than the input offset voltage!
 

WBahn

Joined Mar 31, 2012
30,339
You are correct, this is a general conception idea. I treated the op-amp as an ideal op-amp. Will it work in the real world? Well it simulated good. But as we all know the real world is a totally different thing. :)
Simulations can produce extremely accurate results compared to the real world, IF the time and effort is taken to set up the simulation adequately.
 

Thread Starter

dcbingaman

Joined Jun 30, 2021
1,065
How is this supposed to "measure" anything?

It is a carry around battery operated reverse leakage current device. The 'output' is the brightness of the LED, the brighter the LED to more leakage current for the device being tested.

Your opamp has NO feedback -- so it is just a comparator.

Actually it does via R2 but it is not voltage feedback but current feedback from the reverse voltage leakage current through the device being tested (in this example I used the 1N4148. It is a model not a finished design.

Your LED is only rated for a max forward current of 30 mA, so you are abusing it significantly.

The 'LED' is just a model of a final design, the exact part number used is insignificant.

The point was a conceptual design. I am quite aware of that.

Your simulation shows an LED current of 55 mA. If the LED voltage is 3.6 V at that current, that would have 54 mA of current flowing in R2. So basically nothing is flowing in R3.

Yes that is not a concern to me. It is a model as you stated.

If the opamp is railed at the high output (and assuming the LED doesn't burn up), the LED would have well over 500 mA flowing in it, the vast majority of which would be coming from the opamp, thus far exceeding it's maximum current output spec.

The simulations shows otherwise. R3 is serving as both an RC filter and a current limiting source to the LED.

While the AD8030 has rail-to-rail inputs, that's not the only consideration.

It does not really matter to me if it does or does not. The concept is using an 'ideal' op amp. I have not selected a final specific op-amp.

The input bias current and offset currents are on the order of a microamp and the input offset voltage is about 5 mV.

That question has already been answered. It is conceptual.

The 1n4148 diode is spec'ed to have a max reverse leakage current (at room temperature and with 20 V across it) of 25 nA, so the input bias and offset currents are going to completely swamp it, and even if those were zero, the signal voltage from a 1 Ω resistor would only be 25 nV, which is five orders of magnitude less than the input offset voltage!

Like I already said, it is a model not a specific final design and the simulation shows otherwise.
I do appreciate you taking time to examine the circuit. I have always received good advice on this forum and appreciate the feedback. :)
 

Thread Starter

dcbingaman

Joined Jun 30, 2021
1,065
Simulations can produce extremely accurate results compared to the real world, IF the time and effort is taken to set up the simulation adequately.
Well, yes and no. Yes they provide a reasonable estimation of the real world. But the simulation does not take into account part tolerances, changes due to temperature, humidity, PCB layout concerns, inductive and capacitive cross talk between parts. etc. I think experimentation in the lab environment is superior. But yes, first have a good simulation.

I once had problem with needing an exact resistor value for a specific situation. This was the 'carbon film' resistor. The solution was connect it to and ohm meter and use an exacto-knife to cut a grove into the material until the exact value needed was shown on the meter. The lab is where the rubber hits the road.
 

WBahn

Joined Mar 31, 2012
30,339
Well, yes and no. Yes they provide a reasonable estimation of the real world. But the simulation does not take into account part tolerances, changes due to temperature, humidity, PCB layout concerns, inductive and capacitive cross talk between parts. etc.
Oh, they can most definitely take all of that into account -- some more easily than others and they can do a much better job that you can reasonably achieve in the lab for much of it.

Let's take component tolerances as an example. If you have a design that has, say, ten resistors in it and nothing else, then even if you are only concerned about min, nominal, and max values you have nearly 60k possible combinations. Try characterizing that circuit in a lab. But with a Monte Carlo simulation, you can run more than enough simulations with each resistor being picked randomly according to some distribution (though many simulators only support Gaussian) and quickly have a good idea what the distribution of your circuit performance is likely to be, even if your circuit has thousands of components in it. You can do the same thing over temperature, provided your device models model the temperature-dependence reasonably well. Cross-talk and device parasitics are very commonly taken into account. The same with PCB layout considerations. Humidity effects can also be modeled, but that is usually not part of the simulator's base capability and has to be done via some kind of behavioral modeling.

It all depends on how much time and effort you are willing to spend to have a high-fidelity simulation.

In many cases, going to the lab is simply not an option. When you are designing an integrated circuit that is going to cost a good fraction of a million dollars to get a handful of parts, you don't fab the chip and then see how it behaves in the lab. You put in the effort to get good simulations so that you have high confidence that it is going to behave just like the sims.

How much effort? As a data point, when I was working on the IBM 130 nm process I wanted to tweak the device parameters to take something into account that was important to us but not included in the process models. So I looked at the subcircuit that was being used to model each transistor and discovered that it had over three hundred components in it. That nipped that idea in the bud. Instead, we found another way to incorporate that effect into the simulation.

Before I started working there, I had the same belief that you did -- the simulations only produced a rather crude estimate of the behavior. But on the very first chip I tested, I was amazed to discover that the bias voltages that were generated on chip were within a couple millivolts of the sim results, both at room temperature and at liquid nitrogen temperature.

I once had problem with needing an exact resistor value for a specific situation. This was the 'carbon film' resistor. The solution was connect it to and ohm meter and use an exacto-knife to cut a grove into the material until the exact value needed was shown on the meter. The lab is where the rubber hits the road.
Sounds risky -- but sometimes ya gotta do what ya gotta do. Wonder what that did to the life of the resistor. I assume you sealed it after your trimming was done?
 

DickCappels

Joined Aug 21, 2008
10,247
When I have measured the reverse leakage current through reverse biased base-collector junction, I merely used a power supply set to the appropriate voltage and measured the leakage current as the voltage across the 10 meg ohm input resistance of my DVM. No big deal.
 

WBahn

Joined Mar 31, 2012
30,339
When I have measured the reverse leakage current through reverse biased base-collector junction, I merely used a power supply set to the appropriate voltage and measured the leakage current as the voltage across the 10 meg ohm input resistance of my DVM. No big deal.
Though you were assuming that the meter resistance was right at 10 MΩ and not just something close to that. I don't know how closely that is controlled on the cheaper meters.
 

DickCappels

Joined Aug 21, 2008
10,247
Sometimes you don't worry about the last few tens of percent, you just want to know whether the leakage of a part is within specifications.

One can measure the input resistance of a voltmeter if one wants to go through the process. It is not that hard.
 

Thread Starter

dcbingaman

Joined Jun 30, 2021
1,065
Oh, they can most definitely take all of that into account -- some more easily than others and they can do a much better job that you can reasonably achieve in the lab for much of it.

Let's take component tolerances as an example. If you have a design that has, say, ten resistors in it and nothing else, then even if you are only concerned about min, nominal, and max values you have nearly 60k possible combinations. Try characterizing that circuit in a lab. But with a Monte Carlo simulation, you can run more than enough simulations with each resistor being picked randomly according to some distribution (though many simulators only support Gaussian) and quickly have a good idea what the distribution of your circuit performance is likely to be, even if your circuit has thousands of components in it. You can do the same thing over temperature, provided your device models model the temperature-dependence reasonably well. Cross-talk and device parasitics are very commonly taken into account. The same with PCB layout considerations. Humidity effects can also be modeled, but that is usually not part of the simulator's base capability and has to be done via some kind of behavioral modeling.

It all depends on how much time and effort you are willing to spend to have a high-fidelity simulation.

In many cases, going to the lab is simply not an option. When you are designing an integrated circuit that is going to cost a good fraction of a million dollars to get a handful of parts, you don't fab the chip and then see how it behaves in the lab. You put in the effort to get good simulations so that you have high confidence that it is going to behave just like the sims.

How much effort? As a data point, when I was working on the IBM 130 nm process I wanted to tweak the device parameters to take something into account that was important to us but not included in the process models. So I looked at the subcircuit that was being used to model each transistor and discovered that it had over three hundred components in it. That nipped that idea in the bud. Instead, we found another way to incorporate that effect into the simulation.

Before I started working there, I had the same belief that you did -- the simulations only produced a rather crude estimate of the behavior. But on the very first chip I tested, I was amazed to discover that the bias voltages that were generated on chip were within a couple millivolts of the sim results, both at room temperature and at liquid nitrogen temperature.



Sounds risky -- but sometimes ya gotta do what ya gotta do. Wonder what that did to the life of the resistor. I assume you sealed it after your trimming was done?
I sealed it with nail polish.

You have made some good points about simulations. I usually just use LTSpice and then only the basics. As now I am retired and love making electronic circuits just for the fun of it.
 

Thread Starter

dcbingaman

Joined Jun 30, 2021
1,065
When I have measured the reverse leakage current through reverse biased base-collector junction, I merely used a power supply set to the appropriate voltage and measured the leakage current as the voltage across the 10 meg ohm input resistance of my DVM. No big deal.
True, but sometimes I just like to make small box cool gadgets, for the fun of it. If you catch my drift. :)
 
Top