Displacement sensors are widely used in industrial and control fields, such as process detection , physical measurement and automatic control. Due to its low measurement accuracy, it often cannot meet social needs and also limits the application of sensors. Therefore, a displacement measurement device based on single-chip microcomputer and FPGA is designed here , which can achieve high-precision measurement and high linearity, can replace manual work in various harsh environments, achieve high-precision measurement, and has certain practical value.
1 Overall design
Plan
and implementation diagram
The overall implementation block diagram of the system
is shown in Figure 1, which consists of
a signal
generation part, a differential amplifier part, a transformer coupling part, a signal processing part,
a
data
sampling part, and a processing and display part. The signal generated by DDS
technology
is sent to the differential transformer after differential amplification by THS4503. The signal output by the differential transformer is sent to MAXl97 for sampling after amplification, rectification and filtering. The sampled data is processed by the processing unit and the measured displacement is displayed on the LCD.
2 Theoretical analysis and calculation
2.1 Theoretical analysis of DDS signal generation
When the system clock frequency and the number of bits of the phase accumulator are constant, the frequency of the output waveform is determined by the frequency control word. Let M be the number of bits of the designed phase accumulator and N be the frequency control word. The frequency of the output signal of the DDS system is In
the experiment
, the frequency of the excitation signal is 100 kHz, the clock frequency used is 40 MHz, the frequency control word is 24 bits, and the number of bits of the phase accumulator is 29 bits. Then, after passing through the D/A
converter
, the output signal is output through an active low-pass filter with a cutoff frequency of 150 kHz to obtain a stable, continuous and smooth waveform.
2.2 Analysis of data processing methods
The differential transformer is an open magnetic circuit. The mutual inductance between the primary and secondary sides changes accordingly with the movement of the magnetic core, causing the voltage of the two secondary coils to change accordingly. The change in displacement is converted into a change in the output voltage. After rectification, data is collected and processed to obtain the d value. Figure 2 shows the table lookup method used for differential transformer data processing: First, a vernier caliper is used to measure several groups of displacement values. The number of groups measured is determined according to the measurement range and the measurement results, and the corresponding d value is recorded and drawn into a table. In actual measurement, the displacement range is determined by table lookup based on the measured d value, and the segmented broken line method is used within this range to obtain the accurate displacement value. The table lookup method can accurately locate the displacement range, and the data obtained has a small error and high accuracy.
3 Unit Module Circuit Design
3.1 Design of Linear Variable Differential Transformer
The following two factors should be considered during design: 1) to ensure that the armature does not extend beyond the coil when working; 2) the sensitivity of the differential transformer. When the number of turns increases, the sensitivity S can be increased, but the increase in the number of turns will be constrained by factors such as the allowable current density of the coil wire, the heat dissipation of the wire heat, and magnetic saturation.
Based on the above analysis, the coil is divided into three sections: upper, middle and lower, each with a length of 2 cm. The middle section is the primary coil, and the upper and lower sections are the secondary coils. The turns ratio of the primary and secondary coils is 1:1, and the length of the matching magnetic rod is also 2 cm. This coil works well within the linear movement range, but when it moves to the edge, the magnetic lines are dispersed, and nonlinear data is measured, but it can still achieve high accuracy after calibration.
3.2 Differential Amplifier Circuit
THS4503 is selected as the differential amplifier circuit. Since the frequency of the excitation signal is fixed at 100 kHz, a capacitor is added to the feedback resistor of the differential amplifier to achieve the effect of filtering and avoiding self-excitation. The signal output from the low-pass filter needs to be amplified by the differential amplifier and then output a pair of differential signals to provide voltage for the primary coil of the transformer. The power supply adopts ±5 V dual power supply, and the two output terminals of THS4 503 are connected to the two ends of the primary coil of the transformer through two isolation resistors with a resistance of 12 Ω. The specific circuit diagram is shown in Figure 3.
3.3 Detection Circuit
Figure 4 is a detection circuit. The differential transformer converts the displacement into a voltage signal, measures the signal amplitude or effective value, and then processes the data to obtain the corresponding displacement value. For the detection of effective value, the true effective value measurement chip AD637 is selected. The average capacitor C1 sets the average time constant and determines the low-frequency accuracy, output ripple size and stabilization time. After amplification, the signal is input to AD637 for effective value detection. The two potentiometers are respectively adjusted to zero and amplitude to make the output of AD637 more accurate. [page]
3.4 A/D sampling circuit
During the movement of the core, the output voltage value varies greatly. Therefore, it is connected to the programmable amplifier, first sampled by the A/D converter, and the amplitude of the signal to be processed is located according to the amplitude band divided in advance, and then the gear of the amplifier is controlled to improve the sampling accuracy of the A/D converter, thereby reducing the measurement error. MAXl97 uses an internal clock and internal reference source, and almost no peripheral circuits are required. The circuit structure is simple and easy to use. The specific circuit diagram is shown in Figure 5.
3.5 DC motor drive circuit
The dedicated chip L298HN is used as the motor driver. The motor needs a large current when starting. In order to ensure that the power supply system of the microcontroller control board is not affected and power failure occurs when the motor starts, the photocoupler TLP521-2GB is required for power isolation. At the same time, it should be noted that the power supply voltage of L298HN needs to be decoupled to ensure the stable operation of the drive circuit. The motor drive circuit is shown in Figure 6. [page]
4 System software programming
This system is jointly controlled by a single-chip microcomputer and FPGA. The FPGA is mainly used for ADC timing control and data calculation, while the single-chip microcomputer is used to realize human-computer interaction. The program adopts a structured design concept, and the software adopts a modular design. The main program calls various subroutines, including special data processing subroutines, signal generator subroutines, and scanning keyboard subroutines. In addition to data calculation and display, this system also adds a self-correction function, that is, by comparing the amplitudes of the two signals to control the forward and reverse rotation of the motor, and finally stop the iron core at the reference zero position. Figure 7 shows the program flow.
5 System testing and result analysis
5.1 Instruments used and models
PC: Intel Pentium D, main frequency: 2.5 G, memory: 1 G; Weifu emulator: E51/S; DC regulated voltage and current power supply: SG1733SB3A; dual-trace digital storage oscilloscope: TEKT-RONLX TDS1002.
5.2 Test content and results
During the circuit debugging process, each module was debugged separately, and the debugging results were good. The debugging data table is omitted. When debugging the whole machine, the signal waveforms at points A, B, and C were measured. The signal waveform at point C is good and undistorted. The DC signal output at points A and B has no ripple jitter and the value is accurate. For displacement measurement, the experimental data are shown in Table 1 and Table 2. By analyzing the displacement measurement results, it can be seen that the displacement measurement has a high accuracy, the maximum error is 0.5 mm, and the measurement range is -20 to 20 mm. In general, the completion of the entire system is good.
6 Conclusion
The displacement measurement range of the system is extended to -20 to 20 mm. The actual measured approximate linear range of the homemade differential transformer is about -24 to 24 mm. It can achieve higher precision measurement and a good dynamic range, but the linearity is not very good. This is mainly due to factors such as non-ideal uniformity and symmetry of coil winding and non-ideal core specifications. However, the accuracy of displacement measurement can be greatly improved through software correction, and the stability of linearity will also be improved.
Previous article:Design and implementation of single-chip dial-up Internet access based on PPP protocol
Next article:Design of Multi-DSP Parallel System Based on ADSP-TS201S
Recommended ReadingLatest update time:2024-11-16 21:49
- Popular Resources
- Popular amplifiers
- Analysis and Implementation of MAC Protocol for Wireless Sensor Networks (by Yang Zhijun, Xie Xianjie, and Ding Hongwei)
- MATLAB and FPGA implementation of wireless communication
- Intelligent computing systems (Chen Yunji, Li Ling, Li Wei, Guo Qi, Du Zidong)
- Summary of non-synthesizable statements in FPGA
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Detailed explanation of GPIO input and output modes
- 【ESP32-Korvo Review】+ 03 Implementing TTS
- Millimeter wave sensors enable edge intelligence
- A few key points about interrupts
- Disassembling a DALSA S2-12-02K40 line scan camera
- Chapter6 Timer_A
- Do you know the eight important knowledge points of FPGA design?
- Share an ADI one-stop power design tool kit
- Component selection of DCDC power chip
- EEWORLD University - Make your design easier - Get to know TI's latest reference design for motor drive