• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Diode Log and AntiLog Circuit Derivations

    Blog entry posted in 'Uncategorised', October 07, 2011.

    Hello Members,


    Here is some basic theory on diode log and antilog circuits and their derivations. Lots of people seem to be interested in this kind of circuit so i thought it would be a good idea to present some useful information on this subject.

    I'm starting with the log circuit and as time goes by I'll update with antilog and related circuits and improvements.


    THE LOG CIRCUIT DERIVATION (See Attachment 1 below)

    Starting with the diode equation:
    i=IS*(e^(v/(N*VT))-1)
    where
    i is the current through the diode,
    IS is the diode saturation current,
    N is the diode emission constant,
    v is the voltage across the diode, and
    VT=k*T/q,
    k=Boltzmanns constant 1.381e-23 J/K,
    q=charge on one electron 1.6e-19 Coulombs

    Simplifying a little we get:
    i/IS=e^(v/(N*VT)-1
    i/IS+1=e^(v/(N*VT)
    ln(i/IS+1)=v/(N*VT)

    Now the inside of the natural log on the left side contains
    i/IS+1

    but for many current levels we encounter i/IS is much greater than 1, so we can approximate this as:
    i/IS

    making the new approximated equation:
    ln(i/IS)=v/(N*VT)

    Expanding the natural log function on the left we get:
    ln(i)-ln(IS)=v/(N*VT)

    or
    ln(i)=v/(N*VT)+ln(IS)

    What this means is that the output of the op amp will be v, not ln(i), so we would have to divide by N*VT and then add ln(IS) to get the natural log of i.
    But there's another little catch here, we dont really want the natural log of i anyway because we would have to use large values for i like 1 amp or 2 amps or 4 amps. We would like to scale this down so we can use much smaller currents like 100ua and 1ma. To do this, we include a scaling factor A. Adding this to the equation, we get:
    ln(i/A)=v/(N*VT)+ln(IS)

    and now again we can expand the natural log on the left side and we get:
    ln(i)-ln(A)=v/(N*VT)+ln(IS)

    and solving again for ln(i) we get:
    ln(i)=v/(N*VT)+ln(IS)+ln(A)

    and this equation allows us to construct a practical circuit that takes the log of the input current.

    What we really want in the end though is to be able to take the natural log of the input voltage, so we use a resistor and whatever voltage we apply across that resistor is the voltage we will be taking the natural log of. The way it works into the circuit is that A is equal to the input resistor value in ohms. So we can change the equation a little now:
    ln(i)=v/(N*VT)+ln(IS)+ln(Rin)

    and this is the equation for the circuit shown in Figure 1 of the attachment.

    The output is v, but we need to perform some operations on it to get it to equal the natural log of i (which is now the natural log of the input voltage Vin because of the resistor Rin). This means we have to divide by (N*VT), add the natural log of IS, and add the natural log of Rin. The divide can be performed with a gain stage set equal to 1/(N*VT), but since we want a positive output we make it negative as shown in the diagram in Figure 2. We then add ln(IS) and add ln(Rin) and that gives us the circuit shown in figure 3.

    An actual implementation of this would be done using op amps for the two summing blocks shown in Figure 3.

    I'll be posting more on this as time goes on.

    Comments
    BravoV, November 17, 2011
    Mr.Al, sorry to post here, apparently your PM box is full and can't accept any PM message, please, delete at least one, I have an important PM for you. ;)
 

EE World Online Articles

Loading

 
Top