Is this a logarithmic amplifier? - Page 1
Forum section: electronics / beginners

author: injb
author_rank: Regular Contributor
timestamp: March 31, 2020, 03:00:36 pm
content: [ 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 ]

author: TheHolyHorse
author_rank: Regular Contributor
timestamp: March 31, 2020, 04:10:32 pm
content: 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

author: injb
author_rank: Regular Contributor
timestamp: March 31, 2020, 04:11:33 pm
content: Yes it is, sorry!

author: injb
author_rank: Regular Contributor
timestamp: March 31, 2020, 07:17:14 pm
content: Quote from: injb on March 31, 2020, 04:11:33 pmSo 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!

author: schmitt trigger
author_rank: Super Contributor
timestamp: March 31, 2020, 07:28:19 pm
content: To me, that appears to be an integrator reset.Someone with a higher mind and a higher paycheck might disagree.

author: capt bullshot
author_rank: Super Contributor
timestamp: March 31, 2020, 07:31:35 pm
content: Quote from: injb on March 31, 2020, 03:00:36 pmAgree, 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.

author: MathWizard
author_rank: Super Contributor
timestamp: April 02, 2020, 07:46:19 am
content: 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+caphttps://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=1320Are you thinking of 1 of them in some circuit ? I'm no expert, so IDK.