Development of automatic tube expansion controller based on MSP430

Publisher:YaqiLatest update time:2010-10-10 Source: 电子设计工程 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The tube expander is a special equipment designed and developed for the expansion of various types of tubes and tube sheets in condensers, oil coolers, heaters, and heat exchangers. The basic principle of its controller is to use the working current of the drive motor (also known as the drive motor, tube expander head) to calibrate the applied load, that is, the drive motor provides a considerable amount of torque under a certain working current value, and the corresponding amount of torque can produce a certain amount of expansion (expansion force) by rotating the tube expander, which can be measured. Therefore, by accurately measuring and controlling the working current value of the drive motor, the required expansion (expansion force) can be obtained and controlled.

At present, most of the tube expanders on the market use 51 single-chip microcomputers, but their shortcomings are prominent. For example, there is no internal memory, and external Flash or EPROM must be connected to store setting information, which makes the circuit more complicated and not conducive to expansion, and the operating voltage range is narrow and the anti-interference ability is poor. The tube expander using the MSP430F149 single-chip microcomputer can effectively overcome these shortcomings.

1 Working Principle

Figure 1 is the overall block diagram of the system. The working process of the tube expander is analyzed through the block diagram: after power-on, the manual switch is pressed, and the manual detection circuit will detect the start signal and send it to the single-chip microcomputer through photoelectric isolation (separating strong current); at this time, the AC is added to the load through the current transformer, and the AC is converted into DC through the rectifier filter circuit. After a delay circuit delays for a period of time to avoid the starting current of the motor, and then after amplification, the current signal is input into the single-chip microcomputer for A/D conversion and processing; at the same time, the relay controls the main switch M-SW to open, the motor starts, and the set current value and the real-time value of the motor rotation current are displayed on the panel: when the actual current changes based on the detection current, the single-chip microcomputer controls the reversing switch D-SW through the relay to perform expansion or de-expansion operations. At the same time, the indicator light can display the working status of the tube expander. The button can set the expansion force and select 3 different power gears of the motor. When the motor is unloaded, after the manual switch is pressed, the main switch is turned on, the rotor rotates, and the collected current signal is sent to the single-chip microcomputer. After about 6 seconds, the microcontroller displays the average value of the idling current it measured. At this time, the main switch is disconnected and the rotor stops rotating. When setting the expansion force, the expansion force setting value must be greater than the current value when the motor is idling, otherwise the motor cannot expand the tube.

Overall block diagram of the system

2 Circuit Design

After 220 V AC input, the voltage regulator module continuously outputs stable +5 V and +12 V voltages to ensure the power supply of the circuit board. At the same time, TPS76301 is used to convert the +5 V voltage into +3 V voltage to power the microcontroller. The 220 V AC power is isolated through optoelectronics to provide +12V power for the relay 555 delay circuit that controls A/D acquisition and the D-SW commutation circuit.

When the manual switch is pressed, the power is turned on, and the single-chip microcomputer collects the current signal and performs A/D conversion. Figure 2 shows the A/D signal acquisition circuit. The AC input passes through the current transformer T1, and the AC is added to the load, and is converted into DC through the rectifier and filter circuit. The output current signal AA/D is controlled by the relay K5 and sent to the front panel. The current signal AA/D1 obtained after amplification by the LM358 is handed over to the single-chip microcomputer MSP430 for collection and processing. The 0 end of the relay K5 is connected to the output end of the 555 delay circuit, and the output signal of the 555 delay circuit controls its working state.

A

When the tube expander is turned on, there is a very large instantaneous current, which will cause the machine to shut down immediately after it is turned on and cannot start normally. Therefore, a peak avoidance circuit composed of a 555 delay circuit is needed to avoid the instantaneous large current and delay the startup time. Figure 3 is a delay peak avoidance circuit. When the tube expander is turned on, there will be a pulse on pin 2 (TRIG) of NE555, which makes the level of pin 3 (Q) become low. The relay K5 coil in Figure 2 is energized and disconnected, causing the microcontroller to be unable to collect signals. At the same time, the capacitor begins to charge, and pin 7 (DIS) of NE555 is internally turned on. After the pulse, the capacitor begins to discharge through pin 7, and the voltage of TRIG and THR begins to decrease. When the voltage drops to a certain level, Q becomes a high level, pin 7 is internally cut off, K5 stops working, and signal collection is normal, avoiding the phenomenon of immediate shutdown after startup.

Delay peak avoidance circuit

In the tube expander, an interlocking circuit needs to be designed to control the running state of the motor and perform tube expansion and de-expansion operations. The interlocking circuit is shown in Figure 4. The levels of points A0 and A1 are controlled by the single-chip microcomputer to control the potential of M-SW and D-SW respectively. When point A1 is set to a low level, the photoelectric isolation works, making D-SW a high level, so that Q2 is turned on, L-SW is low, and the D10 (RET-URN) light is on, that is, the de-expansion state; if point A1 is set to a high level, D-SW is set low, and the coil of K3 relay works, making L-SW high, so the de-expansion light goes out, which is the tube expansion state. When point A0 is set to a low level, the photoelectric isolation is triggered, making M-SW a high level, so that the collector of Q1 is connected to the ground, and the coil of relay K1 is energized to start working, thereby disconnecting the connection state between the input and the motor. Therefore, the circuit interlocking is realized through the relay, and the running state of the motor is controlled.

Interlock circuit

In addition, in the design of the double-head tube expander, in order to ensure that the two tube expanders work at the same time and are not affected by each other, a combination circuit consisting of a 555 timer and a 16-bit bistable JK trigger 74LS76 is added, as shown in Figure 5. It can be seen from the figure that each time the MODE switch is pressed and released, a pulse signal is provided to the HAl7555, and at the same time, it is output to the HD74LS76 so that the negative terminal level of the CHA and CHB two indicator lights changes according to the rule of the JK trigger, thus satisfying that each time the MODE switch changes, the two sides of the double-head tube expander can work independently without being affected.

Combination circuit of 555 timer and 16-bit bistable JK flip-flop 74LS76

3 Software Design

The core CPU structure of MSP430 is designed according to the purpose of reduced instruction set and high transparency. The instructions used are hardware-executed cores and high-efficiency simulation instructions based on existing hardware structures. It has rich addressing modes, concise instructions, a large number of registers and data storage on the chip, which can participate in various operations. It has efficient table lookup processing methods and high processing speed. The computing power reaches 1 million instructions per second under 8 MHz crystal. These characteristics make this series of single-chip microcomputers still highly efficient when developed in C language, thereby improving the development cycle and realizing the portability of the program. The system software development adopts IAR Embedded Workbench, an integrated development environment dedicated to the MSP430 series of single-chip microcomputers, and adopts C language programming.

In the program design of the instrument, since a large current impact will be generated at the moment of motor commutation, the delay time of commutation must be properly set, otherwise it will cause great damage to the instrument, motor and even the operator. The software design process of the instrument is shown in Figure 6.

Instrument software design process

4 Current calibration and fitting

After experimental measurement, the delay time T of the delay peak avoidance circuit is about 1.32 s. Table 1 is the A/D value and current I value measured in the experiment.

The experimentally measured A

According to the data in Table 1, the fitting software 1stOpt is used to fit the curve. And the fitting formula is obtained. Figure 7 is the curve obtained by using 1stOpt to fit the data. One is the actual curve and the other is the fitting curve obtained by calculation. Its root mean square error RMSE = 0.040 73, square sum error SSE = 0.119 45, determination coefficient DC = 0.999 61, average correlation coefficient R = 0.999 881; it can be seen that the curve fits quite well and the fitting degree is high.

The curve obtained by curve fitting the data using 1stOpt

The fitting formula obtained by 1stOpt is:

official

Wherein: y is current I, x is A/D value, p1 = -10.630 343 410 453 1, p2 = 1.745 270 764 713 4, p3 = -0.104 720 964 439 341, p4 = 0.003 091 662 786 520 87. p5 = -4.382 000 357 851 88x10-5, p6 = 2.419321 657 545 33x10-7.

This fitting formula calibrates the relationship between the current I value and the A/D value; and the corresponding I value can be obtained according to the corresponding A/D value.

5 Conclusion

The tube expander developed with MSP430 single-chip microcomputer has low cost, wide working voltage range, strong expansion capability and strong anti-interference ability. At the same time, the analog-to-digital conversion module inside the single-chip microcomputer greatly reduces the circuit board area and other peripheral expansion devices, making the whole set of tools small and easy to use. The tube expander can be connected to three different power drive motors of 300, 400 and 600 W; the set value and real-time value are fully digitally displayed; the expansion force is digitally set and adjusted by key operation; for drive motors of different powers, the minimum and maximum values ​​allowed to be set are automatically prompted; the drive motor is automatically detected to see if it is working properly; there are sound and light prompts during operation, which is simple, intuitive and flexible to operate; the LED indicates the working status; it can automatically record and display the number of tube expansions; and it has leakage protection function. The tube expander has outstanding advantages and has been widely used in many domestic enterprises and has received unanimous praise.

2010/9/11 8:16:53
Reference address:Development of automatic tube expansion controller based on MSP430

Previous article:Design of fan temperature control system based on single chip microcomputer
Next article:Analysis: What is the relationship between NVIDIA, CUDA and x86?

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

Transplantation of μC/OS-Ⅱ on MSP430F149
μC/OS-Ⅱ is an embedded real-time operating system (RTOS) with open source code. Theoretically, the operating system can manage up to 64 tasks. In general applications, 8 tasks need to be reserved for the system itself. Therefore, the user's application can have up to 56 tasks. The kernel of μC/OS-Ⅱ is a fully preemp
[Microcontroller]
Transplantation of μC/OS-Ⅱ on MSP430F149
Wireless temperature and humidity real-time monitoring system based on MSP430F149
introduction With the rapid development of Internet of Things technology and the establishment of various big data centers, various data monitoring systems, especially wireless data monitoring systems, have emerged. Among them, the wireless temperature and humidity monitoring system is a very representative wireless m
[Microcontroller]
Wireless temperature and humidity real-time monitoring system based on MSP430F149
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号