Design and Application of 32 Channel Remote Signal Unit Based on ATmega128

Abstract: Introduce the design principle of an ARTU-K32 type remote signal unit based on the 8-bit single-chip ATmega128 as the main control chip, with monitoring 32-channel switch signal input, and the main technical indicators and application cases of the product.

0 Introduction In electric power and industrial automation control systems, there are a large number of actuators such as the opening and closing of circuit breakers, the opening and closing of motors, the opening and closing of solenoid valves, etc. that need to be detected and fed back to the control unit to form a closed-loop control. In the past system design, multiple PLCs or field instruments with communication and switch input functions are often used to form a remote automatic control system, but the high cost and cumbersome system structure of PLC bring trouble to the automation design and application.
This article introduces an ARTU-K32 with 32 channels of remote signal contact input. The device can accept 32 channels of active or passive contacts. The digital signals can be exchanged with the host computer monitoring system through communication. 32 channels are scanned for a week It only takes 1ms, and has 2000 sets of input status event records, with GPS time calibration function, which can ensure that SOE event records are not lost within one month after the external power supply is powered off. Compared with the previous control method, this design simplifies the control network structure At the same time, it provides a low-cost, high-reliability alternative.

1 Circuit design principle
The hardware circuit of ARTU-K32 remote signaling unit includes 8 parts: main CPU chip, DIP switch setting input, real-time clock, dual RS485 communication, SOE event record storage, watchdog control, photoelectric isolation input acquisition, power supply module, etc. . (see picture 1)

Figure 1 Circuit structure

1.1 Main control CPU
The 32-channel switch signal acquisition unit (ARTU-K32) design adopts ATmega128 of ATMEL company, and the single chip realizes dual-channel RS485 communication, data processing, event record access, display status control, etc. 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 Flash, 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 ports are 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 IIC bus interface and its built-in 32.768 kHz quartz oscillator provides wide temperature and high stability in 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
The 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, so that the system quickly returns to a controlled state. (See Figure 5)

Figure 5 Watchdog circuit

1.7 Opto-isolated input signal state acquisition External switch signal acquisition uses optocouplers (IC1, IC2 only draw four of them) for electrical isolation, and a data buffer 74HC244 (IC9) is used to buffer the optocoupler output signal at the optocoupler output After the data bus is transferred to the CPU for the CPU to read. (See Figure 6)

Figure 6 Signal state acquisition

1.8 Power supply 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, 12V power output, communication and other circuits.

2 Software design software process see Figure 7

Figure 7 Software flow chart

3 Product structure characteristics
ARTU-K32 is installed with DIN35mm rail. The front end has two groups of indicator lights with communication indication and signal running channel indication. The communication has two RS485 interfaces. (Using ModBus-RTU protocol) One way is used for general parameter setting and debugging, and the other way is used to communicate 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.

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

Product main technical index Table 1

performance
Index
Input circuit / mode
32 active wet contacts or passive dry contacts
Bus mode
Two-wire half-duplex RS485 (ModBus—RTU) is recommended to use three-core shielded wire
Bus capacity
≤32
Switching event resolution
Distinguishing ability of multiple contact successive displacement, when the interval time of any two contact displacement is greater than 1 millisecond, the distinguishing ability of the unit (less than 2ms) is reflected in the SOE
Remote signal scanning speed
It takes 1ms to scan 32 channels a week
Remote letter to shake time
1 ~ 99ms programmable (32 channels unified time)
Event Sequence Recording (SOE) capacity
1600 groups
Enclosure rating
IP20
power supply
DC24V or AC / DC200V
Power consumption
< 5W

5 Application Case
One ARTU-K32 can monitor the working status of 8 motor circuits or 16 lighting circuits. Taking the monitoring motor circuit as an example, the primary scheme is shown in Figure 8 (a), which is composed of an NS circuit breaker with auxiliary and fault contacts, an LC1 AC contactor, an LR2 thermal relay, and an AKH-0.66P protection transformer. Each motor circuit monitors 4 sets of nodes, namely circuit breaker closing and fault contacts, motor running (contactor) status contacts, motor thermal overload (thermal relay) contacts, and one ARTU-K32 monitors 8 motor circuits. See Figure 8 (b), the operation and stop of the motor are controlled by the on-site start-stop button, the red and green indicator lights on the spot simultaneously display the working status of the motor, and the remote signaling unit can remotely display the motor's operation value by monitoring the action value of each component contact Working status.

Picture 8

6 Conclusion
The ARTU-K32 remote signaling unit was tested at the National Relay Protection and Automation Equipment Quality Supervision and Inspection Center in December 2007 and met the relevant requirements. This product has been used in a power distribution monitoring system for an oilfield water supply company, a taxation building in Suzhou, and a coal mine in Inner Mongolia, which has reduced investment costs and produced good social and economic benefits.

Aluminum Based PCB

Aluminum Based Pcb,Aluminum Based Circuit Board,Electrical Circuit Board,Double-Sided Pcb Circuit Board

Shenzheng Weifu Circuit Technology Co.Ld , https://www.wfcircuit.com