An Audio Frequency Sweep Signal Generator Based on DDS Technology
Through the audio frequency sweeping signal generator based on DDS technology, using the STC15W2K60S2 microcontroller and AD9854 digital synthesizer, the problems of complex structure and narrow frequency range of audio frequency sweeping signal generator in the existing technology are solved, and high stability and high frequency are achieved The audio signal output at resolution is suitable for speaker pure tone testing.
Patent Information
- Application Number
- CN201911395267.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-12-30
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2039-12-30
AI Technical Summary
The existing audio frequency sweeping signal generator has a complex structure, a narrow frequency range and poor stability.
Using DDS technology-based audio frequency sweeping signal generator, using STC15W2K60S2 microcontroller and AD9854 digital synthesizer, combined with a combination of digital simulation, to achieve 20Hz-20KHz audio sine wave output, adopting dual MCU structure design to improve signal processing speed and Frequency accuracy, set multiple sweep modes and manual single frequency output modes, and the human-computer interface adopts a 128×64 dot matrix LCD display.
It realizes full digital modulation with short frequency conversion time, wide bandwidth, high frequency resolution, and continuous output phase, and is good stability and is suitable for speaker pure tone testing. The system structure is simple and compact and the cost is reduced.
Smart Images

Figure CN111130509B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of audio frequency sweep signal generators, and specifically relates to an audio frequency sweep signal generator based on DDS technology. Background Art
[0002] Audio frequency sweep signal generator is a very important instrument in the production and testing of audio-related products. At present, a large proportion of audio frequency sweep signal generators on the market are tuned signal generators, which have complex structures, narrow frequency ranges, and poor stability, but are inexpensive; the phase-locked signal generator developed on this basis has high frequency accuracy and stability, but it is difficult to achieve fast and program control, and the frequency resolution of the output signal is poor; while the synthetic signal generator has high frequency stability, high frequency resolution and good frequency setting repeatability, which can easily realize program control of frequency; the latest technology is the combination of digital processing technology and signal synthesis, namely Direct Digital Synthesis (DDS), the signal generator based on DDS technology has the advantages of short frequency conversion time, wide relative bandwidth, high frequency resolution, continuous output phase, etc., which can realize full digital modulation of the signal. Summary of the invention
[0003] The object of the present invention is to provide an audio frequency sweep signal generator based on DDS technology to solve the problems of the audio frequency sweep signal generator in the prior art having a complex structure, a narrow frequency range and poor stability.
[0004] To achieve the above-mentioned purpose, the present invention provides the following technical solutions: an audio frequency sweep signal generator based on DDS technology, comprising a main processor module, a slave processor module, a digital synthesizer, a filter module, a power amplifier module, an amplitude potentiometer, a speaker, a voltage sampling circuit, a memory, a key module and a display module, wherein the output end of the key module is connected to the input end of the main processor module, the input end of the display module is connected to the output end of the main processor module, the memory is connected to the main processor module for communication, the main processor module is connected to the slave processor module for data communication, the output end of the slave processor module is connected to the input end of the digital synthesizer, the output end of the digital synthesizer is connected to the input end of the filter module, the output end of the filter module is connected to the input end of the power amplifier module, the output end of the power amplifier module is connected to the input of the speaker, the output end of the amplitude potentiometer is connected to the input end of the power amplifier module, and the detection end of the voltage sampling circuit is connected to the receiving end of the speaker.
[0005] Preferably, the main processor module and the slave processor module are both STC15W2K60S2 type single chip microcomputers.
[0006] Preferably, the digital synthesizer is an AD9854 digital synthesizer.
[0007] Preferably, the key module includes a 74LS245 driver and a plurality of keys, the plurality of keys are respectively connected to corresponding input terminals on the 74LS245 driver, and the output terminal of the 74LS245 driver is connected to the input terminal of the main processor module.
[0008] Preferably, the plurality of buttons include function buttons for upper limit, lower limit, increase, decrease, sweep, manual, speed and reset.
[0009] Preferably, the filtering module is a low-pass filter.
[0010] Preferably, the power amplifier module is a power amplifier circuit composed of an LF347 operational amplifier and an LM3886 power audio amplifier integrated circuit. The input end of an operational amplifier module in the LF347 operational amplifier is connected to the output end of the filter module, the output end of the operational amplifier module there is connected in series with an amplitude potentiometer and then connected to the input end of another operational amplifier module in the LF347 operational amplifier, the output end of the operational amplifier module there is connected to the input end of the LM3886 power audio amplifier integrated circuit, and the output end of the LM3886 power audio amplifier integrated circuit is connected to the receiving end of the speaker.
[0011] Preferably, the voltage sampling circuit includes a LF347 operational amplifier 2, an LM336-2.5 power reference chip, a CD4051 multi-way selection switch and an ADS8326 high-speed, low-power analog-to-digital converter. The LF347 operational amplifier 2 includes four operational amplifier modules, which are respectively defined as operational amplifier 1, operational amplifier 2, operational amplifier 3 and operational amplifier 4. The positive terminal of operational amplifier 1 is connected to the receiving end of the speaker, the output end of operational amplifier 1 is connected to the negative terminal of operational amplifier 2, the output end of operational amplifier 2 is connected to the negative terminal of operational amplifier 3, and operational amplifier 3 is connected to the negative terminal of operational amplifier 3. The output end of is connected to the positive terminal of operational amplifier four, the output end of operational amplifier four is connected to an input end of a CD4051 multiplexer, the output end of the CD4051 multiplexer is connected to the input end of an ADS8326 high-speed, low-power analog-to-digital converter, the output end of the ADS8326 high-speed, low-power analog-to-digital converter is connected to the input end of the main processor module, the LM336-2.5 power reference chip is connected to an external power supply, and the output end of the LM336-2.5 power reference chip is respectively connected to the input end of the CD4051 multiplexer and the reference voltage end of the ADS8326 high-speed, low-power analog-to-digital converter.
[0012] Preferably, the display module is a DG12864 liquid crystal module with a 128*64 dot matrix.
[0013] Compared with the prior art, the beneficial effects of the present invention are: the signal generator based on DDS technology has the advantages of short frequency conversion time, wide relative bandwidth, high frequency resolution, continuous output phase, etc., and can realize full digital modulation of the signal;
[0014] The present invention uses STC15W2K60S2 single-chip microcomputer as the main controller, based on DDS chip AD9854, and adopts a combination of digital and analog to achieve 20Hz-20KHz audio sine wave output, with low distortion and good stability, and is particularly suitable for detecting the pure sound of the speaker. It has two working modes: logarithmic sweep and manual single-frequency output. The sweep start point, end point and sweep time of each sweep mode can be set arbitrarily. The single-frequency output frequency can also be set arbitrarily within the audio range. The human-machine interface uses a 128×64 dot matrix liquid crystal block display to display the frequency and voltage values at the same time. The specific features are as follows:
[0015] (1) The STC15W2K60S2 microcontroller is a wide power supply voltage MCU that can operate under a 3V power supply. It is unified with the DDS chip AD9854 and does not require a level conversion chip (such as 74LVC245, etc.). In addition, the built-in EEPROM does not require an external AT24C02, making the system structure simpler and more compact, improving reliability and reducing costs.
[0016] (2) A dual MCU structure design is adopted. The main MCU is mainly responsible for the human-computer interface function, and the slave MCU is responsible for controlling the DDS chip to output a sine wave signal, thereby improving signal processing speed, frequency accuracy and resolution.
[0017] (3) Set a variety of sweep modes, including normal sweep mode, AB sweep mode and ABC sweep mode, to meet the testing needs of specific product production such as pure sound inspection of loudspeakers.
[0018] (4) Two modes of manual single frequency and swept frequency output can be set. The output sine wave amplitude can also be controlled manually or automatically. It is easy to use and convenient for production automatic testing and remote control needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 It is a system principle structure block diagram of the present invention;
[0020] Figure 2 This is a schematic diagram of the key module circuit of the present invention;
[0021] Figure 3 The schematic diagram of the system power supply circuit of the present invention is
[0022] Figure 4 The schematic diagram of the output DC bias protection circuit of the present invention;
[0023] Figure 5This is a schematic diagram of the power amplifier module circuit of the present invention;
[0024] Figure 6 The schematic diagram of the AC output voltage DC sampling conversion circuit of the present invention;
[0025] Figure 7 The schematic diagram of the output voltage AD conversion circuit of the present invention;
[0026] Figure 8 The schematic diagram of the display module circuit of the present invention;
[0027] Fig. 9 A schematic diagram of the circuit connection between the single-chip microcomputer and the digital synthesizer of the present invention;
[0028] Fig.10 The main single chip microcomputer control circuit schematic diagram of the present invention;
[0029] Fig.11 It is the flow chart of the generator software of the present invention. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0031] See also Figure 1 The present invention provides a technical solution: an audio frequency sweep signal generator based on DDS technology, comprising a main processor module, a slave processor module, a digital synthesizer, a filter module, a power amplifier module, an amplitude potentiometer, a speaker, a voltage sampling circuit, a memory, a key module and a display module, wherein the output end of the key module is connected to the input end of the main processor module, the input end of the display module is connected to the output end of the main processor module, the memory is connected to the main processor module for communication, the main processor module is connected to the slave processor module for data communication, the output end of the slave processor module is connected to the input end of the digital synthesizer, the output end of the digital synthesizer is connected to the input end of the filter module, the output end of the filter module is connected to the input end of the power amplifier module, the output end of the power amplifier module is connected to the input end of the speaker, the output end of the amplitude potentiometer is connected to the input end of the power amplifier module, and the detection end of the voltage sampling circuit is connected to the receiving end of the speaker.
[0032] The main processor module and the slave processor module are both STC15W2K60S2 type single chip microcomputers;
[0033] like Fig.10The main MCU control circuit shown in the figure is mainly responsible for LCD display, key detection, some switch quantity control and chip select signal generation. U12 latch 74HC273 generates switch control quantity Q1-Q8, U14 decoder 74LS138 generates chip select signal / CS0- / CS7, the master and slave MCU communicate through the serial port, LCDRST is the LCD reset signal, LCDDI is the LCD command / data selection signal, and LCDCS is the LCD chip select signal. LCD interface control data and key detection data are transmitted through data bus DA0-DA7.
[0034] The main MCU determines the relevant parameters of the sine wave signal through the human-machine interface, and notifies the slave MCU to control the DDS chip AD9854 to output a sine wave of a specific frequency through serial communication.
[0035] like Fig. 9 As shown, the digital synthesizer is AD9854 digital synthesizer. AD9854 has 10MHz serial interface and 100MHz 8-bit parallel interface. Different from AD99XX series, because there is no built-in RAM, when realizing programmable modulation function, it is necessary to use the method of timely refreshing internal registers, so only high-speed parallel interface can be used. Connect the S / P (Pin 70) pin to high level and select parallel transmission mode. Input the 20MHz clock of Y11 from the REFCLK end of pin 60, and generate a 200MHz reference clock signal after 10 times the frequency inside the chip.
[0036] The AD9854 parallel interface has 6 address lines and 8 data lines, which are connected to the P0 and P2 ports of the microcontroller respectively, and the read and write signals / WR and / RD form parallel transmission control. For example, when the / WR pin is set to a low level, the frequency control word is sent to the I / O buffer register through the data port, and then the control word is written into the register at the specified address by the internal refresh clock. The microcontroller IOSET pin controls the reset of AD9854, and IOUD is a bidirectional frequency update control signal. The output sine wave signals IOUT1 and IOUT2 (converted into voltage signals by resistors R193 and R194) are output from the plug P5 to the power amplifier circuit.
[0037] AD9854 has a built-in register table with an address range of 00H to 27H, which is divided into 11 groups, of which 7 groups of registers store data about frequency, phase, and amplitude. Units 00H, 01H and 02H, 03H in the register table are phase register 1 and phase register 2, respectively, storing 14-bit phase control word 1 and phase control word 2 (generally, audio signal generators do not need to control phase). Units 04H to 09H and 0AH to 0FH in the register table are frequency register I and frequency register 2, respectively, storing 48-bit frequency control word 1 and frequency control word 2. When working at a single frequency, as long as the 48-bit frequency control word is written into frequency register 1 in 6 clock cycles and then the pulse is updated, the signal will be output at a new frequency. Units 21H, 22H and 23H, 24H in the register table are sine amplitude register and cosine amplitude register, respectively, storing 12-bit amplitude control word I and amplitude control word 2. When working at single frequency, just write the 12-bit amplitude control word into amplitude register 1 in 2 clock cycles, and then update the pulse, and the signal will be output with the new amplitude.
[0038] In addition to writing control word changes, AD9854 also provides a hardware adjustment method, which can achieve the maximum output amplitude by changing the resistor value connected to the 56-pin DAC Rset. The specific adjustment method is: according to the formula
[0039]
[0040] Adjust R set To change I OUT , in general, R set The range is 8K(I OUT =5mA)~2K(I OUT =20mA), 5mA~20mA is the current range of the output signal. However, this method cannot achieve automatic and accurate control of the fixed amplitude value. Generally, the method of writing amplitude control words is used. 10mA output current provides the best SFDR performance, so a 3.92K resistor load is connected to the ground at the DAC Rset pin.
[0041] like Figure 2 As shown, the key module includes a 74LS245 driver and a plurality of keys, the plurality of keys are respectively connected to corresponding input ends of the 74LS245 driver, and the output end of the 74LS245 driver is connected to the input end of the main processor module.
[0042] Multiple buttons include upper limit, lower limit, increase, decrease, sweep, manual, speed and reset function buttons. The instrument is equipped with upper limit K1, lower limit K2, increase K3, decrease K4, sweep K5, manual K6, speed K7 and reset K8, 8 buttons, among which the upper limit and lower limit buttons respectively set the starting and ending frequencies of the sweep; the increase and decrease buttons can increase and decrease the starting frequency, ending frequency and sweep speed in different states; the manual button switches to the single frequency output state; the sweep button switches to the cyclic logarithmic sweep state; the speed button sets the sweep speed; the reset button can realize the system reset function at any time.
[0043] Figure 2 When the middle button K1-K7 is not pressed, the 74LS245 of U1 detects a high level (0xFF) and sends it to the MCU data bus DB0-DB7. If a button is pressed, the corresponding data bus bit is low level, and the corresponding button can be detected. When the reset button K7 is pressed, the reset pin RESET of the MCU is pulled high to cause a reset, and / CS7 is the chip select signal of the button detection function.
[0044] The filtering module is a low-pass filter.
[0045] like Figure 5 As shown, the power amplifier module is a power amplifier circuit composed of an LF347 operational amplifier and an LM3886 power audio amplifier integrated circuit. The input end of an operational amplifier module in the LF347 operational amplifier is connected to the output end of the filter module. The output end of the operational amplifier module there is connected to the input end of another operational amplifier module in the LF347 operational amplifier after being connected in series with an amplitude potentiometer. The output end of the operational amplifier module there is connected to the input end of the LM3886 power audio amplifier integrated circuit. The output end of the LM3886 power audio amplifier integrated circuit is connected to the receiving end of the speaker.
[0046] In the specific implementation process, the IOUT1 and IOUT2 output by the control board are converted into voltage signals after passing through the resistor and input into the power amplifier circuit through the plug P8. Figure 5 As shown, it is first amplified 11 times by the in-phase amplifier circuit composed of U6A and its peripheral resistors, then attenuated by the resistor R31, the charge amplitude potentiometer RP2, and then input into the power amplifier circuit with the high-power audio amplifier chip LM3886 as the core through the DC isolation capacitor C34. Among them, R31, C35, R32 and C42, R37, C43 are all filter networks. Relay S1 is controlled by the output overvoltage protection circuit. When working normally, the normally open contact of the relay is closed and the output power is output; if the output is overvoltage, the relay loses power, the normally closed contact is closed, and there is no output.
[0047] like Figure 6 and 7As shown, the voltage sampling circuit includes a LF347 operational amplifier 2, an LM336-2.5 power reference chip, a CD4051 multi-way selection switch and an ADS8326 high-speed, low-power analog-to-digital converter. The LF347 operational amplifier 2 includes four operational amplifier modules, which are respectively defined as operational amplifier 1, operational amplifier 2, operational amplifier 3 and operational amplifier 4. The positive terminal of operational amplifier 1 is connected to the receiving end of the speaker, the output end of operational amplifier 1 is connected to the negative terminal of operational amplifier 2, the output end of operational amplifier 2 is connected to the negative terminal of operational amplifier 3, and the output end of operational amplifier 3 is connected to the negative terminal of operational amplifier 3. The output end is connected to the positive terminal of operational amplifier four, the output end of operational amplifier four is connected to an input end of a CD4051 multiplexer, the output end of the CD4051 multiplexer is connected to the input end of an ADS8326 high-speed, low-power analog-to-digital converter, the output end of the ADS8326 high-speed, low-power analog-to-digital converter is connected to the input end of a main processor module, the LM336-2.5 power reference chip is connected to an external power supply, and the output end of the LM336-2.5 power reference chip is respectively connected to the input end of the CD4051 multiplexer and the reference voltage end of the ADS8326 high-speed, low-power analog-to-digital converter.
[0048] The voltage sampling circuit includes an AC output voltage DC sampling conversion circuit and an output voltage AD conversion circuit;
[0049] The AC output voltage DC sampling conversion circuit is as follows Figure 6 As shown, the output voltage Vout is divided by R150 and R151, and then outputs a step-down voltage AC signal from pin 1 through the voltage follower U50A. After passing through the precision rectifier circuit composed of U50B, U50C and their peripheral circuits, an equivalent DC sampling signal is obtained at pin 8 of U50C, and the final sampling voltage Uad is obtained through the inverting amplifier U50D.
[0050] The output voltage AD conversion circuit is shown in Figure Figure 7 As shown, ADS8326 is a 16-bit high-speed, low-power analog-to-digital converter with an operating voltage range of 2.7V-5.5V. Even at the highest speed, its power consumption is quite small, with low noise and good linearity. It provides an SPI interface. LM336-2.5 is a power reference chip that outputs 2.5V as the reference voltage of AD8326. DCLOCK, COUT and / CS are the SPI interfaces between the microcontroller and ADS8326, which are simulated by P1.0, P1.1 and P1.2 respectively. The sampling voltage is selected by the CD4051 multiplexer U61. When Q5=0, the DC equivalent voltage Uad converted from the normal output AC voltage is selected; when Q5=1, the voltage division of the potentiometer RP181 under the reference voltage is selected as manual debugging.
[0051] like Figure 8 As shown, the display module is a 128*64 dot matrix DG12864 liquid crystal module, potentiometer RP4 adjusts the contrast, P11, P22 and P23 are the corresponding pins of the main microcontroller, / CS5 is the decoder output liquid crystal chip select signal, and the liquid crystal module is connected to the circuit board through a 20PIN connector X10.
[0052] Through this technical solution, the audio frequency sweep signal generator system structure block diagram is as follows Figure 1 As shown in the figure, in order to improve the data processing speed, two master and slave microcontrollers are set, of which the master microcontroller is mainly responsible for key detection, LCD display and other human-machine interface tasks, as well as setting parameter storage and output voltage AD sampling. The slave microcontroller is mainly responsible for the generation and output of DDS audio signals, and the amplitude of the signal can be adjusted by the amplitude potentiometer. The master and slave microcontrollers communicate through the serial port to maintain synchronization.
[0053] In the specific implementation process, the instrument requires DC power supplies of positive and negative 28V, positive and negative 15V, and 5V, all of which are implemented using linear power supplies.
[0054] like Figure 3 As shown, the 1-3 pins of the plug P1 are connected to dual 18V AC voltage, and the 2nd pin is the ground. After the bridge rectifier, voltage regulator and filtering, the positive and negative 15V voltage is output as the power supply of the signal conditioning circuit. The 4-5 pins of the plug P1 are connected to the 6V AC voltage, and the 5V VCC generated after the rectification, filtering and voltage regulation is used as the power supply of the single-chip microcomputer system. The 1 and 3 pins of the plug P2 are connected to dual 20V AC voltage, and the 2nd pin is the ground. After the bridge rectifier, voltage regulator and filtering, the positive and negative 28V voltage is obtained as the power supply voltage of the power amplifier.
[0055] The instrument is also equipped with an output DC bias protection circuit:
[0056] The function of the output DC bias protection circuit is to disconnect the output voltage or limit it to a safe value range when the DC component of the output voltage exceeds the designed value.
[0057] like Figure 4As shown, after the output AC voltage Vout passes through the step-down filter circuit of R10, R11 and C20, the AC component is filtered out by C20, and the DC bias component is input into the precision rectifier circuit composed of U5A, U5B and U5C, and the equivalent DC voltage is output at the 13th pin of U5C. If this DC voltage is greater than the positive terminal voltage of U5D, the output 14th pin of the comparator U5D is low level, the transistor Q1 is in the cut-off state, the relay S1 is in the power-off state, the normally open switch of S1 is disconnected (in the power amplifier circuit), and there is no output voltage. When the rectified DC voltage is less than the positive terminal voltage of U5D, the output 14th pin of the comparator U5D is high level, the transistor Q1 is in the on state, the relay S1 is in the power-on state, the normally open switch of S1 is closed, and the output voltage is normal. Among them, X1 is the temperature protection switch 67L070. When the temperature is too high, the switch is in the off state, and there is no output voltage.
[0058] The main microcontroller audio signal generator software flow chart is as follows Fig.11 As shown, after the system is powered on, it first initializes variables and peripherals, displays the LCD initial interface, reads the setting parameters stored in the EEPROM, checks the check code, and if the check code is incorrect, it needs to reinitialize the setting parameters; selects the sweep frequency array or single frequency data according to the setting parameters, communicates with the microcontroller to control the signal output, and displays the frequency and amplitude of the output signal on the LCD interface; in this process, it continuously detects whether there is a key, and if there is a key, performs the corresponding function processing of the increase key, decrease key, start point key, end point key, manual key, speed key and reset key respectively.
[0059] 1. Communication protocol between two microcontrollers
[0060] For single-frequency mode, the host first transmits two bytes of data to the slave, which is the actual frequency, with the high bit first and the low bit last, followed by a byte of CRC check (the cumulative sum of all previous bytes).
[0061] For sweep mode, first send the sweep mode, then send the specific data:
[0062] (1) Single frequency sweep: 0 means single frequency sweep, and then 5 bytes of data are sent, which are the starting frequency (2 bytes), the ending frequency (2 bytes), the speed (1 byte), and the last byte is the CRC check (the cumulative sum of all previous bytes).
[0063] (2) AB sweep mode: 1 indicates AB sweep mode, and then 10 bytes of data are sent, namely A start frequency (2 bytes), A end frequency (2 bytes), A speed (1 byte); B start frequency (2 bytes), B end frequency (2 bytes), B speed (1 byte), and the last byte is CRC check (the cumulative sum of all previous bytes).
[0064] (3) ABC sweep mode: 2 indicates ABC sweep mode, and then 15 bytes of data are sent, namely A start frequency (2 bytes), A end frequency (2 bytes), A speed (1 byte); B start frequency (2 bytes), B end frequency (2 bytes), B speed (1 byte); C start frequency (2 bytes), C end frequency (2 bytes), C speed (1 byte). The last byte is CRC check (the cumulative sum of all previous bytes).
[0065] 2. Frequency sweep point setting
[0066] The output of the swept frequency audio signal is to set the required sweep frequency points in the slave microcontroller. These sweep frequency points are set according to the logarithmic law and stored in the microcontroller. The master microcontroller sends the relevant data to the slave microcontroller through the serial port according to the user's settings. The slave microcontroller controls the AD9854 to output a sine wave output signal with the corresponding frequency and amplitude according to these settings. The sweep frequency point data setting is determined according to the following sweep frequency formula:
[0067]
[0068] Where n = 0, ±1, ±2…, each value of n corresponds to a frequency sweep point data; k is the octave, and this design selects k = 96, that is, the frequency is swept in 96 octaves.
[0069] The sweep frequency points are set according to formula 1, that is, k=96, and according to n=0, ±1, ±2, etc., to meet the range of 20-20kHz, with 1000Hz as the center, 816 frequency points are set.
[0070] 3. Sweep speed realization
[0071] The frequency sweep speed is determined by the frequency sweep time t sent by the host. Since the length of the frequency sweep point data table in the slave is 816, that is, there are 816 frequency points. According to the two-way frequency sweep, there are a total of (816-1)*2=1630 gaps. The waiting time for each gap is t / 1630. Since the frequency sweep time setting range is 0.2-20s, and the crystal oscillator frequency of the single-chip microcomputer is selected as 22.1184MHz, the fastest frequency sweep time is 0.2 / 1730=0.1227ms. If the time interval is set to, select timer 1 to realize the timing function, and set the initial value to x, then the calculation process is as follows:
[0072]
[0073] After sorting, the initial value of timer 1 is: x=65535-613.5t, where the time unit of t is seconds.
[0074] In the timer 1 interrupt program, AD9854 is controlled to output sine waves of various frequencies in turn to achieve swept frequency output.
[0075] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. An audio frequency sweep signal generator based on DDS technology, characterized in that: The invention comprises a main processor module, a slave processor module, a digital synthesizer, a filter module, a power amplifier module, an amplitude potentiometer, a speaker, a voltage sampling circuit, a memory, a key module and a display module. The output end of the key module is connected to the input end of the main processor module, the input end of the display module is connected to the output end of the main processor module, the memory is connected to the main processor module for communication, the main processor module is connected to the slave processor module for data communication, the output end of the slave processor module is connected to the input end of the digital synthesizer, the output end of the digital synthesizer is connected to the input end of the filter module, the output end of the filter module is connected to the input end of the power amplifier module, the output end of the power amplifier module is connected to the input end of the speaker, the output end of the amplitude potentiometer is connected to the input end of the power amplifier module, the detection end of the voltage sampling circuit is connected to the receiving end of the speaker, The power amplifier module is a power amplifier circuit composed of an LF347 operational amplifier and an LM3886 power audio amplifier integrated circuit. The input end of an operational amplifier module in the LF347 operational amplifier is connected to the output end of the filter module. The output end of the operational amplifier module is connected in series with an amplitude potentiometer and then connected to the input end of another operational amplifier module in the LF347 operational amplifier. The output end of the operational amplifier module is connected to the input end of the LM3886 power audio amplifier integrated circuit. The output end of the LM3886 power audio amplifier integrated circuit is connected to the receiving end of the speaker. The voltage sampling circuit includes a LF347 operational amplifier 2, an LM336-2.5 power reference chip, a CD4051 multi-way selection switch and an ADS8326 high-speed, low-power analog-to-digital converter. The LF347 operational amplifier 2 includes four operational amplifier modules, which are respectively defined as an operational amplifier 1, an operational amplifier 2, an operational amplifier 3 and an operational amplifier 4. The positive terminal of the operational amplifier 1 is connected to the receiving end of the speaker, the output end of the operational amplifier 1 is connected to the negative terminal of the operational amplifier 2, the output end of the operational amplifier 2 is connected to the negative terminal of the operational amplifier 3, and the input end of the operational amplifier 3 is connected to the negative terminal of the operational amplifier 3. The output end is connected to the positive terminal of operational amplifier four, the output end of operational amplifier four is connected to an input end of a CD4051 multiplexer, the output end of the CD4051 multiplexer is connected to the input end of an ADS8326 high-speed, low-power analog-to-digital converter, the output end of the ADS8326 high-speed, low-power analog-to-digital converter is connected to the input end of the main processor module, the LM336-2.5 power reference chip is connected to an external power supply, and the output end of the LM336-2.5 power reference chip is respectively connected to the input end of the CD4051 multiplexer and the reference voltage end of the ADS8326 high-speed, low-power analog-to-digital converter.
2. The audio frequency sweep signal generator based on DDS technology according to claim 1, characterized in that: The main processor module and the slave processor module are both STC15W2K60S2 type single chip microcomputers.
3. The audio frequency sweep signal generator based on DDS technology according to claim 2, characterized in that: The digital synthesizer is an AD9854 digital synthesizer.
4. The audio frequency sweep signal generator based on DDS technology according to claim 1, characterized in that: The key module comprises a 74LS245 driver and a plurality of keys, wherein the plurality of keys are respectively connected to corresponding input terminals of the 74LS245 driver, and the output terminal of the 74LS245 driver is connected to the input terminal of the main processor module.
5. The audio frequency sweep signal generator based on DDS technology according to claim 4, characterized in that: Multiple buttons include upper limit, lower limit, increase, decrease, sweep, manual, speed and reset function buttons.
6. The audio frequency sweep signal generator based on DDS technology according to claim 1, characterized in that: The filtering module is a low-pass filter.
7. The audio frequency sweep signal generator based on DDS technology according to claim 1, characterized in that: The display module is a DG12864 liquid crystal module with a 128*64 dot matrix.
Citation Information
Patent Citations
Simple and economic waveform generator based on DDS technology
CN106681426A
Audio swept-frequency signal generator based on DDS technology
CN211656106U
Data transmission apparatus adaptive to data quality on radio-transmission and a method of data transmission therefor
US20050071714A1
