A diode can be used as a variable attenuator element based on variability of the diode's dynamic impedance versus its bias. An estimate of that dynamic impedance can be found from the basic diode equation as follows:

A program in GWBASIC for all of this is as follows:

10 CLS:SCREEN 9:COLOR 15,1:T=300:K=1.38E-23:Q=1.602E-19:IS=1E-12:GOTO 20

20 PRINT "save "+CHR$(34)+"diode_vi.bas"+CHR$(34):PRINT

30 PRINT "save "+CHR$(34)+"a:\diode_vi.bas"+CHR$(34):PRINT:PRINT

40 C$=" #####.## mA #.#### volts #####.#### ohms"

50 D$=" Current Voltage Dynamic Impedance":PRINT D$

60 FOR XX=1 TO 10:V=.6:READ IMA(XX):DATA 0,.2,1,3,5,10,30,100,300,1000

70 I=IS*(EXP(Q*V/K/T)-1):R=(K*T/Q/IS)*EXP(-Q*V/K/T)

80 IF ABS(I*1000-IMA(XX))<.0015 THEN GOTO 100

90 V=V*(1-.001*SGN(I-IMA(XX)/1000)):GOTO 70

100 PRINT USING C$;I*1000,V,R:NEXT XX

I should have mentioned that this was how I once made the gain control portion of a couple of "leveller" designs using 1N914 diodes. (The 1N4148 didn't yet exist back then.) Needless to say, I suppose, is that I didn't push the 1N914 diodes to one ampere!

Posted by: John Dunn | February 21, 2012 at 07:35 AM

A note of caution when using this formula at high forward voltages.The dynamic resistance does not decrease to zero exponentially with applied voltage, as this simple formula would suggest. A more accurate equation for the diode current would be: I=Is*(exp(q/kT*(V-I*R))-1), where R is the parasitic series resistance. When differentiated, this equation indicates that the dymamic resistance tends to a non-zero constant value equal to R.

Posted by: Francisco | February 21, 2012 at 10:58 AM

Hmm:

A simple rearrangement gives:

V = k.T.ln(I+Is)/q

which differentiates to give the low frequency value as:

Rdynamic = dV/dI = k.T/q/(I+Is)

However, even at low currents the resistance this would calculate is half the realistic value for a 2N914 (or 4148), and the error increases at higher currents. This is because the emission coefficient (N) of these diodes is approximately 2, and all real components have series resistance (Rs).

So we can write the forward Voltage Vf as:

V = k.T.N.ln(I+Is)/q + I.Rs

and the dynamic (low-frequency) resistance:

Rdynamic = dV/dI = k.T.N/q/(I+Is) + I.RS

More accurate, more intuitive, and no need for a program.

(and that's before we decide that the operating region allows us to omit Is)

Posted by: George Storm | February 21, 2012 at 11:20 AM

One note that is missing is to make clear that this is usefull only for small signals (really small).

You could add a calculation of the signal distortion vs. signal amplitude.

Posted by: Victor Koren | February 22, 2012 at 12:58 AM