Abstract: Aiming at the defects of the installation process of the Hall sensor in the brushless DC motor, a logic signal detection analyzer based on the virtual instrument architecture is designed and implemented to detect the Hall sensor signal of the motor. The AT89S52 microcontroller is used as the signal collector, and the microcontroller communicates with the PC through the RS232 serial port. The graphical interface designed by VB is used to analyze the collected data.
In brushless DC motor (BLDC) applications, Hall sensors are often used to detect the actual position of the motor rotor to provide a basis for electronic commutation. However, due to manufacturing process limitations, the installation of the Hall sensor may cause physical position deviations, which will cause deviations in the timing of electronic commutation and affect the speed and smoothness of the motor. In order to detect this manufacturing process defect, dedicated motor detection equipment is used in the industry, but these devices are complex in structure, bulky in size, and expensive. Based on the design concept of the virtual instrument architecture, this paper designs a low-cost logic signal detection analyzer to detect the motor Hall sensor signal.
1. System solution
This design uses a cheap 51 single-chip microcomputer as a signal collector. The 51 single-chip microcomputer sends the collected data to the PC through the RS232 serial port, and the PC then records and analyzes the data and draws the waveform. The structure of the hardware part is shown in Figure 1.
By using the P1 port of the 51 single-chip microcomputer as the signal sampling port, 8 logic signals can be collected synchronously, and then the 8 logic levels collected at the same time can be transmitted to the PC as 8 bits of a byte through the RS232 serial port.
Figure 1 Hardware structure diagram.
2. Software
2.1 MCU part
The AT89S52 microcontroller is a low-power, high-performance CMOS 8-bit microcontroller, which has 8KB online programmable ISP flash memory that can be erased and written 1000 times, 3-level program memory encryption, 256B internal ARM, 32 programmable I/O lines, 3 16-bit timer # counters, 8 interrupt sources, UART serial channel and other features. On the AT89S52 microcontroller, P1 port is used as the sampling port, Timer() is the waiting time timer, and Timer2 is used as the timer for the serial port baud rate. The serial port data communication protocol is: the data transmission rate is 57600b/s, 8 data bits, 1 stop bit, and no parity bit. The serial port communication initialization program is:
When the 51 MCU is powered on, it starts sampling and sending data continuously, which is similar to the "DMA" method on a computer. The main program flow chart of the MCU is shown in Figure 2. The main program code is:
Figure 2 MCU main program flow chart
Section 2.2
VB is used on the PC to write a program for receiving, storing and analyzing data on the serial port. The design concept of the "virtual instrument architecture" is borrowed, and efforts are made to complete the required test functions by operating the PC-side software, just like operating an electronic instrument defined and designed by oneself.
First, the serial port must be initialized, and the communication characteristics of the MSComm control must be set to be consistent with the 51 microcontroller in order to communicate normally.
After the serial port is initialized, the MSComm control can be used to receive data from the serial port in real time. ONComm is the communication event processing function of the MSComm control. The serial port communication program is:
The above is the serial port data receiving program. After receiving the data, the PC needs to process and display the data. In this system, the collected signal information is intuitively displayed by drawing the data sampling results.
In addition to the above functions, the PC software also has the functions of saving the collected data and reading historical samples.
3. Application Examples
The Hall sensor plays a very important role in the brushless DC motor control system. It is used to detect the position of the rotor pole and provide the correct commutation information for the switching circuit. If the phase of the Hall sensor is deviated, the electronic commutation time will be deviated, affecting the speed and stability of the motor. If the phase of the Hall sensor is missing, the motor phase current will increase and the electromagnetic torque pulsation will increase, and even burn the motor. Therefore, the detection of the Hall phase is very important. In this paper, the designed logic signal detection analyzer is applied to the detection of the motor Hall sensor signal. Its hardware circuit is shown in Figure 3.
Figure 3 Hall sensor signal detection hardware circuit
Brushless DC motors (BLDC) generally have three Hall sensors, and the three signals generated by them are sampled by the 51 single-chip microcomputer. The signals are sent to the PC through the RS232 serial port line. The receiving and analysis software running on the PC can analyze and display the collected signals. After connecting the detection circuit, turn the motor rotor by hand, start sampling on the software, and stop after a period of time, and you can get the waveform shown in Figure 4. It can be seen from Figure 4 that when the BLDC rotor rotates, the Hall signal will present a square wave waveform, and the position changes of the three Hall signals can be effectively analyzed through the analysis software function.
Figure 4 Hall signal analysis interface collected on the PC
The logic signal detection analyzer designed in this paper based on the virtual instrument architecture gives full play to the role of the single-chip microcomputer and the PC. It can synchronously sample 8-way signals, store and record a large amount of test data, and can effectively analyze and display the test data in graphics. This paper successfully applies it to the detection of motor Hall sensor signals and achieves good results. Due to its simple structure, low cost, wide applicability, and strong expansibility, it can be used in various multi-way signal detection schemes.
Previous article:Stress concentration principle in the design process of force sensors
Next article:Current output capacitive angle sensor based on AM402
- 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
- TI bidirectional DC-DC converter solution
- Senior Electronic Engineer (FPGA) Recruitment
- Should I choose a slow-blow or fast-blow fuse for the power module?
- Join [Micron VIP] and win a 200 yuan JD card!
- [GD32L233C-START Review] 8. TRNG True Random Number Generation
- How to set the grid of PCB more efficiently
- Input Considerations for SAR ADCs
- Enabling BLE in ESP-S3 using micropython
- The LM5118 buck-boost circuit has poor load capacity?
- GD32L233C Review: Unboxing