3919 views|2 replies

95

Posts

6583

Resources
The OP
 

(A-Current Signal Detection Device) First Prize of Zhejiang Province_Hangzhou Dianzi University [Copy link]

This design uses STM32F407 as the core to achieve isolated current measurement. Use TDA2030 to power amplify the input signal, and the current is transmitted to the lower level after passing through the current sensing magnetic ring wound with constantan wire. To facilitate voltage control, INA128 is used for post-amplification, OPA695 is used to raise the voltage, and finally input into the AD of STM32 for sampling and processing.
In the competition, you need to have a big picture view. First, you need to understand which modules need to be made, and then divide the work and cooperate. The production of spare boards can save a lot of time during production. Teammates in the same group need to negotiate the connection method between the front and rear stages. The hardware should complete the production of key modules in advance, giving students who write software sufficient time to process the code.
Actual picture of the work
Current signal detection device (Topic A)
1 System solution
1.1 Power amplifier circuit
Solution 1: Use OPA548 to amplify the input signal.
Solution 2: Use TDA2030 to amplify the input signal.
During the test, OPA548 will overheat and fail to work properly after working for a long time, and the TDA2030 waveform is more intact at low current, so Solution 2 is finally selected.
1.2 Current Sensing
Solution 1: Use a magnetic ring to sense the current, convert the current into voltage through a sampling resistor, and then amplify the voltage through INA128.
Solution 2: Use a magnetic ring to sense the current, convert the current into voltage through a sampling resistor, and then amplify the voltage through INA194.
However, since INA194 is powered by a single power supply and cannot amplify negative current, INA128 is used to measure negative current. In addition, INA128 can adjust the amplification factor, so the output voltage is more suitable for the measurement of the subsequent stage, so option 1 is selected.
1.3 Current detection and analysis
Option 1: Use AD8505 to collect the voltage after the previous stage amplification.
Option 2: Use an adder to raise the output voltage of INA128, and control the output voltage between 0-3.3V, and directly use the on-chip AD of STM32F407 for sampling.
It is relatively simple to use the on-chip AD circuit of STM32F407 directly, and it can achieve measurement accuracy; while AD8505 is more expensive and requires self-configuration of the program. Considering the cost, circuit structure, and difficulty, option 2 is finally selected.
1.4 System overall block diagram
Figure 1 System block diagram
2 Theoretical Analysis and Calculation
2.1 Design of Power Amplifier Circuit
Imax=Ipp/2/1.414
Pmax=Imax*RL=3.53W
2.2 Design of Induction Signal Amplifier
The current sensor is composed of a primary coil, a secondary coil and a magnetic core. The secondary coil is connected to the main circuit and passes through the magnetic ring (the number of coil turns is N1=1, and the current is I1). The number of turns of the enameled wire wound on the manganese core magnetic ring is N2, and the current is I2. The current transformer ratio is: K=I1/I2=N2/N1
I2=I1*N1/N2 "]INA128 amplifier gain calculation: G=1+50KΩ/Rg
2.3 Adder Design
vo=vo1+vo2
vo1=(1+R4/R3)*R2/(R1+R2)
vo1=(1+R4/R3)*R1/(R1+R2)
2.4 Current measurement
The current is induced by the magnetic ring and then converted into a voltage signal. The ADC sampling is used for Fourier analysis to convert the time domain signal into a frequency domain signal to obtain its frequency and amplitude. The amplitude conversion coefficient is then compared through multiple data measurements.
Discrete Fourier Transform (DFT) is a Fourier Transform in both time and frequency domains, which transforms the sampling of the time domain signal into the sampling of the discrete time Fourier Transform (DTFT) frequency domain. In form, the sequences at both ends of the transform (in the time domain and frequency domain) are of finite length, but in fact both sets of sequences should be considered as the main value sequences of discrete periodic signals. Even if a finite-length discrete signal is subjected to DFT, it should be considered as a periodic signal after periodic extension and then transformed. In practical applications, fast Fourier transform is usually used to efficiently calculate DFT. Therefore, stm32 was used for fft analysis during reanalysis.
2.5 Harmonic Measurement Method
This method also uses the fft algorithm to perform sampling analysis by comparing the frequency and amplitude of the fundamental wave and harmonic wave of the sampled data.
The following are the Fourier series of triangle wave and square wave (the composition of their waveforms can be obtained):
Triangle wave: (A is the peak-to-peak value)
Square wave (E is the peak-to-peak value)
After FFT analysis, each point represents the amplitude of a frequency. Through analysis, it is easy to get the frequency and peak-to-peak value of the fundamental wave and harmonic wave
3 Circuit and Program Design
3.1 Design of Power Amplifier Circuit
The circuit has a large power, so the TDA6030 with a large power is selected to make it have a large output capacity. In order to reduce the chip temperature, an external heat sink is required. In order to make the peak-to-peak value of the current loop current 0.1 of the peak-to-peak value of the voltage set by the arbitrary waveform generator, the power amplifier maintains a gain of 1.
Figure 3 TDA2030 hardware circuit
3.2 Design of inductive current conversion
To meet the measurement range of the on-chip AD, and because the post-stage adder raises the voltage to 1.2V, when a 10Vpp signal is input, the INA128 output should be within 2.4V. This is achieved by adjusting Rg to change the gain.
Figure 3 INA128 amplifier circuit
3.3 Adder design
Since the on-chip AD acquisition range is 0-3.3V, in order to improve the measurement accuracy, the adder is best to use a 1.6V reference source to raise the signal, but because there is no ready-made 1.5V, a 1.2V reference source is used to provide the reference voltage.
Figure 4 Adder circuit
3.4 Software Programming
The program flow chart is shown in the figure:
Figure 5 Program flow chart
4. Test plan and test result analysis
4.1 Test Instruments
Oscilloscope, handheld meter, signal generator
4.2 Test Plan
Input the signal to the power amplifier circuit, connect the multimeter in series to measure the current, and the microcontroller to measure the frequency and peak value, and compare them with the previous stage.
4.3 Test Data

4.4 Test Result Analysis
From the measurement results, it can be seen that the waveform has no obvious distortion at 1A, the frequency measurement error is within 1%, the current measurement error is within 5%, and it can measure multiple harmonic components within 1KHz. Therefore, the design meets the requirements of the topic
5 Summary
This design uses STM32F407 for measurement and display, which can realize the functions required by the question and measure the frequency of the current signal and the amplitude of each harmonic component. The actual test found that there is a large deviation between the theoretical calculated value of the number of magnetic ring turns and the actual number of turns.
jpg[/img]
Figure 3 INA128 amplifier circuit
3.3 Adder design
Since the AD acquisition range in the chip is 0-3.3V, in order to improve the measurement accuracy, the adder is best to use a 1.6V reference source to raise the signal, but because there is no ready-made 1.5V, a 1.2V reference source is used to provide the reference voltage.
Figure 4 Adder circuit
3.4 Software Programming
The program flow chart is shown in the figure:
[font=微软雅黑, Figure 5 Program flow chart
4. Test plan and test result analysis
4.1 Test instruments
Oscilloscope, handheld meter, signal generator
4.2 Test plan
The signal is input into the power amplifier circuit, a multimeter is connected in series to measure the current, and the microcontroller measures the frequency and peak value, and compares them with the previous stage.
4.3 Test Data

4.4 Test result analysis
The measurement results show that the waveform has no obvious distortion at 1A, the frequency measurement error is within 1%, the current measurement error is within 5%, and it can measure multiple harmonic components within 1KHz, so the design meets the requirements of the topic
5 Summary
This design uses STM32F407 for measurement and display, which can realize the functions required by the topic and measure the frequency of the current signal and the amplitude of each harmonic component. The actual test found that there is a large deviation between the theoretical calculated value of the number of magnetic ring turns and the actual number of turns.
jpg[/img]
Figure 3 INA128 amplifier circuit
3.3 Adder design
Since the AD acquisition range in the chip is 0-3.3V, in order to improve the measurement accuracy, the adder is best to use a 1.6V reference source to raise the signal, but because there is no ready-made 1.5V, a 1.2V reference source is used to provide the reference voltage.
Figure 4 Adder circuit
3.4 Software Programming
The program flow chart is shown in the figure:
[font=微软雅黑, Figure 5 Program flow chart
4. Test plan and test result analysis
4.1 Test instruments
Oscilloscope, handheld meter, signal generator
4.2 Test plan
The signal is input into the power amplifier circuit, a multimeter is connected in series to measure the current, and the microcontroller measures the frequency and peak value, and compares them with the previous stage.
4.3 Test Data

4.4 Test result analysis
The measurement results show that the waveform has no obvious distortion at 1A, the frequency measurement error is within 1%, the current measurement error is within 5%, and it can measure multiple harmonic components within 1KHz, so the design meets the requirements of the topic
5 Summary
This design uses STM32F407 for measurement and display, which can realize the functions required by the topic and measure the frequency of the current signal and the amplitude of each harmonic component. The actual test found that there is a large deviation between the theoretical calculated value of the number of magnetic ring turns and the actual number of turns.
"]The program flow chart is shown in the figure:
Figure 5 Program flow chart
4. Test plan and test result analysis
4.1 Test instruments Oscilloscope, handheld ammeter, signal generator 4.2 Test plan Input the signal into the power amplifier circuit, connect a multimeter in series to measure the current, use the microcontroller to measure the frequency and peak value, and compare them with the previous stage.
4.3 Test Data

4.4 Test result analysis
The measurement results show that the waveform has no obvious distortion at 1A, the frequency measurement error is within 1%, the current measurement error is within 5%, and it can measure multiple harmonic components within 1KHz, so the design meets the requirements of the topic
5 Summary
This design uses STM32F407 for measurement and display, which can realize the functions required by the topic and measure the frequency of the current signal and the amplitude of each harmonic component. The actual test found that there is a large deviation between the theoretical calculated value of the number of magnetic ring turns and the actual number of turns.
"]The program flow chart is shown in the figure:
Figure 5 Program flow chart
4. Test plan and test result analysis
4.1 Test instruments Oscilloscope, handheld ammeter, signal generator 4.2 Test plan Input the signal into the power amplifier circuit, connect a multimeter in series to measure the current, use the microcontroller to measure the frequency and peak value, and compare them with the previous stage.
4.3 Test Data

4.4 Test result analysis
The measurement results show that the waveform has no obvious distortion at 1A, the frequency measurement error is within 1%, the current measurement error is within 5%, and it can measure multiple harmonic components within 1KHz, so the design meets the requirements of the topic
5 Summary
This design uses STM32F407 for measurement and display, which can realize the functions required by the topic and measure the frequency of the current signal and the amplitude of each harmonic component. The actual test found that there is a large deviation between the theoretical calculated value of the number of magnetic ring turns and the actual number of turns.

This post is from Electronics Design Contest

Latest reply

I really miss the time when we worked together.  Details Published on 2019-4-22 16:02
 
 

173

Posts

0

Resources
2
 
Thanks for sharing!
This post is from Electronics Design Contest
Personal signature服务器大全
 
 
 

943

Posts

3

Resources
3
 
I really miss the time when we worked together.
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