11567 views|13 replies

40

Posts

0

Resources
The OP
 

Why is the square wave output of the LM339 comparator distorted? [Copy link]

 
It is an amplifier itself, and I want to amplify a 125kHz square wave. There is a power amplifier in front of it, but this power amplifier will turn the square wave into a sine wave. Now I want to use a comparator to change it back into a square wave. The input of the comparator is an amplified sine wave, which is then input into the LM339 chip. The output becomes a strange distorted square wave (the amplitude is correct), but the simulation is almost a standard square wave. Now I don't know where the problem is. The actual welding is correct, but I don't know which component to change to correct it, because the simulation is correct. I would like to ask the great god for advice. Thank you very much!

E746B11EE4B70CE7BBC6929D19F46D46.png (928.87 KB, downloads: 0)

E746B11EE4B70CE7BBC6929D19F46D46.png

QQ截图20180509192519.png (13.33 KB, downloads: 0)

仿真波形

仿真波形

IMG_0943.JPG (2.69 MB, downloads: 0)

实际实物波形

实际实物波形
This post is from Analog electronics

Latest reply

"If I use LM339, how can I make the rising edge of this square wave steeper? Can I reduce the resistance of the pull-up resistor as you said before?" The pull-up resistor needs to be reduced to 1 kilo-ohm or even smaller, so that the 125kHz square wave is barely acceptable.  Details Published on 2018-5-9 22:49

2w

Posts

0

Resources
2
 
1. The LM339 non-inverting input terminal is not allowed to be directly connected to the positive terminal of the power supply. 2. The reason for the output waveform to tilt upward may be that the value of R10 is too large.
This post is from Analog electronics
 
 

374

Posts

3

Resources
3
 
LM339 output has no pull-up
This post is from Analog electronics

Comments

The output of LM339 has a pull-up resistor, R10, which is connected to the positive terminal of 24V. However, the two power pins of LM339 are quite strange, with pin 3 connected to 24V and pin 12 connected to 5V power supply.  Details Published on 2018-5-9 20:52
 
 
 
 

2w

Posts

0

Resources
4
 
wenyangzeng published on 2018-5-9 19:57 LM339 output has no pull-up
LM339 output has pull-up, the pull-up resistor is R10, connected to the 24V positive terminal. However, the two power pins of LM339 are strange, pin 3 is connected to 24V, and pin 12 is connected to 5V power supply.
This post is from Analog electronics
 
 
 
 

40

Posts

0

Resources
5
 
This post was last edited by Kurtaiu on 2018-5-9 21:47
maychang posted on 2018-5-9 20:52 The output end of LM339 has a pull-up, and the pull-up resistor is R10, which is connected to the 24V positive terminal. The two power pins of LM339 are rather strange, with pin 3 connected to 24V...
Well, the comparator, the front end is an amplifier, the purpose is to amplify the amplitude of the input square wave, there is no such comparator originally, I added it later, the output from L2 became a sine wave, I thought of using the comparator to convert the sine wave into a square wave, since the whole system needs to have an amplification effect, I probably want to set the peak-to-peak value to 24-5=19, the peak-to-peak value output of the signal generator is 8, it has both an amplification effect and a square wave, so 24V and 5V are set by myself, after all, the working voltage of the chip seems not to exceed 30V, if the 5V end is grounded, the simulation is not correct, so there is such a combination, but the simulation is correct, the real object is distorted, so I don't know what to do...
This post is from Analog electronics

Comments

The front section is an amplifier, the purpose is to amplify the input square wave amplitude. There is no comparator originally, I added it later. After adding the comparator, it can no longer be linearly amplified. What this means is that the amplitude of the output square wave is not proportional to the input signal. Therefore, Q1, Q2 and Q3 and their associated circuits are  Details Published on 2018-5-9 21:55
The front section is an amplifier, the purpose is to amplify the input square wave amplitude. There is no comparator originally, I added it later. After adding the comparator, it can no longer be linearly amplified. What this means is that the amplitude of the output square wave is not proportional to the input signal. Therefore, Q1, Q2 and Q3 and their associated circuits are  Details Published on 2018-5-9 21:52
The front section is an amplifier, the purpose is to amplify the input square wave amplitude. There is no comparator originally, I added it later. After adding the comparator, it can no longer be linearly amplified. What this means is that the amplitude of the output square wave is not proportional to the input signal. Therefore, Q1, Q2 and Q3 and their associated circuits are  Details Published on 2018-5-9 21:50
 
 
 
 

2w

Posts

0

Resources
6
 
Kurtaiu posted on 2018-5-9 21:44 Well, the comparator, the front section is an amplifier, the purpose is to amplify the input square wave amplitude, there is no such comparator originally, I added it later, ...
The front section is an amplifier, the purpose is to amplify the input square wave amplitude, there is no such comparator originally, I added it later, after adding the comparator, it can no longer be linearly amplified. What this means is that the amplitude of the output square wave is not proportional to the input signal. Therefore, Q1, Q2 and Q3 and their associated circuits are completely useless.
This post is from Analog electronics
 
 
 
 

2w

Posts

0

Resources
7
 
Kurtaiu posted on 2018-5-9 21:44 Well, the comparator, the front end is an amplifier, the purpose is to amplify the input square wave amplitude, there is no such comparator, I added it later, ...
It is true that the output from L2 is a sine wave. The circuit composed of Q1, Q2 and Q3 uses L2 and C3 as loads, and the output should be sine. Not to mention that the input end is connected to L1 and C1.
This post is from Analog electronics
 
 
 
 

2w

Posts

0

Resources
8
 
Kurtaiu posted on 2018-5-9 21:44 Well, the comparator, the front end is an amplifier, the purpose is to amplify the input square wave amplitude, there is no such comparator originally, I added it later, ...
This circuit, including U3A, Q1, Q2, Q3 and U2A, what is the purpose? What is the amplitude of the XFG1 output signal? What is the frequency?
This post is from Analog electronics
 
 
 
 

40

Posts

0

Resources
9
 
maychang posted on 2018-5-9 21:50 The front section is an amplifier, the purpose is to amplify the input square wave amplitude, there is no such comparator, I added it later...
I understand what you mean, thank you very much! This circuit itself cannot amplify the square wave into a square wave, it will become a sine wave. The output of the circuit should be at the black arrow in the figure below, but because of the inductor (it cannot be deleted due to requirements), the output is not a square wave. If the comparator is not used, what should be used to turn this sine wave into a square wave with amplified amplitude (no multiple required)?

QQ截图20180509215403.png (1004.01 KB, downloads: 0)

黑色箭头是原本的输出

黑色箭头是原本的输出
This post is from Analog electronics
 
 
 
 

40

Posts

0

Resources
10
 
This post was last edited by Kurtaiu on 2018-5-9 22:06
maychang posted on 2018-5-9 21:55 What is the purpose of this circuit, including U3A, Q1, Q2, Q3 and U2A? What is the amplitude of the output signal of XFG1? What is the frequency?
U3A is an inverter. It doesn't matter whether it has it or not. Q1, Q1, Q3 are used for amplification. The instructor didn't ask for the multiple, so the comparator was added later. XFG1 outputs a 125kHz square wave, 4Vpp. U2A is to shape the output sine wave into a square wave.
This post is from Analog electronics

Comments

125kHz is a frequency that exceeds audio, but it is not very high, lower than video. However, square waves contain a lot of high-order harmonics. If you consider the 20th order, your amplifier circuit bandwidth will have to be 2.5MHz, which is not easy. You need to think of some way to achieve a 2.5MHz bandwidth. If you limit yourself to using discrete transistors, you can  Details Published on 2018-5-9 22:23
 
 
 
 

2w

Posts

0

Resources
11
 
Kurtaiu published on 2018-5-9 22:01 U3A is an inverter. It doesn't matter whether it is there or not. Q1, Q1, Q3 are used for amplification. The instructor did not require the multiple, so the comparator XFG was added later...
The frequency of 125kHz has exceeded the audio frequency, but it is not very high, and it is lower than the video frequency. However, the square wave contains a lot of high-order harmonics. If you consider the 20th harmonic, the bandwidth of your amplifier circuit will be 2.5MHz, which is not easy. You need to think of some ways to achieve a bandwidth of 2.5MHz. If you are limited to using discrete transistors, you can refer to the video amplifier circuit of old TVs. If you can use integrated circuits, then look for op amps with large enough bandwidth.
This post is from Analog electronics

Comments

Thanks for your advice. If the circuit remains unchanged and I just want to change the output sine wave into a square wave, how can I make the shaping circuit better? If I use LM339, how can I make the rising edge of the square wave more jittery? Can I lower the pull-up resistor value as you said before?  Details Published on 2018-5-9 22:42
 
 
 
 

40

Posts

0

Resources
12
 
maychang posted on 2018-5-9 22:23 The frequency of 125kHz is beyond the audio frequency, but it is not very high, and it is lower than the video frequency. However, the square wave contains rich high-order harmonics. If you consider the 20th order, your amplifier...
Thank you for your advice. If the circuit remains unchanged and you just want to turn the output sine wave into a square wave, how can you make this shaping circuit better? If you use LM339, how can you make the rising edge of this square wave steeper? As you said before, can you reduce the resistance of the pull-up resistor?
This post is from Analog electronics

Comments

"If we use LM339, how can we make the rising edge of this square wave steeper? Can we reduce the pull-up resistor value as you said before?" The pull-up resistor needs to be reduced to 1 kilo-ohm or even smaller, so that the 125kHz square wave is barely acceptable.  Details Published on 2018-5-9 22:49
 
 
 
 

2w

Posts

0

Resources
13
 
Kurtaiu posted on 2018-5-9 22:42 Thank you for your advice. If the circuit does not change, and I just want to change the output sine wave into a square wave, how should I make this shaping circuit better? If I use LM339, ...
"If I use LM339, how can I make the rising edge of this square wave steeper? Can I reduce the resistance of the pull-up resistor as you said before?" The pull-up resistor needs to be reduced to 1 kilo-ohm or even smaller, so that the 125kHz square wave is barely acceptable.
This post is from Analog electronics

Comments

I'll give it a try tomorrow, thanks!  Details Published on 2018-5-9 23:04
 
 
 
 

40

Posts

0

Resources
14
 
maychang posted on 2018-5-9 22:49 "If we use LM339, how can we make the rising edge of this square wave steeper? Can we reduce the resistance of the pull-up resistor as you said before?" Pull-up...
I'll try it tomorrow, thank you!
This post is from Analog electronics
 
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list