In the modern electronics industry, the application of wireless communication technology is more and more extensive, and infrared communication is popular in various fields as a technology of wireless communication. In the actual communication use, serial communication uses a large number of industrial markets, especially in the electric energy meter industry, infrared communication has become one of the indispensable functions of the new electronic energy meter. The reliable circuit is designed to realize the 232 serial-to-infrared tool of the PC, and the computer 232 serial-to-infrared communication is completed to realize real-time operation of the product. Here we mainly introduce a simple and convenient circuit design to realize serial to infrared technology.
0 Preface
With the development of modern new technologies, the use of electronic products is increasing, and various wireless communication technologies are constantly filling various fields of production and life. Infrared communication uses infrared light as a communication carrier to transmit data through infrared light propagation in the air. It is completed by an infrared emitter and an infrared receiver. At the transmitting end, the transmitted digital signal is sent to the electro-optic conversion circuit after being properly modulated and encoded, and converted into an infrared light pulse to be transmitted into the air through the infrared transmitting tube; at the receiving end, the infrared receiver photoelectrically receives the received infrared light pulse. Transform, demodulate and decode to recover the original signal.
As a means of data transmission, infrared communication can be applied in many occasions, such as infrared remote control of home appliances, entertainment facilities, automatic meter reading of water, electricity and gas energy consumption measurement. Especially in the electronic power industry, there are more and more products using infrared technology for communication. People can use infrared technology to make short-distance copy control of products, which is very simple and convenient. The serial port is a very common device communication protocol on a computer. Most computers include an RS 232-based serial port. The concept of serial communication is very simple. The serial port sends and receives bytes in bits. The communication described in this article is done using 3 lines: ground; send; receive. Since serial communication is asynchronous, a port can send data on one line while receiving data on another line.
1 PC RS 232 interface
PC 232 serial port is generally DB? The 9 (pin) type connector has the pin function definition as follows:
(1) Carrier detection (CD);
(2) Accepting data (RXD);
(3) Issue data (TXD);
(4) Data terminal ready (DTR);
(5) Signal ground (SG);
(6) Data ready (DSR);
(7) Request to Send (RTS);
(8) Clear Send (CTS);
(9) Ringing indication (RI).
2 single chip circuit design
2.1 Level conversion
Since the level of the RS 232 signal is inconsistent with the level of the serial port signal of the microcontroller, level conversion between the two must be performed. The MAX232 is commonly used to implement RS232/TTL level conversion. The MAX232 internal structure has three parts:
(1) Charge pump circuit. It consists of 1~6 pins and 4 capacitors.
(2) Data conversion channel. Two data channels are formed by 7~14 pins. RS 232 data is converted from R1in, R2in input to TTL/COMS data and output from R1out, R2out; TTL/COMS data is converted from T1in, T2in input to RS 232 data from T1out, T2out to computer DB9 port.
(3) External power supply circuit. External power supply is the use of computer USB output +5 V power supply effective power supply, not only saves the design of the circuit, but also saves volume in actual production, the circuit principle is shown in Figure 1.
2.2 Infrared emission part
When the infrared transmitting end transmits data, the binary data to be transmitted is modulated into a series of burst signals and transmitted, and the infrared carrier is a square wave with a frequency of 38 kHz. The infrared carrier can be realized by the PWM function of the internal timer of the microcontroller, or it can be realized by the peripheral hardware circuit. Here, the 38 kHz crystal oscillator is used to generate a stable oscillation signal, and the CD4069 non-gate circuit is used to realize the square wave oscillation signal through a series of conversions. The level-converted COMS data signals are superimposed to drive the triode conduction, thereby realizing the TSAL6200 infrared emission diode to convert the periodic electrical signal into a certain frequency of infrared light signal, as shown in Figure 2.
2.3 Infrared receiving part
The infrared receiver adopts the HS0038B infrared receiver. The principle of the infrared receiving circuit is: when receiving the carrier signal of 38 kHz, the HS0038B receiver will output a low level, otherwise it will output a high level, so that the infrared light signal can be demodulated into a certain period. The continuous square wave signal can be recovered by the single chip microcomputer to recover the original data signal. HS0038B is a miniaturized receiving device capable of receiving infrared signals. Its epoxy packaging can be used as an infrared filter, so there is no need to add an infrared filter. The biggest advantage is that the output is also stable in highly disturbing environments. The circuit design is shown in Figure 3. In this paper, the CD4093 logic NAND gate chip and HS0038B receiver are used to build the circuit output data. At the same time, the other level of the chip pins are used to self-lock the conversion level data of the MAX232 output to avoid the signal self-receiving. .
2.4 Power section
Through the low frequency filtering of the electrolytic capacitor and the high frequency filtering of the ceramic chip capacitor, a relatively pure power signal is obtained, as shown in FIG. 4 .
3 Conclusion
Infrared communication is suitable for occasions where data needs to be transmitted over short distances, especially in applications where wired communication is difficult or portability is high. This paper introduces the circuit design of 232 signal conversion infrared communication based on MAX 232 level conversion chip and gate circuit chip. This circuit has been applied in reality and has a good effect.
5 Burner Gas Hob,5 Burner Gas Cooker,5 Burner Hob,Glass Gas Hobs
xunda science&technology group co.ltd , https://www.gasstove.be