13743 views|26 replies

306

Posts

0

Resources
The OP
 

What are the methods to generate 4 square wave signals with different frequencies? [Copy link]

 
       The question is this: I want to generate 4 square wave signals with different frequencies. The frequency of the signal is controlled at tens of kHz, but the frequency accuracy is very high. For example, if 12kHz is required, the frequency of the generated square wave must reach 11.9999kHz. And this square wave signal must be transmitted through a wire of about 1m (using the wire of a multimeter probe). Therefore, the generated square wave signal not only has high frequency accuracy, but also has a value of 3.3V and strong load capacity. What I think of now is: use the PWM output function of the STM32 microcontroller timer, and then use a logic NOT gate with push-to-output to enhance the load capacity. What other commonly used methods are there? If the waveform generation principle of a function generator is used, will it be complicated?
This post is from Analog electronics

Latest reply

There is no way. There is a "salt bath quenching" in industrial heat treatment, which uses sodium chloride, which is table salt. Industrial-grade sodium chloride is very cheap, a bag of 25 kilograms, not much money, much cheaper than the table salt in the supermarket. Chemical reagent stores also sell sodium chloride, a bottle of 1 kilogram, high purity, may cost several hundred yuan. There is no way, the purity is high, of course the price is also high.  Details Published on 2018-6-13 10:23

306

Posts

0

Resources
2
 
That's right! The best method is simple, economical and accurate! I'm a student and don't have enough engineering experience. I hope to get some advice! Thank you
This post is from Analog electronics
 
 

424

Posts

8

Resources
3
 
Buy a special chip for a few cents
This post is from Analog electronics

Comments

For example  Details Published on 2018-6-12 09:58
 
 
 
 

2w

Posts

0

Resources
4
 
"If you want to generate 4 square wave signals with different frequencies, the frequencies of the signals are all controlled within tens of kHz, but the frequency accuracy is very high. For example, if 12kHz is required, the frequency of the generated square wave must reach 11.9999kHz." It is easy to enhance the load capacity. It is difficult to achieve such a high frequency accuracy. The difference between 12kHz and 11.9999kHz is only 8 millionths, and the accuracy of ordinary quartz crystals is not that high. The frequency accuracy generated by your microcontroller depends entirely on the accuracy of the quartz crystal.
This post is from Analog electronics

Comments

I originally planned to use a pure analog circuit to generate a square wave, but except for this part of the circuit, the other circuits are all digital devices, and the power supply is also a switching power supply, so I gave up the analog circuit method. If the accuracy is reduced a little, in addition to the microcontroller, can I use CPLD or other methods? Can you tell me which ones are available?  Details Published on 2018-6-12 09:58
 
 
 
 

306

Posts

0

Resources
5
 
maychang posted on 2018-6-11 21:34 "I want to generate 4 square wave signals with different frequencies. The frequencies of the signals are all controlled at tens of kHz, but the frequency accuracy is very high. For example, if 12kHz is required, the product...
I originally planned to use a pure analog circuit to generate square waves, but except for this part of the circuit, the other circuits are digital devices, and the power supply is also a switching power supply, so I gave up the analog circuit method. If the accuracy is reduced a little, in addition to the microcontroller, can I use CPLD or other methods? Can you tell me what methods can be used to generate square wave signals?
This post is from Analog electronics

Comments

"I originally planned to use a pure analog circuit to generate a square wave." A pure analog circuit generates a square wave, and the frequency stability is even worse.  Details Published on 2018-6-12 11:12
"I originally planned to use a pure analog circuit to generate a square wave." A pure analog circuit generates a square wave, and the frequency stability is even worse.  Details Published on 2018-6-12 11:08
"I originally planned to use a pure analog circuit to generate a square wave." A pure analog circuit generates a square wave, and the frequency stability is even worse.  Details Published on 2018-6-12 10:56
 
 
 
 

306

Posts

0

Resources
6
 
lehuijie posted on 2018-6-11 20:49 Buy a special chip, a few cents
For example
This post is from Analog electronics

Comments

Go find a PWM chip. I won't tell you the specific model because I haven't used it much.  Details Published on 2018-6-12 10:44
 
 
 
 

2921

Posts

0

Resources
7
 
To obtain a high-precision frequency signal, the driver is not a big problem, and the accuracy depends entirely on the accuracy of the crystal oscillator you can get. Temperature compensation is necessary. I am not familiar with the STM microcontroller. If its timing is completely implemented by hardware, it should be ok. If there is software, it involves instruction delay and cannot guarantee accuracy.
This post is from Analog electronics

Comments

If CPLD or FPGA is used, will the accuracy be improved?  Details Published on 2018-6-12 10:28
 
 
 
 

306

Posts

0

Resources
8
 
gmchen posted on 2018-6-12 10:23 To obtain a high-precision frequency signal, the driver problem is not a big problem, and the accuracy depends entirely on the accuracy of the crystal oscillator you can get. Temperature compensation is a must. Single...
If CPLD or FPGA is used, will the accuracy be improved a little?
This post is from Analog electronics

Comments

If CPLD or FPGA is used, will the accuracy be improved a little?  Details Published on 2018-6-12 13:52
 
 
 
 

424

Posts

8

Resources
9
 
Go find a pwm chip. I won't tell you the specific model because I haven't used it much.
This post is from Analog electronics

Comments

OK, thanks. I'll check it out.  Details Published on 2018-6-12 13:35
 
 
 
 

2w

Posts

0

Resources
10
 
Yanyuan Technology House published on 2018-6-12 09:58 I originally planned to use a pure analog circuit to generate a square wave, but except for this part of the circuit, the other circuits are digital devices, and the power supply is also a switching power supply, so I gave up the analog...
"I originally planned to use a pure analog circuit to generate a square wave" The pure analog circuit generates a square wave, and the frequency stability is even worse.
This post is from Analog electronics

Comments

So that's what you mean. Digital circuits are better.  Details Published on 2018-6-12 13:37
 
 
 
 

2w

Posts

0

Resources
11
 
Yanyuan Technology House published on 2018-6-12 09:58 I originally planned to use a pure analog circuit to generate a square wave, but except for this part of the circuit, the other circuits are digital devices, and the power supply is also a switching power supply, so I gave up the analog...
What kind of waveform signal is generated is not a problem. It is easy to convert a sine wave into a square wave, and it is also easy to convert a square wave into a triangle wave. As for the signal amplitude, it is not a problem. The difficulty lies in the accuracy of the frequency.
This post is from Analog electronics

Comments

I am also working on the frequency accuracy issue now. Because the four square wave signals I generate are to be used as standard signals to be collected and measured by another device, the accuracy must be high.  Details Published on 2018-6-12 13:36
 
 
 
 

2w

Posts

0

Resources
12
 
Yanyuan Technology House published on 2018-6-12 09:58 I originally planned to use a pure analog circuit to generate a square wave, but except for this part of the circuit, the other circuits are digital devices, and the power supply is also a switching power supply, so I gave up the analog...
The host did not make it clear that "I want to generate 4 square wave signals with different frequencies, and the frequencies of the signals are all controlled at tens of kHz, but the frequency accuracy is very high." What are the frequencies of the four signals? Is there a need for a certain range of variation? If the signal frequency needs to change, what is the range of variation? In addition, "high frequency accuracy requirements", is it the relative accuracy or absolute accuracy of the four signal frequencies? This is very important.
This post is from Analog electronics

Comments

Yes, the frequency of each of the 4 signals is fixed, 10k 15k 20k 25k. As for the accuracy, each channel has its own. The current plan is to use CPLD to generate 4 square wave signals with different frequencies!  Details Published on 2018-6-12 13:34
 
 
 
 

306

Posts

0

Resources
13
 
maychang posted on 2018-6-12 11:12 The original poster did not make it clear that "I want to generate 4 square wave signals with different frequencies, and the frequency of the signals is controlled at tens of kHz, but the frequency accuracy is very high"...
Yes, the frequency of each of the 4 signals is fixed at 10k 15k 20k 25k. As for the accuracy, each channel has its own. The current plan is to use CPLD to generate 4 square wave signals with different frequencies!
This post is from Analog electronics

Comments

The frequency of each of the 4 channels is fixed. The lowest common multiple of the four frequencies is 300kHz. You only need to use a quartz crystal that meets your accuracy requirements to form an oscillator, generate a signal with a frequency of an integer multiple of 300kHz, and then divide the frequency. The frequency division is based on what you said on the 5th floor: "Except for this  Details Published on 2018-6-12 13:51
 
 
 
 

306

Posts

0

Resources
14
 
lehuijie posted on 2018-6-12 10:44 Go find the pwm chip. I won’t tell you the specific model because I haven’t used it much.
OK, thank you. I’ll check it out.
This post is from Analog electronics
 
 
 
 

306

Posts

0

Resources
15
 
maychang posted on 2018-6-12 11:08 It is not a problem what kind of waveform the signal is generated. It is easy to convert a sine wave into a square wave, and it is also easy to convert a square wave into a triangle wave. As for the signal amplitude, it is even less...
Right now, I am also working on the frequency accuracy issue. Because the four square wave signals I generated are to be used as standard signals to be collected and measured by another device, so the accuracy must be high.
This post is from Analog electronics

Comments

According to your description on the 13th floor, the frequency accuracy of your four square wave signals is completely determined by the quartz crystal used.  Details Published on 2018-6-12 13:58
 
 
 
 

306

Posts

0

Resources
16
 
maychang posted on 2018-6-12 10:56 "I originally planned to use a pure analog circuit to generate a square wave." Pure analog circuits generate square waves, and the frequency stability is even worse.
So that's the case. You mean that digital circuits are better.
This post is from Analog electronics

Comments

Here we need to distinguish between the two words "digital" and "analog". Any signal that generates a certain frequency (regardless of the waveform) is an analog circuit rather than a digital circuit. What is "good"? If it can meet your requirements and is low in cost, it is "good".  Details Published on 2018-6-12 13:56
 
 
 
 

2w

Posts

0

Resources
17
 
Yanyuan Technology House published on 2018-6-12 13:34 It is like this. The frequency of each of the 4 channels is fixed, 10k 15k 20k 25k. As for the accuracy, it is each channel. At present...
The frequency of each of the 4 channels is fixed, 10k 15k 20k 25k. The lowest common multiple of these four frequencies is 300kHz. You only need to use a quartz crystal that meets your accuracy requirements to form an oscillator, generate a signal with a frequency of an integer multiple of 300kHz, and then divide the frequency. The frequency division uses those digital devices that you said on the 5th floor that "except for this part of the circuit, other circuits are digital devices." Oscillation can use 74HC04 and the like. Of course, you can also use a microcontroller with a timer hardware output, with two oscillator outputs. The most important thing is: the quartz crystal frequency must meet your accuracy requirements, including the temperature coefficient.
This post is from Analog electronics
 
 
 
 

2w

Posts

0

Resources
18
 
Yanyuan Technology House published on 2018-6-12 10:28 If CPLD or FPGA is used, can the accuracy be improved a little?
If CPLD or FPGA is used, can the accuracy be improved a little? No.
This post is from Analog electronics
 
 
 
 

2w

Posts

0

Resources
19
 
Yanyuan Technology House published on 2018-6-12 13:37 So that's what you mean. Digital circuits are better.
Here we need to distinguish between the two words "digital" and "analog". A signal that generates a certain frequency (regardless of the waveform) is an analog circuit rather than a digital circuit. What is "good"? If it can meet your requirements and has a low cost, it is "good".
This post is from Analog electronics

Comments

Yes, the word "good" is correct. After reading your answers, the focus should be on the selection of crystal oscillator parameters, right?  Details Published on 2018-6-13 10:01
 
 
 
 

2w

Posts

0

Resources
20
 
Yanyuan Technology House published on 2018-6-12 13:36 Right now, I am also dealing with the frequency accuracy issue. Because the four square wave signals I generated need to be used as standard signals to be collected and measured by another device...
According to your description on the 13th floor, the frequency accuracy of your four square wave signals is completely determined by the quartz crystal used.
This post is from Analog electronics
 
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

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