Design of a motor protector based on the H8/3687FP microcontroller
2026-04-06 03:30:46··#1
Abstract: Traditional motor overload protection uses thermal relays. With the development of electronic technology, using microprocessors to calculate the load can not only quickly respond to various motor faults, but also easily incorporate other control conditions, such as motor heat capacity and heat dissipation conditions, enabling more accurate and timely reflection of motor status and effective protection. In recent years, the rapid development of electronics, intelligence, and communication technologies has made microprocessor-based load calculations the research and development direction for motor protectors. Keywords: Motor protector; ARD3 type; H8/3687FP; Protection function; Modbus 0 Introduction Traditional motor overload protection uses thermal relays. Although simple in structure, these relays suffer from poor accuracy and slow response due to variations in the characteristics of the thermal elements. With the development of electronic technology, using microprocessors to calculate the load can not only quickly respond to various motor faults, but also easily incorporate other control conditions, such as motor heat capacity and heat dissipation conditions, enabling more accurate and timely reflection of motor status and effective protection. In recent years, the rapid development of electronics, intelligence, and communication technologies has made microprocessorization, digitalization, and networking the research and development direction for motor protectors. This paper develops a high-performance, cost-effective ARD3 low-voltage motor protector based on the Renesas H8/3687FP microcontroller. 1. Product Functional Features Based on the functional characteristics and actual needs of existing motor protectors on the market, the ARD3 motor protector includes the following functions: 1) Basic protection functions: Phase loss, overload, underload, three-phase imbalance protection, etc., conforming to IEC94704-1, IEC947-4-2, GB14048.4, GB14048.6, etc.; 2) Derived protection functions: Residual current protection, temperature protection, overvoltage protection, undervoltage protection, underpower protection, phase sequence protection, power failure restart, etc., can be provided as needed; 3) Measurable data and communication functions: Can measure three-phase current, residual current, and three-phase voltage; RS485 communication interface, using Modbus communication protocol; 4) Human-machine interaction function, fault recording function, built-in I/O ports to realize direct starting, star-delta starting, frequency conversion starting, and other motor starting methods; 5) The installation method adopts DIN rail mounting. Rated current (A) specifications are available in five sizes: 1.6~6.3, 6.3~25, 25~100, 63~250, and 250~800. 6) Electromagnetic compatibility: Complies with the following standards: GB/T17626.2-1998, GB/T17626.3-1998, GB/T17626.4-1998, GB/T17626.5-1998, GB/T17626.6-1998. 2 Design Scheme Based on the product functions, the ARD3 motor protector needs to perform the following functions: measure the three-phase current, three-phase voltage, and residual current of the motor; diagnose various motor faults; protect the motor according to different faults; display all measured parameters, fault codes, and function menus; and communicate with the host computer. After scheme demonstration, the Renesas H8/3687 microcontroller was adopted. The H8/3687 microcontroller expands the H8/300H Tiny microcontroller lineup with its built-in flash memory, low pin count, and small package. It features an enhanced timer and several communication functions, large-capacity high-speed flash memory, low EMI noise, low power consumption, and a variety of low-cost development tools. It can be widely used in wireless and network communication, automotive electronics, industrial control, and consumer electronics products. The basic functions are as follows: 16-bit high-speed H8/300H CPU is backward compatible with H8/300 CPU at the target code level; H8/3687 has 64K FLASH, 2K RAM; general-purpose registers: 16×16; 62 basic instructions; peripheral functions: RTC (on-chip real-time clock, which can be used as a free-operation counter), 2-channel SCI (asynchronous or clock-synchronous serial communication interface), IIC interface, 8-channel 10-bit A/D converter, multi-function timers: 2 eight-bit timers (Timer B1, Timer V), 1 sixteen-bit timer (Timer Z), watchdog timer; 14-bit PWM; I/O ports: 45 I/O pins (H8/3687N has 43 I/O pins), including 8 high-current pins that can directly drive LEDs (IOL=20mA, @VOL=1.5V). Pins used only as inputs: 8 input pins (can also be used as analog inputs); on-chip reset power supply (POR) circuit, on-chip low voltage detection (LVD) circuit. After selecting the microcontroller, determine the circuits for measuring the three-phase current, three-phase voltage, and residual current of the motor; the circuits for the buttons and display section; the I/O control circuit; and the communication circuit. System functions: When designing using AC sampling, several technical aspects need to be considered: 1) The sampling period should be much shorter than the period of the measured signal. This is not a problem for power frequency current signals because the processing speed of current microcontrollers is sufficient. 2) To avoid sampling signal distortion in hardware, efforts need to be made in several aspects: ① Ensure that the voltage signal waveform output by the current transformer has minimal distortion within the measurement range. ② The sampling signal from the current transformer often needs to be proportionally amplified to the microcontroller input interface, which requires minimal distortion in the signal conversion circuit. ③ Prevent noise interference; a common practice is to add a high-frequency bypass capacitor to the microcontroller input port. The AC sampling circuit eliminates the need for RC filters, resulting in a significant improvement in response speed compared to DC sampling. This is particularly beneficial for servo systems with high response requirements. The choice of sampling method should be carefully weighed in practical applications, considering all factors. For the practical application of motor protectors, the software uses an AC sampling algorithm to process the three-phase current, three-phase voltage, and residual current of the motor. This simplifies the hardware circuit, saves costs and reduces system space, and provides higher measurement accuracy than DC sampling. The hardware circuit employs full-wave processing and an amplification circuit, with the amplified signal directly input to the microcontroller's A/D unit. The effective values of the voltage and current signals calculated by the microcontroller are used as the basis for judging various faults of the protector. The button processing circuit uses a parallel-in, serial-out chip 74HC165, saving on the number of microcontroller I/O ports. Parameters such as rated current, rated voltage, rated power, overload level, and start-up time of the motor can be set via buttons. Similarly, to save on microcontroller I/O ports, the display section uses a 74HC595 chip, and the display uses a 4-digit integrated digital tube. During normal system operation, the digital tube displays the current three-phase current and three-phase line voltage of the motor, and the voltage and current of each phase can be viewed via buttons. In case of a fault, a fault code is displayed, and the fault cause, the current value at the time of the fault, the voltage value, and the motor running time are stored in the EEPROM to achieve a fault recording function. Overload, phase loss, and imbalance fault alarm indicator lights are provided on the protector panel for user convenience. The I/O control circuit involves digital inputs and relay outputs. The digital input section is part of the control section and is powered by a +24V power supply (provided internally by the protector) according to safety requirements. Optical couplers are used for isolation to enhance anti-interference and meet the product's power frequency withstand voltage requirements. Because solid-state relays have long lifespan, stable performance, and no sparking, solid-state relays are used for the output section. To prevent high induced voltage from being generated at the moment the relay coil is de-energized, which could damage the circuit, a freewheeling diode is connected in parallel across the relay coil, and an optocoupler is used for isolation from the microcontroller pins. The ARD3 has communication capabilities, allowing it to form a network monitoring system with a PC. It can transmit various information about the protector, including operating status, fault causes, fault times, and operating time parameters, to the PC. It can also set various protector parameters via the PC. The communication circuit uses an RS485 interface. The communication section utilizes the characteristics of the RS485 interface to employ hardware automatic control of the transceiver circuit, eliminating the need for microcontroller control and reducing the burden on the microcontroller. To meet the requirements of power frequency withstand voltage, isolation measures are implemented during PCB fabrication. 3. Software Design The main software flowchart of this product is shown in Figure 3. The main program includes A/D subroutines, basic protection subroutines, calculation and display subroutines, key processing subroutines, and communication subroutines. Due to the large amount of program content, the program adopts a modular design, ensuring strong readability and portability. The functions of each subroutine are described as follows: After the main program initializes, it enters the A/D sampling program. The A/D sampling subroutine completes the sampling of the three-phase current, three-phase voltage, and residual current of the motor. After sampling, average value filtering is used to improve the system's anti-interference performance. After A/D sampling, the system checks if the sampling time exceeds the normal sampling time. If it does, the sampled value is not included in the basic parameter calculation subroutine. After A/D sampling, the system calculates the current and voltage values of the motor based on the sampled three-phase current, voltage, and residual current values, and then determines if the motor is currently running. If the motor is already running, the system enters the protection subroutine. In the protection subroutine, the system checks if the motor has a fault based on the sampled values. If not, it returns to the main program; otherwise, it continues execution, identifies the fault, and initiates fault handling. The cause of the fault is displayed on the ARD3 motor protector panel and in the communication interface, and the fault is recorded. After the protection subroutine executes, the system enters the display processing subroutine, which provides the data values to be displayed for the subsequent display subroutine. After the display processing subroutine completes, the system enters the button processing subroutine, which provides human-machine interaction, allowing users to set, modify, and view various parameters of the motor protector, as well as display the current motor current and voltage values. After the button handling subroutine is executed, the display subroutine is entered. When the motor is running normally and no buttons are pressed, the display subroutine shows the current current and voltage values of the motor. Users can check the voltage and current values of different phases by pressing the buttons. When the motor is running normally and a button is pressed, the corresponding value for the button function is displayed. When the motor malfunctions, the fault code is displayed along with an indicator light alarm. After the display subroutine finishes, the communication subroutine is entered. This subroutine first checks if the protector has received data from the host computer. If data is received, it is processed according to the standard ModBus protocol, first determining if it belongs to this protector. If it does, the corresponding data is sent to the host computer. After receiving the data, the host computer verifies that there are no errors and begins communication with this protector. The communication subroutine is written entirely according to the standard ModBus protocol. 4. Anti-interference measures: When designing the ARD3 motor protector, the electromagnetic compatibility requirements are as follows: GB/T17626.2-1998, GB/T17626.3-1998, GB/T17626.4-1998, GB/T17626.5-1998, GB/T17626.6-1998. To achieve this goal, anti-interference measures must be implemented during product design. The anti-interference measures adopted for this product are as follows: 4.1 Hardware Measures: An EMC filter is added to the power supply section; high-voltage capacitors are added to the secondary and primary windings of the high-frequency transformer; a filter circuit is added to the output section; a filter circuit is added to the signal acquisition section; port protection circuits are added to the input ports of each chip used for signal processing; decoupling capacitors are added to the power inputs of each chip; freewheeling diodes are connected in parallel across the relays, and optocouplers are added to isolate the CPU port; unused CPU ports are defined as output ports; the analog and digital sections are partitioned during PCB layout, with analog signals routed within the analog area and digital signals within the digital area, preventing them from entering each other's areas; power and ground lines are made as thick as possible during routing, and signal lines are routed at 45° angles, avoiding right angles. 4.2 Software Measures: Software filtering is used for all signal acquisition channels to increase the accuracy of sampled values, and a watchdog timer is used to prevent program overflow. Through these measures, the product's anti-interference performance is significantly improved, and this product passed the 3C safety certification type test on its first attempt. 5. Conclusion This paper introduces the ARD3 motor protector, based on the H8/3687 microcontroller, a new generation of intelligent, networked, and digital motor protectors. The ARD3 protector protects against hazards caused by motor faults such as overload, phase loss, imbalance, locked rotor, blockage, underload, temperature, undervoltage, overvoltage, underpower, and residual current, maximizing the reliability and safety of equipment operation. The ARD3 motor protector is small, compact, and easy to install. It can be directly installed in low-voltage control terminal cabinets and various drawer cabinets of 1/4 module and above. It also has comprehensive network communication capabilities and can form a motor control and protection unit with contactors, motor starters, and other electrical components, improving the reliability and automation level of the control circuit. It is suitable for applications in petroleum, power, coal mining, papermaking, and civil construction.