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

The same method is also used to correct control command bytes and data bytes.


2.4 Software

According to the communication protocol, the software of the ST7536 power carrier module was developed. ST7536 is always in receiving state. When no valid signal is detected for a certain period of time (set to 500ms), ST7536 will switch to the sending mode. If there is data to send, it will send. After the sending is completed, it will switch to the receiving mode; if no data is sent, it will switch directly to the receiving mode.


The software uses buffer exchange technology, as shown in Figure 6. In this software, an input buffer and an output buffer are built for serial communication, and an input buffer and an output buffer are built for power carrier communication.

First, detect whether there is valid data on the power line. If so, put it into the power carrier receiving buffer; otherwise, start polling whether there is data to be sent through the serial port or the power carrier. The data coming through the serial port enters the serial port receiving buffer through interrupts. . During polling, when there is data in the serial port receiving buffer, it will be processed by the protocol processor and placed in the power carrier sending buffer to wait for transmission; in the same way, the data in the power carrier receiving buffer will be placed in the serial port sending buffer. Finally, the software decides whether to take the corresponding sending action based on whether there is data in the power carrier sending buffer or the serial port sending buffer.


3 Experiments and Analysis

In order to verify the availability of the power carrier communication module and the feasibility of smart network appliances, we developed a network washing machine and smart lights as control objects, using a home PC as the HomeServer. The physical diagram is shown in Figure 7.

During the experiment, the operator connects to the HomeServer through the Internet or PSTN dial-up and sends control instructions or requests to the HomeServer. The HomeServer sends the control instructions to the PLCW module through RS232. The PLCW modulates the control signal and adds it to the power line. The PLCW connected to the home appliance receives the The signal is received and demodulated, and then the instructions are sent to the network washing machine and smart lights through RS232. Networked washing machines and smart lights can feed back control instruction execution results to the operator along the opposite path.


In order to distinguish the network appliances, the network appliances are numbered in advance, that is, assigned addresses. For example, the address of the network washing machine is 1, and the addresses of the smart light are 2 and 3 respectively. The control object address must be included in the control instructions issued by the operator. At the same time, for the convenience of control, define a group address, such as 255 representing all lights, that is, when the control object address is 255, all smart lights will receive instructions and execute them.


Experimental results show that within a range of 100m, the PLCW communication module based on ST7536 can correctly send and receive information, with basically no bit errors. When the control instructions are short and the frequency of issuing instructions is not high, the PLCW communication module can basically respond in real time. However, when the control instructions are longer and the instructions are issued more frequently, the PLCW communication module responds slowly. This is because the ST7536 has two optional baud rates on the power line: 600bps and 1200bps. The current data communication rate of this module is 600bps. And because only two bytes (control commands and data) in each frame in the customized protocol are actually required bytes, the effective information transmitted per second is approximately 11.6 bytes. Therefore, it is suitable for transmitting short messages (commands), low data communication volume and low real-time requirements.


Experiments have proven that the application of power carrier communication technology can effectively control home appliances and save the trouble of rewiring the home. Therefore, the power carrier module can be used as a control method for home appliances and home service robots based on the short message short command control mechanism. It can be well used to build a home communication network and is a control method with relatively high performance and price.


[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号