Why cap needed at Schmitt output?

I've isolated the cause of the problem I described in my post 'Simple toggle circuit?' I'd either forgotten including one in previous toggle circuits (about a decade ago) or I got away without doing so. But it's apparently essential to place a small capacitor at the output of a

4001 Schmitt. Without that there's hf noise, so the 4013 bistable obviously doesn't work properly.

But why is it necessary anyway please? Why doesn't the following circuit give a clean output as it stands?

formatting link

Trial/error led me to a 10nF cap. Much larger made the risetime too slow. Even the 10nF gave a risetime of close to 30uS which I thought might be close to the 4013 spec for clock input signals, yet in maybe fifty tests it didn't fail once. Using 2.2nF, about 1 in 5 tests gave a spurious result.

Here's what it looked like before adding the cap:

formatting link

--------------------

I've raised this as a separate thread as I'd still like to get recommendations about alternative simple toggle circuits please.

--
Terry, East Grinstead, UK
Reply to
Terry Pinnell
Loading thread data ...

Put a small cap across the 10M (10pF+?).

Probably you have too much negative feedback capacitance (from the first output pin), making it oscillate instead of latch.

Tim

Seven Transistor Labs, LLC Electrical Engineering Consultation and Contract Design Website:

formatting link

I've isolated the cause of the problem I described in my post 'Simple toggle circuit?' I'd either forgotten including one in previous toggle circuits (about a decade ago) or I got away without doing so. But it's apparently essential to place a small capacitor at the output of a

4001 Schmitt. Without that there's hf noise, so the 4013 bistable obviously doesn't work properly.

But why is it necessary anyway please? Why doesn't the following circuit give a clean output as it stands?

formatting link

Trial/error led me to a 10nF cap. Much larger made the risetime too slow. Even the 10nF gave a risetime of close to 30uS which I thought might be close to the 4013 spec for clock input signals, yet in maybe fifty tests it didn't fail once. Using 2.2nF, about 1 in 5 tests gave a spurious result.

Here's what it looked like before adding the cap:

formatting link

--------------------

I've raised this as a separate thread as I'd still like to get recommendations about alternative simple toggle circuits please.

--
Terry, East Grinstead, UK
Reply to
Tim Williams

Why are you using a bodged-together pair of gates when you could use a schmitt-trigger chip instead? Something like a 4093?

Or, why not use a comparator, like an LM393? Or, if the LM393 output doesn't rise fast enough with a reasonable pull-up resistor, some newer comparator chip with a push-pull output?

I'm pretty sure that your Schmitt trigger circuit is oscillating as the output gate goes into its linear region. If you're just bound and determined to stick with it, then the first thing you should do (if you haven't already) is properly bypass the chip with a 100nF cap. The second thing you should do is pay close attention to layout -- if you're doing this on a proto-board, make sure that all the wiring is short and direct, not sticking four inches up into the air. Finally, the other Tim's suggestion of a cap in parallel with the 10M-ohm resistor (instead of the output cap) may help speed up the transition to the point where the thing doesn't have time to oscillate.

--
www.wescottdesign.com
Reply to
Tim Wescott

Hi Terry

An old EMC test engineer that I knew used to say "It's much easier to build a radio than not to build a radio!" and it looks like you've just built a nice little (regenerative) radio ...

Why? I think that there may be several reasons, feedback being the most critical one and noise from radio waves coming up as a close second.

For one thing, the feedback circuit of your homemade Schmitt looks like a band-reject filter. In the schematic, it only consists of one 10M resistor, but in reality you'd have to include the strays and component parasitics as well. That 10M forms a low-pass together with the input capacitance of the chip (which is likely a dozen pF). In addition, the stray capacitance across that same 10M also forms a high-pass filter at sufficiently high frequencies. Note that both the high-pass and the low-pass are essentially in parallel and both are in the positive feedback loop. This way you get an "amplifier" with positive feedback in

2 distinct frequency ranges - the first one is low and includes DC up to the dozens of kHz region, the second one is from several MHz and up.

As you may remember from basic control theory, a system with positive feedback and over-unity gain (at some frequency) will oscillate (at that same frequency). In your case, there are 2 distinct frequencies at the same time where that condition is satisfied, and therefore where oscillation may happen - one is low and it includes DC and the other one is high. The low one is not a problem. Because it's nice and the maximum gain is at DC, the "oscillation frequency" will be zero (DC) - that is the Schmitt will "rail" and provide a stable DC output. This is indeed its intended function. But wait, there is still that other frequency where the instability condition may be satisfied, and that frequency is somewhere in the upper MHz. Now, when the logic input is either stable at LOW or stable at HIGH, the gate has essentially zero gain, so the whole feedback thing won't have over-unity gain at ANY frequency. However, in the transition region as the gates become linear, the gain of the gate chain goes way up, and it may peak at incredibly high values (90 dB or more would not be unlikely). At that kind of open-loop gain, even a little positive feedback is enough to provide over-unity closed-loop gain. In fact, strays and parasitics can do that more than well enough. The results - you've seen them :)

Now, for a properly constructed Schmitt trigger to function, it must have stable closed-loop gain with positive feedback over the frequency range where the underlying amplifier has open-loop gain, and that entire frequency range must be covered as a continuous range without gaps, with the peak gain being at DC. For best results, the gain should be mostly flat over a wide frequency range, then fall monotonically with rising frequency as the limits of the amplifier are approached. If the gain plot has any "humps", they should be small compared to the gain at DC. That way a Schmitt trigger will operate reliably over the entire permissible input frequency range and it will "snap" to its intended target logic state cleanly no matter what frequencies are present in the input signal (or in the radio waves around).

Leaving a gap in the closed-loop frequency response (band-reject filter behavior) will invite oscillation in the frequency region above that gap during the time where the low frequency part of the input (slowly) passes through the linear region. So, to make the Schmitt "nice and snappy", you'll have to close that gap.

To close the gap, you can approach it from above and from below (in the frequency domain). You approach it "from below" by making the feedback resistors low-impedance. Replacing the 10M and 1M resistors by 47k and

4k7 respectively will be a step in the right direction. That way the cut-off frequency of the low-pass formed by the feedback resistors and the gate input capacitance will rise accordingly. Also the "depth" of the filter's "notch" will flatten out. You also approach it "from above" by connecting a small bypass capacitor in parallel to the 10M (now hopefully already 47k) resistor. 1 nF or thereabouts should be plenty. This will lower the cutoff frequency of the high-pass part of the filter. This way, you can get the cutoff frequencies of the two filter halves (low-pass and high-pass) to approach - and finally to intersect each other, and once they intersect, there will be no more notch and no more band to be rejected. This way you can get a stable coverage of the entire frequency range with positive feedback and a "snappy" Schmitt trigger action.

Of course, in addition to all this, one should not forget to properly bypass the power pins of any and all ICs that can operate at (have significant internal gain at) high frequencies.

Regards Dimitrij

Reply to
Dimitrij Klingbeil

The best "touch sensors" rely on coupling between rows and columns rather that some unknown capacitance to "somewhere". ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142     Skype: skypeanalog  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

Thanks all, appreciate the feedback so far.

Update: worked fine on breadboard as described earlier, but now fails after soldering up.

Here's a schematic:

formatting link

(Note: I also have a 47uF electrolytic across the supply, which forgot to draw.)

Will try the suggestions in the morning. I'll persist with this circuit for now as I've invested so much time on it already.

P.S: Dimitrij, could you spell out exactly what you mean by "properly bypass the power pins" please, for this circuit.

--
Terry, East Grinstead, UK
Reply to
Terry Pinnell

What does the "touch switch output" look like? ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142     Skype: skypeanalog  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

I've already shown that twice in this thread. In my initial post

formatting link

and again in this post, the blue signal.

--
Terry, East Grinstead, UK
Reply to
Terry Pinnell

Aha! I'm late to the discussion and missed that.

See the third example in this link...

uses a 555 timer as a noise-blanker. ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142     Skype: skypeanalog  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

Thanks, but looks way too complicated! Not what I'd call a 'simple toggle circuit'.

Terry, East Grinstead, UK

Reply to
terrypingm

Put a 100nF cap (0.1uF) at each chip, as close as you can reasonably locate it, with traces as short as you can reasonably make them from power and ground.

With typical DIPs I put the cap at the pin "1" end, with a very short lead to power and a lead the length of the DIP to ground. The purpose of the cap is to reduce ground bounce, so you do NOT want to route the wires from the cap to the chip pins three times around the board -- short and direct is what you want.

--

Tim Wescott 
Wescott Design Services 
http://www.wescottdesign.com
Reply to
Tim Wescott

Thanks Tim, I'll place those this morning. And try several other suggestion s.

Seems very odd to me. Intuitively, given that I had it working just fine on the bench, with several croc clips and probes connected, I'd have expected it to work on a 1" X 2" piece of neatly wired Veroboard. So, despite stari ng at it for ages without finding anything wrong, I'm still hoping to find some careless mistake.

Reply to
terrypingm

Did you look at all 3 schematics in that PDF?

Reply to
Tom Del Rosso

No, just the 555 one that Jim recommended. But that only briefly, as I found it too daunting, especially with no explanatory text. I'm a hobbyist, not a pro.

Terry, East Grinstead, UK

Reply to
terrypingm

The second and third both use 555's and there's nothing complex about the third.

Reply to
Tom Del Rosso

Pleased to report that I have it working again. I added decoupling caps acr oss the two ICs but the crucial step appeared to be implementing the sugges tion made by several of you to place a small cap across the 10M feedback re sistor. Used 2200pF and now toggling cleanly. Hope this survives final cons truction!

Many thanks for the help.

Terry, East Grinstead, UK

Reply to
terrypingm

That is normal, and to be expected when you make significant changes to the parasitic capacitance and inductance in a circuit, especially where they are working at 100s of MHz as in your circuit.

Consider and understand the reasons why experience professionals use manhattan or dead-bug techniques for prototypes, ignore breadboards, and are suspicious of veroboard.

Reply to
Tom Gardner

Yep. Just build as drawn ;-) ...Jim Thompson

-- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: skypeanalog | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at

formatting link
| 1962 | I love to cook with wine. Sometimes I even put it in the food.

Reply to
Jim Thompson

I seem to be catching Terry's posts second-hand. They don't seem to appear on GigaNews ?? ...Jim Thompson

--
| James E.Thompson                                 |    mens     | 
| Analog Innovations                               |     et      | 
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    | 
| San Tan Valley, AZ 85142     Skype: skypeanalog  |             | 
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  | 
| E-mail Icon at http://www.analog-innovations.com |    1962     | 
              
I love to cook with wine.     Sometimes I even put it in the food.
Reply to
Jim Thompson

Good advice!

The kind of veroboard where you have to cut long "traces" is particularly nasty in terms of parasitic capacitive effects.

The kind with single "dots" on the solder-side is much better. Here you can (and have to) make your own "traces" with wire, this way they tend not to become much longer than required.

However, for circuits with a reasonably low connection density I usually prefer boards with a DIP-IC-style pattern.

Like this one:

formatting link

Here one can make reasonably solid ground connections, the crossbar patterns allow for space-efficient pull-up / pull-down construction. Most important, the signal pads are reasonably small and parasitics won't dominate circuit performance if you take some care.

Regards Dimitrij

Reply to
Dimitrij Klingbeil

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.