1

I need to design a comparator with Vih=1.3V and Vil=1.2V. Therefore hysteresis is 100mV. The circuit will be working on a 3.3V supply. During high state, the o/p of the comparator will be 3.3V and at the low state, it will be 0V. I will be using a comparator with push-pull output configuration. Please see my design calculations below.I would like to know two things

1)May I know my design calculation is correct or not.

2)For finding Vref where I need to plug the value of R1 and R2.In equation 1 or 2

enter image description here

Hari
  • 1,496
  • 11
  • 22
  • 1
    Looks good except equ. 1 and 2 Note, that when Vin = 0V the output is LOW. Thus, to gets the HIGH state at the output Vin needs to reach Vh. Therefore: \$ V_{REF} = V_H \times \frac{R_2}{R_1 + R_2}\$, So when the output is at HIGH state the circuit will switch back to LOW only if Vin drops below VL. – G36 Apr 28 '21 at 05:16
  • you mean equation 2 is applicable for high state and equation 1 is applicable for low state,correct me if I am wrong. – Hari Apr 28 '21 at 05:20
  • Yes, this is what I meant because your circuit is a non-inverting comparator. – G36 Apr 28 '21 at 05:30
  • Thank you, Still, the hysteresis equation will be the same,I mean (Vh-Vl) = VccxR1/R2. – Hari Apr 28 '21 at 05:40
  • 1
    Almost all comparator with hysteresis will have the hysteresis width equal to \$V_H - V_L = (V_{OH} - V_{OL}) \times \frac{R_1}{R_2}\$ https://electronics.stackexchange.com/questions/430912/what-is-the-purpose-of-a-resistor-in-parallel-with-a-buffer-gate/431076#431076 – G36 Apr 28 '21 at 05:45
  • I tried to learn more about comparators. Still, some confusions are there.if you don't mind Could you please tell me the difference in the analysis of inverting and non-inverting comparator. Taking the same circuit as example – Hari Apr 28 '21 at 10:59
  • 1
    But you understand that the op-amp based comparator will change its state at the point when v_n = v_p (inverting input voltage is equal to non-inverting input voltage)? And can you explain to me what confuses you? https://electronics.stackexchange.com/questions/465430/waveform-at-the-negative-terminal-of-an-opamp/465585#465585 – G36 Apr 28 '21 at 13:51
  • I thought when Vin is VIH, Vout is Vcc i.e. high state. That is why I wrote the equation 1 like that. Everywhere what I have seen is at this time Vout is 0V i.e low state. This confused me. My assumption is like Vin=Vih, then Vout is Vcc. But I need to consider the point in time where the circuit switches between the high and low states, i.e., when the output of the comparator is in the old state, but the input voltage is moving to the new state. – Hari Apr 29 '21 at 04:47
  • 1
    The output state depends on the voltage "level" at the op-amp inputs. If the voltage at the non-inverting input is larger than the inverting input the op-amp output will be driven to the positive supply voltage (high state). But if inverting input voltage is higher than non-inverting input the output will be driven low (driven to the negative supply). – G36 Apr 29 '21 at 15:00
  • 1
    In your example at the beginning Vin > Vref thus, Vout = LOW but as the input voltage increases the voltage at V_"+" also increases. And until V_"+" and Vin is lower than Vref nothing is changing at the output. But when V_"+" reaches the Vref value (due to Vin increases) this will cause the output to transition from LOW to a HIGH state. And any further increases in the input voltage do not change the output state. The only this that is changing is the voltage at V_"+" will further increase along with Vin. Do you see it? – G36 Apr 29 '21 at 15:01
  • Thank you for your time and concern.I understood where I went wrong – Hari Apr 29 '21 at 16:03

1 Answers1

2

short answer is

If you put in any equation you should get same Vref value, if the calculations are correct.

few corrections.

Lets say assume Initially Vin started from 0V, Vout initial state will be Ov (GND or Vee), as voltage starts increasing to Vih =1.3V we should see Vout switching to Vcc, But before that Vout = 0V.

So, for Vinh =1.3V equation will be

VthU = VinH(=1.3V) * R2/(R2+R1) this is also same Vref ---> Eq 1.

On the reverse side,

Now Vout = Vcc(high) and Vin is coming down to 0V ,

when VinL =1.2V Vout switches to 0V,Before that Vout is Vcc.

So, for VinL = 1.2V equation will be VthL = VinL(=1.2V) * R2/(R2+R1) + Vcc * R1/(R2+R1) = Vref ---> Eq 2

Now after equating Eq 1 & 2 and solving for relation between R1 & R2 we will get R2 = 33 R1.

Select R1 & R2 based on your op-amp selection, I am not selecting them.

Now you put this R1,R2 relation in any equation, we should get Vref ~ 1.262V.Comparator Hysterysis

user19579
  • 1,378
  • 2
  • 14
  • 23