5
\$\begingroup\$

I'm trying to work through an iterative solution for the forward voltage of a diode in series with a voltage source and a current limiting resistor.

schematic

simulate this circuit – Schematic created using CircuitLab

Normally I'd just use the sim for it, but I figured it was worth learning how to do by hand.

The model from the CircuitLab simulator used by EE SE (click "simulate this circuit" above) provides the following parameters for the 1N4148 diode:

  • \$I_S = 2.52 \times 10^{-9} \text{A}\$
  • \$n = 1.752\$
  • \$R_S = 0.568 \Omega \$

Assuming a default temperature of 27°C in a SPICE sim, we should have \$V_T=0.025865\$ for the thermal voltage.

First, I used the diode voltage drop equation with an Ohm's law substitution to determine a starting point for \$V_D\$ without knowing \$I\$:

$$V_D = nV_T \times \text{ln} \left( \frac{V_S-V_D}{R I_S} + 1 \right)$$

For this initial step I set \$R\$ to \$R_S\$, ignoring \$R_1\$, so that my starting point is unaffected by external components. (Note: I also tried starting with \$R=R_S+R_1\$, but it didn't make much of a difference to the converged result)

With the given parameters and a \$V_S\$ of 5V this solves to \$V_D \approx 0.9858 \text{V}\$ using Wolfram Alpha.

We know that \$I = \frac{V_S-V_D}{R_1}\$, so we can substitute our value for \$V_D\$ in and get \$I = \frac{5-0.9858}{100}=0.040142\text{A}\$.

The diode equation then gives us:

$$V_D = nV_T \times \text{ln} \left( \frac{I}{I_S} + 1 \right)$$

Plugging the numbers back in, we get \$V_D = 0.751497V\$.

The initial equation is then iteratively evaluated with \$V_D\$ on the right initially set to 0.751497V and \$R=100 \Omega\$, feeding the resulting \$V_D\$ back in until it converges on a solution.

The converged value I got was \$V_D=754 \text{mV}\$, and therefore \$I=42.46\text{mA}\$.

This looks reasonable. However, it diverges from the in-browser simulation for the circuit above, which gives me 772mV and 42.27mA. I tried again on Falstad (circuit-js) with the 1N4148 model parameters there (even verifying the \$V_T\$ value in the circuitjs GitHub) and also didn't get the same result.

Why doesn't it match up? Did I mess up my model calculations?

\$\endgroup\$
9
  • \$\begingroup\$ Can you post the diode full model? Maybe there is some series resistance included in the model. \$\endgroup\$
    – G36
    Commented Jul 6, 2023 at 16:55
  • 1
    \$\begingroup\$ for a diode, both 754 and 772 mV are reasonable. It all depends on exactly what parameters are used for the model - residual series resistance, ideality factor, temperature, Is. \$\endgroup\$
    – Neil_UK
    Commented Jul 6, 2023 at 16:58
  • \$\begingroup\$ @G36 Click "Simulate this circuit" under the diagram in the question, then double click the 1N4148 to get the full parameter set. The series resistance (Rs) is the 0.568Ω I listed in the model parameters. \$\endgroup\$
    – Polynomial
    Commented Jul 6, 2023 at 17:00
  • 1
    \$\begingroup\$ Did you include that Vd = 754mV + 42.46mA*0.568 = 778mA \$\endgroup\$
    – G36
    Commented Jul 6, 2023 at 17:40
  • 2
    \$\begingroup\$ Of course not. VD equation gives you only the voltage drop across the PN junction nothing more. \$\endgroup\$
    – G36
    Commented Jul 6, 2023 at 17:45

1 Answer 1

9
\$\begingroup\$

It seems that you forgot to include the voltage drop across the \$R_S\$ resistor. \$V_D\$ equation will only give you the voltage drop across the "ideal diode".

schematic

simulate this circuit – Schematic created using CircuitLab

So, the total voltage drop is equal to:

$$V_D = V_{IDEAL} + I_D*R_S$$

And lets us check it

$$ V_D = nV_T \ln\left(\frac{I_D}{I_S}\right)$$

And the first iteration current is

$$I_D(1) = \frac{5V - 0.7V}{100.568\Omega} = 42.7571mA$$

$$ V_D(1) = 45.31548mV *\ln\left(\frac{42.7571mA}{2.52nA}\right) = 754.357mV$$

$$I_D(2) = \frac{5V - 754.357mV}{100.568\Omega} = 42.2166mA$$

$$ V_D(2) = 45.31548mV *\ln\left(\frac{42.2166mA}{2.52nA}\right) = 753.780mV$$

$$I_D(3) = \frac{5V - 753.780mV}{100.568\Omega} = 42.2223mA$$

$$ V_D(3) = 45.31548mV *\ln\left(\frac{42.2223mA}{2.52nA}\right) = 753.786mV$$

$$I_D(4) = \frac{5V - 753.786mV}{100.568\Omega} = 42.2223mA$$

$$ V_D(4) = 45.31548mV*\ln\left(\frac{42.2223mA}{2.52nA}\right) = 753.786mV$$ As you can see we are getting the same numbers, so we can conclude that.

$$I_D = 42.2223mA$$ And the voltage drop across the real diode is:

$$V_D = 753.786mV + 42.2223mA*0.568\Omega = 777.769mV$$

The LTspcie result is

enter image description here

Looks good to me. Nothing to complain about.

\$\endgroup\$
7
  • 1
    \$\begingroup\$ Perfect! Thanks :) \$\endgroup\$
    – Polynomial
    Commented Jul 6, 2023 at 18:33
  • 3
    \$\begingroup\$ Added bonus: I was wondering why Falstad and LTspice both get 777mV but CircuitLab slightly disagrees at 772mV. On a hunch I checked how the numbers work out if CircuitLab was setting their environmental temperature to 25°C instead of 27°C like LTspice and Falstad do. 27°C translates to a \$V_T\$ of 25.865mV, whereas 25°C translates to a \$V_T\$ of 25.69mV, and if you scale 777mV by a factor of 25.69/25.865 you get 772mV. So the disagreement is purely down to temperature. \$\endgroup\$
    – Polynomial
    Commented Jul 6, 2023 at 19:08
  • \$\begingroup\$ @Polynomial But lower temperature means higher VD voltage not lower. To get 772mV temperature needs to be higher than 27°C. Somewhere around 31°C. \$\endgroup\$
    – G36
    Commented Jul 6, 2023 at 19:22
  • \$\begingroup\$ \$V_D\$ scales up with \$V_T\$ though? And \$V_T\$ @ 25°C is 25.69mV, whereas at 27°C it's 26.865mV. \$\endgroup\$
    – Polynomial
    Commented Jul 6, 2023 at 19:26
  • \$\begingroup\$ Ok I see, you have assumed constant \$I_S\$ current (not temperature dependent). But in the real world the higher the temperature the lower the diode forward voltage. electronics.stackexchange.com/questions/377861/… \$\endgroup\$
    – G36
    Commented Jul 6, 2023 at 19:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.