Logarithmic amplifier

Discussion in 'Homework Help' started by tassat, Oct 11, 2014.

  1. tassat

    Thread Starter New Member

    Oct 11, 2014
    7
    0
    I was given basically this image: [​IMG] as a guide and told to build a logarithmic amplifier and verify that its output is proportional to the logarithm of its input. I have a 411 for the op amp, a 10k for the resistor, and a 1N914 for the diode. I'm driving the circuit with a 10khz sine wave, but my output just looks like a square wave. Is this what I'm supposed to get, and if so, how is that proportional to the logarithm of the input? If not, what should I do differently?
     
  2. ericgibbs

    AAC Fanatic!

    Jan 29, 2010
    2,504
    380
    hi,
    I would use a variable DC source as Vin, start at 0Vin and increment Vin in say 0.1V steps, note the Vin and Vout for each step, then paper plot Vin versus Vout.

    Post your results.;)
    E
     
  3. tassat

    Thread Starter New Member

    Oct 11, 2014
    7
    0
    Ok, I used a DC power supply and got the following (all in volts):

    In Out
    1.0 -.497
    5.0 -.575
    7.0 -.592
    10 -.609
    12 -.617
    15 -.629

    So that's, according to my calculator, out=-.497+-.049*ln(in).

    So my results are proportional, thanks, that was honestly super helpful. If I can ask, what is the -.497?
     
  4. ericgibbs

    AAC Fanatic!

    Jan 29, 2010
    2,504
    380
    hi,
    I did say 0V and the in 0.1V steps, 1V is too big a step.!

    To get more detail, you should start at 0V and increment in 0.01V steps.

    Its an Inverting amplifier so the polarity of the Vout will be opposite of Vin.

    Try 0V thru -1V , in -0.01V steps upto -1V, lets see what you get.
    E
     
  5. tassat

    Thread Starter New Member

    Oct 11, 2014
    7
    0
    So you want the voltage I apply to be negative?
     
  6. ericgibbs

    AAC Fanatic!

    Jan 29, 2010
    2,504
    380
    Yes, if you have a negative variable voltage source to use use for the test.

    You may get a result you don't expect, can you tell us why that is,?:rolleyes:
     
  7. tassat

    Thread Starter New Member

    Oct 11, 2014
    7
    0
    I don't know if I have a negative variable voltage source. I can connect the positive from my power supply to ground and the negative to the input and the voltage will be negative right?
     
  8. ericgibbs

    AAC Fanatic!

    Jan 29, 2010
    2,504
    380
    hi,
    If you cannot do that test, think what the Vout may be for a negative Vin input.?
    Clue: which way will the diode be biased.?
    E
     
  9. tassat

    Thread Starter New Member

    Oct 11, 2014
    7
    0
    Would what I said not work?

    And the vout would be higher right?
     
  10. ericgibbs

    AAC Fanatic!

    Jan 29, 2010
    2,504
    380
    If your Vin power supply source is floating, ie: the neg is not connected to ground, then you can connect the positive to 0V and the negative to the Vin.

    I guess you know the gain of an Inverting OPA is: Vout= Vin * Rfeedback/Rin.?
    As I asked you earlier if the Vout goes positive with respect to the Input, will the diode be biased ON or OFF.?
     
  11. tassat

    Thread Starter New Member

    Oct 11, 2014
    7
    0
    The diode would be biased off I think.

    How would it make sense for the output to be proportional to the logarithm of the input if the input is negative?
     
  12. ericgibbs

    AAC Fanatic!

    Jan 29, 2010
    2,504
    380
    When the diode is reverse biased its resistance is very high, many megohms, so the gain Vout= Vin* Rmegohm/Rin is the 'open loop' gain of the OPA, which can be 10,000's!
    So the output voltage would tend towards the OPA's positive supply rail, with only a few -mV on Vin.

    The Vout is only the Log of Vin when when is positive, that is when Vout is going negative.

    Do you follow OK.

    To get the best plot you should increase +Vin in very small increments

    E
     
  13. tassat

    Thread Starter New Member

    Oct 11, 2014
    7
    0
    Ok, I think I understand, when using a small increment I got (all in volts)

    in out
    0 -.370
    .1 -.387
    .2 -.425
    .3 -.452
    .4 -.462
    .5
    .6
    .7
    .8
    .9
    1
     
  14. ericgibbs

    AAC Fanatic!

    Jan 29, 2010
    2,504
    380
    If you use the Table of values you posted to produce a graph plot, does it look logarithmic.?
    [you could ignore the minus sign and create a positive going plot]

    You will get a better resolution if you use 0.01Vin increments and not 0.1Vin
     
Loading...