Produce high frequency square wave

ScottWang

Joined Aug 23, 2012
7,501
I see why this is not working, try this modification:
View attachment 255659
In the original circuit with the pullup resistor added and pin 3 connected to ground the reference voltage for the + input goes to ground when the output goes LOW. At this point the capacitor cannot discharge low enough to switch the output back HIGH.
Added R3 to set the reference and R1 now provides hysteresis.
Check Post #8.
 

eetech00

Joined Jun 8, 2013
4,705
View attachment 255574
View attachment 255575
Hi People,

I am using an LM 319 High Speed Comparator to produce high frequency square wave as shown. However, from the first diagram, I assembled the connections based on second diagram, it does not work. The V+ and V- that is negative rail and positive rail I used is +9 and -9 V from 2
battery. Any suggestions how to make it work using LM 319 High Speed Comparator?

Thank you for reading :)
I used a LM119 but it is the same as the LM319.

See Below.
1640031998516.png
 

Thread Starter

MrsssSu

Joined Sep 28, 2021
267
I used a LM119 but it is the same as the LM319.

See Below.
View attachment 255663
Hi, I have tested your circuit and it works good at low frequency. But when I reached high frequency (100kHz above), the square waveform becomes very distorted as shown in my picture attached. Is this normal because I thought that this LM 319 is very good at high frequency and it is one of the best on the internet that I found? Or can the high gain be adjusted via a specific resistor?:)
 

Attachments

Last edited:

eetech00

Joined Jun 8, 2013
4,705
Hi, I have tested your circuit and it works good at low frequency. But when I reached high frequency (100kHz above), the square waveform becomes very distorted as shown in my picture attached. Is this normal because I thought that this LM 319 is very good at high frequency and it is one of the best on the internet that I found? :)
I think 100khz is pushing it but try raising the supply voltage to +/-15v and/or changing R/C to use a smaller cap value
Maybe 500p/15kohms. I don't have the part so can't bench test. Make sure you have good, short, connections.
 

Thread Starter

MrsssSu

Joined Sep 28, 2021
267
I think 100khz is pushing it but try raising the supply voltage to +/-15v and/or changing R/C to use a smaller cap value
Maybe 500p/15kohms. I don't have the part so can't bench test. Make sure you have good, short, connections.
Hi, theoretically, it should also produce a good square waveform at 100kHz right? I try to raise the voltage to +-20V and see the gain. And, I believe that my connections are not short enough, and my breadboard wires have a little capacitance to cause this slew rate which cause the square wave to have some hill slope. My LT spice shows that the circuit even at 1MHz, it will still produce a good high gain square wave.
 
Last edited:

ericgibbs

Joined Jan 29, 2010
21,442
I tested the circuit using a LM393 with a single 9 volt supply. Why did you choose R2 at 25K rather 330K?
Hi s,
I made an error when modifying the circuit layout.:rolleyes:

In LTS there is an 'Undo' icon, used to remove a previous change, it is easy to double-click by mistake, so removing another earlier change.! [I had changed it to 330k]
E
 

Thread Starter

MrsssSu

Joined Sep 28, 2021
267
Hi s,
I made an error when modifying the circuit layout.:rolleyes:

In LTS there is an 'Undo' icon, used to remove a previous change, it is easy to double-click by mistake, so removing another earlier change.! [I had changed it to 330k]
E
Hi eric, sorry to bother again. This LM 319 gives me bad square wave (it becomes a sine wave) at high freuqnecy above (100kHz) even if I used it as a comparator properly with open loop gain that is no feedback to the input. Like this, in the picture. Is this normal? Or what mistake I could have made?

Merry Christmas :)
 

Attachments

jjw

Joined Dec 24, 2013
823
Hi, theoretically, it should also produce a good square waveform at 100kHz right? I try to raise the voltage to +-20V and see the gain. And, I believe that my connections are not short enough, and my breadboard wires have a little capacitance to cause this slew rate which cause the square wave to have some hill slope. My LT spice shows that the circuit even at 1MHz, it will still produce a good high gain square wave.
With a fast square wave, what you can see is limited by your scope.
It has 200kHz analog bandwidth and sampling only 1Msa/s.
 

ericgibbs

Joined Jan 29, 2010
21,442
Hi Mrss,
This is what LTspice shows for that circuit, looks OK to me, 100kHz Sine wave input.
Please post a circuit showing EXACTLY how you have it wired and powered, also the input signal data.
E
EG 1153.png
 

Thread Starter

MrsssSu

Joined Sep 28, 2021
267
With a fast square wave, what you can see is limited by your scope.
It has 200kHz analog bandwidth and sampling only 1Msa/s.
Hi, so you are saying even if the chip is producing good square wave, it would appear to be quite a bad square wave in my scope because of my scope's limitations. :)
 

Thread Starter

MrsssSu

Joined Sep 28, 2021
267
it would appear to be quite a bad square wave in my scope because of my scope's limitations.

Yes.
it would appear to be quite a bad square wave in my scope because of my scope's limitations.

Yes.
Hi, I will post the circuit soon :). Thanks for help. By the way, DSO 138, the scope that is cheap that I am using here, It cant really measure a good square wave at 100kHz, is that what you are saying? Because this scope is so light and small, so maybe it cant really give a good reading at high frequency.:)
 

Thread Starter

MrsssSu

Joined Sep 28, 2021
267
Hi, I have tested your circuit and it works good at low frequency. But when I reached high frequency (100kHz above), the square waveform becomes very distorted as shown in my picture attached. Is this normal because I thought that this LM 319 is very good at high frequency and it is one of the best on the internet that I found? Or can the high gain be adjusted via a specific resistor?:)
Can this be the oscillioscope's limitation problem?
 

ericgibbs

Joined Jan 29, 2010
21,442
hi,
One way to check is to make up a 555 timer, 100kHz Astable and Scope pin#3, or use a Signal generator to check your Scope.
What model and make is the Scope,?
E
 

crutschow

Joined Mar 14, 2008
38,512
A man's got to know his (instruments) limitations. ;)
To see a 100kHz square-wave, the scope should have a bandwidth of at least 1MHz, more if you want to see a fast risetime.
An approximate rule-of-thumb for digital scopes is: Bandwidth x rise time = 0.45.
Thus your DSO 138 200kHz scope likely has a risetime (for a step input) of about 2.25µs.
 
Last edited:
Top