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.
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
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- What is the working principle of pneumatic solenoid valve? What are the classifications of pneumatic solenoid valves?
- [SC8905 EVM Evaluation] + I2C communication between MCU and SC8905
- [RVB2601 Creative Application Development] 2 Familiar with basic peripherals GPIO
- [2022 Digi-Key Innovation Design Competition] Deploy blockchain smart contracts
- [AT32F421 Review] + Digital tube module and automatic counting display
- Today's broadcast starts at 10:00: Focus on "TI FPD-Link III automotive chipset", the ideal solution for automotive video transmission
- What is the relationship between RF chip and baseband chip? How does it work?
- MSP430 Development Red Book
- [Xiangyin Review] JBL QUANTUM TWS Review——The Pioneer of 1,000-yuan Dual-mode Gaming Noise Cancelling Headphones
- i.MX6ULL Embedded Linux Development——by DDZZ669