Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help, Schmitt trigger

Status
Not open for further replies.

rngd

New Member
Hi guys,

Anyone know any links to where I can find the formula/expressions for an Op Amp Schmitt Trigger ? Meaning to calculate the UTP and LTP values. Or if any of you know the formula, please reply, this is giving me a headache !

I understand the theory but I just can't get the calculations. I've googled everywhere and I cannot find any .. There are formulas for BJT Schmitt triggers though.

Thanks.
 
You are problably looking for a window detector. A dual comparator with open collectors would probably work just fine, by tying the output collectors together and a resistor from the collectors to Vcc. I think the LM2903 would work.
 
Actually I'm just copying an already designed circuit using a TLC339. I'm trying to analyze the circuit and modify the UTP and LTP values. Do you know where I can get that info ?

The circuit is attached below just in case.
 

Attachments

  • chargercircuit.JPG
    chargercircuit.JPG
    34.7 KB · Views: 1,075
Last edited:
Anyone know any links to where I can find the formula/expressions for an Op Amp Schmitt Trigger ? Meaning to calculate the UTP and LTP values. Or if any of you know the formula, please reply, this is giving me a headache !

OK, guess I need to define R1 and R2 first:
R1 connected from output to non-inverting input. R2 connected from non-inverting input to ground. Vin is inverting input.
VupperTH = R2/R1+R2(+Vout-max)
VlowerTH = R2/R1+R2(-Vout-max)

Hope you can make sense of this.
 
BeeBop said:
OK, guess I need to define R1 and R2 first:
R1 connected from output to non-inverting input. R2 connected from non-inverting input to ground. Vin is inverting input.
VupperTH = R2/R1+R2(+Vout-max)
VlowerTH = R2/R1+R2(-Vout-max)

Hope you can make sense of this.
It's not quite that simple. see below.
 

Attachments

  • Schmitt trigger calcs.PNG
    Schmitt trigger calcs.PNG
    31.4 KB · Views: 1,296
Thanks, Roff ! Exactly what I was looking for !
But I have a few questions for you,

1. I did not know we need to take Vcc into account.. My circuit does not have the RL resistor between the output and Vcc, so I can just leave RL out of the eq. and replace with a short between output and Vcc ?

2. What about when the Schmitt trigger is non-inverting ?

I will try out the calculations and simulate it and see what I can get.
Thanks for your time.
 
rngd said:
Thanks, Roff ! Exactly what I was looking for !
But I have a few questions for you,

1. I did not know we need to take Vcc into account.. My circuit does not have the RL resistor between the output and Vcc, so I can just leave RL out of the eq. and replace with a short between output and Vcc ?
What IC are you using for a comparator?

2. What about when the Schmitt trigger is non-inverting ?
Do you mean like in the circuit below?

I will try out the calculations and simulate it and see what I can get.
Thanks for your time.
 

Attachments

  • schmitt noninv.PNG
    schmitt noninv.PNG
    3.6 KB · Views: 513
What IC are you using for a comparator?

I am using a TLC339.

Please help, I have been going over this since I posted and I still can't get it ! The connections are different than your diagram. Can you please have a look at the circuit I posted above and tell me how I should do the calculations ?
It doesn't have voltage dividers, its replaced with a 2.5V reference.
Vcc does not appear to be connected to any of the op amp resistors, just the power supply for the IC.



Do you mean like in the circuit below?

Yes
 
rngd said:
I am using a TLC339.

Please help, I have been going over this since I posted and I still can't get it ! The connections are different than your diagram. Can you please have a look at the circuit I posted above and tell me how I should do the calculations ?
It doesn't have voltage dividers, its replaced with a 2.5V reference.
Vcc does not appear to be connected to any of the op amp resistors, just the power supply for the IC.





Yes
This is the Schmitt from your schematic. If your schematic is different, then post it.
EDIT: I just noticed the other Schmitt in your schematic. Hang on for a while so I can look at it.
 

Attachments

  • Schmitt.PNG
    Schmitt.PNG
    9.3 KB · Views: 486
OK, here's the analysis for the other Schmitt trigger. You do have RL, it's the 100k from the output to the battery. Your LM339 is powered by the 15V zener circuit at the bottom of your schematic. LM339 is a quad comparator, so they only show the power supply connections on one of the sections.
 

Attachments

  • Schmitt trigger calcs1.PNG
    Schmitt trigger calcs1.PNG
    26.6 KB · Views: 591
OK, much thanks Ron, its all less confusing now. After calculating, the results I got for the UTP is approx. 2.5V and LTP 0V. Simulation seems to work ok too.

But how does the LTP get triggered when it is at 0V ? In this circuit the Vin cannot possibly become negative, right ?

Also, how do I find the Vout(max) of the opamp ?

Can you elaborate on 'Out(low) = approx 0V' ? Do you mean -Vout(max) =approx 0V and why do you set it that way?

Is the analysis for the non-inverting opamp similar, using the Vcc to feedback to ground branch? The circuit is something like this :
 

Attachments

  • untitled.JPG
    untitled.JPG
    77.1 KB · Views: 388
rngd said:
OK, much thanks Ron, its all less confusing now. After calculating, the results I got for the UTP is approx. 2.5V and LTP 0V. Simulation seems to work ok too.
V(ltp)=Vref*RH/(RH+Rth)
V(ltp)=2.5*1Meg/(1Meg+5k)
V(ltp)=2.488
How did you get zero?

But how does the LTP get triggered when it is at 0V ? In this circuit the Vin cannot possibly become negative, right ?

Also, how do I find the Vout(max) of the opamp?
Vout(max)=Vref+(Vcc-Vbatt)*(RH+Rth)/(RH+Rth+RL), where RL=100k (the resistor from the output to the battery).
I don't know what your battery voltage (Vcc) is, but if it were, for example, 9V, Vout=2.5+(9-2.5)*(1Meg+5k)/(1Meg+100k+5k)=8.13V
Can you elaborate on 'Out(low) = approx 0V' ? Do you mean -Vout(max) =approx 0V and why do you set it that way?
The TLC339 has an open drain output, with the source grounded (see p.2 of the datasheet). When the output is low, that transistor is like a closed switch to ground. When the output is high, that transistor is off, so the output voltage is determined by whatever is connected to the output. Hence the equation above for Vout(max).
Is the analysis for the non-inverting opamp similar, using the Vcc to feedback to ground branch? The circuit is something like this :
If Vin is a voltage source, R1 (RL in my terminology) is the only resistor that does anything in that circuit.
 
Last edited:
Hey Ron, sorry for the late reply.

For the non-inverting one, why do you say RL the is the only resistor that does anything ? I thought adjusting the pots would adjust the UTP/LTP ?

Looking at the attached pic, is the UTP calculated using the blue path ? If not, can you please tell me how it should be.

Also, how does the 2.5V reference in the negative input affect things ?


Thank you.
 

Attachments

  • Schmitt.PNG
    Schmitt.PNG
    9.3 KB · Views: 348
  • untitled.JPG
    untitled.JPG
    14.3 KB · Views: 305
rngd said:
Hey Ron, sorry for the late reply.

For the non-inverting one, why do you say RL the is the only resistor that does anything ? I thought adjusting the pots would adjust the UTP/LTP ?

Looking at the attached pic, is the UTP calculated using the blue path ? If not, can you please tell me how it should be.

Also, how does the 2.5V reference in the negative input affect things ?


Thank you.
When your Vin is where you show it in the right-hand schematic, and Vin is a zero impedance source, the R2-R3 voltage divider and the hysteresis resistor R4 have no effect, because Vin is Vin, regardless of the value of those resistors. Imagine Vin is a 3 volt battery. You can adjust R2, R3, and R4 until the cows come home, but Vin will still be 3V. If you want those resistors to have some effect, Vin has to have some series resistance.
EDIT: have you posted what you are trying to do with a Schmitt trigger, or are you making the study of Schmitts your life's work?:D
I don't want to have to calculate the equations for every possible permutation of a Schmitt trigger.
 
Last edited:
Actually, the main circuit is someone else's and I'm just trying to figure out how hysteresis adjustments are made.

OK sorry, forget the equations, can you just tell me what the reference voltage at the negative input does ? :D

When it is at the positive it affects the Vin, what about at the negative ? I cant find anything about it either online or in books...
 
rngd said:
Actually, the main circuit is someone else's and I'm just trying to figure out how hysteresis adjustments are made.

OK sorry, forget the equations, can you just tell me what the reference voltage at the negative input does ? :D

When it is at the positive it affects the Vin, what about at the negative ? I cant find anything about it either online or in books...
I don't know why you say that. Vref does not affect Vin in either case. In fact, Vin is by definition a voltage source, so it can't be affected by Vref. Here are the equations for -in and +in Schmitt triggers.
 

Attachments

  • Schmitt calcs -in.PNG
    Schmitt calcs -in.PNG
    28.9 KB · Views: 514
  • Schmitt calcs +in.PNG
    Schmitt calcs +in.PNG
    29 KB · Views: 350
Sorry, I meant it affects the input to the positive/the UTP value.

Ok, thanks very much for the analysis (again).
 
Ron, is there a typo for the +in calcs ? The second box, at first its Vutp then you change it to Vltp.
 
rngd said:
Ron, is there a typo for the +in calcs ? The second box, at first its Vutp then you change it to Vltp.
Nope, that's the way it works out when you switch from -in to +in. I ran simulations with an LM393 just to make sure my equations gave me the same answers as did the sims.
 
Weird though, in my circuit there is no Rth. Cannot be that the Vutp, Vltp and Vref are at the same voltage point .. ?
 

Attachments

  • Schmitt.PNG
    Schmitt.PNG
    9.3 KB · Views: 278
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top