LCD Display Inverter

Display Inverter / VGA Board / LCD Controller

Design of motor drive device based on MSP430 single-chip microcomputer and micro-infusion instrument

Stepping motor is a kind of control driving element that directly converts digital signal into angular displacement or linear displacement. It has the characteristics of fast start and stop. Its mechanical displacement and speed are respectively proportional to the number of input pulses and pulse frequency. Stepper motors are widely used in all aspects of industrial production and people’s lives, and single-chip-controlled stepper motors have the characteristics of flexible and diverse functions, accurate pulse output, strong real-time performance, and low system costs.

1 Introduction

Stepping motor is a kind of control driving element that directly converts digital signal into angular displacement or linear displacement. It has the characteristics of fast start and stop. Its mechanical displacement and speed are respectively proportional to the number of input pulses and pulse frequency. Stepper motors are widely used in all aspects of industrial production and people’s lives, and single-chip-controlled stepper motors have the characteristics of flexible and diverse functions, accurate pulse output, strong real-time performance, and low system costs.

The existing small stepping motor drive circuit basically uses OC gate drive and triode push-pull drive. The shortcomings of the OC gate circuit driving the motor are that the driving current is not enough and the response speed is slow, and the OC gate is best to work in a +5V voltage environment, and the work is unstable in a low voltage environment. The shortcoming of the triode push-pull drive stepping motor is the choice of NPN and PNP triode. The switching points of the PN junction of the two triodes should be the same as possible, otherwise the triodes will be broken down, resulting in unsafe hazards.

In this paper, aiming at these problems in the traditional small stepping motor drive, combined with the design of a motor drive device for a miniature infusion instrument, a new type of stepping motor drive scheme is proposed. This scheme adopts MSP430 single-chip microcomputer, and controls the output of MAX4685 high-speed analog switch through the software running on it, so as to realize the control of stepper motor.

This low-cost, high-stability, and high-performance drive method is suitable for applications with low voltage, high current and relatively high response frequency.

2. Motor drive scheme for micro infusion equipment

The micro-infusion instrument developed in this paper is composed of three components: an infusion container, a small battery-driven pump, and a computer chip used to accurately control the infusion dose of the pump. After the above components are encapsulated, an infusion device the size of a pager is formed, and the pump container is controlled by input commands to infuse liquid from a thin plastic tube.

The motor drive device of the instrument includes a command input panel, a drive circuit control board, and a stepping motor. The drive circuit control board adopts the integrated circuit MAX4685; the output end of the drive circuit control board is connected to the input end of the small stepping motor. The motor drive block diagram of the micro infusion instrument is shown in Figure 1.

Design of motor drive device based on MSP430 single-chip microcomputer and micro-infusion instrument
Figure 1 Block diagram of motor drive

The input panel is to set the parameters through the keys, and control the output of the IO port of the single-chip microcomputer through the intelligent software running on the single-chip microcomputer. The IO port of the one-chip computer is connected to the input end of the integrated circuit MAX4685. The integrated circuit MAX4685 is a high-speed analog switch, and the input is a pulsed square wave, which controls the action of the MAX4685 analog switch so that the output of the MAX4685 is a pulsed square wave. In this way, the MAX4685 can provide a pulse current of 500mA. The MAX4685 chip is a dual analog switch. When the switch is closed, it has a resistance of 0.8Ω (2.7V operation), and a voltage range of 1.8V to 5.5V. The response speed can reach up to 1MHz, and the drive current can reach up to 500mA.

The specific parameters of MAX4685 are as follows:

The maximum closing resistance of the NC terminal is 0.8Ω (working voltage is 2.7V);
The maximum closing resistance of NO terminal is 0.8Ω (working voltage is 2.7V);
The maximum matching resistance of the two channels is 0.06Ω;
The working voltage range is 1.8V-5.5V;
The threshold voltage is 1.8V, and the highest input signal voltage is 5.5V.

This example is to drive a two-phase DC stepper motor. The microcontroller model used is MSP430F149. This type of single-chip microcomputer is an ultra-low-power 16-bit single-chip microcomputer with FLASH function, and its working voltage is 1.8V-3.6V. Use the buttons to select menu functions and set parameters. The 4 IO ports of P50, P51, P52, P55, etc. of the single-chip microcomputer are controlled by intelligent software to output the pulse waveform used to drive the stepper motor, and control the switch of MAX4685. Use the MAX4685 output to provide 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 pushes the syringe for infusion.

The specific connection is shown in Figure 2.

Design of motor drive device based on MSP430 single-chip microcomputer and micro-infusion instrument
Figure 2 Connection diagram of single-chip microcomputer, MAX4685, stepper motor

This design uses a single-chip microcomputer to control the switch of the MAX4685, and uses the output of the MAX4685 to provide the pulse waveform of the stepper motor, which can ensure the stable output voltage waveform, large drive current, and low interference. It meets the requirements of low-voltage micro-motors with low cost, high stability and fast response speed. OC gate and triode push-pull drive is not easy to integrate.

3. The specific design and realization of the motor driver

According to the connection relationship of the motor drive part of the example, the input state of MAX4685 is shown in Table 1.

Table 1 MAX4685 input state table
Design of motor drive device based on MSP430 single-chip microcomputer and micro-infusion instrument

This text uses the MSP430F149 single-chip microcomputer to control the action of the MAX4685 analog switch to realize the control of the stepper motor. After being driven by MAX4685, the P50 and P51 IO ports of MSP430F149 microcontroller are connected to the phase A of the stepping motor; after being driven, the P52 and P55 IO ports are connected to the phase B of the stepping motor. The rotation mode of the stepper motor is full-step mode, and a two-phase stepper motor with 20 steps per circle is selected. The angle of rotation for each step is 18 degrees. The rotation accuracy of each circle is ±10 degrees.

The phase input signal and rotation relation of the stepping motor is shown in Figure 3. If the signal of phase A and phase B is added from 1-4, it will rotate counterclockwise, and from 4-1, it will rotate clockwise.

Design of motor drive device based on MSP430 single-chip microcomputer and micro-infusion instrument
Figure 3 The relationship between the input signal and rotation of the stepper motor phase

Use the IO output terminal of MSP430F149 to output signals to control the action of MAX4685 to 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 the motor’s rotation. The motor rotates through the transmission device to push the syringe to inject liquid.

Table 2 The relationship between the output signal of the IO port of the single-chip microcomputer and the rotation
Design of motor drive device based on MSP430 single-chip microcomputer and micro-infusion instrument

The specific process of the motor driver of the micro infusion instrument is shown in Figure 4, which includes the following key steps:

(1) Definition of MCU related IO port
P5.0 P5.1 P5.2 P5.3 P5.4 P5.5 P5.6 P5.7
ABC Data Vdd D
(2) Timing initialization of motor-related timers
TBCCR0 = IntTime; //Total time of the main timer
TBCCR1 = IntTIme1;
//Timer 1 motor power supply, high level time
TBCCR2 = IntTIme2;
//Timer 2 motor stop, low level time
(3) Start the motor-related timer
TBCCTL1 = 0x10; //Start timer 1
TBCCTL2 = 0x10; //Start timer 2
TBCTL = 0x0114; //Open the main timer
(4) Turn off the motor-related timer
TBCCTL0 = 0x00;
TBCCTL1 = 0x00;
TBCCTL2 = 0x00;
(5) Interrupt handling function
interrupt[TIMERB1_VECTOR]void TImer_B1 (void)
According to the value of the timer interrupt vector TBIV, adjust the motor walking direction, or move the motor to the corresponding position.

Design of motor drive device based on MSP430 single-chip microcomputer and micro-infusion instrument
Figure 4 Flow chart of motor drive

4 Conclusion

This design changes the existing OC gate drive and triode push-pull drive mode, and uses the MAX4685 high-speed analog switch to directly drive a small stepping motor. The response speed of this drive scheme can reach 1MHz, and the drive current can reach 500mA. It can be designed as a low-cost, high-stability, and high-response motor drive circuit to directly drive a small stepping motor. At the same time, it has the characteristics of simple principle and easy implementation.

The Links:   HDM3224-1-9J1F 1MBI300S-120