0 Introduction
The traditional wire-type displacement sensor uses a potentiometer-type displacement sensor, which converts the mechanical displacement into a resistance or voltage output that is linear or has an arbitrary function relationship with it through a potentiometer element. Ordinary linear potentiometers and circular potentiometers can be used as linear displacement and angular displacement sensors, respectively. However, the potentiometer designed for the purpose of measuring displacement requires a definite relationship between displacement change and resistance change. The movable brush of the potentiometer displacement sensor is connected to the object to be measured, and the displacement of the object causes the resistance change at the moving end of the potentiometer. The change in resistance reflects the magnitude of the displacement, and the increase or decrease in resistance indicates the direction of the displacement. Usually, a power supply voltage is passed through the potentiometer to convert the resistance change into a voltage output. The traditional wire-type displacement sensor has a step-shaped output characteristic because its resistance changes in turns as a step when its brush moves. If this displacement sensor is used as a displacement feedback element in a servo system, an excessive step voltage will cause system oscillation. Therefore, the resistance value per turn should be minimized in the production of the potentiometer. At the same time, another major disadvantage of the potentiometer sensor is that it is easy to wear, has poor resolution, low resistance, and poor high-frequency characteristics, which leads to a decrease in measurement accuracy. Its advantages are: simple structure, large output signal, easy to use, and low price.
The wire-type displacement sensor based on magnetic angle technology uses the magnetic field as the transmission carrier to convert the displacement transformation into magnetic field angle displacement. At the same time, the displacement signal is returned to the application system through the communication interface.
1 Overall design plan
The function of the wire-type displacement sensor based on magnetic angle technology is to convert the mechanical displacement of the wire into an electrical signal that can be measured, recorded or transmitted. It is mainly composed of an automatic return spring, a wheel hub, a magnet, and a data processing unit. The structure is shown in Figure 1.
As can be seen from Figure 1, the wire-drawing displacement sensor based on magnetic angle technology is mainly composed of 6 parts. It changes the shortcomings of traditional wire-drawing displacement sensors such as contact, easy wear, and poor high-frequency characteristics. The wire-drawing displacement sensor based on magnetic angle technology uses magnetic field as a medium to convert mechanical displacement changes into magnetic field angle changes. On the one hand, it solves the contact mode of traditional wire-drawing displacement sensors, and on the other hand, it reduces wear and improves the high-frequency characteristics of the system, thereby ensuring the displacement detection accuracy. The data processing operator is used to calculate the received magnetic angle signal into the displacement signal of the wire through a mathematical model. The communication interface communicates with the equipment of the application system through the communication interface, receives commands from the application system equipment and feeds back the collected displacement signal to the application system. This improves the data acquisition accuracy, stability and reliability, and lowers the application threshold of the displacement sensor.
The functions of each component are described as follows:
(1) The steel rope of the wire is wound around the hub, and the hub is connected to a magnet. When the wire is displaced, it drives the hub to rotate. The rotation of the hub causes the magnet connected to the shaft of the hub to rotate, so that the magnetic field of the magnet produces a changing angle. When the wire movement occurs, the automatic return spring ensures that the wire has a certain tension, ensuring the proportional relationship between the displacement of the wire and the magnetic sensitive angle.
(2) The magnetic sensitive angle sensor is installed on the same central axis as the magnet to sense the change of the magnet angle. A microprocessor is selected to read the magnetic sensitive angle information and calculate the magnetic sensitive angle as the displacement of the wire by establishing a mathematical model.
(3) Communication interface. The microprocessor receives commands from the application system through the communication interface and returns the displacement information to the application system through the communication interface.
2 Hardware interface circuit design
The data processing unit consists of a magnetic angle sensor, a microprocessor unit, a communication interface and an output module. The specific functional block is shown in Figure 2.
By analyzing Figure 2, the magnetic angle sensor uses MLX90316, which converts the angle of rotation of the magnetic field caused by the displacement of the wire into the magnetic angle. The microprocessor unit uses a 32-bit embedded ARM to process the received magnetic angle data and complete the reception of the magnetic angle data. Since the received angle is the angle of magnetic field conversion, the magnetic angle is converted into the displacement of the wire by establishing a mathematical model and combining factors such as the diameter of the hub. Therefore, in order to quickly realize the reception of data and the establishment of the model, LPC2136 is selected as the data processing unit. The input and output control module is responsible for the processing of various external interfaces, such as receiving commands from the application system through the communication interface and returning the collected displacement results to the application system, so that the microprocessor unit can execute the commands of the application system and send the collected results to the application device safely and reliably through the interface, mainly including 1 RS 485 and 4-20 mA current output.
2.1 Magnetic angle receiving interface
MLX90316 is a linear Hall chip, a monolithic integrated sensor chip using planar Hall sensing technology. The chip can be used to measure the magnetic flux density coplanar with the chip surface, and can obtain the rotation position value from 0 to 360°. It can output highly accurate linear absolute position signals through multiple modes, and it is low-cost and easy to install.
The front end of the MLX90316 chip is a sensor using Triaxis Hall technology. After the two orthogonal analog signals obtained by the Hall sensor are amplified, they enter the chip microprocessor (DSP) through a 14-bit differential A/D converter, and then the digital signals processed by the 16-bit DSP are divided into three outputs. The MLX90316 output has 12-bit angle resolution and 10-bit angle accuracy, and can avoid the influence of peripheral temperature changes on output accuracy to a certain extent. MLX90316 has three outputs: analog output converted from 12-bit D/A; PWM output with a frequency of 100 to 1 000 Hz; and serial communication protocol output (SPI) in digital mode.
Since the output signal of serial communication comes directly from the internal DSP output of MLX90316, the SPI output mode is more stable, has smaller errors, and has higher anti-interference ability. In this design, the SPI interface is selected, and the specific hardware interface connection circuit is shown in Figure 3. In Figure 3, the three SPI lines of MLX90316 are connected to the SP10 port of ARM LPC2136. The SPI (Serial Protocol InterIace) bus interface is a synchronous serial peripheral interface. This is a serial interface protocol with 4 signal lines, including master and slave modes. The 4 signal lines are: clock line (SCK), data input line (MISO), data output line (MOSI) and slave enable line (SS).
2.2 RS 485 communication interface circuit design
The RS 485 bus has been widely used in industrial control systems due to its simple structure, high communication rate, long transmission distance and many other advantages. It uses balanced transmission and differential reception to achieve communication. The sending end converts the TTL level signal of the serial port into two differential signal outputs A and B. After cable transmission, the differential signal is restored to a TTL level signal at the receiving end. Since the transmission line usually uses twisted pair and differential transmission, it has a strong ability to resist common mode interference, and the bus transceiver has high sensitivity.
In the wire-type displacement sensor based on magnetic angle technology, we designed an RS 485 signal output. The RS 485 interface chip uses MAX3485, which is used to exchange displacement data with the application system. In order to ensure the reliability of data communication, the communication interface uses the optoelectronic isolation chip 6N137.
2.3 Controllable current output interface
The data processing unit has a controllable 4-20 mA current output for driving the field indicator instrument. The specific connection circuit is shown in Figure 4. Among them, PWM2 is connected to the PWM2 pin of ARM. The PWM signal is used to control the conduction and cutoff of the optocoupler. The inverter is mainly used for waveform adjustment. According to the relationship between the magnetic sensitivity angle and the displacement, a mathematical model is established to calculate the duty cycle of PWM, so as to achieve the purpose of current regulation.
3 Software Design
The μC/OS-Ⅱ operating system is embedded in LPC2136.
μC/OS-Ⅱ is a priority-based preemptive multi-tasking real-time operating system that includes real-time kernel, task management, time management, inter-task communication synchronization (semaphore, mailbox, message queue) and memory management functions. It can make each task work independently without interfering with each other, and it is easy to achieve timely and error-free execution, making the design and expansion of real-time applications easy and greatly simplifying the application design process.
Software programming mainly includes three modules: PWM control current output module, RS 485 communication module, and MLX90316 SPI communication module. The programming process is shown in Figure 5. The PWM control current output module mainly adjusts the current by changing the PWM duty cycle. The RS 485 communication module is mainly used to receive instructions from the upper system and transmit data back according to the instructions. The SPI communication module of MLX90316 is mainly used to read the magnetic angle. The SPI communication process is as follows: the master end first outputs 1 0xAA and 1 0xFF as the communication start signal, and then outputs 8 0xFFs, while the slave end simultaneously outputs 2 0xFFs, 4 bytes of angle signals and 4 0xFFs, thus completing a data communication.
4 Conclusion
The construction of a position sensor using the MLX90316 requires the use of magnets and the installation of active mechanical parts at the sensing position (usually connected to the end of the shaft). Any magnet with uniform horizontal magnetic flux can be used. The size and material of the magnet are not important; the horizontal magnetic flux must be within the range of 20 to 70 mT (for example, (45 ± 25) mT) within the mechanical, magnetic and thermal tolerances.
In terms of air gap, ring magnets are better than disc magnets if the actual air gap from the IC surface is greater than 7.5 mm. The magnet can be placed at the end of the shaft, and when using a ring magnet, it can be wrapped around the shaft. Special magnet designs can also be used to obtain normal transmission characteristics of the rotary position sensor.
In the "Intelligent Detection System for Dam Displacement Based on FPGA Technology", a wire-type displacement sensor based on magnetic angle technology is used for the dam root stone displacement acquisition device. There are a total of 7 dams to be monitored, and each dam has 5 key monitoring points. Therefore, the RS 485 bus is used to form a star network for these 35 monitoring points. From the test results, it can be seen that the sensor overcomes the shortcomings of traditional wire-type displacement sensors such as easy wear, poor resolution, low resistance, and poor high-frequency characteristics, and improves the measurement accuracy.
Previous article:Design and implementation of integrated cockpit display control system
Next article:Design of 16-channel adjustable speed colored light controller based on VHDL
- Popular Resources
- Popular amplifiers
- Molex leverages SAP solutions to drive smart supply chain collaboration
- Pickering Launches New Future-Proof PXIe Single-Slot Controller for High-Performance Test and Measurement Applications
- CGD and Qorvo to jointly revolutionize motor control solutions
- Advanced gameplay, Harting takes your PCB board connection to a new level!
- Nidec Intelligent Motion is the first to launch an electric clutch ECU for two-wheeled vehicles
- Bosch and Tsinghua University renew cooperation agreement on artificial intelligence research to jointly promote the development of artificial intelligence in the industrial field
- GigaDevice unveils new MCU products, deeply unlocking industrial application scenarios with diversified products and solutions
- Advantech: Investing in Edge AI Innovation to Drive an Intelligent Future
- CGD and QORVO will revolutionize motor control solutions
- 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
- ULN 2803a and PLC usage issues
- Features and applications of the MS554X series of serial input, voltage output, 16-bit digital-to-analog converters (DACs)
- pic16f877 tm0 makes the LED flash every 10ms
- Meet the Electrocardiogram (ECG) Si1172 ECG Evaluation Kit
- TI C6678 Multi-core DSP Architecture
- [TI mmWave Radar Review] + Belated AWR1443 EVM Board Unboxing
- Watch Shuige's video for a reward | MIPI D-PHY transmitter physical layer consistency test
- Summary of Problems and Solutions in CCS6 Compilation
- [STM32WB55 review] +thread trial 1
- Guess the question about the list of materials for the undergraduate group of the electronic competition: Sound source localization system