Frequency response adjusting method for multifunctional sound calibrator

The MCU generates discrete sinusoidal signals and combines DAC and digital-to-analog converters to realize flexible frequency and amplitude adjustment of multifunctional acoustic calibrators, solving the problem that existing acoustic calibrators cannot meet the multi-frequency point and sound pressure level adjustment, and improving the stability and accuracy of the acoustic calibrator.

CN120282084AActive Publication Date: 2025-07-08HANGZHOU AIHUA INSTR
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510773581.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-11
Publication Date
2025-07-08
Estimated Expiration
2045-06-11

AI Technical Summary

Technical Problem

The existing multifunctional acoustic calibrators can only adjust the amplitude at one or two frequency points, and cannot meet the multi-frequency calibration requirements. Adjusting multiple sound pressure levels requires complex algorithms and circuits, making it difficult to meet the requirements of multi-frequency points and different sound pressure levels when calibrating different acoustic instruments.

Method used

Discrete sinusoidal signals are generated through the MCU, converted into analog signals using the DAC, and frequency response is adjusted through the power amplifier. The frequency and amplitude are coordinated by the timer and digital-to-analog converter. The timer automatic reload function and 12-bit high-precision DAC are used to achieve flexible and adjustable frequency and amplitude control.

Benefits of technology

It realizes flexible and adjustable frequency generation, with a frequency deviation of less than 0.7%, supports 20dB sound pressure level range adjustment, ensuring signal stability and reliability, and meeting the needs of long-term continuous working.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120282084A_ABST
    Figure CN120282084A_ABST
Patent Text Reader

Abstract

The invention provides a frequency response adjusting method for a multifunctional sound calibrator, and relates to the technical field of acoustic measuring instruments, and the method comprises the following steps: S01, generating data of a discrete sinusoidal signal through an MCU, and controlling a DAC to convert the data into an analog signal for output; s02, amplifying an analog signal output by the DAC through a power amplifier so as to adjust the frequency response of a sound calibrator; and S03, adjusting the signal output frequency through the timer in the MCU: S31, configuring a clock of the timer in the MCU, the clock of the timer being formed by frequency division of an AHB bus clock in the MCU, and the frequency of the timer being determined after frequency division of a system clock by an AHB prescaler and an APB prescaler. According to the sound calibrator, high-precision frequency response control, low-deviation signal output and flexible amplitude adjustment of the sound calibrator are realized through precise frequency division of an MCU timer and a double-DAC cooperative adjustment mechanism in combination with multi-mode interaction and low-power-consumption design.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of acoustic measurement instruments, and particularly to a method for frequency response adjustment of a multifunctional sound calibrator. Background Art

[0002] With the continuous development of acoustic technology and the continuous expansion of application fields, the requirements for the accuracy and reliability of acoustic measurement instruments are also getting higher and higher. As one of the important tools in the field of acoustic measurement, a multifunctional sound calibrator can generate one or more constant sound pressures at one or more frequency points, providing an accurate reference for calibrating measurement microphones, sound level meters, and various acoustic measurement instruments. Ensuring that these instruments can accurately reflect the true parameters of sound, such as sound pressure level, frequency, etc., in actual measurements. This is crucial for acoustic research and applications.

[0003] However, most of the existing sound calibrators have only one or two frequency points and can only perform one or two amplitude adjustments. Moreover, different types of acoustic instruments often require different calibration frequencies during calibration, and some require calibration at multiple frequency points. However, due to problems such as performance, algorithm complexity, and frequency accuracy, most of the existing multifunctional sound calibrators have only one or two frequency points and cannot meet the demand for multiple frequency points. And in order to calibrate the response of acoustic instruments at different sound pressure levels, the sound calibrator needs to be able to emit sound pressures of different amplitudes. However, adjusting multiple sound pressure levels often requires more complex algorithms and circuits. Therefore, how to solve the above problems is expected to be well solved. Summary of the Invention

[0004] In view of the above technical problems, the technical solution adopted by the present invention is a method for frequency response adjustment of a multifunctional sound calibrator, including the following steps: S01. Generate data of a discrete sine signal through an MCU, and control a DAC to convert the data into an analog signal for output; S02. Amplify the analog signal output by the DAC through a power amplifier to adjust the frequency response of the sound calibrator; S03. Adjust the signal output frequency through the internal timer of the MCU, including: S31. Configure the clock of TIM inside the MCU, and the timer clock is divided from the internal AHB bus clock of the MCU, and its frequency is determined after being divided by the AHB prescaler and the APB prescaler from the system clock; S32. Set the prescaler and counter inside the timer, and make the timer periodically trigger update events through the automatic reload function; S04. Coordinate the adjustment of the signal amplitude through two digital-to-analog converters. The two digital-to-analog converters include a digital-to-analog converter No. 1 and a digital-to-analog converter No. 2. The output end of the digital-to-analog converter No. 1 is connected to the input end of the digital-to-analog converter No. 2, where: The output end of the first digital-to-analog converter is connected to the input end of the second digital-to-analog converter. The first digital-to-analog converter is used for reference frequency response calibration, and the second digital-to-analog converter is used for dynamically adjusting the output amplitude. The control ends of the first digital-to-analog converter and the second digital-to-analog converter are both connected to the MCU, and the MCU adjusts the ratio coefficients of the two.

[0005] Preferably, the timer clock is obtained by dividing the internal AHB bus clock of the MCU. The calculation method includes: When the division factor of the APB prescaler = 1, ; Wherein, represents the timer clock, represents the internal AHB bus clock of the MCU, represents the division factor of the APB prescaler; When the division factor of the APB prescaler ≠ 1, *2; Wherein, represents the internal system clock of the MCU, represents the division factor of the AHB prescaler; The internal AHB bus clock of the MCU is obtained by dividing the system clock by the AHB prescaler. The calculation method includes: When the division factor of the APB prescaler = 1, ; Wherein, represents the internal system clock of the MCU, represents the division factor of the AHB prescaler; When the division factor of the APB prescaler ≠ 1 ; Wherein, represents the division factor of the internal prescaler of the timer, represents the count value of the internal counter of the timer.

[0006] Preferably, the step S32 makes the timer periodically trigger update events through the automatic reload function, including: S321. Configure the specific TIM trigger time. Each timer can obtain its own clock frequency by further dividing on the basis of the timer clock; S322. Configure the timer in the count-up mode, enable the timer update event, set the counter. When the timer is used, it will start counting from zero internally and increment according to its own clock frequency. When the count value is equal to the preset counter, the timer update event will be triggered; Among them, the timer trigger time for triggering the timer update event is: .

[0007] Preferably, the calculation formula for the signal output frequency in step S03 is: signal_output_fre = = ; Among them, signal_output_fre represents the signal output frequency, and n represents the number of points per cycle of the signal; Among them, n is the number of points per cycle of the discrete sine signal, and the deviation of the signal output frequency satisfies *100% ≤ 0.7%.

[0008] Preferably, the generation of the discrete sine signal data includes: S50. Generate sine signal data with an amplitude of A, ranging from -A A; S51. Increase the data as a whole by 2048 and convert it to a positive integer from 0 4095 to adapt to the input range of the DAC; Among them, the maximum value of the amplitude A does not exceed 2047.

[0009] Preferably, the adjustment of the signal amplitude in step S04 includes: S41. Set the initial ratio coefficient of the second digital-to-analog converter according to the target sound pressure level adjustment range to ensure that its maximum adjustment range covers the sound pressure level change requirements; S42. Measure the current output sound pressure level with a sound level meter, and adjust the ratio coefficient of the first digital-to-analog converter to make the sound pressure level reach the reference value, and the reference value is 94 dB; S43. After fixing the ratio coefficient of the first digital-to-analog converter, dynamically adjust the ratio coefficient of the second digital-to-analog converter through the MCU to adjust the output amplitude.

[0010] Preferably, the setting of the initial ratio coefficient of the second digital-to-analog converter in step S41 includes: S411. According to the target sound pressure level adjustment range ≥ 20 dB, determine that the maximum ratio coefficient of the second digital-to-analog converter does not exceed ; S412. Control the initial coefficient of the second digital-to-analog converter through the MCU.

[0011] Preferably, the amplitude of the signal output by the MCU is calculated according to the following formula: VOUT = *k; where k is an internal parameter of the DAC that can be controlled by the MCU, and VIN is the amplitude of the input signal.

[0012] A frequency response adjustment circuit for a multi-functional sound calibrator, which is used to implement the frequency response adjustment method for the multi-functional sound calibrator described in the above solution, and is characterized by including an MCU, a DAC, a power amplifier, a display module, a serial port module, and a Bluetooth module, wherein: The MCU is used to output a signal to the DAC and control the amplitude of the output signal of the DAC. The DAC processes the received signal according to the instruction sent by the MCU and then outputs it; The input end of the power amplifier is connected to the output end of the DAC, and is used to amplify the output signal to adjust the frequency response of the sound calibrator; The display module is connected to the MCU through an SPI interface to display the frequency and amplitude of the output signal; The serial port module is used to connect to a computer to read and control the frequency and amplitude of the signal; The Bluetooth module is used to connect to a mobile phone to read and control the frequency and amplitude of the signal.

[0013] Preferably, the display module is an OLED screen.

[0014] The present invention has at least the following beneficial effects: 1. Through the precise frequency division configuration of the internal timer of the MCU and the cyclic output of discrete sine signal data, a flexible and adjustable frequency generation is realized. The system calculates the output frequency according to the frequency division coefficient, the count value, and the number of points per cycle, and the frequency deviation is less than 0.7% to ensure that the frequency output of the sound calibrator meets the high-precision metrology requirements.

[0015] 2. Adopting the design of separating the reference frequency response adjustment (the first digital-to-analog converter) from the amplitude adjustment (the second digital-to-analog converter), only the ratio coefficient of the second digital-to-analog converter needs to be adjusted to achieve rapid amplitude adjustment after the reference frequency response is stable. Through the collaborative control of a 12-bit high-precision DAC and the MCU, it supports a 20dB sound pressure level range adjustment, taking into account both the adjustment accuracy and the operation convenience, and avoiding stability problems caused by signal attenuation.

[0016] 3. Design based on the timer auto - reload function and full - cycle signal output to ensure no phase deviation and discontinuity problems of the signal, improve the stability and reliability of the output of the sound calibrator, and meet the application requirements of long - term continuous operation. Brief Description of the Drawings

[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0018] Figure 1 The circuit diagram provided in Embodiment 1 of the present invention; Figure 2 The flowchart of the internal timer provided in Embodiment 1 of the present invention; Figure 3 The amplitude adjustment circuit provided in Embodiment 1 of the present invention. Detailed Embodiments

[0019] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present invention.

[0020] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above - mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present invention described here can be implemented in an order different from those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non - exclusive inclusion. For example, a process, method, system, product or server including a series of steps or units does not necessarily need to be limited to those clearly listed steps or units, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0021] Embodiment 1:

[0022] A frequency response adjustment method for a multifunctional sound calibrator, as Figure 2 shown, includes the following steps: S01. Generate data of discrete sine signals through an MCU (Micro - Controller Unit) and control a DAC (Digital - to - Analog Converter) to convert the data into an analog signal for output; S02. Amplify the analog signal output by the DAC through a power amplifier to adjust the frequency response of the sound calibrator; Specifically, the above frequency adjustment is mainly achieved through the internal timer of the MCU. A complete cycle signal data is generated inside the MCU, and the internal DAC is used to circularly output the complete cycle signal through timer triggering. By adjusting the timer triggering time and the number of points per cycle of the signal, the flexible adjustment of the signal output frequency can be realized. Since the generated signal is a complete cycle, there will be no phase deviation in the output signal, and the situation of signal discontinuity will not occur.

[0023] When configuring the clock of the internal timer TIM of the MCU: The timer clock is divided from the internal AHB bus clock of the MCU. The calculation method includes: When the division factor of the APB prescaler = 1, ; Among them, represents the timer clock, represents the internal AHB bus clock of the MCU, represents the division factor of the APB prescaler; When the division factor of the APB prescaler ≠ 1, *2; The internal AHB bus clock of the MCU is divided from the system clock through the AHB prescaler. The calculation method includes: When the division factor of the APB prescaler = 1, ; Among them, represents the internal system clock of the MCU, represents the division factor of the AHB prescaler; When the division factor of the APB prescaler ≠ 1 .

[0024] For example, when the system clock SYSCLK is 100 MHz, if the division factor of the AHB prescaler is equal to 1 and the division factor of the APB prescaler is equal to 1, then = = 100 MHz. If the division factor of the AHB prescaler is equal to 1 and the APB prescaler factor is equal to 2, then = = 100 MHz.

[0025] After configuring the clock source of the timer through the above steps, configure the specific timer triggering time through the following steps: S03. Adjust the signal output frequency through the internal timer of the MCU, including: S31. Configure the clock of the internal timer of the MCU. The timer is divided from the internal AHB bus clock of the MCU, and its frequency is determined after being divided by the AHB prescaler and the APB prescaler from the system clock; S32. Set the prescaler and counter inside the timer, and make the timer trigger the update event periodically through the auto-reload function; Specifically, the above step S32 makes the timer trigger the update event periodically through the auto-reload function, including: S321. Configure the specific trigger time of the timer. Each timer can divide the frequency again on the basis of the timer clock to obtain its own clock frequency; S322. Configure the timer to be in the counting-up mode, enable the timer update event, and set the counter. When the timer is enabled, the timer will start counting from zero inside and increment according to its own clock frequency. When the counted value is equal to the preset counter, the timer update event will be triggered; Among them, the trigger time of the timer for triggering the timer update event is: ; Among them, represents the division factor of the prescaler inside the timer, and represents the counted value of the counter inside the timer.

[0026] Further, the calculation formula for the signal output frequency in step S03 is: signal_output_fre = = ; Among them, signal_output_fre represents the signal output frequency, and n represents the number of points per cycle of the signal; Among them, n is the number of points per cycle of the discrete sine signal, and the deviation of the signal output frequency satisfies * 100% ≤ 0.7%.

[0027] And the generation of the above discrete sine signal data includes: S50. Generate sine signal data with an amplitude of A, ranging from -A A; S51. Increase the data as a whole by 2048 and convert it into positive integers from 0 4095 to adapt to the input range of the DAC; Among them, the maximum value of the amplitude A does not exceed 2047.

[0028] For example, if the timer clock is 100 MHz and a 1 kHz signal needs to be output, the division factor of the internal prescaler of the timer can be set to 10 and the counter to 100. At this time, the timer trigger time = = = 100 kHz, and then a discrete sine signal data with 100 points per cycle is generated. At this time, the output signal frequency = = = 1 kHz.

[0029] However, the above method cannot accurately obtain all the required frequency points, especially when the required output frequency is not an integer. For example, the timer clock is configured to 100 MHz, but a 501.19 Hz signal needs to be output. At this time, from the output signal frequency signal_output_fre = it can be known that = = ≈399050.26, but the internal division factor of the timer, the count value CK_CNT, and the number of points n per cycle of the signal can only be integers. Therefore, there will be a frequency deviation. For example, if the division factor of the internal prescaler of the timer is set to 1, the count value is 1608, and n is 124, then the output signal frequency = ≈501.52 Hz. At this time, there is *100% = *100% ≈0.07% frequency deviation. According to the "Verification Regulation of Sound Calibrators JJG 176-2022", the acceptable tolerance for the frequency of LS-level sound calibrators is 0.7%. It can be seen that the frequency output by this method is within the acceptable range. Therefore, it can be applied to the frequency adjustment of sound calibrators to achieve the output of multi-frequency signals.

[0030] S04. Coordinately adjust the signal amplitude through Digital-to-Analog Converter No. 1 and Digital-to-Analog Converter No. 2, where: The output terminal of Digital-to-Analog Converter No. 1 is connected to the input terminal of Digital-to-Analog Converter No. 2. Digital-to-Analog Converter No. 1 is used for reference frequency response calibration, and Digital-to-Analog Converter No. 2 is used for dynamic adjustment of the output amplitude; The control terminals of Digital-to-Analog Converter No. 1 and Digital-to-Analog Converter No. 2 are both connected to the MCU, and the MCU adjusts the ratio coefficient of the two.

[0031] Furthermore, the adjustment of the signal amplitude in step S04 includes: S41. Set the initial ratio coefficient of Digital-to-Analog Converter No. 2 according to the target sound pressure level adjustment range to ensure that its maximum adjustment range covers the sound pressure level change requirements; S42. Measure the current output sound pressure level through a sound level meter, and adjust the ratio coefficient of Digital-to-Analog Converter No. 1 to make the sound pressure level reach the reference value, and the reference value is 94 dB; After fixing the ratio coefficient of the first digital-to-analog converter, the MCU dynamically adjusts the ratio coefficient of the second digital-to-analog converter to adjust the output amplitude.

[0032] Secondly, the initial ratio coefficient setting of the second digital-to-analog converter in step S41 includes: S411. Determine that the maximum ratio coefficient of the second digital-to-analog converter does not exceed ; S412. The MCU controls the initial coefficient of the second digital-to-analog converter.

[0033] Furthermore, the MCU output signal amplitude is calculated according to the following formula: VOUT = *k; where k is the internal parameter of the DAC that can be controlled by the MCU, and VIN is the input signal amplitude.

[0034] In the above implementation, the amplitude adjustment is mainly achieved through the MCU and two DACs. As Figure 3 shown, one DAC is used for reference frequency response adjustment, and the other DAC is used for amplitude adjustment. This can not only increase the accuracy of frequency response adjustment but also conveniently adjust the signal amplitude when the reference frequency response is accurate and stable. Select a DAC device with an adjustable output signal amplitude. For example, the adjustable accuracy is 12 bits, and the 12-bit data range is 0 to 4095, then the output amplitude , where k is the internal parameter of the DAC that can be controlled by the MCU, and VIN is the input signal amplitude. In this way, the output signal amplitude can be conveniently adjusted through the MCU. Connect the control terminal and input terminal of the first digital-to-analog converter to the MCU, connect the control terminal of the second digital-to-analog converter to the MCU, and connect the output terminal of the first digital-to-analog converter to the input terminal of the second digital-to-analog converter.

[0035] First, before adjusting the frequency response through the first digital-to-analog converter, it is necessary to configure the output ratio coefficient of the second digital-to-analog converter and the output signal amplitude of the MCU. For the initial ratio coefficient of the second digital-to-analog converter, it is necessary to determine the amplitude range to be adjusted. For example, for a multifunctional sound calibrator, the sound pressure level range to be adjusted is 20 dB. Then, according to the acoustic formula △Lp = 20 * log10( ), and △Lp = 20, it can be known that the sound pressure P2 is 10 times that of the sound pressure P1. In order to meet the 10-fold amplitude adjustment, when the maximum adjustable coefficient of the DAC is 4095, the initial coefficient of the second digital-to-analog converter cannot exceed = 409.5, otherwise the requirement of 10-fold amplitude adjustment cannot be met. For the amplitude of the output signal of MCU1, since the output signal of the DAC is a partial ratio of the input signal and will not exceed the input signal at most, the output signal of MCU1 cannot be too small. Otherwise, the signal after two attenuations may be too small, resulting in instability and high distortion. The amplitude of the output signal of the internal DAC of MCU1 can be set when generating discrete sine signal data. For example, if the precision of the internal DAC is 12 bits, the data range that can be set by the internal DAC is 0~4095. Generally, the reference voltage of the internal DAC of the MCU is 3.3V, so the amplitude represented by each value is ≈0.8mV. Since the sine signal contains positive and negative parts, but the internal DAC cannot set negative values and must be an integer, the set sine signal amplitude A cannot exceed = 2047.5, that is, less than or equal to 2047. In this way, after generating the sine signal data, the data can be increased by 2048 as a whole. In this way, the generated data are all positive and will not exceed the set range of the DAC. For example, if the amplitude A is set to 1024, the generated sine data is between -1024 and 1024, and then increased by 2048 as a whole. At this time, the data range is between 1024 and 3072, and the output signal amplitude is *3.3V ≈ 0.825V.

[0036] Then, the frequency response is adjusted through the first digital-to-analog converter. For example, for a multifunctional sound calibrator, 94dB is often used as the reference. Since the ratio coefficient of the second digital-to-analog converter and the amplitude of the output signal of the MCU are both known and determined values, only the coefficient of the first digital-to-analog converter needs to be adjusted. At this time, in order to know how much the current output sound pressure level is, a calibrated sound level meter and measuring equipment such as an amplifier can be used. Connect the corresponding microphone to the sound hole of the sound calibrator to measure the sound pressure level emitted by the current sound calibrator. Adjust the coefficient of the first digital-to-analog converter according to the measured sound pressure level so that the measured result is 94dB. Record the ratio coefficient of the first digital-to-analog converter and the ratio coefficient of the second digital-to-analog converter at this time. This coefficient is the setting parameter required to be set with 94dB as the reference under the current amplitude parameter of the MCU. Then, adjust the output amplitude to keep the coefficient of the first digital-to-analog converter unchanged, and directly adjust the ratio coefficient of the second digital-to-analog converter proportionally to achieve flexible adjustment of the output amplitude.

[0037] In summary, in the first embodiment, through the precise frequency division configuration of the internal timer of the MCU and the cyclic output of discrete sine signal data, a flexible and adjustable frequency generation is achieved. The system calculates the output frequency based on the frequency division coefficient, the count value, and the number of points per cycle, and the frequency deviation is less than 0.7% to ensure that the frequency output of the sound calibrator meets the high-precision metrology requirements. Then, by adopting the design of separating the reference frequency response adjustment and the amplitude adjustment, only the ratio coefficient of the second digital-to-analog converter needs to be adjusted after the reference frequency response is stable to achieve rapid amplitude adjustment. Through the collaborative control of the 12-bit high-precision DAC and the MCU, it supports the adjustment of the sound pressure level range of 20 dB, taking into account both the adjustment accuracy and the operation convenience, and avoiding the stability problems caused by signal attenuation. Secondly, based on the automatic reload function of the timer and the design of the complete cycle signal output, it ensures that there are no phase deviation and discontinuity problems in the signal, improves the stability and reliability of the output of the sound calibrator, and meets the application requirements of long-term continuous operation.

[0038] Embodiment 2:

[0039] Combined with Figure 1 As shown, this embodiment aims to provide a circuit for the frequency response adjustment method of the above multi-functional sound calibrator, which includes an MCU, a DAC, a power amplifier, a display module, a serial port module, and a Bluetooth module, where: The MCU is used to output signals to the DAC and control the amplitude of the output signals of the DAC. The DAC processes the received signals according to the instructions sent by the MCU and then outputs them; The input end of the power amplifier is connected to the output end of the DAC and is used to amplify the output signals to adjust the frequency response of the sound calibrator; The display module (an OLED screen) is connected to the MCU through the SPI interface to display the output signal frequency and amplitude; The serial port module is used to connect to a computer to read and control the frequency and amplitude of the signals; The Bluetooth module is used to connect to a mobile phone to read and control the frequency and amplitude of the signals.

[0040] In summary, the serial port module interacts with the computer terminal, while the Bluetooth module interacts with the mobile phone terminal. Through relevant protocols, the computer and the mobile phone can be used to quickly and conveniently operate the MCU, facilitating the quick reading and setting of required parameters such as the signal frequency and amplitude. During the operation of the above circuit, the trigger time of the timer is configured according to the output frequency requirement and discrete sine signal data is generated, and then the initial ratio coefficient of the second digital-to-analog converter is configured according to the amplitude adjustment range requirement; finally, the ratio coefficient of the first digital-to-analog converter is adjusted by an external measuring instrument to make the output sound pressure level the reference sound pressure level.

[0041] Secondly, by integrating the OLED display module (SPI interface), serial port module, and Bluetooth module, it supports command control from the computer side and wireless parameter settings from the mobile phone side, enabling real-time display and dynamic adjustment of parameters such as frequency and amplitude. The low-power consumption characteristics of the OLED screen combined with the optimized configuration of the MCU further reduce the system power consumption and extend the device's battery life, making it suitable for various scenarios such as laboratory and on-site calibration.

[0042] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to memory, storage, database, or other media used in the various embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0043] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the above-mentioned division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0044] The above is only a preferred embodiment of the present invention and does not impose any form of limitation on the present invention. Although the present invention has been disclosed above with a preferred embodiment, it is not intended to limit the present invention. Any person skilled in the art can make some changes or modifications to the equivalent embodiments by using the above-disclosed technical content within the scope of the technical solution of the present invention. However, as long as it does not depart from the content of the technical solution of the present invention, any simple modification, equivalent change, and modification made to the above embodiments based on the technical essence of the present invention still fall within the scope of the technical solution of the present invention.

Claims

1. A frequency response adjustment method for a multi-functional sound calibrator, characterized in that, It includes the following steps: S01. Generate data of a discrete sine signal through the MCU, and control the DAC to convert the data into an analog signal for output; S02. Amplify the analog signal output by the DAC through a power amplifier to adjust the frequency response of the sound calibrator; S03. Adjust the signal output frequency through the internal timer of the MCU, including: S31. Configure the clock of the internal timer of the MCU. The timer clock is divided from the internal AHB bus clock of the MCU, and its frequency is determined after being divided by the AHB prescaler and the APB prescaler from the system clock; S32. Set the prescaler and counter inside the timer, and make the timer periodically trigger an update event through the auto-reload function; S04. Coordinate and adjust the signal amplitude through two digital-to-analog converters. The two digital-to-analog converters include Digital-to-Analog Converter No. 1 and Digital-to-Analog Converter No.

2. The output terminal of the Digital-to-Analog Converter No. 1 is connected to the input terminal of the Digital-to-Analog Converter No. 2, where: The output terminal of the Digital-to-Analog Converter No. 1 is connected to the input terminal of the Digital-to-Analog Converter No.

2. The Digital-to-Analog Converter No. 1 is used for reference frequency response calibration, and the Digital-to-Analog Converter No. 2 is used for dynamically adjusting the output amplitude; The control terminals of the Digital-to-Analog Converter No. 1 and the Digital-to-Analog Converter No. 2 are both connected to the MCU, and the MCU adjusts the ratio coefficients of the two; 2. A frequency response adjustment method for a multifunctional sound calibrator according to claim 1, characterized in that, The timer clock is divided from the internal AHB bus clock of the MCU. The calculation method includes: When the division coefficient of the APB prescaler = 1, ; Among them, represents the timer clock, represents the AHB bus clock inside the MCU, represents the division factor of the APB prescaler; When the division coefficient of the APB prescaler ≠ 1, *2; The internal AHB bus clock of the MCU is divided from the system clock through the AHB prescaler. The calculation method includes: When the division coefficient of the APB prescaler = 1, ; Among them, represents the internal system clock of the MCU, represents the division factor of the AHB prescaler; When the division coefficient of the APB prescaler ≠ 1 。 3. A method for frequency response adjustment of a multifunctional sound calibrator according to claim 1, characterized in that, The step S32 makes the timer periodically trigger an update event through the auto-reload function, including: S321. Configure the specific trigger time of the timer. Each timer can divide the frequency again on the basis of the timer clock to obtain its own clock frequency; S322. Configure the timer to be in the count-up mode, enable the timer update event, set the counter. When the timer is used, the timer will start counting from zero inside and increment according to its own clock frequency. When the count value is equal to the preset counter, the timer update event will be triggered; Among them, the trigger time of the timer for triggering the timer update event is: ; Among them, represents the division factor of the internal prescaler of the timer, represents the count value of the internal counter of the timer.

4. A method for frequency response adjustment of a multifunctional sound calibrator according to claim 1, characterized in that, The calculation formula for the signal output frequency in the step S03 is: signal_output_fre= = ; Among them, signal_output_fre represents the signal output frequency, and n represents the number of points per cycle of the signal; Among them, n is the number of points per cycle of the discrete sine signal, and the deviation of the signal output frequency satisfies *100%≤0.7%。 5. A frequency response adjustment method for a multifunctional sound calibrator according to claim 4, characterized in that, The generation of the discrete sine signal data includes: S50. Generate sine signal data with an amplitude of A, ranging from -A A; S51 increases the whole data by 2048 and converts it to a 4095 positive integer to adapt to the input range of the DAC; 4095 positive integer to adapt to the input range of the DAC; Among them, the maximum value of the amplitude A does not exceed 2047.

6. A frequency response adjustment method for a multifunctional sound calibrator according to claim 1, characterized in that, The adjustment of the signal amplitude in the step S04 includes: S41. Set the initial ratio coefficient of the Digital-to-Analog Converter No. 2 according to the target sound pressure level adjustment range to ensure that its maximum adjustment range covers the sound pressure level change requirements; S42. Measure the current output sound pressure level through a sound level meter, and adjust the duty cycle coefficient of the first digital-to-analog converter to make the sound pressure level reach the reference value, where the reference value is 94 dB; S43. After fixing the duty cycle coefficient of the first digital-to-analog converter, dynamically adjust the duty cycle coefficient of the second digital-to-analog converter through the MCU to adjust the output amplitude.

7. A method for frequency response adjustment of a multifunctional sound calibrator according to claim 6, characterized in that, The initial duty cycle coefficient setting of the second digital-to-analog converter in step S41 includes: S411. Determine that the maximum occupancy ratio coefficient of the second digital-to-analog converter does not exceed according to the target sound pressure level adjustment range ≥ 20 dB ; S412. Control the initial coefficient of the second digital-to-analog converter through the MCU.

8. A method for frequency response adjustment of a multifunctional sound calibrator according to claim 7, characterized in that, The output signal amplitude of the MCU is calculated according to the following formula: VOUT= *k; where k is an internal parameter of the DAC that can be controlled by the MCU, and VIN is the input signal amplitude.

9. A frequency response adjustment circuit for a multi-functional sound calibrator, which is used to implement the frequency response adjustment method for a multi-functional sound calibrator described in any one of the above claims 1-8, characterized in that, It includes an MCU, a DAC, a power amplifier, a display module, a serial port module, and a Bluetooth module, where: The MCU is used to output a signal to the DAC and control the output signal amplitude of the DAC. The DAC processes the received signal according to the instruction sent by the MCU and then outputs it; The input end of the power amplifier is connected to the output end of the DAC and is used to amplify the output signal to adjust the frequency response of the sound calibrator; The display module is connected to the MCU through an SPI interface to display the output signal frequency and amplitude; The serial port module is used to connect to a computer to read and control the signal frequency and amplitude; The Bluetooth module is used to connect to a mobile phone to read and control the signal frequency and amplitude.

10. A frequency response adjustment circuit for a multifunctional sound calibrator according to claim 9, characterized in that, The display module is an OLED screen.

Citation Information

Patent Citations

  • Automatic debugging and testing system and method for intermodulation of power amplifier module

    CN107222268A

  • Multi-frequency-point multifunctional sound calibration device and method

    CN112345068A

  • Method for correcting output amplitude-frequency response of arbitrary waveform generator

    CN114548169A

  • High-frequency signal processing device and wireless communication system

    US20130051290A1

  • Noise control system, a noise control device and a method thereof

    US20220328028A1