Design and application of 16-channel remote control unit based on ATmega128

Abstract: Introduce the design principle of an ARTU-J16 remote control unit with 16 outputs based on the 8-bit microcontroller ATmega128 as the main control chip, and the main technical indicators and application cases of the product.

0 Introduction In electric power and industrial automation control systems, the opening and closing of circuit breakers, the opening and closing of motors, the opening and closing of solenoid valves, etc., there are many actuators that need to be controlled remotely. Field instruments with communication and switching output functions form a remote automatic control system, but the high cost and cumbersome system structure bring trouble to the automation design and application.
This article introduces an ARTU-J16 with 16 channels of remote control contact output. The device is connected to the host computer via RS485 bus as a remote relay output module for receiving computer commands and performing remote control operations or automatic control of the system. The device has 1600 sets of operation event records with GPS time adjustment function. After the external power supply is powered off, it can ensure that the SOE event records are not lost within one month. Compared with the previous control method, this design provides simplified control network structure and provides A low-cost, high-reliability alternative.

1 Circuit design principle
ARTU-J16 remote control unit hardware mainly includes 8 parts: main CPU chip, DIP switch setting input, real-time clock, dual RS485 communication, SOE event record storage, watchdog control, relay control and output, power supply module, etc. ( see picture 1).


Figure 1 Circuit structure

1.1 Main control CPU
The design of ARTU-J16 type 16-channel remote control execution unit adopts ATmega128 of ATMEL company. The single chip realizes dual-channel RS485 communication, data processing, event record access, display and output status control of 16-way relay normally open contact. ATmega128 is an 8-bit RISC structured high-speed low-power single-chip microcomputer introduced by ATMEL. The system performance can reach 16MIPS at 16M clock frequency, with 128k FlashROM, 4k EEPROM, 4k system SRAM; 64k external memory can be expanded; two UART communication port. At the same time, the chip has a JTAG online programming port, which is convenient for user debugging and reduces development costs. 53 programmable I / O ports can connect enough peripheral devices.
1.2 DIP switch setting The input DIP switch provides users with a simplified man-machine interface for setting address, baud rate, data format and other setting functions in RS485 communication, and 10-bit data of the DIP switch (SW1) The port is connected to a 10k resistor and pulled up to Vcc. The circuit uses a 74HC244 (IC5) data buffer to transfer the status of the dip switch to the 8-bit data bus. The remaining two data lines are directly connected to the CPU's I / O port ( (See Figure 2).

Figure 2 DIP switch setting input circuit

1.3 Real-time clock The real-time clock chip RX-8025A (IC4) provides time recording points for system SOE events. The chip has a 400kHz serial I2C bus interface and a built-in quartz oscillator with a frequency of 32.768 kHz. Real-time time data.
1.4 Communication mode The communication mode adopts the dual-channel RS485 mode. The debugging and setting and the communication part of the host computer are physically divided into two channels, which do not interfere with each other, effectively preventing possible misoperation (see Figure 3).

Figure 3 Dual RS485 communication circuit

1.5 SOE event record storage
SOE event record memory uses 32k low-power SRAM (IC3) IC61C256AH and backup power to form a data storage unit that is not lost when power is turned off, and uses a data latch 74HC373 (IC2) and the PC port of the CPU to form a 15-bit data address for IC3 Data storage operations (see Figure 4).

Figure 4 Event record storage circuit

1.6 The watchdog controls the power-saving automatic saving part to use MAX691CWE (IC8) as the power management. When the system has auxiliary power supply, ensure that IC3 is powered by the main power supply Vcc. When the main power supply is powered off, it automatically switches to the backup battery power supply mode. At the same time, this chip also has a watchdog function, in the extreme case of system crash, reset the CPU in time to quickly restore the system to a controlled state (see Figure 5).

Figure 5 Watchdog circuit

1.7 Relay control and output The relay control output uses a 74HC273 (IC14) to latch the output state of the 8-way relay that needs to be output, and then drives the corresponding relay (K1 is only one of the 16 roads) via ULN2803 (IC15), and the diode D1 can be bypassed The reverse current generated by the relay K1 at the moment of disconnection, and the varistor VZ1 connected in parallel to the output contact of K1 can absorb the reverse electromotive force generated by the inductive load after the shutdown, effectively extending the output relay contact. Life (see Figure 6).

Figure 6 Relay control and output

1.8 Power supply part The power supply module adopts the Switching Power Supply chip of PI company, the input range is AC / DC 80-270V, the power supply has 3 outputs, and provides power to the CPU, relay drive, communication and other parts of the circuit.

2 Software design The software design process is shown in Figure 7.

Figure 7 Software flow chart

3 Product structure characteristics and technical indicators
ARTU-J16 is installed with DIN35mm rail. The front end is provided with two groups of indicator lights for communication indication and signal running channel indication. There are two RS485 interfaces for communication, one for setting and debugging of general parameters, and the other for communication with the host computer. There is a dial switch window at the top of the product, and the product communication address and baud rate can be set through the dial switch. The product meets the standards of JB / T10388-2002 "General Technical Conditions for Intelligent Measurement and Control Node Products with Bus Communication", GB / T7261-2000 "Basic Test Methods for Relays and Devices" and GB / T13729-2002 "Remote Terminal Equipment" standards.

The main technical indicators of the products are shown in Table 1 Table 1

performance
Index
Output circuit
16 relay outputs (pulse or hold mode)
Output capacity
AC 5A / 220V or DC 5A / 30V
Bus mode
Two-wire half-duplex RS485 (ModBus—RTU) is recommended to use three-core shielded wire
Bus capacity
≤32
Control accuracy
100%
Event Sequence Recording (SOE) capacity
1600 groups
Enclosure rating
IP20
power supply
DC24V or AC / DC200V
Power consumption
< 5W

4 Application case Take a certain power distribution system as an example, one ARTU-J16 controls 8-channel low-voltage feeder, CM1 circuit breaker is equipped with motor operating mechanism. The primary scheme is shown in Figure 8 (a), and the control method is shown in Figure 8 (b). The start-stop button manually controls the closing and opening of each circuit breaker on site, and the remote control unit centrally controls the working state of the 8-circuit breaker through the communication interface to achieve the working mode of local and remote control of the circuit breaker.

Picture 8

5 Conclusion
The ARTU-J16 remote control unit was tested in the National Relay Protection and Automation Equipment Quality Supervision and Inspection Center in December 2007 and met the relevant standards. This product has been used in a power distribution monitoring system of an oil field water supply company, a tax building in Suzhou, a coal mine in Inner Mongolia, etc., which reduces investment costs and produces good social and economic benefits.

High Voltage Capacitor Tester

High Voltage Capacitor,Igh Voltage Variable Capacitor,High Voltage Electrolytic Capacitors,High Voltage Capacitor Leakage Tester

Yangzhou IdealTek Electronics Co., Ltd. , https://www.idealtekpower.com