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 about threshold voltages for this schmitt trigger

Status
Not open for further replies.

redling1370

New Member
Hi,
I have this circuit here and I want to know what are the threshold voltages and there derivation. This circuit is a bit similar to a circuit I did in the past but the equations still seem to elude me.
upload_2017-10-23_15-33-31.png
 
Where is the input?
 
First, the circuit will not do anything.
Pin 2 is at 4.167 volts. For anything to happen; pin 3 needs to go above and below pin 2.
The POT R5 has 1V on the bottom and 2.8 volts on the top end. Pin 3 can not get above pin 2.
--------
If R1, R2, R3, R4 all = 10k then the POT will allow pin 3 to get above and below pin 2.
R1-4 could be 2k. Not important.

upload_2017-10-23_14-11-28.png
 
Ok lets say that R1 is a photocell or any type of variable resistor. What are the equations that determine the threshold voltages (Vth & Vtl) that will produce the postive feedback (hystersis) for this circuit.
 
I just need help with deriving the equations.
Off the top of my head .....aaaaaaaaaaaaaaaaaa......
Pretend pin3 has a pull up resistor of 100k and a pull down resistor of 100k. That gives us 2.5Volts.
When Vo= near 0V then there is a 6.8meg resistor across the pull down resistor.
When V0= near 11V (as high as the LM324 can pull) then the 6.8meg resistor pulls up.
You can think about this approximation:
11V-2.5V=8.5V or the voltage across R6.
Current pulling up on pin3 is 8.5V/6.8meg. = 1.25uA.
You can also think about pin3 as having 100k//100k=50k ohms. (it will look like 50k to 2.5V) OR (100k to 5V//100k to 0V)
upload_2017-10-23_15-5-42.png

So you can solve by "resistor divider" or by summing up the current in a node.
It is a little complicated because part of your POT is pulling up and part is pulling down.
Very approximately, the impedance on pin3 is about 50k to some voltage (maybe 2.5) and R6 is 6.8meg pulling down to 0 or up to 11 volts. Pulling up is about 1.25uA and pulling down is about 0.36uA. (total is 1.61uA) R6 will offset the voltage on pin3 by 1.6uA/50k.
 
The Theavenin equivalent resistance for R3, R4 and R5 will vary as you sweep R5's cursor.
From 44.6k to 67.8k

Which means that the amount of hysteresis, assuming that U1's Voh is about 10.5 volt, will vary from about 69 to 104 mV.

If you are using a LM324, please wire one of the remaining three unused opamps as a unity-gain follower.
You can then add at its output another resistor (R7) to fix the hysteresis at a known and stable value.
 
Vo for a LM324 will depend on its load current (i.e. if Vout drives some external load not shown in the schematic). Lightly loaded, VoutHigh will be about 12V-1.5v = 10.5V and VoutLow will be about 10mV
 
The datasheet for the LM324 and LM358 says that its inputs do not work if they are within 1.5V from the positive supply.
 
With the pot centered, LTSpice says that the Schmitt will snap high when R1 increases through 16.23KΩ, and snap low when R1 decreases through 14.96KΩ.
I'm not about to calculate it... That requires more algebra than I want to deal with...

324s.png

R1 is proportional to V(s).

Notice the little step in V(ni) caused by the positive feedback through R6. The DC levels at V(i) and V(ni) should make audioguru rest easy...

Also notice the high and low levels at V(out). Look familiar?

Write back if you need to know the trigger points with the pot other than centered.

ps, here is the .asc file for the circuit, and the LM324.txt file for the opamp.
 

Attachments

  • 324s.asc
    2.1 KB · Views: 289
  • LM324.txt
    1.1 KB · Views: 305
Last edited:
Mike,
Please attach your SPICE file.
For those learning SPICE, look at how Mike made a POT and stepped through the values.
thanks
Ron
 
Sim files added to post #10.

This shows how the trip points move as the pot is adjusted. This simulation shows five runs of varying R1, with the pot set at 10% from the bottom (green), 30% from the bottom (yellow), ... , 90% from the bottom (violet). By using the two cursors on the plot, here are the results:

Pot R1 R1
pos up dn
10% 32.0 29.9
30% 22.3 20.5
50% 16.3 15.0
70% 12.1 11.1
90% 9.07 8.33, where the trip point resistances are in KΩ

324m.png
 
Last edited:
**broken link removed**
by Google https://www.google.com/search?q=+op+amp+comparator+threshold+hysteresis+calculator+online

though it should be quite simple to deduce a formula (for ideal op amp) if the resistor values are known

this might be helpful (not verified to be typo free) ← this might leave wrong impression about the actually required - so i made it to "half a way"
IMG_9955.gif → bug fix. : Ux = Ku·(U2 - U1) + OpAmp's Internal Ground (= usually (Vcc + Vee) / 2 , on the attached schm. OAiG =apx. Us /2)
here we don't have neg feedback so the hysterresis assumes the OUTP voltage being either
  1. Zero + α -- occurs when +INP < -INP
  2. Vs - ß -- occurs when +INP > -INP
    where α and ß are Op Amp's offsets from Neg and Pos rail respectively
  • -- so we have to consider only the "helpful formula" where it sets the +INP when the OUTP has fixed eigther near the + or - rail
    + . . . usually the inverting inp ( -IN ) is used for reference voltage that sets the hysterresis center - - if we use it for input signal we vary that center - - PS! - - that most likely sets your hysterresis to be input dependent !!!
  • update : in simple form it actually goes like :
    1. +INP < -INP output = Neg.Rail so the 6M8 Ω goes in parallel with lower part of the voltage divider at +INP
    2. +INP > -INP output = Pos.Rail so the 6M8 Ω goes in parallel with higher part of the voltage divider at +INP
+spice versus math
Draft_3-ple_V-Div.png
----------------
+ comparative upload Doc1Hyst
 

Attachments

  • Doc1Hyst.doc
    582.5 KB · Views: 306
Last edited:
Now you see why I prefer to let the simulator do it for me...;)

There are times when I use a soldering iron and just try resistors. 10k=no, 12k=maybe, 22k=works, 30k=no.
In spice you can do the same thing.
.step param w LIST .4 .5 .6 .7 .8
w=0.4 on the first pass and w=0.8 in the last try. "list"
Here I can set a value (resistance, cap., voltage or something) so a voltage can be 0.4 or 0.5 etc volts.
There are many options under ".step......."

I have not in LTSpice, but in P-Spice you can set the components to +/-10% and 5% and 1% then run with all the combinations of R1=+10% while R2=-10%. (this is a production engineering problem)
For hobby electronics you are building only one. For production you might be making 1000s a day. Some of the circuits on the forum, will not work in production because of "tolerance stack up".

Two very nice reasons to learn SPICE.
You can try many values and see what happens.
You can see what happens with part tolerances. What happens if bate= 50 or 200 or 500. Years ago we would sort through 1000s of parts looking for a low gain and a very high gain part to see what happens.
 
I understand the circuit operation, I just need help with deriving the equations.
You are going to get it. Actually it is quite simple. Just an application of the node method. I used a computer program to solve the equations, but it is not much more difficult with a hand calculator. Although is is not necessary to worry about the output of the op amp because the high resistance of R6, I will include it anyway. Even though the op amp cannot go up/down to the full 12 volts, I will use that voltage regardless. All six equations have only one unknown, so the solutions are simple. Here goes.

1 ) Lowest pot setting and Vo stuck at -12 volts.

for a solution V+ = 0.929618 volts.

2) Middle pot setting and Vo stuck at -12 volts.

for a solution of V+ = 1.78791 volts.

3) Highest pot setting and Vo stuck at -12 volts.

for a solution of V+ = 2.67967 volts

4) Lowest pot setting and Vo stuck at +12 volts.

for a solution of Vo = 1.0814 volts.

5) Middle pot setting and Vo stuck at +12 volts.
for a solution of V+ = 2.01615 volts.

6) Highest pot setting and Vo stuck at +12 volts.
for a solution of V+ = 2.91669 volts.

As you can see, the voltages taking into consideration Vo are not much different than ignoring Vo because of the high resistance of R6.

Ratch
 

Attachments

  • jpg1.JPG
    jpg1.JPG
    10.9 KB · Views: 302
  • jpg2.JPG
    jpg2.JPG
    11.5 KB · Views: 312
  • jpg3.JPG
    jpg3.JPG
    10.9 KB · Views: 308
  • jpg4.JPG
    jpg4.JPG
    10.9 KB · Views: 294
  • jpg5.JPG
    jpg5.JPG
    11.6 KB · Views: 290
  • jpg6.JPG
    jpg6.JPG
    11 KB · Views: 299
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top