I have a dubt about Schmitt Waveform Generator

Hallo everybody,
I am approaching waveform generation and stuff like that. So i came to this article http://www.electronics-tutorials.ws/waveforms/generators.html which I find interesting :slight_smile: But things don't work like exposed :frowning:

I wired immediately the "CMOS Schmitt Waveform Generator" circuit (in order to get an Astable Multivibrator):

using a 5V DC supply (not 9V like the example) and using a CY7C68013A Mini Board Digital Analyzer (I don't have an oscilloscope) to inspect the generated wave. As of now I'm mostly interested in getting a steady square wave at a constant frequency. So I'm trying to get the desired frequency first ... but I don't :frowning:

The problem to me is that the article says I should get a frequency f = 1 / (1.2 * R * C) but I get f ~= 1 / 0.7 (R * C) instead.

The wave seems to be quite steady, with a duty cycle close to 50%, which is good :slight_smile: but the frequency if somewhat off. I used various combinations of R and C, always producing quite the same result. I decoupled the 5V supply, and grounded every unused Input of the IC.

So I wonder what's going on, maybe I am missing something? Is this maybe related to the "propagation delay" that changes with Vdd?

I'd be quite happy to use the circuit as it is right now (with the "corrected" formula) but only if that doesn't hide some mistake on my behalf.

robitabu:
using a 5V DC supply (not 9V like the example)

the article says I should get a frequency f = 1 / (1.2 * R * C) but I get f ~= 1 / 0.7 (R * C)

9.0 / 5.0 = 1.8

1.2 / 0.7 = 1.7

I suspect those values are too similar for it to be a coincidence.

fungus:
9.0 / 5.0 = 1.8
1.2 / 0.7 = 1.7
I suspect those values are too similar for it to be a coincidence.

I thought about that too. Other than being a supposition ... any direct evidence/explanation? :slight_smile:

The frequency is critically dependent on the hysteresis of the 40106 or (more usually,) 74HC14 gate series for that particular manufacturer, so the formula cited is at best an extremely rough approximation. It will vary from brand to brand.

Clearly you simply have to "tweak" the values - generally the resistor - to get the desired frequency.

I am scratching my head at the explanation for the presence of the 10k resistor; there may be some reason for it, possibly to do with powering the circuit off, but that given is nonsense.

Mike - what do you think?

Yes I never use a resistor in the place of that 10K.
Mind you I usually use a TTL gate for this, something like a 74LS13. Also only one oscillator per chip because if you try and use the other the frequency of one will pull the other.

Paul__B:
Clearly you simply have to "tweak" the values - generally the resistor - to get the desired frequency.

I can live with that :slight_smile:

I am scratching my head at the explanation for the presence of the 10k resistor; there may be some reason for it, possibly to do with powering the circuit off, but that given is nonsense.

You mean "the 10k? resistor which is used to prevent the capacitor from damaging the sensitive MOSFET input transistors ..." makes no sense to you?

You mean "the 10k? resistor which is used to prevent the capacitor from damaging the sensitive MOSFET input transistors ..." makes no sense to you?

No absolutely no sense, why would it protect anything and from what?

Grumpy_Mike:

You mean "the 10k? resistor which is used to prevent the capacitor from damaging the sensitive MOSFET input transistors ..." makes no sense to you?

No absolutely no sense, why would it protect anything and from what?

Mmhh ... ok.

Anyway, apart from that, would you say that the article http://www.electronics-tutorials.ws/waveforms/generators.html has to be taken seriously? Or should I be skeptical about what it states? It's all relatively new to me, so I'd better learn something meaningfull in the first place and not waste my time on questionable theses.

It says:-

The Schmitt waveform generators circuit for the CMOS 40106 is basically the same as that for the previous TTL 74LS14 inverter, except for the addition of the 10k? resistor which is used to prevent the capacitor from damaging the sensitive MOSFET input transistors as it discharges rapidly at higher frequencies.

But I don't see the point. It is not as if the capacitor discharges through the input pin. The discharge path is through the other resistor to the output. I can not see what they are on about.
Otherwise the rest of the stuff looks fine, and I won't do any harm having that resistor in there.

Grumpy_Mike:
It says:-

The Schmitt waveform generators circuit for the CMOS 40106 is basically the same as that for the previous TTL 74LS14 inverter, except for the addition of the 10k? resistor which is used to prevent the capacitor from damaging the sensitive MOSFET input transistors as it discharges rapidly at higher frequencies.

But I don't see the point. It is not as if the capacitor discharges through the input pin. The discharge path is through the other resistor to the output. I can not see what they are on about.
Otherwise the rest of the stuff looks fine, and I won't do any harm having that resistor in there.

Thank you Mike, you are precious as always :slight_smile:

In the meanwhile, I run the circuit with both a HEF40106B and a SN74HC14 (both are Schmitt trigger inverter) with consistent results. I will fix the freq manually finding out which RC combination gets me the 38kHz Carrier I am looking for.

robitabu:
I will fix the freq manually finding out which RC combination gets me the 38kHz Carrier I am looking for.

You probably need to add a trimmer potentiometer.

38KHz carrier? That sounds like IR remote control in which case it doesn't usually need to be very precise. The receivers usually trigger with a couple of kHz either way.

fungus:
You probably need to add a trimmer potentiometer.

Once I find the correct combination I will use a resistor. Don't need no variable stuff in this case.

38KHz carrier? That sounds like IR remote control ...

Exactly! You are spot on :slight_smile:

Everything started with me trying to clone an IR Remote Control. I got it working with a library, a little investigation, and an Arduino UNO equipped with an IR Led and a resistor.

From there on I got into oscillators and waveforms, I wanted to learn more and I started reading about the simplest circuits that could produce such things.

Now I'm going to learn how to superimpose a low freq signal generated with an Atmega328 on top of a 38kHz carrier (or the opposite, you know what I mean ... IR marks and spaces) made with the above mentioned gate.

The 10k resistor prevents the capacitor discharging large currents through the input
protection diode of the input when the power is cut. If the cap is large this could be
necessary (if small compared to all the decoupling on the supply its probably a non-issue).

The circuit gives C as anywhere from 1pF to 100uF....

robitabu:
Now I'm going to learn how to superimpose a low freq signal generated with an Atmega328 on top of a 38kHz carrier (or the opposite, you know what I mean ... IR marks and spaces) made with the above mentioned gate.

Dead easy. You just use a diode (and if you are fussy, a resistor of less than 1/10 the value of the timing resistor - to limit the discharge current) to pull the timing capacitor to whichever state corresponds to the IR sending LEDs to be off.

For this application, the duty cycle is quite uncritical.

MarkT: That's what I figured (and explained) as well; certainly irrelevant for the frequency (and thus capacitor value) in question. Just very poorly explained in the article which is otherwise OK.

MarkT:
The 10k resistor prevents the capacitor discharging large currents through the input
protection diode of the input when the power is cut. If the cap is large this could be
necessary (if small compared to all the decoupling on the supply its probably a non-issue).

The circuit gives C as anywhere from 1pF to 100uF....

Thanks MarkT, that makes sense. +1