Produce high frequency square wave

Reloadron

Joined Jan 15, 2015
7,580
Something else you may want to consider is just an off the shelf crystal oscillator. These are available from a wide range of manufacturers and distributors. Dale Vishay comes to mind but other manufacturers also make them. This all depends on the accuracy and stability you want or need but you get everything in a single small package and they can also be gated. The link is to a 1.0 MHz version which can easily be divided down using for example an old 7490 or any common divide by ten decade counter divider. This will afford you a nice clean accurate square wave which is very stable. The entire oscillator part is typically well below $5.00 USD. These are pretty much universally available and very inexpensive. You also get a nice symmetrical square wave.

Ron
 

Audioguru again

Joined Oct 21, 2019
6,783
Look it up, the lM741 opamp design is 53 years old and its datasheet shows that it has trouble producing an output above 9kHz.
For a 100khz squarewave you need a circuit that produces at least 1MHz but 2MHz will be better.
 

crutschow

Joined Mar 14, 2008
34,842
Hi, so a comparator can be used as an integrator or diffrentiator too right?
Wrong.
Comparators do not have the internal compensation needed for stable operation in such circuits.
Op amps do (which slows them down when you try to use them as comparators).
 

Thread Starter

MrsssSu

Joined Sep 28, 2021
266
Which is an RC exponential integration, not a linear integration.
1639223348752.png
Hi sir:), I saw this oscillator in the datasheet. Would this be good at producing 100kHz and can the negative rail voltage supply be a positive value that is less than the positive rail voltage ? This is because I tested the LM 741 with a positive supply voltage at its negative rail, it does not work :)
 

DickCappels

Joined Aug 21, 2008
10,246
Yes, those run at over 100 kHz if you use a fast enough comparator. I am using an LM319 to get upwards of 1 MHz with a similar oscillator. The LM393 might also work at 100 kHz.
 

Thread Starter

MrsssSu

Joined Sep 28, 2021
266
Yes, those run at over 100 kHz if you use a fast enough comparator. I am using an LM319 to get upwards of 1 MHz with a similar oscillator. The LM393 might also work at 100 kHz.
Wow. LM 319 is
Yes, those run at over 100 kHz if you use a fast enough comparator. I am using an LM319 to get upwards of 1 MHz with a similar oscillator. The LM393 might also work at 100 kHz.
Hi, thats awesome. So, the arrangement of components is the same as the circuit diagram above for LM 319 that you used right? Planning to buy LM 319 to produce this high frequency square wave. This LM 319 has 14pins right and can the negative rail be a negative voltage so that it can produce a (10V to -10V square wave) that oscillate about origin?
 

Audioguru again

Joined Oct 21, 2019
6,783
The 741 opamp was designed 53 years ago to use a power supply that is 30V. Most will not work if their supply is less than 10V. The 741 opamp has trouble (poor slew rate) above 9kHz.

If you use a negative rail voltage that is a positive value that is less than the positive supply voltage then their difference is the total supply which must be enough for the IC and then you are messing up the bias voltage that is supposed to be half the total supply voltage.

The opamp circuit in the first post has a dual supply with the ground (the opamp bias voltage) of the circuit at half the supply voltage.

The comparator circuit has a single positive supply and ground. It is also biased at half the supply voltage.
 

Attachments

Thread Starter

MrsssSu

Joined Sep 28, 2021
266
The 741 opamp was designed 53 years ago to use a power supply that is 30V. Most will not work if their supply is less than 10V. The 741 opamp has trouble (poor slew rate) above 9kHz.

If you use a negative rail voltage that is a positive value that is less than the positive supply voltage then their difference is the total supply which must be enough for the IC and then you are messing up the bias voltage that is supposed to be half the total supply voltage.

The opamp circuit in the first post has a dual supply with the ground (the opamp bias voltage) of the circuit at half the supply voltage.

The comparator circuit has a single positive supply and ground. It is also biased at half the supply voltage.
Hi, so this LM 319 can output negative voltage (-10V) if its negative supply voltage is -10V? Or it will be capped at 0V only?
 

DickCappels

Joined Aug 21, 2008
10,246
Wow. LM 319 is

Hi, thats awesome. So, the arrangement of components is the same as the circuit diagram above for LM 319 that you used right? Planning to buy LM 319 to produce this high frequency square wave. This LM 319 has 14pins right and can the negative rail be a negative voltage so that it can produce a (10V to -10V square wave) that oscillate about origin?
1639248059495.png
This (above) is the circuit I and others used. It is similar but this one uses and LC tank (C1 and Lx) connected to the non-inverting input of the LM319.

The LM319 is good for 36 volts so ±10 volts should be fine. If you use a split supply you will not need the resistor from (in the schematic above) +5V to the + input.
 

Thread Starter

MrsssSu

Joined Sep 28, 2021
266
1639986711721.png
1639986733815.png
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 :)
 

Alec_t

Joined Sep 17, 2013
14,408
Each comparator is open-collector and needs a pull-up resistor (say 10k) to the +9V supply rail.
The inputs of the unused comparator should not be left floating. Connect them to ground.
 

Thread Starter

MrsssSu

Joined Sep 28, 2021
266
Each comparator is open-collector and needs a pull-up resistor (say 10k) to the +9V supply rail.
The inputs of the unused comparator should not be left floating. Connect them to ground or 9V.
Hi, how do you attach the 10k to the 9V supply rail in my diagram. Can just label it :)
 
Top