Design of power line carrier communication module based on ST7538 and ATmega88V

Publisher:幸福的老农Latest update time:2012-02-22 Source: 21ICKeywords:ST7538 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

The low-voltage distribution network is an energy transmission network with the largest number of users and the widest distribution. Power line carrier communication is a communication method that uses the existing power line network to transmit information. It can be used for power management, lighting control, heating and cooling system control, remote meter reading, alarm system and intelligent community. The advantage of using power lines as a communication medium is that there is no need to rewire, maintenance is convenient, and communication costs are greatly saved. This paper designs a power line carrier communication module based on the modem module ST7538 and the ATmega88V microcontroller.

Overall system design

According to the system principle of low-voltage power line carrier communication, the overall design of the whole system is given, as shown in Figure 1. The power line carrier communication node module mainly includes the following parts: microcontroller part, signal processing part, power supply circuit part and power line interface part.

Figure 1 System principle of low-voltage power line carrier communication

Hardware Design

1. Microcontroller selection

The microcontroller is the control core of the system, which is responsible for the coordination and scheduling of tasks in the entire system. In order to overcome the many unfavorable factors on the power line, such as large signal attenuation, large time variability, and noise influence, some encoding and decoding schemes with strong error correction capabilities need to be adopted, but this may increase the complexity of the algorithm and reduce the operation speed. After comprehensively considering the cost and computing power, the microprocessor selected is the high-performance, low-power 8-bit AVR series microcontroller ATmega88V. Its specific parameters and features are detailed in the product manual.

2. Selection of modem chip

The power line carrier chip performs functions such as signal modulation and demodulation, adaptive balanced amplification, filtering and communication with the microcontroller. The power line interface performs the functions of coupling, isolation, filtering and protection.

Therefore, we choose ST7538 carrier chip as the signal modulation and demodulation chip. ST7538 carrier chip is a half-duplex, synchronous/asynchronous, FSK modem chip designed for power line network communication in home and industrial fields. It has the characteristics of powerful functions, high integration, and multiple anti-interference technologies. It has been widely used in power line carrier communication.

ST7538 exchanges data with the host controller through a serial interface. Since the USART of ATmega88V is used to communicate with the server in the scheme design, the interface between ST7538 and the host is realized by communicating with the serial peripheral interface SPI of ATmega88V through the serial interface. The serial peripheral interface SPI of ATmega88V has the characteristics of full-duplex, 3-wire synchronous data transmission, master-slave and operation. In this scheme design, ST7538 is used as the host and ATmega88V as the slave, and ST7538 provides the data synchronization transmission clock.

3. Selection of power chip

Since the operating voltages of the main chips (ST7538, ATmega88V) in the whole system are 12V and 5V respectively, and the total power of the system does not exceed 2W, we choose LM2596 as the power chip. The LM2596 switching voltage regulator is a step-down power management monolithic integrated circuit with very small voltage regulation and current regulation, and a load driving capacity of 3A. The LM2596 can output fixed voltages of 3.3V, 5V, 12V, and 15V and adjustable voltage output mode with adjustable voltage, and the input voltage reaches 36V.

LM2596 is relatively simple to use and has fewer peripheral components, as shown in Figure 2 (only four), with built-in frequency compensation circuit and fixed frequency oscillator. The switching frequency of the LM2596 series is 52kHz, so small-sized filter components can be used when applied. It can efficiently replace the general three-terminal linear regulator and can fully reduce the area of ​​the heat sink. Under the conditions of specified input voltage and output load, the error range of the LM2596 output voltage is ±4%; the error range of the oscillator's oscillation frequency is ±10%; the typical standby current is 50μA, and the chip has built-in overcurrent protection circuit and overheating protection circuit. Therefore, two LM2596s were selected in the design to make two branches output 5V and 12V respectively. In addition, when designing the PCB, considering that the switching power supply chip will generate strong electromagnetic wave radiation, it is best to stay away from the modulation and demodulation circuit and the filter circuit to avoid interference with the carrier signal.

Figure 2 LM2596 power module circuit principle

4 Power Line Interface Circuit Design

The key to achieving high-quality and efficient power line carrier communication lies in the selected carrier modulation and demodulation module and the corresponding interface circuit. The power line interface circuit couples the modulation and demodulation part with the power line to realize the transmission of the signal on the power line. The communication process requires that this interface circuit filters the signal when sending the signal, filters out certain noise such as the second harmonic, and uses the power amplifier to make the signal have enough power to couple to the power line; when receiving, the noise mixed in the signal is filtered out, the signal is amplified, and then the signal is transmitted to the modulation and demodulation module for demodulation. Therefore, the performance of the interface circuit determines the quality of the communication effect. Generally, the power line interface circuit includes: receiving part, sending part, power amplification part and protection part. Because the ST7538 has a power amplifier circuit inside, only the receiving, sending and protection parts need to be designed. The power line interface circuit is shown in Figure 3. [page]

Figure 3 Power line interface circuit

In the transmission circuit, the values ​​of capacitor C11, inductor LC12, inductor L4 and equivalent inductive impedance LC are generally given in advance. The values ​​of capacitor C13 and CR9 need to be determined by calculation. When selecting the values ​​of C11, LC12, L4 and LC, attention should be paid to the leakage inductance of the transformer, the capacitance of the crystal diode and the equivalent series resistance ESR (100mΩ~1Ω) of the series devices (C13, LC12, T1, L4, C11), so resistive devices should be selected as much as possible. The transformer should be a 1:1 isolation transformer. Simulate the impedance condition of the power line, that is, add an inductive load to the output end of the filter, so that its impedance characteristic is 2LC = 100μH. The ESR of the inductive device in the circuit should be proportional to its inductance value, and the ESR of the inductive device should be as small as possible. The inductor should be LBC (large bobbin tape wound on the magnetic core), and the inductance value should be as small as possible, so the value of LC12 is selected as 10μH and the value of L4 is selected as 22μH. The function of C11 is to isolate the transformer from the power line, filter the 50/60Hz signal on the power line, prevent low-frequency signals from entering the circuit and allow some high-frequency signals to pass through. X2 type capacitors are selected, which have short-circuit protection functions, so the value of C11 is generally selected as 33nF/400V. According to the pole frequency formula, the value of C13 is calculated to be 220nF and the value of CR9 is 100nF.

Passive filters are better than active filters for the receiving circuit because active filters will generate a white noise equivalent to the received signal. A parallel resonant circuit is used, and a second-order passive bandpass filter (C36, L7, R11) is selected. The frequency of the receiving filter is mainly determined by the values ​​of capacitor C36, inductor L7 and resistor R11. The center frequency can be set to 132.5kHz. An important factor in the performance of the filter is the quality factor Q, and the Q value is selected to be 2 to 3. Polypropylene capacitors with an allowable error of 5% and BC (bobbin tape wound core) inductors with an allowable error of 10% are selected. In order not to affect the sending part and reduce the DC current passing through the primary coil of the transformer, the value of R11 should be as large as possible, but if the value of R11 is too large, a higher white noise will be generated, so the value of R11 is taken as 750Ω. Let the value of R11 remain unchanged, and different values ​​of C36 and L7 can be obtained according to the selection of center frequency and quality factor.

In the protection circuit part, a bidirectional voltage regulator is generally used. When the voltage value is not less than the voltage of the voltage regulator, the voltage regulator will be shorted to the ground, thereby protecting the components of the interface circuit from being burned out. The interference between the live wire and the neutral wire is differential mode interference, and the interference between the live wire and the ground wire, and between the neutral wire and the ground wire is common mode interference. Using a bidirectional voltage regulator only works on differential mode spike signals but not on common mode spike signals. When common mode spike signals appear, the circuit will be damaged. Therefore, three diodes (D16 and D15 are P6KE6V8, and D17 is SM6T6V8A) are used here to connect them into a star structure. For differential mode spike signals, D16 and D15 form a bidirectional voltage regulator. For common mode spike signals, this star structure is equivalent to two bidirectional voltage regulators (D15 and D17, D16 and D17).

Software Design

When the system starts, the program automatically enters the state of receiving data from the power line after initialization, and starts to detect the presence and correctness of the carrier signal. If the carrier signal is detected and correct, the system enters the carrier receiving interrupt program and starts to receive data from the power line; if there is no carrier signal at the beginning, the system starts to detect the serial port to determine whether there is data transmitted from the serial port. If there is serial port data, the system enters the serial port data receiving state. After confirming that the serial port data reception is completed, it immediately enters the carrier sending interrupt program to complete data modulation and send. If there is no data transmission on the power line and the serial port, the system re-enters the detection state, restarts the detection of the power line, and enters a new cycle. The flow chart is shown in Figure 4. In order to avoid the serial port being in the receiving and sending states at the same time, causing data conflicts, the program is completed by querying the status word and setting the interrupt.

Figure 4 Power line carrier communication system program flow

Conclusion

The circuit design scheme based on ATmega88V and ST7538 low-voltage power line carrier communication module introduced in this paper has the characteristics of simple structure, low cost, flexible and reliable working mode, strong anti-interference ability, etc. After experimental observation, the equipment operates well, the data transmission is stable and reliable, it can automatically restart in case of failure, and can be unattended, providing a reference solution for industrial control and data transmission in complex industrial environments.

Keywords:ST7538 Reference address:Design of power line carrier communication module based on ST7538 and ATmega88V

Previous article:Design of wireless temperature measurement system based on C8051F020 and Atmegal6
Next article:Problems that should be paid attention to in the development and application of ATmega128

Recommended ReadingLatest update time:2024-11-16 22:48

Design of automatic electric energy information collection terminal
0 Introduction With the rapid development of the national economy and the continuous improvement of people's material and cultural living standards, people's demand for electricity is increasing, and the requirements for power supply quality and reliability are also increasing. In addition, in industrial systems, the
[Test Measurement]
Design of automatic electric energy information collection terminal
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号