Author Topic: Is this a logarithmic amplifier?  (Read 843 times)

0 Members and 1 Guest are viewing this topic.

Offline injbTopic starter

  • Regular Contributor
  • *
  • Posts: 64
Is this a logarithmic amplifier?
« on: March 31, 2020, 03:00:36 pm »
[ Specified attachment is not available ]I hadn't seen an op amp with a transistor in the feedback loop before. From reading up on this, it sounds like this is commonly done to create a logarithmic amplifier, to squash the dynamic range of a signal.

EDIT: I have updated the schematic because I had missed quite a bit in my first attempt. it looks like the idea here is that the microcontroller can turn the transistor in the feedback loop on and off.

It looks to me like the second transistor is being used as a switch. When the pin from the microcontroller is OFF, the switch is open, and the transistor in the op amp feedback loop gets V+ to it's base. When the microcontroller turns the pin ON, the base switch is closed and the base of the feedback transistor is grounded, and the op amp starts to work as a logarithmic amplifier.

Is that correct? What would the point of this be? From the code in the microcontroller, I can see that the pin is turned ON just before the analog-to-digital converter is read. What is the point of having the ability to turn it off? It looks like that would make the op amp behave more like a follower. But why is would there be a need to switch this behavior ?

[ Specified attachment is not available ]
« Last Edit: March 31, 2020, 07:18:25 pm by injb »
 

Offline TheHolyHorse

  • Regular Contributor
  • *
  • Posts: 179
  • Country: se
  • You don't need to be confused, just understand it.
Re: Is this a logarithmic amplifier?
« Reply #1 on: March 31, 2020, 04:10:32 pm »
Is that resistor looking thing before the tranny the diode? If it is I'd suggest you use the standard symbol in the future to minimize confusion :-+
 

Offline injbTopic starter

  • Regular Contributor
  • *
  • Posts: 64
Re: Is this a logarithmic amplifier?
« Reply #2 on: March 31, 2020, 04:11:33 pm »
Yes it is, sorry!
 

Offline injbTopic starter

  • Regular Contributor
  • *
  • Posts: 64
Re: Is this a logarithmic amplifier?
« Reply #3 on: March 31, 2020, 07:17:14 pm »
Yes it is, sorry!

So it turns out I made more mistakes than just using the wrong symbol - I missed a significant part of the circuit. I've uploaded a completely new one into the original post. Hopefully this one makes more sense. Can anyone help me to understand it? I updated my original post with how I think it works. Thanks!
 

Offline schmitt trigger

  • Super Contributor
  • ***
  • Posts: 2333
  • Country: mx
Re: Is this a logarithmic amplifier?
« Reply #4 on: March 31, 2020, 07:28:19 pm »
To me, that appears to be an integrator reset.

Someone with a higher mind and a higher paycheck might disagree.
 
The following users thanked this post: injb

Offline capt bullshot

  • Super Contributor
  • ***
  • Posts: 3033
  • Country: de
    • Mostly useless stuff, but nice to have: wunderkis.de
Re: Is this a logarithmic amplifier?
« Reply #5 on: March 31, 2020, 07:31:35 pm »

It looks to me like the second transistor is being used as a switch. When the pin from the microcontroller is OFF, the switch is open, and the transistor in the op amp feedback loop gets V+ to it's base. When the microcontroller turns the pin ON, the base switch is closed and the base of the feedback transistor is grounded, and the op amp starts to work as a logarithmic amplifier.

Is that correct? What would the point of this be? From the code in the microcontroller, I can see that the pin is turned ON just before the analog-to-digital converter is read. What is the point of having the ability to turn it off? It looks like that would make the op amp behave more like a follower. But why is would there be a need to switch this behavior ?

(Attachment Link)

Agree, the uC can turn the transistor in the negative feedback loop on or off. I doubt it's intended as an log amplifier, because for the transistor to conduct, the OpAmp output would have to swing below GND. The uC ADC wouldn't understand that.

So what I see:
The diode prevents the base to get negative in respect to the emitter if the lower transistor is turned on and the OpAmp output is above some 0.7V. The transistor remains turned off in this state, regardless of the OpAmp output voltage (supposed it doesn't swing below 0V). The OpAmp acts as an integrator now (capacitor in negative feedback). When the uC turns its output off, the transistor gets switched on and shorts (discharges) the capacitor, one would call this "integrator reset".

From that I'd guess, the uC starts the integrator by turning its output on before the ADC takes the sample. I bet, the delay between turning the output on and reading the ADC is well-timed, so the input signal gets integrated over a defined time window.
Safety devices hinder evolution
 
The following users thanked this post: injb

Offline MathWizard

  • Super Contributor
  • ***
  • Posts: 1609
  • Country: ca
Re: Is this a logarithmic amplifier?
« Reply #6 on: April 02, 2020, 07:46:19 am »
In the log detector I tried making, it used a varactor diode (or varicap diode), which is a diode designed to change capacitance by some amount, as the voltage across it changes.

The symbol is diode+cap
https://www.google.com/search?q=varactor+diode&client=firefox-b-d&source=lnms&tbm=isch&sa=X&ved=2ahUKEwj_uvGLn8noAhWSm-AKHd28AmEQ_AUoAXoECBMQAw&biw=1364&bih=1320

Are you thinking of 1 of them in some circuit ? I'm no expert, so IDK.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf