Design and application research of power carrier module based on 89C52/C51 series microcontroller

Publisher:量子启示Latest update time:2023-07-17 Keywords:89C52 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

PowerLine CarrierWave (PLCW) communication is a communication method that uses power lines to transmit information. Power carrier communication is widely used in the automatic collection and transmission of remote three-meter (water meter, electricity meter, gas meter) information, and is favored in the construction of smart communities. With the development of information technology, intelligent network appliances have gradually become a research hotspot, and the application of power carriers to the control of intelligent network appliances has just begun. There are currently no research reports on power carrier communication products used in the control of intelligent networked home appliances in China; while abroad, there are already stable power carrier communication products for building intelligent networked home appliances, but they are expensive and difficult for ordinary Chinese households to receive, and the voltage It is 110V, which is not suitable for China's national conditions. Therefore, it is necessary to conduct in-depth exploration of power carrier technology and research and develop low-cost and reliable power carrier communication products that are suitable for China's national conditions. There are many advantages in applying power carriers to intelligent network home appliance control: 1) existing power lines can be used to form a network; (2) financial, material and manpower can be saved because there is no need to rewire the network; (3) stable, reliable and easy to use Implementation; (4) There are currently a variety of power carrier chips on the market, which can be selected and used.


However, there are still many technical difficulties in applying power carriers to intelligent network home appliance control. 1) How to design the architecture of an intelligent home appliance network based on power carrier control; (2) How to formulate a power carrier communication protocol so that they can communicate with each other. Reliably transmit information; (3) How to overcome the inherent signal attenuation, impedance mismatch, and constant-amplitude oscillation interference problems of power carriers [2]; (4) How to design the PowerLine Interface (PLI). This article will start from the above issues and explain the design and implementation process of power carrier module in intelligent network home appliance control.


1 Power carrier communication network architecture

Power carrier communication is a communication method that uses power lines to transmit information. Therefore, power lines can be used to build a communication network in the home environment. The power line communication network based on power carrier is shown in Figure 1. Power carrier communication networks generally use master-slave control. In the figure, there is a master CPU in the upper layer and several slave CPUs in the lower layer. The master CPU issues instructions to each slave CPU to coordinate work. Only one CPU can use power line resources at the same time. The main control CPU is connected to the gateway or home server, and the slave CPU controls the work of the smart appliances.

2 Power carrier module design

In current power carrier communication products, two main methods are used: narrowband communication and spread spectrum communication. Narrowband communication technology is cheap and easier to implement; spread spectrum communication technology is better than narrowband communication in terms of anti-interference performance, but the technology is complex. Using ST7536 as the power carrier chip and adopting narrow-band communication method is a mature technology widely used in automatic meter reading systems. Considering the short communication distance and few message commands of home network, this article chooses ST7536 chip to design the power carrier communication module.


2.1 Module structure

The structural diagram of the power carrier module is shown in Figure 2. It takes ST7536 as the core, uses 89C52/C51 series microcontroller as the controller, and has RS232 interface and power line interface.

The working process of the power carrier module is as follows:

The module is always in the receiving state (Rx/Tx-=1) and monitors the power line at all times. When there is a signal on the power line, it starts receiving information frames and verifies the target address at the same time. If the destination address is not the local address, the frame is discarded. If the target address is the same as the local address, the information frame is decomposed, useful information is detected, and then sent to the host computer or application appliance through the RS232 interface.


If the host computer issues a control command or the home appliance generates feedback information, an interrupt is generated through the RS232 interface and enters the module. The module combines the control instructions or feedback information into a frame, and then the module enters the transmission mode (Rx/Tx-=0) and sends the information frame to the power line through PLI. After the information frame is sent, the module switches to receiving mode (Rx/Tx-=1).


2.2 Technical difficulties

Problems such as signal attenuation, impedance mismatch, impulse noise, and constant-amplitude oscillation wave interference are common problems affecting power line transmission signals. In addition, the design of the transformer for the power line interface is also a design difficulty.


There are various interferences on power lines, mainly including high-frequency interference in power lines, transient noise generated by inductive loads, interference generated when thyristors are turned on and off, interference caused by short-term drops in grid voltage, and interference caused by the switching process. High frequency interference. For the above problems, the main solutions are shielding, filtering, and grounding. When wiring on the circuit board, attention should be paid to reducing distributed inductance and distributed capacitance. Attenuation and impedance matching are really two sides of the same coin. If the impedance matching is not good, the signal will attenuate quickly. The core issue of impedance matching is to detect the impedance of the wire. The detected signal is introduced into the ST7536 to form a closed loop to match the impedance and increase the output power. In addition, in the design of the power carrier module, we should try our best to avoid having two modules on the same line in the transmitting state at the same time. At this time, the two modules are each other's load. If the module works for a long time, it may be damaged. The solution to the problem is to establish a master-slave network, with the master polling each slave. The slave can only send signals to the power line after receiving the control instructions from the master; and once the sending module finds that other modules are sending on the line, Then this module will immediately switch to receiving state.


The transformer design of PLI is another design difficulty. Figure 3 shows the structural diagram of PLI. It consists of low-pass filtering, preamplifier, transformer, etc. The purpose is to isolate the ST7536 from the power line, load/extract signals on the power line, filter the 50/60Hz signal on the power line and the second harmonic signal of the transmitted signal.

The core of the transformer is TOKO T1002N, which has two main windings and one secondary winding. The turns ratio is 4:1:1. Its circuit structure is shown in Figure 4. Typical values ​​of the transformer are 1t: 9.4μH; L4t: 140μH.

The main winding of the transformer functions as a gate filter, using capacitors C10/C11 to set the resonant frequency at the transmitting frequency. Capacitor C10/C11 is connected in parallel with the main winding 1t/4t. The equivalent values ​​of these two windings are calculated as follows:

Because ST7536 is based on a narrow-band communication method, the passband of the filter is very narrow, so it has a different value for each transmission frequency Cp.


The capacitor should be placed close to the transformer on the PCB. In order to obtain the best filtering performance, capacitors C10/C11 are of better linearity.


Capacitor C12 is used to filter 50/60Hz signals on the power line. It filters out low-frequency signals and allows high-frequency signals to pass. C12 is an X2 class capacitor. Class X2 capacitors have short circuit protection. This is indispensable in power carrier systems. Because if the capacitor is short-circuited, the C12 capacitor will lose the ability to filter the 50/60Hz signal, and the PLI will burn out, which may cause harm to people close to the ST7536.


In order to avoid burrs from damaging the PLI, a TRL1 bidirectional voltage regulator is used in the PLI. Its regulated voltage value is 6.8V. If a voltage of 6.8V or above appears, TRL1 will be shorted to ground, thereby protecting the rest of the PLI from being burned out.


2.3 Communication protocol

In order to enable modules to communicate with each other, a simple and effective protocol is customized for ST7536 communication. Error correction and bit error rate checking are easy using this protocol, and the protocol can be easily modified to meet a variety of special needs.


On the power line network, ST7536 sends information frames. Each information frame consists of five parts: preamble, system address, target address, control command block and data block. The preamble and system address each occupy two bytes, and the target address, control command block, and data block each occupy three bytes.


The preamble is used to synchronize the sending ST7536 and receiving ST7536. It consists of two 8-bit "10101010" byte sequences. The receiving module uses it to adjust the receiving clock. Because the first 3 bits sent by ST7536 may cause errors during transmission, the preamble does not contain valid data, which can overcome unreliable data at the beginning of data transmission.


The system address is used to distinguish different modules in the power carrier network. The system address has only 8 bits. In order to avoid errors, the system address is sent twice, as shown in Figure 5. The destination address, control command and data of the frame must be very reliable, so they must be error corrected. To correct errors, each data is sent three times. For example, the destination address is only 8 bits, and it is sent three times, in destination address 1, destination address 2, and destination address 3. The same goes for control commands and data. So the target addresses (1, 2, 3) should have the same content. The error correction method is to use a show of hands algorithm to extract the correct information from these three bytes. The error correction process is as follows: First, compare the 0th bit of target address 1, target address 2 and target address 3. If the 0th bit in at least two bytes is 0, then the 0th bit of the target address is 0. , otherwise it is 1. Then compare bit 1, bit 2 to bit 7 in sequence, so that all bits of the target address can be determined.

[1] [2]
Keywords:89C52 Reference address:Design and application research of power carrier module based on 89C52/C51 series microcontroller

Previous article:Design of smart home anti-theft alarm system with AT89S51 microcontroller as the control core
Next article:AD574A and MCS-51 microcontroller interface

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号