走马观花

2021 Question A-Signal Distortion Measurement Device-Huijia Fei Team

 
Overview
### 1. Foreword This system uses TI MSP432P401R microcontroller as the control core, uses the AGC circuit based on VCA821 to perform pre-processing on the input periodic signal, adjusts the large dynamic range signal to a small fluctuation range, and combines it with ADC front-end conditioning circuit to convert the signal into the MSP432 on-chip ADC acquisition range. The ADC is used to sequentially sample the conditioned signal, and the FFT is used to transform the collected signal sequence in the time-frequency domain. The total harmonic distortion THD is obtained based on the calculation, and finally the measurement information is displayed on the mobile APP through the wireless module. It was experimentally measured that when the input signal fundamental frequency is 1kHz~100 kHz and the peak-to-peak voltage range is 30mV~600mV, the output signal has a peak-to-peak value of not less than 2V, and the normalized amplitude of the above input signal is collected and measured by the ADC. value and THD, the absolute value of THD measurement error is within 3%. The above measurement information can be displayed in real time on the serial screen and mobile APP, and all indicators meet the design requirements. ### 2. Team Introduction* 2021 Question A: Signal Distortion Measurement Device - 2021 National First Prize* Team Name: Hui Jiafei* Team Members: Zhang Jiaming, Yue Zhifei, Zhou Hui* Instructor: Xia Dingyuan# ## 3. Project Analysis **Basic Requirements** 1. The peak-to-peak voltage range of the input signal: 300mV~600mV. 2. Input signal fundamental frequency: 1kHz. 3. Input signal distortion range: 5%~50%. 4. It is required that the absolute value of the input signal distortion measurement error |THDx-THDo|≤5%, THDx and THDo are the measured value and nominal value of the distortion respectively. 5. Display the distortion measurement value THDx. 6. The distortion measurement and display takes no more than 10 seconds. **Play part** 1. The peak-to-peak voltage range of the input signal: 30mV~600mV. 2. Input signal fundamental frequency range: 1kHz~100kHz. 3. Measure and display the input signal distortion THDx value, requiring |THDx-THDo|≤3%. 4. Measure and display a periodic waveform of the input signal. 5. Display the normalized amplitude of the fundamental wave and harmonics of the input signal, and only display the 5th harmonic. 6. Display the THDx value of the input signal measured and displayed by the measuring device, a periodic waveform, the normalized amplitude of the fundamental wave and harmonics on the mobile phone. 7. Others. * Automatic gain control (AGC) circuit design scheme: Using AGC circuit based on VCA821. The VCA821 is a DC-coupled, broadband, dB linear voltage-controlled gain amplifier. After VCA821, OPA695 is added as a post-amplifier, and the output signal passes through the OPA820 integrator and is connected to the VG pin of VCA821 to form a closed loop, thereby ensuring the stability of the output signal. The advantage of this solution is that the principle is clear, the input signal voltage range is wide, the frequency response is good, and the output voltage stability is good. The disadvantage is that the circuit is relatively complex. * ADC front-end conditioning circuit design: Use a non-inverting adder to follow the AGC circuit output signal and boost it by 1.65V. The non-inverting amplifier has high input impedance and has little impact on the front stage. * Signal sampling design scheme: sequential sampling. The sequential sampling method is mainly used in digital oscilloscopes. This method can obtain extremely high bandwidth (up to 50GHz) at an extremely low sampling rate (100 kHz ~200kHz), and the vertical resolution is generally above 10 bits. Since only one sample point on the waveform is taken in each sampling period, and each time is delayed by a known time, it takes longer to collect enough sample points. The advantage of this solution is that it can use a smaller sampling frequency to collect higher frequency signals, but the disadvantage is that it takes a long time to measure once. The principle of sequential sampling is shown in the figure below. ![Sequential sampling principle diagram.png] * Overall plan: In summary, this system uses the AGC circuit to perform pre-processing of the input periodic signal, combined with the ADC front-end conditioning circuit, to transform the signal into the ADC acquisition range, using MSP432 The internal ADC sequentially samples the output signal, and obtains the normalized amplitude of the fundamental wave and harmonics through FFT algorithm analysis. The THD is obtained through calculation and processing, and is displayed on the serial screen and mobile APP. The system structure block diagram is shown in the figure below. ![System structure block diagram.png] ### 4. Schematic circuit analysis The circuits in this work are all designed using Lichuang EDA. The schematic diagram is shown in the figure below. ![Schematic_[2021 National Electric Competition] Signal Distortion Measurement Device_2021-12-10.png] ***AGC circuit based on VCA821*** According to the above scheme design and principle analysis, through parameter calculation and actual debugging, The AGC circuit based on VCA821 is designed as shown in Figure 3. When dynamic signal amplitude correction is required, the AGC loop provides real-time gain control. The VCA821 output signal passes through OPA695 to provide additional load driving capability, then passes through the OPA820 integrator, and is connected to the VG pin of VCA821 to form a closed loop. The time constant of the loop is set by capacitor C2 and resistor R9. ![20211213124845.png] ![VCA821.png] ***ADC front-end conditioning circuit*** The input voltage range of the MSP432 on-chip ADC is 0~3.3V, and a front-end conditioning circuit is required to process the input signal. OPA211 is used to form a voltage follower, which plays the role of buffering, isolation, and improving load capacity. REF3030 is then used to generate a +3V reference voltage. The +1.65V DC potential is superimposed to the original signal through a resistor divider network, which is conducive to full sampling by the ADC. ![20211213125005.png] ![ADC.png] ### 5. PCB design analysis Since this design does not involve high-frequency circuits, the PCB design can follow the general op amp board design. ### 6. Physical display! [IMG_5444.JPG] ### 7. Work assembly ** Materials used: ** * ESP8266 development board! [image.png] * MSP432P401R microcontroller! [image.png] * Serial screen ![image.png] * Power supply![image.png] * VCA821 AGC circuit board * The assembly positions of various materials and modules of the ADC front-end conditioning circuit board are as shown in the physical picture, and the connection method is as shown in the system block diagram: AGC circuit of VCA821 The output is connected to the ADC front-end conditioning circuit, and the conditioned signal is input to the MSP432 microcontroller, and then the two serial ports of the microcontroller control the serial screen for display and communication with the ESP8266. The entire system is powered by a power supply. The AGC power supply is ±5V; the ADC front-end conditioning circuit power supply is ±12V; the microcontroller power supply is 3.3V; the serial port screen and ESP8266 module are both powered by 5V. ![System structure block diagram.png] Each module is connected through Dupont wire and shielded wire. ### 8. Program design According to the requirements of the topic, the program mainly includes functions such as ADC sequential sampling, THD calculation, waveform restoration, and measurement result display to meet the functional requirements of the topic. The system program flow chart is shown in the figure below. ![Program flow chart.png] The design idea is: after the system turns on the power, each module is first initialized. When there is a signal input, the first round of ADC real-time sampling is started; the fundamental frequency of the input signal is obtained through FFT; the number of points to be sampled in one cycle is preset. , set the adaptive reload value to modify the sampling frequency; after modifying the parameters, re-perform a round of ADC sequential sampling, collect 1024 points and perform FFT operation; calculate the THD, normalized amplitude and restore the waveform based on the obtained spectrum ; Display the results on the serial screen and transmit them to the mobile APP through the wireless module; Finally, restore the sampling frequency and perform a new round of sampling and display the measurement results. See the attachment for the core code. ### 9. Summary** According to the test data analysis, this system has achieved all the indicators of the basic requirements and performance part of the task, and the peak-to-peak voltage range and fundamental frequency range of the input signal are better than the task requirements. The peak-to-peak voltage range of the input signal reaches 10mV~1000mV, which is better than the requirements of some indicators (1); the maximum fundamental frequency of the input signal can reach 500kHz, which is better than the requirements of some indicators (2). ** **This system obtains a reasonable solution through theoretical analysis. It uses MSP432P401R as the control core, combines the AGC circuit and ADC front-end conditioning circuit based on VCA821, designs and implements a signal distortion measurement device, and completes the overall analysis of the input periodic signal. Harmonic distortion and normalized amplitude are measured and displayed, and all indicators meet the design requirements. **
参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2024-11-22 06:00:50
  • Questions about TVS breakdown voltage VBR and clamping voltage VC
  • Wireless Mesh Network Technology Foundation and Application
  • Parallel I/O Port Programming
  • STM32MP157A-DK1 review - by cruelfox
  • Coreless (standard low voltage) DC servo motor
  • 【SAMR21 New Gameplay】1. Introduction

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号