Hall sensor is a semiconductor element that works by using the Hall effect. Due to the high conversion efficiency, fast response speed, wide dynamic range, good frequency characteristics and low noise of Hall element, Hall sensor is widely used in motor detection, magnetic field meter, speed controller, position detection and automatic control. In many occasions, it is necessary to understand the various performances of Hall sensor. This test system uses Visual Basic visual programming language and RS-232 serial communication between single chip microcomputer and computer to realize automatic measurement, recording and analysis of Hall sensor parameters.
1 Test system structure
1.1 System hardware structure and principle
The hardware structure of the Hall sensor performance test system is shown in Figure 1. On the one hand, the signal processing circuit board receives the measurement signal of the Hall sensor and processes it into a standard signal to transmit to the single-chip microcomputer. On the other hand, it generates corresponding control signals based on the data transmitted by the single-chip microcomputer to make the Hall sensor work under specified conditions. The single-chip microcomputer transmits measurement signals to the computer through the RS-232 serial communication port and receives control signals. The computer is used to display, analyze and store the performance test data of the Hall sensor.
Figure 1 Test system hardware structure
1.2 Signal processing principles
This system has two test parameters: the sensitivity KH of the Hall sensor and the temperature coefficient α of the Hall potential. The signal processing is shown in Figure 2.
Figure 2 Signal processing schematic diagram
X1—control signal, adjust the resistance R, control the magnetic field strength X2—control signal, adjust the excitation current of the Hall sensor
X3--control signal, control
the power switch
X4—control signal, adjust the heater voltage to control the temperature
Y1—test signal, measure
the output voltage
of the Hall sensor
Y2—test signal, measure the ambient temperature of the test system
When the control signals X3, X1 and X2 are output, the Hall sensor works under the conditions of a fixed magnetic field strength and different excitation currents, or under the conditions of a fixed excitation current and different magnetic field strengths. The sensor will output a series of no-load Hall potentials, and the sensitivity KH under different conditions can be calculated through computer calculations. Under the conditions of a fixed magnetic field strength and excitation current, the Hall potential temperature coefficient α of the sensor is measured by changing the voltage of the electric heater and measuring the ambient temperature signal Y2 of the test system through the control signal X4.
2. RS-232 serial communication implementation
2.1 Implementation of serial communication
Data transmission between the microcontroller and the computer is achieved through the RS-232 serial port. The computer transmits control commands and data to the microcontroller, which transmits the signal to the signal processing circuit board, and then measures the output signal of the signal processing circuit board and transmits it back to the computer through the serial port. The serial port data communication protocol is: data transmission rate is 9600bps, 1 start bit, 8 data bits, 1 stop bit, and no parity bit. Since only the microcontroller and the computer transmit information to each other, the RS-232 serial port only needs three wires: receiving, transmitting and grounding. The microcontroller uses the AT89C52 chip, and its logic level is inconsistent with the RS-232 interface level of the computer. It is necessary to design a MAX232 chip between the microcontroller and the RS-232 serial port of the computer. This chip can convert the 0V and +5V voltages of the microcontroller into the logic "1" level (-3 to -15V) and logic "0" level (+3 to +15V) of the RS232 interface. As shown in Figure 3, C1 – C5 are all 1μF.
Figure 3 Application of MAX232 chip
2.2 Application of VB
VB (Visual Basic) is the main development language in computer systems. It is efficient, easy to learn, and has powerful graphics functions. It supports object-oriented programming, has a structured event-driven programming model and a good human-computer interface, and provides a powerful communication control MSCOMM. Therefore, the application of VB language can easily design applications that require a large number of graphic displays. The MSCOMM control can be used to set the data transmission and reception of serial communication, and to set the serial port status and the information format and protocol of serial communication. The MSCOMM control is a standard 10-bit serial port communication. The OnComm event is triggered during the data transmission and reception process. The CommEvent property is accessed to understand the type of communication event. [page]
2.3 Programming of VB Communication Controls
Private Sub Form_Lopad() ;Serial port initialization program
Comm1.CommPort=1 ;Set serial port 1
Comm1.Settings=”9600,n,8,1” ;Set baud rate, parity, data bits and stop bits
Comm1.InputLen=0 ;Read data in the receive buffer
Comm1.InBufferSize=255 ;Set the size of the receive buffer
Comm1.OutBufferSize=255 ;Set the size of the send buffer
Comm1.PortOpen=True ;Open serial port 1
Comm1.Sthreshold=1 ;Buffer empty trigger
Comm1.Rthreshold=1 ;Data enters the receive buffer to trigger the receive event
End Sub ;Program ends
The above is the initialization program of the serial port of VB, as well as the data sending and receiving programs. The data sending program is
The computer
sends control commands and data to the microcontroller, and the receiving program is to receive data detected by the microcontroller.
2.4 MCU serial communication program design
For serial communication between the microcontroller and the computer, the serial port controller SCON of AT89C52 needs to be set to SCON=50H, working in the 10-bit asynchronous communication mode of serial mode 1, and the interrupt bit EA of the interrupt enable register IE of AT89C52 needs to be set to 1 to allow serial port interrupts. The serial port initialization procedure is as follows:
CXK: MOV TH1, #0FDH; Set the baud rate
MOV TL1, #00H;
MOV TMOD, #20H; Set the working mode of timer 2 to 2
MOV TCON, #40H; Timer start
SETB ES; Serial port enables interrupt
MOV SCON, #50H; Set the working mode of serial port to 1
RET
3. Several aspects that require attention
3.1 Generation and regulation of magnetic field strength
In Figure 2, the power source E should remain stable, and the potentiometer for adjusting the magnetic field strength adopts a digital potentiometer, which can accurately adjust the field strength. Before use, use a field strength meter with a higher level of accuracy to measure the magnetic field strength under different resistance values of the digital potentiometer, and store the corresponding data of the two in the computer as the basis for adjusting the magnetic field strength.
3.2 Temperature measurement and control
Using thermistors as temperature sensors , thermistors have high sensitivity and low thermal inertia, and can quickly and correctly measure temperature values. The electric heater uses a resistance wire to heat with 220V AC. In order to reduce the thermal inertia of the heater and facilitate temperature control, the resistance wire is wound on a plane and a small fan is used to make the temperature distribution in the test system uniform and the temperature of the Hall sensor reach a stable state relatively quickly. A single-loop closed-loop control system is used. Since the Hall potential temperature coefficient α refers to the change when the temperature changes by 1°C, the measurement and control of the system temperature has relatively high requirements.
4. Conclusion
In the design of the Hall sensor performance test system, the role of the single-chip microcomputer and the computer is fully utilized, and the graphic function of VB is fully utilized, so that the test system has a very friendly user interface.
Previous article:Application of atmospheric pressure sensor TP015P in altitude measurement
Next article:Research on LED chip packaging defect detection method
- Keysight Technologies Helps Samsung Electronics Successfully Validate FiRa® 2.0 Safe Distance Measurement Test Case
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Seizing the Opportunities in the Chinese Application Market: NI's Challenges and Answers
- Tektronix Launches Breakthrough Power Measurement Tools to Accelerate Innovation as Global Electrification Accelerates
- Not all oscilloscopes are created equal: Why ADCs and low noise floor matter
- Enable TekHSI high-speed interface function to accelerate the remote transmission of waveform data
- How to measure the quality of soft start thyristor
- How to use a multimeter to judge whether a soft starter is good or bad
- What are the advantages and disadvantages of non-contact temperature sensors?
- 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
- What is this DC to AC circuit called a power supply circuit?
- MSP430 analog-to-digital conversion module--ADC12
- TPA3245 series amplifier problem
- EEWORLD University Hall----Live Replay: Application of TI Sitara? Products in Smart Grid
- [LDO common terms 1] line regulation and load regulation
- So cool! Flexible screen concept smart watch
- A chart shows how 5G is better than 4G, with a challenge
- How does FPGA adjust the volume of the buzzer?
- [Repair] Repaired a data cable
- How long will the battle between community owners and communication base stations last?