The speed regulation and speed measurement system of stepper motors generally uses ARM as the controller, plus discrete digital logic circuits and analog circuits. This system uses LPC2148 as the control core, reasonably selects the frequency control and closed-loop feedback control of the motor, and detects and adjusts the speed of the motor in real time, so that the system has both good steady-state performance and good dynamic performance.
1 Working principle of the system
The system is mainly composed of a main control circuit based on LPC2148, connected to a motor drive circuit, a communication module circuit (RS232), a speed measurement circuit (Hall sensor), an A/D conversion circuit and other circuits, as shown in Figure 1. Figure 2 shows the ARM main control chip. The main control circuit with LPC2148 as the core is responsible for frequency output, and controls the speed of the motor by changing the frequency. The data collected by the acquisition circuit can communicate with the PC through the RS-232 interface circuit. At the same time, the LPC2148 module processes the collected data and further corrects the output of the frequency control signal according to the deviation value.
2 Hardware Design
2.1 Speed control module design
The system regulates the speed of the stepper motor by adjusting the frequency. The speed of the stepper motor = f × 60/200x, where x is the subdivision multiple. Under the subdivision drive mode, due to the small step angle, the control accuracy of the stepper motor is significantly improved. At the same time, this drive mode can effectively suppress the noise and oscillation generated during low-speed operation. The stepper motor adopts a 1.8° two-phase four-beat type, and 200 step pulses can make one circle. Its stepping action is controlled by ARM, and the motor-specific driver L298 drives the stepper motor. The drive circuit is shown in Figure 3. L298 contains a 4-channel logic drive circuit and is a dedicated driver for two-phase and four-phase motors. That is, it contains a high-voltage and high-current dual full-bridge driver with 2 H bridges, which receives standard TTL logic level signals and can drive motors below 46 V and 2 A. The ARM main controller is connected through the control port on the right end, and the four ports M1 to M4 are used to connect the motor and control it through the changes in the input pulse signal on the right end.
2.2 Hall sensor speed measurement module
2.2.1 Hall Effect
A semiconductor sheet with a length of l, a width of b, and a thickness of d, when placed in a magnetic field with a magnetic induction intensity of B, if a control current I flows on its opposite sides and the direction of the magnetic field is orthogonal to the direction of the current, then an electric potential UH proportional to the product of the control current I and the magnetic induction intensity B will be generated on the other two sides of the semiconductor, that is, UH=KHIB, where KH is the sensitivity of the Hall element. This potential is called the Hall potential. The semiconductor sheet is the Hall element, and its size is proportional to the external magnetic field and current. Hall switch sensors are widely used in the field of measuring the rotation speed of rotating objects due to their small size, no contacts, good dynamic characteristics, and long service life. The Hall speed sensor produced by SPRAGUE is selected here. It is a silicon monolithic integrated circuit, which contains a voltage regulator circuit, a Hall potential generator, an amplifier, a Schmitt trigger, and an open collector output circuit. It has the characteristics of a wide operating voltage range, high reliability, a simple external circuit, and an output level compatible with various digital circuits.
2.2.2 Working Principle
The Hall sensor signal amplifier amplifies the Hall potential UH, then shapes and amplifies it, and outputs a square wave signal with equal amplitude and changing frequency. The amplitude of the Hall potential changes with the strength of the magnetic field.
There are many methods for measuring speed. The methods for measuring speed based on pulse counting mainly include M method (frequency measurement method), T method (period measurement method) and MPT method (frequency period method). This system adopts M method (frequency measurement method) and the speed measurement circuit of Hall sensor, as shown in Figure 4.
2.3 Other circuit modules
2.3.1 Power module
When the power module supplies power, it first passes through the diode VD1 to prevent the hardware from being burned by the power supply with opposite polarity. The SPX1117M3-3.3 three-terminal regulator is used to provide power for the microcontroller, RS232, and Hall sensor, and also for the CAT811R. The CAT811R microcontroller monitoring circuit (at 3.3 V voltage, error ±5%) is used to monitor the power supply of the digital system. It can generate a reset signal, which is valid when the power supply voltage falls below the threshold set and within 140 ms after the power supply voltage rises to the threshold. K1 is a manual reset button.
2.3.2 RS232 power supply circuit
The RS232 interface realizes communication with the host computer, such as sending measured data to the host computer (host), receiving control instructions from the host computer, and performing parameter setting and calibration operations. The communication instructions with the host computer use ASC code instructions of variable length, use different signaling headers (SOT) to represent different controls, and have CRC error correction to ensure correct data transmission. The signaling has a unified end code (EOT).
2.3.3 LCD display circuit
TCM24064B is used to complete graphic display, text display, and mixed display of graphics and text. It has a built-in 128 types of 5×8 dot ASCI character font library CGROM, and the character code is 00H~07H. The software design of the LCD display is actually the instruction operation of the controller T6963C. The biggest feature of T6963C is its unique hardware initial value setting function. The parameters required for the display driver, such as duty cycle, the number of bytes/line transmitted by the driver, and the font of the character, all have pin level settings. Initialization is basically completed when power is turned on.
3 System Software Design
Figure 5(a) is a software design flow chart of the speed regulation system of the stepper motor, which mainly realizes the frequency of receiving the main controller. Figure 5(a) is a software design flow chart of the speed measurement system, which is used to collect the actual speed m and compare it with the input speed n to obtain whether there is a deviation (mn). The deviation value is fed back to the main controller through the A/D conversion circuit, and finally the output frequency is adjusted by the PC to achieve the adjustment of the speed.
4 Conclusion
The system design uses LPC2148 as the core controller, and uses the stepper motor speed control circuit and the speed measurement circuit based on the Hall sensor to greatly improve the stability and accuracy of the speed. The experimental results also verify that the speed error can be controlled within ±0.2 m/s. The problem that needs to be paid attention to during the debugging process is that if the motor is to achieve high-speed rotation, the pulse frequency should have an acceleration process, that is, the starting frequency is low, and then it rises to the desired high frequency at a certain acceleration; and solve the problem that the motor shakes and cannot rotate after the driver is powered on. When encountering this situation, first check whether the connection between the motor and the driver L298 is correct; if there is no wrong connection, then check whether the input frequency is too high; whether the frequency increase and decrease design is unreasonable; if none of the above reasons are, the driver may be burned. The entire system based on LPC2148 has the characteristics of high voltage utilization and low power consumption, and simplifies the design of the peripheral interface circuit. The collected signal is processed, and the error value is transmitted back to the main control chip through the feedback circuit to further correct the output frequency, thereby improving the speed accuracy.
Previous article:Application of ARM9 in Temperature Control System of High Precision Biochemical Analyzer
Next article:Hardware Design of Radio Station Detection Controller Based on ARM Processor
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!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- 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
- There is a large supply of microcontrollers!
- IPTV Analysis
- Share the C language program of FIR filter implemented by MSP430 microcontroller
- [2022 Digi-Key Innovation Design Competition] CAN Communication Data Display Terminal
- How to design high frequency (>100K) ultrasonic sensor processing circuit
- A design scheme of smart water meter controlled by NFC
- Oscilloscope waveform jitter can be turned into stable waveform by setting trigger properly
- How to measure the noise floor of an oscilloscope
- PLC online monitoring control cloud configuration software SCADA
- Is this dime-sized millimeter-wave sensor evaluation board worth trying?