introduction
Power line communication (Power Line CommunicaTIon) technology refers to a communication method that uses the power line as a communication medium to transmit data, voice, and video signals in the frequency range of 1.6M to 30M. When sending, use GMSK or OFDM modulation technology to first modulate the data into a carrier signal or a spread spectrum signal, and then couple it to a 220V or other AC / DC power line through a coupler, and then transmit it on the power line. At the receiving end, first filter The filter filters out the modulated signal, and then after demodulation, the original signal can be obtained. Power line communication technology does not require rewiring, and directly uses the existing power network to achieve the transmission of data, voice, video and other information. It has the advantages of easy maintenance, easy promotion, easy to use, low cost, etc., showing good prospects and huge Market potential.
According to the characteristics of power line communication, a design scheme of data concentrator is proposed, the hardware design scheme with SH7145 development board as the core is elaborated, and the software implementation process under the T-Kernel embedded real-time operating system is analyzed. Reasonably implement task scheduling so that it can realize the function of reading the data of each node in the automatic power meter reading system.
1 System principle and structure
In the remote electric power automatic meter reading system, the PLC technology automatically reads the meter data and uploads it automatically according to the command or setting, which increases the meter reading rate, usually at 2400bps. Electric power automatic meter reading system is generally composed of main station, concentrator, collector (or module) and other components, which can collect and control the power consumption state of user terminal. The collector (or module) realizes the pulse counting of the user terminal electricity meter, and the concentrator cyclically queries the count value (or status) of the collector (or module) according to the instructions issued by the master station (such as copying, electricity theft detection, etc.). The master station It is composed of a PC and is responsible for the management and monitoring of the power consumption of the user terminals to which the power supply belongs. The concentrator is the communication bridge of the entire system. It receives commands from the master station and sends the power status of the user terminal (such as power consumption, abnormal power consumption, etc.) to the host computer or performs control on the user terminal (such as cutting off the user) according to the instructions. Power supply, etc.).
In the same power transmission line, the digital meter and concentrator are connected to the PLC access controller through the R422 / 488 interface, so that the entire power grid can be turned into a data transmission network, and the concentrator can collect data from each node.
Since the power line is used as the communication channel, there is no need to set up another communication cable, which saves investment and provides an efficient and scientific method for the network management of the user's energy meter and the "one meter per meter, meter reading to home" system. The data concentrator automatically collects the accumulated power of each user's energy meter according to the set meter reading time, and automatically generates the accumulated power of each user's energy meter according to the set meter reading day. The system software and hardware adopt modularization and multiple redundancy Design, this not only ensures the reliability of the equipment, but also makes the system easy to expand and software upgrade.
2 Hardware design of the data concentrator
The data concentrator is a hardware and software system with the embedded microcontroller SH7145 as the core. SH7145 is one of the SH series development boards produced by Renesas Technology of Japan. The SH7145 board has no MMI, no DSP core, uses real-time addresses, and is a low-end product suitable for beginners. There are buzzer, LCD, keyboard, A / D conversion, 2 motors, BIP switch, SH7145 chip, serial port slot, E10A emulator socket, etc. on the SH7145 board.
3 System software design
3.1 Introducing the T-Kernel embedded real-time operating system As the application becomes more complex, the traditional front-end and back-end design methods will be too complicated, real-time performance is not guaranteed, and deadlocks are prone to occur. The best way to solve these problems is to use a real-time operating system.
T-Kernel is the real-time core of T-Engine. It makes full use of ITRON achievements with many achievements in the field of embedded devices, and introduces functions such as subsystems. It is a kind of development from small embedded devices to large advanced systems. Large-scale OS. It includes functions such as time management, communication synchronization between tasks (semaphores, mailboxes, event flags), extended synchronous communication, and memory pool management; using the T-Kernel real-time operating system can effectively schedule tasks; assign different tasks The priority of can ensure the timely response of the task, and the use of real-time operating system reduces the complexity of the program and facilitates the development of the program.
3.2 Task division and scheduling To complete various functions of real-time multitasking, tasks must be divided. This program divides the program into six tasks with different priorities according to the importance and real-time nature of each task, including managing the start and sleep of each task; receiving serial interrupts and awakening the UPDATE_TASK task; simulating RTC with the system clock; reading each The data of the meter is automatically added to the new node; the SHELL instruction is received and executed.
Usually the task of a multitasking operating system is different from the general function, it is an infinite loop, and there is no return value. If no higher-priority task enters the ready state, the current task will not give up the right to use the CPU. In order to realize the normal operation of the operating system and the synchronization of related events, the communication between tasks and the setting of event flags must be properly handled.
4 Conclusion
The T-Kernel real-time operating system is unique on the basis of the embedded hardware platform. Using the T-Kernel real-time operating system to develop application programs has its own unique features. Users can directly use the system's interface functions to write their own applications without additional development. It greatly facilitates user programming, shortens the software development cycle, and improves development efficiency.
The JUK universal Screw Terminal Block series has the typical features which are decisive for practical applications:
l The universal foot allows the terminal blocks to be easily snapped onto the NS35 or NS32 DIN Rail with G shape.
l Closed screw guide holes ensure screwdriver operation perfect.
l For terminal block with different wire cross-sectional areas, complete accessories are available, such as end plates, partition plates, etc.
l Potential distribution achieved by fixed bridges in the terminal center or insertion bridges in the clamping space.
l Same shape and pitch Grounding Terminal Blocks as the JUK universal series.
l Adopt ZB marker strip system,achieve unified identification.
Double Level Terminal Blocks,Fuse Hold Terminal Block,Weidmuller Sak Terminal Block,Fuse Terminal Block
Wonke Electric CO.,Ltd. , https://www.wkdq-electric.com