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.
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
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- Brief Analysis of Automotive Ethernet Test Content and Test Methods
- How haptic technology can enhance driving safety
- Help analyzing non-isolated ACDC circuit
- Xunwei IMX6 development board AndroidStudio-layout test
- [IOT harmful gas detection device based on STM32F7508-DK] Part 1: touchGFX trial
- Free gifts: Aim TTi current measurement probe, professional signal generator, JD card and other small gifts are waiting for you
- Happy Mid-Autumn Festival and National Day friends!
- TangDynasty Software Manual for Anlu FPGA IDE
- Looking for a single chip microcomputer
- [TOPWAY 5-inch smart TFT module review] First experience
- How to use simth Smith chart software
- EEWORLD University ---- 2021_Digikey KOL Series: Application of New Intelligent Exposure Algorithm in Face Recognition