Design of time/displacement commutation controller based on AT89C51

Publisher:快乐旅人Latest update time:2006-12-12 Source: 电子元器件应用 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
introduction

  In the actual production process, control components with automatic reversing functions are often used, such as round-trip operation (displacement) in machining, forward and reverse output of DC power supply, forward and reverse operation of motors, etc. When the forward (or reverse) operation reaches a certain time or a certain position, it automatically switches to reverse (or forward) operation, and the process starts over and over again. To automate this process is to design a control circuit coupled with a displacement sensor or time relay. Although the current time relays currently on the market can be used in multiple combinations to meet the requirements of some use occasions, they still have problems such as large repeated timing errors, low stability and reliability, and inconvenient and flexible use. To this end, the author has developed a time/displacement commutation controller SWHX-1 with a single-chip microcomputer as the core. This system has the characteristics of low cost and can completely overcome the above shortcomings.

Circuit composition and working principle

  The internal circuit of SWHX-1 is shown in Figure 1. The system is divided into three parts: input and output electrical signal conversion, CPU software programming control and timing delay setting. The entire circuit has a total of 14 leads, of which pins 2, 3 and 4 are the DC ground common terminal VGND. The device can operate in both AC and DC power supply modes. When AC power supply is used, AC 12 V is input through pins 13 and 14. After bridge rectification and voltage stabilization, it is supplied to the constant voltage reference power supply of the internal circuit, and the rectified DC 12 V is passed through pins 1, 2, 3, 4 is sent out for use by other external circuits; when using DC power supply, pins 1, 2, 3, and 4 become input terminals, and the input 12V DC voltage is stabilized and then supplied to the internal circuit. This method can be omitted AC power supply, but be sure to leave pins 14 and 13 floating.

Figure 1 Schematic diagram of time/displacement commutator circuit

  The internal circuit of SWHX-1 is designed with 1 channel of reversing delay and 2 channels of timing output. The reversing delay time refers to the delay for a period of time after the forward (or reverse) output group is turned off before the reverse (or forward) output group is turned on. ) group working time, the user can set it arbitrarily between 0.5 and 2s; the 2-way timing time refers to the working time of the forward and reverse group output respectively, and the user can set it arbitrarily between 1m and 7h31m. If the timing time of 1m~7h31m cannot meet the usage requirements, there are 4 ports P1~P4 left, which can be connected with 4 external time relays or 4 travel switches to make up for it. Pl and P3 are forward groups, and P2 and P4 are reverse groups.

◇ Setting of delay time

(1) Delay time setting method

  In Figure 1, t0~t4 are the short-circuit switches for setting the reversing delay time, t0 is the common terminal to ground, t1~t4 are respectively with 0.5 s , 1 s, 1.5 s, and 2 s correspond to each other. When the two are short-circuited, the corresponding commutation delay can be realized through CPU software programming. For example, when t0 and t1 are short-circuited, the delay is 0.5 s; when t0 and t3 are short-circuited, the delay is 1.5 s.

(2) Timing time setting method

  S1 and S2 in Figure 1 are 8-digit timing time setting dial switches. The first three digits of each switch are the hour digits, and the last 5 digits are the minute digits. They adopt binary coding. When 8 After the bit dial code is selected, it is sent through the P1 and P2 ports of the CPU and controlled by software programming to realize the corresponding timing function. Therefore, the timing time of each channel can be set arbitrarily between 1m and 7h31m.

◇ Working principle of timing commutator

  When SWHX-1 is used for timing commutation control, the CPU first reads the timing setting value of the dial switch S, which is recognized by software programming and implemented through the CPU internal timer and software delay. When the timing time is up, the timing setting value will be passed The P0 port sends a timing pulse through pins 12 and 11. When pins 12 and 11 are shorted to pins 5 and 7 respectively, the timing pulse will generate an interrupt request signal to the CPU, and the CPU receives this interrupt request. Then a blocking potential signal will be output through the pin Vs1 port to stop the currently working group, and after a delay of 0.5 to 2 s, a start signal will be output through the pin Vs2 port to start another group. work to complete a commutation work cycle. Vice versa, the cycle begins over and over again.

◇ Working principle of displacement commutator

  When SWHX-1 is used for displacement commutation control, the above timing function will not work. Instead, the "displacement to" signal sent by the displacement detection sensor (usually a travel switch) will pass through Pins 5 and 7 send interrupt requests to the CPU. When the CPU receives the interrupt request signal, the above-mentioned commutation process is completed. In addition, pins 6 and 8 are used for displacement limitation. Because the displacement in most actual production processes is limited, the signal from the limit sensor is sent through ports 6 and 8, and the CPU receives the After the request signal, the limit blocking signal is immediately sent through pins 9 and 10 to stop the displacement work.

Software design

  The software program of SWHX-1 is divided into three parts: initialization, timing identification and delay processing, and interrupt commutation processing. The program flow is shown in Figure 2.

Periodically commutated power supply applications

  Periodically commutated power supply devices are used in many production processes. Here we only take one of the common electroplating power supplies as an example to illustrate its use. Figure 3 shows the circuit schematic diagram of a three-phase double reverse star bidirectional 6-pulse cycle commutation power supply. The power supply uses two sets of thyristor silicon controlled rectifier circuits, but under the control of SWHX-1, only one set can work at the same time, and the other set is blocked. The working time of the two sets of rectifier circuits can be set separately through S1 and S2 in Figure 1. The CF97088B in Figure 3 is a special device for dual reverse star 6-pulse thyristor triggering. In addition to generating 6 synchronous trigger pulses, it also has an internal current and voltage double P1 negative feedback adjustment function, and can also automatically identify the input three-phase power. Phase loss, over-voltage protection, over-current limiting and other functions in the system. When these phenomena occur, the system can automatically block the output of the trigger pulse for the purpose of protection and limitation. W1 and W3 are the forward and reverse output voltage setting value adjustment knobs respectively, while W2 and W4 are the forward and reverse output voltage feedback amount adjustment knobs respectively.

  The advantage of this power circuit is that it has a simple structure and is easy to assemble, debug and maintain on site. Since CF97088 and SWHX-1 are fully sealed devices, they can be used in electroplating, electrolysis and chemical industries.

Application in Displacement Electrical Transmission In

  the process of mechanical processing and production, there is often a round-trip displacement operation process. The working phenomenon reflected in the electrical transmission part is the forward and reverse rotation of the motor. Here we only take common gantry planers and milling machines as examples to illustrate. Application of SWHX-1. Figure 4 is a diagram of a planing and milling machine with a direct current flow switch. S1 and S2 are forward and reverse travel switches, and S3 and S4 are limit travel switches. When the forward displacement touches switch S1, under the control of SWHX-1, it will automatically switch to reverse operation after a delay of 0.5~2 s. When the displacement touches S2, it will automatically switch to forward operation, and the cycle repeats. . The displacement touch switch S3 or S4 can be used to indicate that the displacement is out of bounds and is under the control of SWHX-1 to immediately turn off the output and stop the displacement operation.

Conclusion:

  Replacing the current timers and time relays with microcontroller-based control is the future development direction. The SWHX-1 device introduced in this article can be used as an attempt. The application results of this device in periodic commutation power supply show that the timing controller has accurate timing, reliable operation and good effect.

Reference address:Design of time/displacement commutation controller based on AT89C51

Previous article:The principle and application of dsPIC30F6010 microcontroller
Next article:Design plan using 8-bit microcontroller to drive PCI bus network card

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号