Pick   want:       The design scheme of the two bus communication module is given, and the related circuits involved in the design of the power line interface and the two bus interface circuits of the communication module are mainly introduced.
introduction
Smart homes require home appliances to be interconnected and interoperable via a network ( bus ) . The bus protocol is the essence of the system. At present, the internationally dominant home network standards are: the US X10 , the consumer bus (CEBus) , the Japanese home bus (HOME BUS) , and the European installation bus (EIB) .
The consumer bus uses five types of media: power lines, wireless, infrared, twisted pair, and coaxial cable, with power lines being the most widely used. However, at present, China's power grid characteristics, power grid structure, residential residential distribution and other factors make power line carrier communication difficult to achieve the expected communication effect, in order to reduce the interference between power carrier signals, the network system should minimize the introduction of power carrier signals, therefore, The data exchange between the home appliance and the data collector is implemented by the power carrier communication module in the entire network system.
The block diagram of the power carrier communication module is shown in Figure 1 . The design uses AT89S52 as the microcontroller, and the power line carrier modem uses the dedicated chip ST7536 . The AT89S52 and ST7536 use a universal serial communication interface, which communicates with the serial EEPROM using the I2C bus . The EEPROM uses the ferroelectric 24C02, which has an infinite erasable function. The communication of the entire network is realized by the power carrier, and the communication between the module and other devices is realized through the two buses. In this way, the communication module can realize communication and control of multiple actual devices through software and communication protocols. All data frames are CRC checked. AT89S52 and ST7536 are made on external hardware reset, while using AT89S52 internal watchdog function, AT89S52 necessary and ST7536 reset to prevent system crashes caused by network traffic interruption. The multi-way selection switch adopts CD4052 , through which the power carrier and the two buses are selected to realize time-sharing control of power carrier communication and two-bus communication.
Â
Figure 1 Â General communication module block diagram
Figure 2 Â Power line interface diagram
Figure 3 Â Power line interface circuit
Figure 4 Â Two bus communication circuit
Figure 5 Â Receive and carrier transmit waveforms
Communication module power line interface circuit design
Foreign countries have studied power line carrier communication technology very early, and many companies have introduced their own power line carrier modem chips, and have developed standards for the applicable frequency range of power line carriers. There is currently a standard frequency range of 100KHz-450KHz for the North American grid (480Y/277V , 208Y/120Vac) and a standard frequency range of 9KHz-150KHz for the European regional grid (400Y/230Vac) . In the standard frequency range, each company designs its own power line carrier modem chip by using various specific proprietary technologies for the characteristics of the local power grid . Because the foreign power line carrier modem chip is designed for the characteristics of the local grid, the power grid structure, and is generally designed for home automation, it is difficult to use in China. At present, one or two power line carrier modem chips can be used barely in certain application fields. This system uses ST7536 as the modem for power carrier communication.
The ST7536 is a modem chip designed by STMicroelectronics for power line carrier communication . In addition to the signal modem function of the general modem chip, it also adds many special signal processing methods for power line applications. At present, it is widely used in the field of domestic power line carrier communication, but the application level of each company is different. The ST7536 modem technology is a relatively backward FSK method with a maximum baud rate of only 1200 bps . In addition, it has no CSMA ( Network Carrier Sense ) function, which limits its application. At present, according to the actual situation of the domestic power grid, in the field of power line carrier communication, ST7536 is a more suitable modem chip.
The signal output from the ST7536 is small in amplitude, weak in driving capability, and has various harmonics, so it must be amplified and filtered before the signal can be modulated onto the power line through the coupling circuit. The coupling circuit isolates the high voltage from the low voltage to prevent high voltage breakdown of the communication circuit. Similarly, the carrier signal from the power line is received by the ST7536 , and the interference signal on the power line is very uncertain and very complex. Therefore, a bandpass filter is required to pass the signal between 67.2 kHz and 87.5 kHz ( this system uses 72 kHz). Carrier frequency ) , after pre-amplification, is sent to the receiving end of ST7536 . The block diagram of the circuit is shown in Figure 2 .
Comprises a block diagram of a left end of ST7536 from ATO and RAI and RX / TX, RX / TX is a digital signal, the conversion control the transceiver. The ATO is the transmit output of the ST7536 , which is connected to the transmit input of the power line interface. The analog transmit output is adjusted by an automatic level control input circuit. The peak -to- peak value of the maximum output voltage is 6.5V . RAI is the receive analog input of the ST7536 . It is connected to the receive output of the power line interface, and the rms value of the maximum input voltage is 2V . The receiving sensitivity is 2mV rms value in channel 1 and 2 (600 baud) channel; 3mV is on channel 3 and channel 4 (1200 baud). This system uses the latter.
Power line transmitting and receiving circuit
The power line interface circuit is shown in Figure 3 .
Digital signal RX / TX switch state control transistor, provides DC power to the transmission circuit, when the RX / TX is high, the circuit is in the off state, when the RX / TX is low, the circuit is in the ON state, the ATO ST7536 The signal is amplified by filtering and coupled to the power line. Thus, the power consumption of the system reaches a maximum value only when the circuit is in carrier transmission.
In transmit mode, the power line interface amplifies and filters the transmitted signal from the ST7536 chip ATO . The role of the buffer is to protect the ST7536 and drive the next component in the power line interface. The role of the low pass filter (LPF) is to suppress harmonics. The filtered signal is sent to a power amplifier that drives a power line with an impedance of 1 to 100 Ω through a converter . In addition, the amplifier also performs band filtering to suppress the second harmonic of the transmitted signal.
In receive mode, the converter takes the signal from the power line, amplifies it in the preamplifier, and sends it to the receive input RAI of the ST7536 . In this mode, RX/TX is high.
Through this circuit , the effective communication distance of 1200m~1500m can be achieved on the power line . If the software design of the system is used to implement the relay function, the actual communication distance of the power line will be strengthened.
Coupling circuit and its protection measures
In Figure 3 , RY1 is a varistor, which can short-circuit the spike to prevent high voltage damage to the circuit. The coupling transformer TR1 achieves isolation between high voltage and low voltage. Because the carrier frequency is relatively high, far greater than the frequency of the grid, this makes the carrier signal unobstructed and can isolate the high voltage. Capacitor C37 blocks low-frequency high voltage and prevents transformer saturation; resistor R37 takes a large value, and the function is to discharge the capacitor when it is offline, preventing high voltage from appearing at both ends of the device plug. D13 is a bidirectional Zener diode, a transient suppression diode, which effectively prevents high voltage breakdown of subsequent circuits. In addition to the high-voltage pulse on the power line, when the device is just connected to the power supply, a high voltage of about 300 volts may be directly applied to the coupling transformer, causing a large current, which can reach several tens of amps to hundreds of amps, using a general It is impossible to eliminate this pulse by the Zener diode. Since the corresponding time of the varistor is slow, the requirements of the circuit cannot be met at all, but the bidirectional voltage regulator can meet the requirements.
Design of two bus interface circuits
The two bus interface circuits are shown in Figure 4 .
The system can realize the control and information acquisition of multiple devices through this circuit, and its load capacity is determined by another set of bus transmitting and receiving circuits, and the effective transmission distance is about 1000m . Since there are only two communication lines, it is very simple and convenient to connect the system.
It can be seen from Figure 4 that when both TCON and RCON are low, the bus is neither received nor transmitted.
When TCON is high, regardless of the level of RCON , the bus is in the transmit state, because U7-11 is always locked high, U7-10 is low, T2 , T4 are off, and reception is prohibited; U6-6 is low, D5 and D6 are off, and TXD2 is transferred to the bus. When TXD2 is high, T1, T6 is turned on, T3 is turned off, a voltage of 12 volts on the bus; TXD2 when low, T1, T6 is turned off, T3 is turned on, the voltage is 0 volts on the bus.
When TCON is low and RCON is high, the bus is in the receiving state. At this time, T1 , T3 , and T6 are turned off, and transmission is prohibited. When T2 and T4 are turned on, together with T5 , the digital signal on the bus can be transmitted to On RXD2 . The signal transmitted on the bus is a series of digital signals with a high level of 5V and a low level of 0V .
Experimental result
By controlling the RX/TX control pin of the ST7536 , the carrier circuit is in the receiving state. A 72KHz , 0.3V sinusoidal signal is added between the live and neutral lines. The waveform of the ST7536 24- pin is observed with an oscilloscope . Normally, it should be 72KHz , 1.5. ± 0.5V , frequency offset adjustment C35-C37 , for every 1nF increase , the center frequency drops 2.4KHz . The carrier receiving signal is shown in Figure 5. When the initial carrier circuit is in the transmitting state, connect the 10th pin of ST7536 , that is, the test pin to VCC, and connect a 5.1 Ω power resistor between the neutral line and the live line. Observe with an oscilloscope. The waveform between the neutral line and the live line should be 72KHz normally , and the peak-to-peak value is greater than or equal to 7V . If the signal is distorted, adjust the relevant capacitance. The carrier transmit signal is shown in Figure 5 .
Conclusion
The design of the communication module is combined with power line carrier and two-bus communication, and the power line communication is reduced as much as possible in one power line subnet, so that the interference signal of the same frequency band caused by the power carrier signal in the power line is well improved, and Communication between the communication module and the underlying layer is achieved using two-bus communication. In order to realize the network interconnection and mutual operation of household appliances and building automation systems, especially in the field of building automation and multi-table collection system, practical applications have been obtained.