# Non-Inverting Open Collector Comparator

#### pinkyponky

Joined Nov 28, 2019
318
Hi all,

Can you anyone help me to understand the below formulas. Please can you explain only formulas, how they are derived?.

Last edited by a moderator:

#### Audioguru again

Joined Oct 21, 2019
5,404
We call it a comparator because its inputs compare voltages.
You call it a compactor maybe because your circuit compacts voltages because the resistor values are too low.

Ohm's Law is used in the formulas.

#### ericgibbs

Joined Jan 29, 2010
16,741
hi pp,
Look at this PDF.
E

#### Attachments

• 178.6 KB Views: 11

#### crutschow

Joined Mar 14, 2008
31,089
can you explain only formulas, how they are derived?.
As AGa stated, you use Ohm's law.
One calculation is with the output low (0V).
The other calculation is with the output high (comparator output open-circuit)

#### MrChips

Joined Oct 2, 2009
27,636
An analog comparator takes the difference of two inputs.

You can change from inverting to non-inverting output by swapping the two inputs (i.e. the Vref can go on either inverting or non-inverting input).

The purpose of R2 is to introduce hysteresis.

#### pinkyponky

Joined Nov 28, 2019
318
Then, which value (of V+) to be used in the 2nd equation (which is in 1st post), either the V+ value is Vc or Vp (from the below image).

Last edited:

#### crutschow

Joined Mar 14, 2008
31,089
which value (of V+) to be used in the 2nd equation (which is in 1st post), either the V+ value is Vc or Vp
Vp
Vc does not affect the output voltage since the output is an open-collector NPN transistor.

#### pinkyponky

Joined Nov 28, 2019
318
Hello,

1) In the derivation below, I haven't considered the Rp (Pull-up Resistor) in this context, because I understand that the Rp is only used to not keep the output signal is floating. So, I'm not considered in this context. What I understand is Right?.

2) Please can anyone correct me If I'm wrong either in above point 1 or below derivation?.

Thank you very much for the verification.

Last edited:

#### ericgibbs

Joined Jan 29, 2010
16,741
Hi,
If the Rp is omitted for a Open Collector output, where is positive hysteresis feedback current coming from to drive R2.???
E

#### ericgibbs

Joined Jan 29, 2010
16,741
hi pp,
This shows the plots for a Comparator with Rp and one without Rp.

Note the change in switching points, on the falling edges of p1 and p2.
E

Update:
If it helps, post the threshold and hysteresis component values, using your calculated values, and I will run a simulation.

#### pinkyponky

Joined Nov 28, 2019
318
Hi,
If the Rp is omitted for a Open Collector output, where is positive hysteresis feedback current coming from to drive R2.???
E
I think from Rp only.
I want formula. Please correct me If I'm wrong.

#### ericgibbs

Joined Jan 29, 2010
16,741
hi pp
I think from Rp only. Correct

I want formula. Please correct me If I'm wrong.

As I suggested, calculate and post actual component values for a Comp using the equations you have derived in post #9, and I will use those values and run a LTS simulation.

E

#### pinkyponky

Joined Nov 28, 2019
318
Update:
If it helps, post the threshold and hysteresis component values, using your calculated values, and I will run a simulation.
Thank you for the simulation.

In this context, do I need to consider Rp as well?. Please give me the clarity.

#### pinkyponky

Joined Nov 28, 2019
318
As I suggested, calculate and post actual component values for a Comp using the equations you have derived in post #9, and I will use those values and run a LTS simulation.
E
Can you give me the clarity that do I need to use the Rp for the derivation in this context?.

#### ericgibbs

Joined Jan 29, 2010
16,741
hi,
It is all in Post #3. PDF.

As you may know, most Comparators have some inbuilt small hysteresis level, so that PDF covers the question you are asking. ie: adding hysteresis to a comp.

E

#### crutschow

Joined Mar 14, 2008
31,089
Can you give me the clarity that do I need to use the Rp for the derivation in this context?.
You need to consider Rp, since current flows through it to R2 when the output is high, which causes a voltage drop through Rp.
Typically Rp is selected to be a much lower value than R2, so the voltage drop is low.

#### pinkyponky

Joined Nov 28, 2019
318
You need to consider Rp, since current flows through it to R2 when the output is high, which causes a voltage drop through Rp.
Typically Rp is selected to be a much lower value than R2, so the voltage drop is low.
Can you verify that, Is the derivation is right?. If not, please let me know where I did the mistake.

Last edited:

#### ericgibbs

Joined Jan 29, 2010
16,741
hi pp,
I have changed the Node labels to match your equations.
All you need to do is plug the actual component values into those equations and see if the results match close to the simulation plots.
E

Last edited:

#### pinkyponky

Joined Nov 28, 2019
318
hi pp,
I have changed the Node labels to match your equations.
All you need to do is plug the actual component values into those equations and see if the results match close to the simulation plots.
E
View attachment 256404View attachment 256406
As you requested, I have placed all component values into the equations and the results are as follows:

Vth_high = 3 + ((10k/4.7K) * (10-9.8) = 3.425 V
Vth_low = 3 + ((10k/4.7K) * (10-0) =24.276 V

Vhys = (Vth_high - Vth_low) = - 20.851 V

when compare simulation and theoretical results, both are not matching at all. I'm not sure where is mistake, either in Derivation or in substitution ?. Could you tell me where the mistake is...

Last edited:

#### ericgibbs

Joined Jan 29, 2010
16,741
hi pp,
Where has the 4k7 come from, it should be 200k.
Also the Vin [ Vref =1]

Vth_high = 3 + ((10k/4.7K) * (10-9.8) = 3.425 V

E