(A-Current Signal Detection Device) First Prize of Shandong Province_Topic A_Qingdao University of Technology[Copy link]
This system uses the ARM Cortex-M3 microcontroller as the core of circuit control and data processing, and designs and implements a current signal detection device using non-contact sensing. A power amplifier circuit is designed using the power amplifier chip LM1875T to achieve distortion-free amplification of the signal generated by the arbitrary wave signal generator. The coil is wound on the manganese core magnetic ring with enameled wire to make a current sensor to obtain the loop current signal, and then input into the single-chip microcomputer through the voltage follower and the AGC automatic gain controller to detect the amplitude and frequency of the loop current signal. With the help of the complex logic control capability of the single-chip microcomputer, the automatic switching of the measurement range and the real-time display of the signal parameters are realized. After rigorous theoretical analysis and calculation and repeated testing, the performance of this design is stable and reliable, and it can achieve the various indicators specified in the topic, and the measurement accuracy fully meets the requirements of the topic, and it is well realized to measure the current signal parameters through non-contact. Keywords: non-contact sensing current detection Cortex voltage follower AGC 1 system solution 1.1 Solution Description The hardware of this system mainly consists of MCU microcontroller module, power amplifier circuit module, current sensor module, signal acquisition and processing module and display module. STM32F103 is the control core of the system. At the same time, the power amplifier circuit of this system adopts LM1875 power amplifier integrated block. After the distortion-free amplification of the signal generated by the arbitrary wave signal generator, it is connected to a 10Ω resistance load through a wire to form a current loop. The coil is wound on the manganese core magnetic ring with enameled wire, and the wire of the measured current loop passes through the magnetic ring to form a current sensor module. A 1kΩ sampling resistor is added to both ends of the current sensor coil, and the signal frequency is stabilized and measurable through the OPA842 voltage follower and AD603 automatic gain controller. The peak-to-peak value of the current is stabilized and measurable through a multi-channel multi-stage instrument amplifier and a voltage follower. After the single-chip multi-channel ADC is collected and processed, the control display module displays the measured data in real time. Figure 1 System Block Diagram
1.2 Comparison and selection1.2.1 Main control chipScheme 1: Use STC89C52RC microcontroller as the main control chip. STC89C52RC has 8K bytes of system programmable Flash memory, uses the classic MCS-51 core, and has in-system programmable (ISP) features. However, it has a low main frequency, few peripherals, and a slow running speed. It is not suitable for fast processing of large amounts of data and has high power consumption.Scheme 2: Use STM32F103 microcontroller. This chip is a low-power, high-performance 32-bit Cortex-M3 ARM microcontroller with a maximum operating frequency of 72MHz. It has two 12-bit analog-to-digital converters, 1us conversion time, and three 16-bit timers. Each timer has up to 4 channels for input capture, which can meet the requirements of the competition question for measuring amplitude and frequency. In addition, the 32-bit controller has excellent performance in data calculation. Based on the principles of practicality, high efficiency, and low consumption, the above two schemes are comprehensively compared and scheme 2 is selected. 1.2.2 Power amplifier circuit Solution 1: Use TDA2030A audio power amplifier circuit as the power amplifier circuit. TDA2030A can output 16W effective power at ±19V and 8Ω impedance, and THD≤0.1%. It has few external components, but the selected components must be of guaranteed quality. When designing the printed circuit board, considering that the output line has a large current passing through, the decoupling of the ground wire and the output must be considered well. Solution 2: Use LM1875 to design the power amplifier circuit. LM1875 is small in size, simple in peripheral circuit, and has a large output power. The voltage range of this integrated circuit is 16~60V, and an output power of 20W can be obtained when the power supply voltage RL=4Ω is ±25V. The undistorted power is 20W (THD=0.08%), and the power can reach 40W when THD=1%. Since the power of LM1875 is larger than that of TDA2030 and TDA2009, and there are very few external components, the design is simple. At 1kHz, 20W, the distortion is only 0.015%. Considering that the power amplifier circuit requires a larger power and lower distortion, after comprehensive comparison of the above two solutions, the second solution is selected. 2 Theoretical Analysis and Calculation 2.1 Current Measurement Method Since the current to be measured is alternating current, let the radius of the manganese-zinc magnetic ring be R, and the area of the coil wrapped around the manganese-zinc magnetic ring on the manganese-zinc magnetic ring be S. According to Ampere's loop theorem: i.e. The magnetic induction intensity around the straight wire can be obtained And because the magnetic flux passing through the coilΦ = BS, according to Faraday's law of electromagnetic induction, the magnitude of the induced electromotive force in the circuit is proportional to the rate of change of the magnetic flux passing through the circuit. If the closed circuit is a coil with n turns, it can be expressed as: Where n is the number of coil turns. According to the above derivation, we can get According to the above derivation, By testing several groups of data, we can get the relationship between I2 and I1, and then we can calculate the measured current. 2.2 Harmonic component measurement method With the help of the internal ADC of the STM32F103 microcontroller, the current signal is collected and converted into a digital signal. The acquired digital signal is calculated using the fast Fourier transform algorithm, and with the help of the high-speed data computing capability of the microcontroller, the frequency and amplitude of the fundamental wave and each harmonic component of the signal are obtained. Then, according to the relationship between the induced current signal and the measured current signal obtained by analyzing a large amount of experimental data, the frequency and amplitude relationship of the fundamental wave of the measured current signal and each harmonic component is obtained. 3 Circuit and Program Design 3.1 Circuit Design The circuit of this system is mainly composed of power amplifier circuit and current analysis and detection circuit. The power amplifier circuit amplifies the signal generated by the arbitrary wave signal generator and connects the 10Ω resistance load through a wire to form a current loop. The current analysis and detection circuit processes the current signal collected from the current sensor through the voltage follower module and the automatic gain control module, and sends it to the single-chip microcomputer to complete the measurement of signal parameters.[font=微软雅黑, 3.1.1 Power amplifier circuit
Figure 2 LM1875 power amplifier circuit
3.1.2 Current analysis detection circuit
Figure 3 OPA842 voltage follower
[img]https://bbs.nuedc-training.com.cn/data/attachment/forum/201810/08/181332ohnrnbkwiqrkcqpk.png.thumb.Figure 4 TLV3501 voltage comparator
Figure 4 TLV3501 voltage comparator
3.2 Program design 3.2.1 Main program design
Figure 5 Main program flow chart
4 Test plan and test results 4.1 Test results and analysis When testing the power amplifier circuit, the sinusoidal signal frequency was selected as 50HZ, 500HZ, 1Khz, and the peak-to-peak amplitude was selected as 10VPP, 12VPP, and 15VPP for test tabulation. It can be seen from Table 2 that the peak-to-peak value of the current flowing through the 10Ω load resistor is not less than 1A, and the current is undistorted, which fully meets the requirements. When designing the current signal detection and analysis circuit, the sinusoidal signal frequency was selected as 50HZ, 300HZ, 600HZ, 1KHZ, and the amplitude was selected as 10VPP, 11VPP, 12VPP, and 13VPP for test tabulation. The test frequency and peak-to-peak value, as shown in Table 3, show that the design fully meets the requirements. Set the peak-to-peak value of the sinusoidal current to 10ma, 50ma, 300ma, 1A, and the frequency setting to the same as above, and tabulate the test results. The test frequency and peak-to-peak value can be obtained from Table 4, which basically meets the requirements of the question. When testing non-sinusoidal signals, the frequencies are selected as 50HZ, 100HZ, 200HZ, and the amplitudes are selected as 5VPP, 10VPP, and 12VPP for test tabulation. The measured data can be obtained from Table 5, which shows that the design basically meets the requirements. 5 Summary According to the above experimental data, the design made for this question meets all the requirements of the question well. This design uses the LM1875 power amplifier to form a distortion-free current signal with a peak-to-peak value of no less than 1A, and achieves the effect of frequency measurement through the voltage follower and AD603 automatic gain system; the current peak-to-peak value can be measured through multi-channel multi-stage operational amplifiers, voltage followers and multi-channel ADC sampling, and finally the frequency and peak-to-peak value of the current are displayed on the screen. When the signal is changed to a non-sinusoidal signal, the frequency and amplitude of the fundamental wave and each harmonic can be measured and displayed on the screen through hardware circuit filtering and FFT fast Fourier transform, completing the test of the non-sinusoidal current signal. Actual picture The peak-to-peak amplitude values were 10VPP, 12VPP, and 15VPP for testing and tabulation. It can be seen from Table 2 that the peak-to-peak current flowing through the 10Ω load resistor is not less than 1A, and the current is undistorted, which fully meets the requirements. When designing the current signal detection and analysis circuit, the sinusoidal signal frequency was selected as 50HZ, 300HZ, 600HZ, and 1KHZ, and the amplitude was selected as 10VPP, 11VPP, 12VPP, and 13VPP for testing and tabulation. The test results of the frequency and peak-to-peak value can be obtained from Table 3, which shows that the design fully meets the requirements. The peak-to-peak value of the sinusoidal current is set to 10ma, 50ma, 300ma, and 1A, and the frequency is set as above. The test results are tabulated. The test results of the frequency and peak-to-peak value can be obtained from Table 4, which basically meets the requirements. When testing non-sinusoidal signals, the frequency is selected as 50HZ, 100HZ, and 200HZ, and the amplitude is selected as 5VPP, 10VPP, and 12VPP for testing and tabulation. The measured data can be obtained from Table 5, which shows that the design basically meets the requirements. 5 Summary According to the above experimental data, the design made for this problem meets all the requirements of the problem well. This design uses the LM1875 power amplifier to form a distortion-free current signal with a peak-to-peak value of not less than 1A, and achieves the effect of frequency measurement through the voltage follower and AD603 automatic gain system; the current peak-to-peak value can be measured through multi-channel multi-stage operational amplifiers, voltage followers and multi-channel ADC sampling, and finally the frequency and peak-to-peak value of the current are displayed on the screen. When the signal is changed to a non-sinusoidal signal, the frequency and amplitude of the fundamental wave and each harmonic can be measured and displayed on the screen after hardware circuit filtering and FFT fast Fourier transform, completing the test of the non-sinusoidal current signal. Actual picture The peak-to-peak amplitude values were 10VPP, 12VPP, and 15VPP for testing and tabulation. It can be seen from Table 2 that the peak-to-peak current flowing through the 10Ω load resistor is not less than 1A, and the current is undistorted, which fully meets the requirements. When designing the current signal detection and analysis circuit, the sinusoidal signal frequency was selected as 50HZ, 300HZ, 600HZ, and 1KHZ, and the amplitude was selected as 10VPP, 11VPP, 12VPP, and 13VPP for testing and tabulation. The test results of the frequency and peak-to-peak value can be obtained from Table 3, which shows that the design fully meets the requirements. The peak-to-peak value of the sinusoidal current is set to 10ma, 50ma, 300ma, and 1A, and the frequency is set as above. The test results are tabulated. The test results of the frequency and peak-to-peak value can be obtained from Table 4, which basically meets the requirements. When testing non-sinusoidal signals, the frequency is selected as 50HZ, 100HZ, and 200HZ, and the amplitude is selected as 5VPP, 10VPP, and 12VPP for testing and tabulation. The measured data can be obtained from Table 5, which shows that the design basically meets the requirements. 5 Summary According to the above experimental data, the design made for this problem meets all the requirements of the problem well. This design uses the LM1875 power amplifier to form a distortion-free current signal with a peak-to-peak value of not less than 1A, and achieves the effect of frequency measurement through the voltage follower and AD603 automatic gain system; the current peak-to-peak value can be measured through multi-channel multi-stage operational amplifiers, voltage followers and multi-channel ADC sampling, and finally the frequency and peak-to-peak value of the current are displayed on the screen. When the signal is changed to a non-sinusoidal signal, the frequency and amplitude of the fundamental wave and each harmonic can be measured and displayed on the screen after hardware circuit filtering and FFT fast Fourier transform, completing the test of the non-sinusoidal current signal. Actual picture