With the popularity of 32-bit DSPs, 32-bit processors have become mainstream products in the control field. Compared with traditional microprocessors, they are faster, more powerful, and more resource-rich, which is more in line with the development pace. The TMS320F28027 is a 32-bit DSP with fast computing speed and high stability. In this paper, TMS320F28027 is used to control two stepping motors, so that the object can move in the plane, so that the object can draw the specified curve and circle arbitrarily in the plane.
1 System overall design
Figure 2 shows the control block diagram of the suspension system. The TMS320F28027 is used as the control chip, and the L298N is used to drive the two stepping motors. The stepping motor adopts 42HS4813A4, its rated current is 1.3A, and the step angle is 1.8Â°. The real-time coordinates of the controlled object are displayed by LCD-12864 liquid crystal. Control two stepping motors to rotate forward and reverse to achieve the effect of any movement of the object in the plane.
Figure 1 Model of the suspension system
Figure 2 suspension system control block diagram
2 hardware circuit design
L298N is a high voltage, high current motor drive chip produced by ST. Figure 3 shows the circuit schematic of the L298N module. The main features of the chip are: high working voltage, its maximum working voltage can reach 46V; large output current, instantaneous peak current up to 3A, continuous working current is 2A; high voltage and high current full bridge with two H bridges driver. Two L298Ns are used to control two stepping motors respectively. The rated current of the stepping motor is 1.3A. When the two phases are connected, the current is 2.6A. The L298N can reach the current requirement of the 42HS4813A4 stepping motor.
Figure 3 L298N module circuit schematic
2.2 Absolute encoder
The accuracy of the absolute encoder must be higher than the accuracy of the stepper motor, so the 10-bit absolute encoder is used here. The model selected is Mini1024J with an accuracy of 10 digits. The advantage is that the contactless Hall detection technology is used. The sensor is not affected by dust or other debris, which overcomes the shortcomings based on the principle of optical detection.
3 system software design
3.1 Geometric relationship 1: moving from arbitrary point to arbitrary point algorithm
The coordinate diagram is shown in Figure 4. It has the following side length and angle relationship:
Figure 4 Schematic diagram
3.2 Geometric relationship 2: current position coordinate display algorithm
As shown in Figure 5, there are the following angle and side length relationships:
The control code is as follows:
Figure 5 Schematic diagram
3.3 Motor position closed-loop control method
The closed-loop control block diagram of the stepping motor is shown in Figure 6. The TMS320F28027 uses two timers to control the two motors. The absolute encoder is used to monitor the position and compensate for the out-of-step compensation to ensure correct position and smooth curve.
Product categories of Lithium Battery Charger, we are specialized in manufacturers from China,Lithium Battery Charger Supplier suppliers/factory, wholesale high-quality products of manufacturing, we have the perfect after-sales service and technical support. Look forward to your cooperation!
Lithium Battery Charger
Lithium Battery Charger,Bike Lithium Battery Charger,Bicycle Lithium Battery Charger,Lithium Motorcycle Battery Charger
Changxing Deli Technology Co., Ltd. , https://www.delipowers.com