1. Introduction
A stepper motor is a control drive element that directly converts digital signals into angular displacement or linear displacement, and has the characteristics of fast starting and stopping. Its mechanical displacement and speed are proportional to the number of input pulses and the pulse frequency respectively. Stepper motors are widely used in industrial production and all aspects of people's lives, and the microcontroller-controlled stepper motor has the characteristics of flexible and diverse functions, accurate pulse output, strong real-time performance, and low system cost.
The existing small stepper motor drive circuit basically adopts OC gate drive and transistor push-pull drive. The disadvantages of OC gate circuit driving motor are insufficient driving current, slow response speed, and OC gate is best to work in +5V voltage environment, and unstable in low voltage environment. The disadvantage of transistor push-pull driving stepper motor is the selection of NPN and PNP transistors. The PN junction switch points of the two transistors should be as similar as possible, otherwise the transistor will be broken down, causing unsafe hidden dangers.
This paper proposes a new stepper motor drive solution based on the design of a motor drive device for a micro infusion instrument, aiming at solving these problems of traditional small stepper motor drive. This solution uses the MSP430 microcontroller to control the output of the MAX4685 high-speed analog switch through the software running on it, thereby realizing the control of the stepper motor.
This low-cost, highly stable, and high-performance driving method is suitable for situations with low voltage, high current, and relatively high response frequency.
2. Motor drive solution for micro-infusion instruments
The micro-infusion device developed in this paper consists of three parts: an infusion liquid container, a small battery-driven pump, and a computer chip for accurately controlling the pump infusion dosage. After the above parts are packaged, they form an infusion device the size of a pager. The pump container infuses liquid through a thin plastic tube under the control of input commands.
The motor drive device of the instrument includes a command input panel, a drive circuit control board, and a stepper motor. The drive circuit control board uses the integrated circuit MAX4685; the output end of the drive circuit control board is connected to the input end of the small stepper motor. The motor drive block diagram of the micro-infusion instrument is shown in Figure 1.
Figure 1 Motor drive block diagram
The input panel sets parameters by pressing buttons, and controls the output of the IO port of the MCU through the intelligent software running on the MCU. The IO port of the MCU is connected to the input of the integrated circuit MAX4685. The integrated circuit MAX4685 is a high-speed analog switch. The input is a pulse square wave, which controls the action of the MAX4685 analog switch so that the output of the MAX4685 is a pulse square wave. In this way, the MAX4685 can provide a pulse current of 500mA. The MAX4685 chip is a dual-channel analog switch. When the switch is closed, it has a resistance of 0.8Ω (2.7V operation) and a voltage operating range of 1.8V to 5.5V. The response speed can reach up to 1MHz, and the maximum drive current can reach 500mA.
The specific parameters of MAX4685 are as follows:
The maximum closed resistance of the NC terminal is 0.8Ω (operating voltage is 2.7V);
the maximum closed resistance of the NO terminal is 0.8Ω (operating voltage is 2.7V);
the maximum matching resistance of the two channels is 0.06Ω;
the operating voltage range is 1.8V-5.5V;
the threshold voltage is 1.8V, and the maximum input signal voltage is 5.5V.
This example is to drive a two-phase DC stepper motor. The microcontroller model used is MSP430F149 . This model of microcontroller is an ultra-low power 16-bit microcontroller with FLASH function, and the operating voltage is 1.8V-3.6V. Use the button to select the menu function and set the parameters. Through the intelligent software, the four IO ports of the microcontroller, such as P50, P51, P52, and P55, output the pulse waveform used to drive the stepper motor and control the switch of MAX4685. The output of MAX4685 provides the current required to drive the stepper motor. The speed of the motor is controlled by the frequency of the output pulse waveform. The rotation of the motor drives the syringe to infuse.
The specific connection is shown in Figure 2.
Figure 2 Connection diagram of MCU, MAX4685, and stepper motor
This design uses a single-chip microcomputer to control the switch of MAX4685, and uses the output of MAX4685 to provide the pulse waveform of the stepper motor, which can ensure the stability of the output voltage waveform, large drive current, and small interference. It meets the requirements of low-cost, high stability, and fast response of low-voltage micro motors. OC gate and transistor push-pull drive are not easy to integrate.
3. Specific design and implementation of motor driver
The connection relationship of the motor drive part of the combined example and the input status of MAX4685 are shown in Table 1.
Table 1 MAX4685 input status table
This article uses the MSP430F149 microcontroller to control the action of the MAX4685 analog switch to achieve control of the stepper motor. After being driven by the MAX4685, the P50 and P51 IO ports of the MSP430F149 microcontroller are connected to the phase A of the stepper motor; after being driven by the MAX4685, the P52 and P55 IO ports are connected to the phase B of the stepper motor. The rotation mode of the stepper motor is full-step mode, and a two-phase, 20-step stepper motor is selected. The rotation angle of each step is 18 degrees. The rotation accuracy of each circle is ±10 degrees.
The relationship between the input signal and rotation of the stepper motor phase is shown in Figure 3. If the signal added to phase A and phase B is from 1-4, it will rotate counterclockwise, and from 4-1, it will rotate clockwise.
Figure 3 Relationship between input signal and rotation of stepper motor phase
The output signal of the IO output terminal of MSP430F149 is used to control the action of MAX4685 and generate the signals required for phase A and phase B. As shown in Table 2. The signals listed in the table are the signal relationships required for each step of motor rotation. The motor rotates through the transmission device to push the syringe to inject liquid.
Table 2 Relationship between MCU IO port output signal and rotation
The specific process of the motor driver of the micro-infusion instrument is shown in Figure 4, which includes the following key steps:
(1) MCU related IO port definition
P5.0 P5.1 P5.2 P5.3 P5.4 P5.5 P5.6 P5.7
ABC Data Vdd D
(2) Initialization of motor-related timers
TBCCR0 = IntTime; //Total time of main timer
TBCCR1 = IntTime1;
//Timer 1: Motor powered, high level time
TBCCR2 = IntTime2;
//Timer 2: Motor stopped, low level time
(3) Start the motor related timer
TBCCTL1 = 0x10; //Start timer 1
TBCCTL2 = 0x10; //Start timer 2
TBCTL = 0x0114; //Start the main timer
(4) Turn off the motor related timer
TBCCTL0 = 0x00;
TBCCTL1 = 0x00;
TBCCTL2 = 0x00;
(5) Interrupt processing function
interrupt[TIMERB1_VECTOR] void Timer_B1 (void)
adjusts the motor's step direction or moves the motor to the corresponding position according to the value of the timer interrupt vector TBIV.
Figure 4 Motor drive flow chart
4. Conclusion
This design changes the existing OC gate drive and transistor push-pull drive mode, and uses the MAX4685 high-speed analog switch to directly drive a small stepper motor. The response speed of this drive solution can reach 1MHz, and the drive current can reach 500mA. It can be designed into a low-cost, high-stability, high-response speed motor drive circuit to directly drive a small stepper motor. At the same time, it has the characteristics of simple principle and easy implementation.
Previous article:New electroacoustic product interface technology
Next article:Electronic nose lung cancer early diagnosis system based on neural network
- 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