Good day folks. Pretty complicated project on my hands here, so please bare with me, as there's no way I can keep it brief: I need to design a circuit which only triggers (its output goes high) when a certain voltage threshold is reached. Of course, we're looking at a Schmitt trigger.
I looked into it and thanks to Dave from EEV, I kinda grasped the concept of how they work and how you build one with an op amp, however when it comes to actually simulating it and putting it to the test, it gets extremely complex.
In his tutorial, Dave demonstrated an inverting Schmitt trigger, meaning its output goes high when the input goes low and vice versa - I don't need that. What I need it to do is go high when the input is high, so we have the non-inverting configuration for that (I started off with wiki here). The inverting input is grounded and the non-inverting one is connected to two resistors: R1 goes to the input (my control signal) and it forms a divider with R2 which comes from the output of the op amp. Now it's time for the math, which is where my head starts spinning as always. The formula for the upper and lower thresholds appears to be, though I may be wrong, UT or LT (upper or lower)=(R1/R2)*Vs, where Vs is the maximum voltage the op amp can reach. This theory appears to be correct and a crude simulation seemed to work. I tried it as follows: R1 is 1k, R2 is 10k and the upper rail of the op amp is 10v...calculate that and I get a threshold of 1, meaning the output swings negative when the input is roughly -1v and it goes back to positive when it goes to 1v....good.....but not so fast :|
You see, everything I read and tried so far demonstrates a split-supply circuit, where the op amp has both + and - voltage rails. In other words, the output can swing both positive AND negative, while the inverting input remains the very middle (to 0v GND). This is where I'm facing difficulties, as my circuit is a single rail circuit, meaning there's no negative rail - instead the lowest I can go is ground or zero V, which messes up the math big time. From what I understand, there IS a way for this to work with a single-rail supply as well and it involves biasing: remember how earlier I said the inverting input was tied to ground (0v) ? Biasing apparently involves connecting the inverting input to a more positive voltage instead of ground, so now our thresholds are "shifted" away from 0v, with this biasing voltage becoming our new "zero" (halfway) point between the two thresholds so to say......confusing, I know. This is actually what I need help with: I came across a calculator which does the math for you (here), but it doesn't tell you the formulas and how it obtains those numbers, so it's only useful up to a point. When I provided those ideal round numbers, it worked perfectly and the math made perfect sense (see the above example: round numbers, positive AND negative rails, simple, perfect).
However, when I could no longer "go negative" and the lowest I could go was 0v, I got stuck: set the "low threshold" to 0 (can't go lower than that), set the "High threshold" to 2 let's say, set the "Output voltage high" to 10v and the "Output voltage low" to 0 (so the op amp can now only go to GND): the resistor values I get are 2k and 10k.....that's fine, but this time, the calculator adds the biasing voltage as "Vref" further down as 1.667v. While I do understand what it does (it's exactly the biasing I was talking about), I COULD NOT figure out how it obtains those numbers and makes things even more annoying. Funnily enough, if I simulate using those numbers, it DOES seem to work. I came across a very complex and detailed paper here which has a lot of formulae but no examples and I really busted my balls trying to work them out...check out page 14, it's exactly what I'm interested in: a non-inverting Schmitt trigger with a reference voltage higher than GND (the reference can't be GND in my case, since my input can't swing lower than 0v). Formula 1.20: I can't work out how to derive Vref from that formula. In other words, I don't understand how the calculator gave me the value it did (1.667v). And of course these are all "rounded" examples - I'll need to have some stable formulae to adapt the numbers to my needs....once I get it down it will be easy. The first step is always the hardest is what they say
Cheers guys and thanks for taking your time to help
I looked into it and thanks to Dave from EEV, I kinda grasped the concept of how they work and how you build one with an op amp, however when it comes to actually simulating it and putting it to the test, it gets extremely complex.
In his tutorial, Dave demonstrated an inverting Schmitt trigger, meaning its output goes high when the input goes low and vice versa - I don't need that. What I need it to do is go high when the input is high, so we have the non-inverting configuration for that (I started off with wiki here). The inverting input is grounded and the non-inverting one is connected to two resistors: R1 goes to the input (my control signal) and it forms a divider with R2 which comes from the output of the op amp. Now it's time for the math, which is where my head starts spinning as always. The formula for the upper and lower thresholds appears to be, though I may be wrong, UT or LT (upper or lower)=(R1/R2)*Vs, where Vs is the maximum voltage the op amp can reach. This theory appears to be correct and a crude simulation seemed to work. I tried it as follows: R1 is 1k, R2 is 10k and the upper rail of the op amp is 10v...calculate that and I get a threshold of 1, meaning the output swings negative when the input is roughly -1v and it goes back to positive when it goes to 1v....good.....but not so fast :|
You see, everything I read and tried so far demonstrates a split-supply circuit, where the op amp has both + and - voltage rails. In other words, the output can swing both positive AND negative, while the inverting input remains the very middle (to 0v GND). This is where I'm facing difficulties, as my circuit is a single rail circuit, meaning there's no negative rail - instead the lowest I can go is ground or zero V, which messes up the math big time. From what I understand, there IS a way for this to work with a single-rail supply as well and it involves biasing: remember how earlier I said the inverting input was tied to ground (0v) ? Biasing apparently involves connecting the inverting input to a more positive voltage instead of ground, so now our thresholds are "shifted" away from 0v, with this biasing voltage becoming our new "zero" (halfway) point between the two thresholds so to say......confusing, I know. This is actually what I need help with: I came across a calculator which does the math for you (here), but it doesn't tell you the formulas and how it obtains those numbers, so it's only useful up to a point. When I provided those ideal round numbers, it worked perfectly and the math made perfect sense (see the above example: round numbers, positive AND negative rails, simple, perfect).
However, when I could no longer "go negative" and the lowest I could go was 0v, I got stuck: set the "low threshold" to 0 (can't go lower than that), set the "High threshold" to 2 let's say, set the "Output voltage high" to 10v and the "Output voltage low" to 0 (so the op amp can now only go to GND): the resistor values I get are 2k and 10k.....that's fine, but this time, the calculator adds the biasing voltage as "Vref" further down as 1.667v. While I do understand what it does (it's exactly the biasing I was talking about), I COULD NOT figure out how it obtains those numbers and makes things even more annoying. Funnily enough, if I simulate using those numbers, it DOES seem to work. I came across a very complex and detailed paper here which has a lot of formulae but no examples and I really busted my balls trying to work them out...check out page 14, it's exactly what I'm interested in: a non-inverting Schmitt trigger with a reference voltage higher than GND (the reference can't be GND in my case, since my input can't swing lower than 0v). Formula 1.20: I can't work out how to derive Vref from that formula. In other words, I don't understand how the calculator gave me the value it did (1.667v). And of course these are all "rounded" examples - I'll need to have some stable formulae to adapt the numbers to my needs....once I get it down it will be easy. The first step is always the hardest is what they say


Comment