3301 views|0 replies

95

Posts

6583

Resources
The OP
 

[A-Current Signal Detection Device] Sichuan Province-Second Prize [Copy link]

This work mainly completed the measurement of frequency and current. We did write a program for the harmonic algorithm, but there were always errors after adding it to the main program. In the end, we ran out of time and did not complete this part. The frequency measurement was very accurate, and it was also the same when we measured it with the precision instruments of the University of Electronic Science and Technology of China. The current was due to a small mistake on our part - we did not add a heat sink to the power resistor, which made it more accurate when the temperature was high, but when the temperature was low, the drift was a bit large and nonlinear. In addition, this is my third time participating in the electronic design competition. I feel that it is really a training for people. It is a kind of tempering for people's abilities and will. In addition, soldering the board really hurts my eyes hhhhhh
Abstract
With the continuous development of power electronics technology, the power industry is facing the challenges of various new technology applications with computers as the core, which makes it difficult for traditional current signal detection devices to meet the further development requirements of the industry. Therefore, there is an urgent need for intelligent and digital current signal detection devices. Based on the comparison of various amplification circuits and detection circuit principles, this paper proposes a method of non-contact sensing and loop current detection. The signal is amplified by the power amplifier circuit, a power resistor is connected in series, and the magnetic ring coil is used as the current sensor to detect the voltage signal. Then the signal passes through the differential amplifier circuit, and the output analog voltage signal is sent to the single-chip microcomputer STM32 for A/D conversion, filtering, FFT and other data processing. Finally, it can display the current peak-to-peak value, frequency and current amplitude and frequency of each harmonic component of any signal. The current accuracy is better than 5% after measurement; the frequency accuracy is better than 1%.
Keywords:Current detection; magnetic ring coil; STM32; FFT
Current signal detection device (Question A)
【Undergraduate Group】
1.SystemScheme
1.1 Comparison and Selection of Schemes Experimental Scheme Selection
1.1.1 Power Amplifier Circuit Module Selection
Solution 1: Use LM1875 power amplifier circuit
The maximum output power of LM1875 is 30W, the harmonic distortion is 0.07, the bandwidth is 10-100K (+/-3dB), and the operating junction temperature Tj=+150. Tj=Ta+(R*PD)Ta: ambient temperature of package (oC); R: thermal resistance from PN junction to environment (oC/W); PD: power consumption of package (W).
Solution 2: Using OPA544 power amplifier circuit
OPA544 is a high-voltage and high-current amplifier, suitable for many high-current AC drive devices.
Combining the above two solutions, choose Solution 2.
1.1.2 MCU Main Control Module Selection
Solution 1: Use STM32F103 MCU as the main control system
The voltage and current acquisition is the core part of the whole system, which is related to the measurement accuracy of the whole system and whether the system reaches the rated index. The voltage output capacity of this power supply is 0 to 30V, the current output capacity is 0-3A, the minimum voltage step value is 10mV, and the minimum current step value is 1mA. When meeting this measurement requirement, the AD accuracy needs to be greater than 30000/10=3000, so the sampling bit number of AD should be greater than 12bit. In order to reduce costs, the system uses the STM32F103 MCU with three built-in 12bit, 18-channel AD when selecting the MCU.
Scheme 2: Use STC12C5A60S2 MCU as the main control system
STC12C5A60S2 is a single clock/machine cycle (1T) MCU produced by STC. It is a new generation of 8051 MCU with high speed, low power consumption and super strong anti-interference. The instruction code is fully compatible with the traditional 8051, but the speed is 8-12 times faster. It integrates MAX810 dedicated reset circuit, 2-way PWM, 8-way high-speed 10-bit A/D conversion, for motor control and strong interference occasions. However, compared with STM32 MCU, D/A conversion circuit is still needed, and the acquisition is relatively slow.
After comprehensive consideration, plan 1 was adopted.
1.1.3 Design and selection of ADC module
Solution 1: Use ADC chip to build analog-to-digital conversion circuit.
You can select a suitable ADC chip and build it using a classic module circuit.
Solution 2: Directly use the 12-bit high-speed ADC module on the STM32 chip.
The core board STM32F103 used in this system has three 12-bit analog-to-digital converters, and the conversion time can reach 1us, with up to 21 input channels.
Since the ADC on the microcontroller can meet the experimental sampling requirements, we choose scheme 2 as the design method of the ADC module to reduce the welding of external circuits.
1.2Scheme Description
After demonstration, this experiment uses the OPA544 chip as a power amplifier to enhance the driving capability, and senses the AC signal through the coil, amplifies the signal differentially, and detects the required voltage by the STM32 microcontroller, and then derives the peak-to-peak value and frequency of the current through the software to achieve the requirements of each project of the competition. 2. Theoretical analysis and calculation 2.1 Current measurement method Wind a coil on a magnetic ring with enameled wire to make a current sensor. The following figure shows a simple 1:N current transformer. The secondary coil of the transformer has a load current Rs. "]
Figure 1 Coil equivalent schematic diagram
The current is passing through the load resistor will generate magnetic flux that interacts with the magnetic flux generated by the resistor ic to be measured. Therefore, the inductance generated in the coil satisfies the following relationship:
Where A is the cross-sectional area of the transformer core. Integrate the above formula:
In the above formula, Lm is the magnetic induction coefficient, Cw is the coil equivalent capacitance, and the size of the coil equivalent capacitance determines the measurement bandwidth.
The biggest advantage of current transformer measurement is that the output voltage is proportional to the current to be measured; at the same time, the influence of the position change of the measuring coil on the measurement accuracy is suppressed. The measured output signal can be directly sampled using an analog-to-digital converter without amplifier amplification. This measurement method provides electrical isolation between the measuring circuit and the measuring circuit.
2.2 Harmonic component measurement method
Harmonic measurement based on Fourier transform is the most widely used method today. It is composed of the basic principle of transition from discrete Fourier transform to fast Fourier transform. This method is used to measure harmonics with high accuracy, more functions and easy use. Its disadvantages are that it requires current values of a certain time and requires two transformations, which requires a large amount of calculation and a long calculation time, resulting in a long detection time and poor real-time detection results. Moreover, during the sampling process, when the signal frequency and the sampling frequency are inconsistent, the use of this method will produce spectrum leakage effect and fence effect, making the calculated signal parameters (i.e. frequency, amplitude and phase) inaccurate, especially the phase error is very large, which cannot meet the measurement accuracy requirements, so the algorithm must be improved.
Where T0 is the signal period; Ts is the sampling period; fs is the sampling frequency; f0 is the signal frequency; L is a positive integer.
Figure 2 System block diagram
(2) Power supply filter circuit
Figure 3 Schematic diagram of power supply filter circuit
(3) Schematic diagram of power amplifier circuit
Figure 4 Schematic diagram of power amplifier circuit
(4) Schematic diagram of current detection and analysis circuit
Figure 5 Schematic diagram of current detection and analysis circuit
3.2. Program design
3.2.1 Program function description and design ideas
According to the requirements of the topic, the software part mainly realizes the calculation and display of the peak-to-peak value and frequency of the current.
(1) Frequency calculation:
(2) Peak-to-peak value calculation:
3.2.2 Program flow chart
Figure 6 Program flow chart

This post is from Electronics Design Contest
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list