Design of displacement measurement device based on FPGA and single chip microcomputer

Publisher:创意驿站Latest update time:2012-02-22 Source: 与非网 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

Reference address:Design of displacement measurement device based on FPGA and single chip microcomputer

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

Design and implementation of a programmable voltage source system based on FPGA
1 System Design The control chip is the Cyclone series EP1C6Q240C8 of Altera. The LPM_ROM macro function module is customized through the IP tool MegaWizard Manager of Altera, and the data of voltage generation is stored in the .mif format file; the control circuits such as the frequency division circuit, address ge
[Power Management]
Design and implementation of a programmable voltage source system based on FPGA
Research and design of a voice password lock system based on FPGA
introduction The electronic password lock system is mainly composed of an electronic lock body, an electronic key and other parts. An electronic key can store multiple sets of unlocking passwords. The user can modify the unlocking password at any time during use, update or prepare the unlocking password in
[Embedded]
Research and design of a voice password lock system based on FPGA
Software Design and Application of Imaging FPGA System Based on TDI-CCD
Abstract: In order to establish a high-speed, efficient and reasonable CCD imaging software system, the top-down software design structure and modular design method of the TDI-CCD imaging system are designed to realize the decoupling of the imaging system FPGA software, and
[Embedded]
Software Design and Application of Imaging FPGA System Based on TDI-CCD
Design of nanosecond-level time interval measurement system using TDC-GP1 and FPGA devices
1 Introduction With the development of space detection technology, the detection of plasma components in space becomes more and more important, especially for the ongoing deep space exploration, such as the lunar exploration program. The most important method for detecting space plasma components is the time-of-flight
[Test Measurement]
Design of nanosecond-level time interval measurement system using TDC-GP1 and FPGA devices
FPGA circuit implementation of an interleaver and deinterleaver
Interleaving and deinterleaving are important parts of the combined channel error correction system. There are many ways to implement interleavers and deinterleavers. This paper uses the Quartus software platform and simulation environment developed by Altera to design a method for single-time implementation of
[Embedded]
FPGA circuit implementation of an interleaver and deinterleaver
FPGA single chip quad-core two-by-two security system
introduction The two computer systems of the 2x2-out-of-2 system each have two CPUs, and all structures and accessories are exactly the same. The two systems use dual-machine hot backup, which greatly improves the system reliability and has been widely used in some fields. The computer interlocking system b
[Embedded]
FPGA single chip quad-core two-by-two security system
A remote temperature monitoring system based on single chip microcomputer and FPGA
Temperature has different degrees of influence on industrial and agricultural production and national defense. There are many kinds of power equipment failures, but most of them are accompanied by heating, and the loss of an accident is huge; in industries such as textiles, food, and tobacco, high temperatures can
[Microcontroller]
Research and application of key bounce elimination module based on FPGA
Buttons are often used in digital circuit design. The bouncing phenomenon of buttons is an objective problem in digital system design. Buttons are mechanical contacts, and jitter will occur when the contact point is open or closed. In order to make each button respond only once, the jitter must be removed. This arti
[Embedded]
Research and application of key bounce elimination module based on FPGA
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号