# Rube Goldberg comparator

#### screen1988

Joined Mar 7, 2013
310
I got stuck with this problem: Here Q1 and Q2 behave like p-n junction diodes.
Find Vo1:
Vo1 = R4/(R3+R4) *Vin - 0.7
IQ1 = I_ref
Now what should I do next?

#### WBahn

Joined Mar 31, 2012
26,398
The first thing to do it finish the schematic.

What is the polarity if Iref?

#### screen1988

Joined Mar 7, 2013
310
What is the polarity if Iref?
It is from left to the right of the image.
(I guess because if it is so then Q1 can be ON)

#### WBahn

Joined Mar 31, 2012
26,398
The polarity of Iref doesn't strictly have anytrhing to do with whether Q1 is one or off. It is merely a symbolic designation that indicated which direction current is flowing IF the value of Iref is positive. Nothing more. Some people choose to always have positive current flow from a current source that has a grounded node flow toward that node. Others always choose to have it go the other way. Doesn't matter. But what does matter is that the choice be clear and unambiguous so that everyone is in agreement what direction the current is flowing when given a specific value for Iref.

Now, in this case, it is perfectly reasonable to say that the actual current from the current source has to flow from left to right in order for Q1 to be ON, therefore we will declare that the polarity of Iref is from left to right. But that declaration is arbitrary and must therefore be explicit.

• screen1988

#### kubeek

Joined Sep 20, 2005
5,765
My guess is that those two things are not comparators but op-amps, and the circuit looks like some sort of logarithmic amplifier.

#### screen1988

Joined Mar 7, 2013
310
The second op amp uses negative feedback => V- = V+ = 0V
If Vo1 > -0.7V => Q2 is OFF and Vo = 0
If Vo1 < -0.7 => Q2 is ON, I can't proceed because I don't know the current through Q2.
Ie (Q2) + Ie (Q1) = I1 where I1 is the current flow from Vo1 point into the first op amp.
I1 seems impossible to calculate.

#### WBahn

Joined Mar 31, 2012
26,398
You have to assume a couple of things. First, that the two transistors are matched and, second, that they are operating at the same temperature.

You know the difference in the Vbe voltage between the two transistors:

Vbe1 = VBE (the Vbe associated with Ic=Iref, or, strictly speaking, Ic=Iref/α)

Vo1 = Vr - VBE (Vr is the voltage at the V+ input of the first opamp and Vo1 is the opamp output voltage).

Vbe2 = 0V - Vo1 = VBE - Vr

Vr = Vi(R4/(R3+R4)

You know that the collector current changes (at room temperature) by about 10x for every 60mV difference in Vbe voltage. Let's call that factor κ, so

The number of decades is therefore:

η = (Vbe2 - Vbe1)/κ

η = (VBE - Vr - VBE)/κ = -Vr/κ

Thus you can determine how much current is flowing in the second feedback resistor as a multiple of Iref:

Ir = Iref*10^η = Iref/10^(Vr/κ)

From that you have your output voltage:

Vo = 0V + Ir*R3

Vo = (Iref*R3)/10^(Vr/κ)

Vo = (Iref*R3)/10^(Vi(R4/[κ(R3+R4)])

What I'm not seeing is why the same value is used for the two different R3 resistors. I'm not seeing them interact in any meaningful way.

• screen1988

#### screen1988

Joined Mar 7, 2013
310
Thanks, it took me a while to understand the method but I get it now.
Vbe1 = VBE (the Vbe associated with Ic=Iref, or, strictly speaking, Ic=Iref/α)
I believe that you meant Ic= α*Iref.
To find the exact value of VBE, I need to look at Vce-Ic characteristic in its datasheet?
You know that the collector current changes (at room temperature) by about 10x for every 60mV difference in Vbe voltage.
Well, I didn't know the specific number!
Does it have in datasheet?

#### WBahn

Joined Mar 31, 2012
26,398
Thanks, it took me a while to understand the method but I get it now.

I believe that you meant Ic= α*Iref.
I typed what I meant, but what I meant was wrong. You are correct. Nice catch.

To find the exact value of VBE, I need to look at Vce-Ic characteristic in its datasheet?

Well, I didn't know the specific number!
Does it have in datasheet?
Why do you need an exact value for VBE? Does VBE appear anywhere in the final relationship between Vo and Vi?

That's one of the many benefits of working symbolically -- you don't have to have actual values while cranking the analysis and if some of the quantities cancel out, then you don't need to find them at all.

• screen1988

#### sirius3

Joined May 30, 2013
5
why is it the post labelled rube goldberg comparator?

#### screen1988

Joined Mar 7, 2013
310
why is it the post labelled rube goldberg comparator?
I saw it somewhere but can't remember. I also searched the name in Google but no resut appeared.

#### djsfantasi

Joined Apr 11, 2010
7,867
Just search for "Rube Goldberg". An old reference to something that is "hacked" together.

#### WBahn

Joined Mar 31, 2012
26,398
I understand the "Rube Goldberg" reference, I just don't understand the "comparator" part of the name.

#### screen1988

Joined Mar 7, 2013
310
What are real applications of this circuit?

#### WBahn

Joined Mar 31, 2012
26,398
It's a circuit that YOU presented. Shouldn't WE be asking YOU what this thing is supposedly used for? #### screen1988

Joined Mar 7, 2013
310
It's a circuit that YOU presented. Shouldn't WE be asking YOU what this thing is supposedly used for? Well, I saw it somewhere and wanted to analyse it. I don't know it and thought maybe many experts know or familiar with this circuit.

#### WBahn

Joined Mar 31, 2012
26,398
The only thing I have to go on is the transfer characteristic, namely:

Vo = (Iref*R3)/10^(Vi*R4/[κ(R3+R4)])

It's basically an antilog relationship in that as Vi increases Vo decreases exponentially. It's possible that this would be useful in some kind of compensation circuit.

We can write this as:

Vo = (Iref*R3)/10^[(Vi/κ)(R4/(R3+R4))]

Vo/(Iref*R3) = 10^-[(Vi/κ)(R4/(R3+R4))]
log10(Vo/(Iref*R3)) = -(Vi/κ)(R4/(R3+R4))
(1+R3/R4)log10(Vo/(Iref*R3)) = -(Vi/κ)

But I don't know that this gives much insight into what it might be useful for. Fairly small changes in Vi will result in large changes in Vo. Since κ is a strong function of temperature, it is possible that it is intended as a thermometer circuit.

Another possibility is that it is a circuit intended to measure κ, either under a specific set of conditions or as a function of some parameter, such as temperature.

κ = -Vi / [(1+R3/R4)log10(Vo/(Iref*R3))]

I don't know that this would be a very good way to measure κ, but it's at least a possible way.

• screen1988