Abstract : This paper introduces the function, composition, and circuit principle of the FCF-1 intelligent servo amplifier in valve control electric actuators, analyzes the amplifier's software block diagram, and briefly introduces the performance of the components and circuits used. Keywords : Microcontroller; Electric actuator; Position feedback; A/D conversion 1 Basic Functions of FCF-1 Servo Amplifier 1) Given Input: Input signal from computer, regulator, or handheld device (generally 4-20mA DC current). 2) Valve Position Input: Position feedback signal from the actuator valve opening (generally 4-20mA). 3) Valve Position Increase Output: Opens the forward rotation solid-state relay, causing the servo motor to rotate forward. 4) Valve Position Decrease Output: Opens the reverse rotation solid-state relay, causing the servo motor to rotate in reverse. 5) Input Circuit Breaker Protection: When the given input current IN or the position feedback current WF is less than 3mA or the circuit is broken, the yellow light on the panel illuminates as an alarm. At the same time, the system cuts off the main power supply and sends out a brake signal and an alarm contact signal. 6) Output short-circuit protection: When a short circuit occurs in the output of the solid-state relay, the red light illuminates as an alarm, the system cuts off the main power supply and sends a brake signal. 7) Output open-circuit protection: When an open circuit occurs in the output of the solid-state relay, the green light flashes as an alarm. 8) Dead-zone adjustment function: If the actuator oscillates at the balance point, the dead zone can be increased (for example, when DIP switch '1' is set to the 'ON' position, '2', '3', and '4' remain unchanged, then the dead zone is 1.5% of the full scale). 2 Basic Structure and Circuit Principle 2.1 Structure and Principle of Signal Acquisition and Calculation Circuit This part of the circuit includes the AT89C2051 microcontroller, the CD4051 multiplexer, the ADC0804 A/D converter, etc. (Figure 1). 2.1.1 AT89C2051 This is a DIP20 packaged chip that integrates an 8-bit CPU, 2KB of flash memory, 128 bytes of internal RAM, 15 programmable I/O lines, and two 16-bit timers/counters. Two chips are used in this amplifier: one for data acquisition, processing, and control, and the other for system protection and alarms. 2.1.2 CD4051 Single-ended 8-channel analog multiplexer. In this example, only X0, X1, and X2 are switched; the remaining five channels X3 to X7 are not switched. Only bits A and B are selected for the binary control input, with C grounded. Therefore, the 4051 can decode four states (00-11), controlled by pins 3.5 and 3.7 of the 2051 control port. The allow input INH is always grounded, keeping the 4051 constantly on. 2.1.3 ADC0804 The ADC0804 has an on-chip tri-state data output latch, is microprocessor compatible, has a single-channel input, and a conversion time of 100μs. A typical wiring diagram is shown in Figure 1. The voltage signal to be converted is input from Vin(+) and Vin(-), allowing for differential or non-common ground voltage signals. Analog and digital grounds are provided separately to prevent the ground current of the digital circuit from affecting the analog signal loop, thus preventing interference caused by parasitic coupling. The reference voltage can be supplied by an external circuit, directly input from the VREF/2 terminal. The ADC0804 has an on-chip clock circuit. Simply connecting an external resistor and capacitor to the "CLK-R" and "CLK-IN" terminals generates the clock required for A/D conversion. The chip select terminal is the input terminal for controlling the chip startup, the conversion end signal output terminal is the conversion result readout control terminal. When both are low, 8-bit parallel binary codes appear on the output data latches DB0-DB7 to represent the A/D conversion result. 2.1.4 Operating Principle The given signal 'IN' from the computer, regulator, or manual controller is input from the X1 terminal of the analog switch 4051, and the position feedback signal 'WF' from the electric actuator is input from the X2 terminal of the 4051 (see Figure 1). These signals are respectively sent from the X terminal of the 4051 to the 'Vin' pin of the A/D converter 0804, and then converted into digital signals which enter ports P1.0 to P1.7 of the 2051. The two signals are subtracted in the CPU. If IN - WF > a (a is the dead-zone signal), it indicates that the given signal is greater than the position feedback signal, meaning the valve... If the valve is not fully opened, a high level is sent from 1P3.2 of 2051 to the input of the reverse driver U1 (7404); conversely, if WF-IN>a, it means that the given signal is less than the bit inverted signal, indicating that the valve is over-opened. In this case, a high level is sent from 1P3.3 of 2051 to the input of the reverse driver U2 (7404). The outputs of U1 and U2 send out low levels K+ or K- respectively to control the output circuit G1 or G2 of the next stage solid-state relay, which sends a certain power of current to the servo motor coil of the electric actuator to make it rotate forward or reverse. 2.2 Composition and Principle of Protection Circuit 2.2.1 Input Circuit Breaker Protection Circuit In Figure 2, BG1, BG2, J0, and the yellow lamp constitute the input circuit breaker protection circuit. Its principle is as follows: when the 'IN' and 'WF' signals of the input 4051 are lost due to a disconnection or fault, a low level is sent to I/O line 1P3.1 of the 2051-1 microcontroller. At this time, BG1 and BG2 conduct successively, and current flows through the yellow lamp, illuminating it and triggering an alarm. Simultaneously, the intermediate relay J0 is energized and engages. Under the action of J0-2, relay J1 closes, causing the normally closed contact J1-2 in the output control circuit to open, cutting off the AC 220V power supply to the forward and reverse rotation circuit. The servo motor stops and a brake signal B is sent to suppress the gate's rotational inertia. Simultaneously, the normally open contact J0-1 also closes, triggering an alarm. 2.2.2 Solid-state relay output short circuit and open circuit protection circuit (1) Judgment of solid-state relay output short circuit and output open circuit The circuit composed of transistors BG5, BG6 and other components is the current detection circuit of the forward and reverse circuits of the solid-state relay. We take forward rotation as an example to explain its principle. In Figure 2, h1 is the secondary coil of the current transformer in the forward rotation circuit. When there is current flowing through the forward rotation circuit, a voltage will be induced on h1. After rectification, filtering, amplification and shaping, a standard low level is sent to 2P3.0 of 2051-2. It is a '0' valid signal. 1P3.2 sent by 2051-1 is a '1' valid forward rotation signal, which is applied to 2P3.1. There are several situations when 2P3.0 and 2P3.1 are combined: 1》. 00: It means that there is current flowing through the forward circuit of the solid-state relay, but there is no given signal at the input, indicating that the solid-state relay is short-circuited. 2》. 01: Indicates that there is current flowing through the forward circuit of the solid-state relay and there is a given signal at the input, indicating normal operation. 3》.10: Indicates that there is no current flowing through the forward circuit of the solid-state relay and there is no given signal at the input, indicating normal operation. 4》.11: Indicates that there is no current flowing through the forward circuit of the solid-state relay and there is a given signal at the input, indicating that the solid-state relay is open circuit. (2) Protection of output short circuit and output open circuit of solid-state relay When the output of the solid-state relay is short-circuited, 2P1.7 of 2051-2 outputs a high level, and the red light is lit to alarm. At the same time, 2P3.7 outputs a low level, BG3 and BG4 are turned on in succession, J1 is energized, the normally closed contact of J1-2 in the output control circuit is opened, cutting off the power supply of the solid-state relay circuit, and the servo motor stops. When the output of the solid-state relay is open circuit, 2P1.6 of 2051-2 outputs a high level, U3 outputs a low level, and the green light is lit to alarm. U3 and U4 are both reverse drivers LS7404. 2.2.3 Hardware Reset and Watchdog Circuit This amplifier uses hardware and software reset circuits (power-on reset, manual reset, and watchdog circuit) to make the system safer and more reliable. 3. Program Flowchart Figure 3 shows the program flowchart of the servo amplifier used for signal acquisition and protection system. [align=center] [/align] 3.1 Signal Acquisition Program Flowchart The signal acquisition program is applied to the 2051-1. Initialization sets an initial state for each port and register of the 2051-1. For example, P3.1=1, P3.2=0, P3.3=0, indicating that these three bits of port P3 are set to high, low, and low levels respectively. Initially, there should be no alarm signal or forward/reverse signal output. The channel number of the CD4051 multiplexer is selected by P3.5 and P3.7. If it is '00', it means channel 0 is selected. Similarly, '01', '10', and '11' are channels 1, 2, and 3 respectively. P3.0, starting with a "0" followed by a "1", outputs a positive pulse to initiate the A/D conversion. After the A/D conversion, the 8-bit binary number from channel 0 is sent to port P1, which contains the dead-time range value set by us. Different settings will change the parameters of variables a1, a2, and a3. When the channel number becomes 1, the value of port P1 is X, which is the servo amplifier's given signal. If X < 48 (current value < 3.7mA), it indicates that the signal may be open. In this case, P3.1 = 0, and an open-circuit alarm signal is given. If X > 48, it indicates that the signal is normal, and the Y value of channel 2 is collected, which is the position feedback value. Similarly, the program judges whether it is less than or greater than 48 to proceed to the alarm or the next step. The difference between the given value and the position feedback is judged by |X - Y|. If it is less than the set dead-time range, the servo amplifier will give a stop signal. Only when |X - Y| > a, it is judged whether X or Y is larger to determine whether to rotate forward or backward. 3.2 Protection Program Flowchart The protection program is added to 2051-2, and the initialization program is the same as described above. P3.0 is a flag indicating that the forward-rotating solid-state relay has a signal output; '0' is valid. P3.1 comes from P3.2 of 2051-1 and is the forward-rotating signal; '1' is valid. The program uses the values of P3.0 and P3.1 for judgment. If they are both '1', it means there is a forward-rotating input but no forward-rotating output, which is obviously an open circuit. P1.6 = 1, i.e., an open-circuit alarm signal is given. If both P3.0 and P3.1 are '0', it means there is no forward-rotating input but a forward-rotating output, which is obviously an output short circuit. P1.7 = 1, an alarm is output, and simultaneously, P3.7 = 0, activating the protection relay. If the values of P3.0 and P3.1 are different, the amplifier operates normally. P3.2 is a flag indicating that the reverse-rotating solid-state relay has a signal output; '0' is valid. P3.3, originating from P3.3 in 2051-1, is an inverted signal; '1' is valid. The program uses the values of P3.3 and P3.2 for judgment, and the method and result of this judgment are the same as when using the values of P3.0 and P3.1.