Suspension motion control design based on 32-bit DSP and motor driver chip

Publisher:YuexiangLatest update time:2014-12-27 Source: 互联网Keywords:32-bit Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  With the popularity of 32-bit DSP, 32-bit processors have become the mainstream products in the control field. Compared with traditional microprocessors, they are faster, more powerful, and more resource-rich, and more in line with the pace of development. TMS320F28027 is a 32-bit DSP with the advantages of fast computing speed and high stability. This article uses TMS320F28027 to control two stepper motors, so that objects can move in a plane and draw specified curves and circles in the plane.

  1. Design of the overall system solution

  Figure 2 is a control block diagram of the suspension system. TMS320F28027 is used as the control chip, and L298N is used to drive two stepper motors. The stepper motor uses 42HS4813A4, with a rated current of 1.3A and a step angle of 1.8°. LCD-12864 is used to display the real-time coordinates of the controlled object. The two stepper motors are controlled to rotate forward and reverse to achieve the effect of arbitrary movement of the object in the plane.

  Suspension motion control design based on 32-bit DSP and motor driver chip

  Figure 1 Model of the suspension system

  Suspension motion control design based on 32-bit DSP and motor driver chip

  Figure 2 Suspension system control block diagram

  2 Hardware Circuit Design

  2.1 L298N

  L298N is a high voltage, high current motor driver chip produced by ST. Figure 3 is the circuit schematic of the L298N module. The main features of this chip are: high operating voltage, the highest operating voltage can reach 46V; large output current, instantaneous peak current can reach 3A, continuous working current is 2A; contains two H-bridge high voltage and high current full bridge drivers. Use two L298N to control two stepper motors respectively. The rated current of the stepper motor is 1.3A. When two phases are connected at the same time, the current is 2.6A. L298N can meet the current requirements of 42HS4813A4 stepper motors.

  Suspension motion control design based on 32-bit DSP and motor driver chip

  Figure 3 L298N module circuit schematic

  2.2 Absolute encoder

  The accuracy of the absolute encoder must be higher than that of the stepper motor, so a 10-bit absolute encoder is used here. The model selected is Mini1024J, which has an accuracy of 10 bits. The advantage is that it uses non-contact Hall detection technology, and the sensor operation is not affected by dust or other debris, which overcomes the shortcomings of optical detection principles.

  3 System Software Design

  3.1 Geometric Relationship 1: Algorithm for Moving from Any Point to Any Point

  The coordinate diagram is shown in Figure 4, with the following relationship between side length and angle:

  Suspension motion control design based on 32-bit DSP and motor driver chip

  Suspension motion control design based on 32-bit DSP and motor driver chip

  Figure 4 Coordinate diagram

  Suspension motion control design based on 32-bit DSP and motor driver chip

  3.2 Geometric Relationship 2: Current Position Coordinate Display Algorithm

  As shown in Figure 5, the following angle and side length relationships exist:

  

  The control code is as follows:

  Suspension motion control design based on 32-bit DSP and motor driver chip

  Suspension motion control design based on 32-bit DSP and motor driver chip

  Figure 5 Coordinate diagram

  3.3 Motor position closed-loop control method

  The closed-loop control block diagram of the stepper motor is shown in Figure 6. TMS320F28027 uses two timers to control the two motors respectively, and uses an absolute encoder to monitor the position and perform step-out compensation to ensure the correct position and make the curve smooth.

Suspension motion control design based on 32-bit DSP and motor driver chip

  Figure 6 Stepper motor closed-loop control block diagram

  The model of the stepper motor is 42HS4813A4. In order to prevent step loss, the minimum interval of each step of the stepper motor is 4ms, and the stepper motor is subdivided into sixteen parts by software, that is, the spacing of each step is 0.45°. The program flow chart of the motor control part is shown in Figure 7.

  Suspension motion control design based on 32-bit DSP and motor driver chip

  Figure 7 Flowchart of the program for controlling the motor

  The control code is as follows:

  Suspension motion control design based on 32-bit DSP and motor driver chip

  3.4 Drawing Algorithm

  By using the algorithm of geometric relationship from any point to any point, a series of position coordinates are given to the processor to control the motion trajectory of the object, as shown in Figure 8.

  Suspension motion control design based on 32-bit DSP and motor driver chip

  Figure 8 Schematic diagram of drawing a circle and selecting points

  Take N points at the same interval and input them into the processor to control the coordinates of the object. When passing the points to TMS320F28027, 200 points are taken on the circle to make the circle smooth enough and eliminate jaggedness. The control code is as follows:

  Suspension motion control design based on 32-bit DSP and motor driver chip

  4 System Testing

  After the system was completed, two tests were conducted, namely, drawing a circle and moving to a specified point.

  The circle drawing test is to compare the actual diameter of the circle drawn with the theoretical diameter after inputting the coordinates of the center of the circle and the radius, and record the time taken to draw the circle. In this test, the coordinates of the center of the circle are (40.0cm, 40.0cm), and the input radius value is 30.0cm. The test results are listed in Table 1.

  Table 1 Drawing motion test results

  Suspension motion control design based on 32-bit DSP and motor driver chip

  Among them, the test of moving to a designated point takes the origin of the coordinates as the starting point. After inputting the designated coordinates, the theoretical value and actual value of the distance from the origin to the designated point are compared, and the error distance of returning to the origin after the movement is completed is recorded, that is, whether it can accurately return to the origin. In this test, the coordinates of the origin of the movement are (0cm, 0cm), and the target coordinates are (49.0cm, 50.0cm), that is, the distance from the origin is 70.0cm. In the actual test, the movement is to (49.1cm, 49.2cm), that is, 69.5cm from the origin. The test results are listed in Table 2.

  Table 2 Movement to a designated point test

  Suspension motion control design based on 32-bit DSP and motor driver chip

  It can be seen from the test results that the system has the advantages of high efficiency, stability and accuracy, which meets the experimental expectations.

Keywords:32-bit Reference address:Suspension motion control design based on 32-bit DSP and motor driver chip

Previous article:Intelligent brake control system circuit design based on DSP embedded technology
Next article:A design of fingerprint recognition system based on USB and DSP

Recommended ReadingLatest update time:2024-11-22 16:13

Design of memory interface based on DSP
   TMS320C32 is a floating-point digital signal processor ( DSP ) produced by TI in the United States. It is a new product of TMS320 series floating-point digital signal processors. Its CPU is simplified and improved on the basis of TMS320C30 and TMS320C31. The structural improvements mainly include variable-widt
[Embedded]
Design of memory interface based on DSP
PWM Pulse Generator for Frequency Converter Based on DSP and CPLD
1 Introduction In recent years, multilevel converters have become one of the hot topics in power electronics research, mainly targeting medium voltage and high power applications. Currently, there are three basic multilevel converter topologies : ① diode clamp type; ② flying capacitor type; ③ cascade type.
[Embedded]
Design of constant current charging power supply based on DSP
  1 Introduction   When the battery is charged normally, the better charging method is the graded constant current method, that is, a larger constant current is used at the beginning of charging, and after a certain period of time or when the battery reaches a certain voltage, a smaller constant current is used for ch
[Embedded]
Design of constant current charging power supply based on DSP
Design of multi-channel single-ended/differential signal acquisition system based on FPGA+DSP
In the process of signal processing, the method of DSP + FPGA collaborative processing is often used. This is because although DSP can achieve high-speed signal acquisition, its instructions are more suitable for implementing algorithms rather than logic control, and its external interface has poor versatility. FP
[Embedded]
Design of multi-channel single-ended/differential signal acquisition system based on FPGA+DSP
Design of inverter power supply based on DSP three-loop control
Aiming at the problem of output voltage waveform distortion and serious output voltage drop under high power load of inverter power supply, a three-loop control strategy with voltage RMS outer loop, capacitor voltage loop and inductor current inner loop is proposed. The DSP
[Power Management]
Design of inverter power supply based on DSP three-loop control
Design of high-speed SDRAM storage system outside DSP chip
  In high-speed signal processing applications such as digital image processing and aerospace, strong support of high-speed and large-capacity storage space is needed to meet the system's requirements for massive data throughput. By using large-capacity synchronous dynamic RAM (SDRAM) to expand the storage space of th
[Embedded]
Design of high-speed SDRAM storage system outside DSP chip
Intelligent micro-control electronic paper tensile and compressive testing machine based on DSP
In industries involving paper testing, such as papermaking and cigarette industries, high-precision measurements of paper tensile and compressive strength are required. The traditional method to improve the force measurement accuracy is to only improve the sensor accuracy and the number of bits of the A/D converter. A
[Embedded]
DSP Programming Skills 17---Very "Critical" Keywords
  What are " keywords "? Keywords are words that have been used by the C language itself and cannot be used for other purposes. For example, keywords cannot be used as variable names, function names, etc. So how critical are "keywords"? Simply put, if we don't know how to use them, the program will not produce t
[Embedded]
Latest Embedded Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号