Abstract:
A device for multiple distortion signal generation and distortion measurement was implemented to measure the signal distortion caused by nonlinear components in circuits. The hardware structure of the device consists of signal generation, signal selection, MCU control, local display and interaction, wireless transmission, and other auxiliary circuits. The ADC was controlled by timer to collect signal voltage and the DMA channel was used to improve data transmission speed. A DSP library was deployed in MCU to perform fast FFT transformation on the signal, the total harmonic distortion THD value was calculated after measuring the amplitude of the first five harmonics. The tests showed that when the voltage peak value of the input signal was between 20 mV and 3 V, and the fundamental frequency was between 1 KHz and 100 KHz, the device could control the output of five types of signals: top distortion, bottom distortion, bidirectional distortion, crossover distortion, and no obvious distortion through local interaction and mobile app. The absolute error of THD measurement for five types of signals under different types and degrees of distortion was less than 0.008. The device has a fast response speed, supports human-machine interaction, data storage and traceability, and provides a visual teaching tool for signal distortion mechanism and THD measurement, as well as technical references for the development of new signal processing devices.