Circuit for realizing mutual conversion between infrared communication and serial communication
By designing the circuit for converting infrared communication and serial communication to realize each other, the problem of wiring and light reflection in the existing technology is solved, contactless data transmission and stable infrared signal transmission are realized, and wireless communication is suitable for the Internet of Things electricity meter and aluminum processing industry.
Patent Information
- Application Number
- CN202422129871.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-31
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2034-08-31
AI Technical Summary
Existing serial port transmission requires wiring, infrared communication is easily affected by light reflection when data is sent, and some products require specific protocol processing, resulting in inconvenient data transmission and poor stability.
Design an infrared communication and serial communication mutual conversion implementation circuit, adopting MAX485 chip and STC8G1K08 microcontroller, through RS485 differential signal conversion and serial signal processing, it realizes contactless data transmission, automatically shields infrared reflected signals, and supports transparent protocol conversion.
It realizes contactless data transmission, improves the transmission stability and flexibility of infrared signals, supports multi-module cascade, and is suitable for wireless communication needs in the Internet of Things electricity meter power parameter acquisition and aluminum processing industries.
Smart Images

Figure CN223157180U_ABST
Abstract
Description
Technical Field
[0001] The utility model relates to a short - distance wireless communication circuit for serial port transmission, in particular to a short - distance communication conversion implementation circuit used in industries such as electric meter reading in the Internet of Things industry and aluminum processing industry. Background Technique
[0002] Existing serial port transmission requires wiring with the electric meter (generally, metering electric meters are sealed with lead seals and others are not allowed to connect wires to collect data). For existing infrared communication, when sending data, not only can the receiving device receive the data, but the infrared receiving circuit of the sending device will also receive a copy of the data it sends under the action of light reflection. In addition, for some products, the infrared data needs to be specially processed and then transmitted according to a specific protocol. Content of the Utility Model
[0003] The utility model provides a circuit for realizing the mutual transparent conversion transmission between serial port and infrared, which can be more convenient for mutual transparent conversion transmission between serial port and infrared. In the field of electric parameter acquisition of Internet of Things electric meters, there is no need to wire with the electric meter, and contactless data transmission can be carried out through the infrared interface, and there is no need for any special conversion between infrared communication and serial communication.
[0004] The specific technical solution adopted by the utility model to solve the above - mentioned technical problems is as follows: A circuit for realizing the mutual conversion between infrared communication and serial communication includes a DC power supply voltage, an RS485 differential signal conversion circuit, and a serial port signal processing and mutual conversion output circuit. The RS485 differential signal conversion circuit uses a MAX485 chip, and the serial port signal processing and mutual conversion output circuit uses a single - chip microcomputer chip with the model number STC8G1K08. The RS485 bus signal is connected to the 6th pin of the MAX485 chip for input, and the RS485 bus signal is connected to the 7th pin of the MAX485 chip for output; the 1st pin of the MAX485 chip is electrically connected to the 6th TXD functional pin of the single - chip microcomputer chip, the 4th pin of the MAX485 chip is electrically connected to the 8th pin of the single - chip microcomputer chip, the 5th RXD functional pin and the 6th pin of the single - chip microcomputer chip are respectively electrically connected to the 3rd plug - in terminal and the 2nd plug - in terminal of the second P4 terminal interface connector, the 3rd plug - in terminal of the P4 terminal interface connector is electrically connected to the 1st pin of the infrared signal receiving chip, and the 7th pin of the single - chip microcomputer chip is the output pin of the modulated PWM signal. It can be more convenient for mutual transparent conversion transmission between serial port and infrared. In the field of electric parameter acquisition of Internet of Things electric meters, there is no need to wire with the electric meter, and contactless data conversion transmission can be carried out through the infrared interface without any special conversion. This signal has high performance, can be precisely controlled, and effectively improves the transmission stability of infrared signals.
[0005] Preferably, the 7th pin of the single-chip microcomputer chip is electrically connected to the base of the first PNP transistor after being serially connected with the second resistor. The collector of the first PNP transistor is electrically connected to the positive output terminal of the third power supply chip after being serially connected with the first light-emitting diode and the first resistor in sequence. The emitter of the first PNP transistor is electrically connected to the power input ground electrode. This improves the stability, effectiveness, and monitorability of the single-chip microcomputer PWM output.
[0006] Preferably, the 2nd pin of the single-chip microcomputer chip is electrically connected to the positive output terminal of the third power supply chip, the 4th pin of the single-chip microcomputer chip is electrically connected to the power input ground electrode, and a first capacitor and a second capacitor are connected in parallel between the 2nd pin and the 4th pin of the single-chip microcomputer chip. This improves the working stability and reliability of the single-chip microcomputer chip.
[0007] Preferably, the 1st functional pin of the MAX485 chip is electrically connected to the base of the fourth PNP transistor after being serially connected with the fourth resistor. The emitter of the fourth PNP transistor is electrically connected to the 2nd and 3rd functions of the MAX485 chip. The 1st functional pin of the MAX485 chip is electrically connected to the 4th functional pin of the MAX485 chip after being serially connected with the 15th resistor and the 22nd resistor in sequence; the 4th functional pin of the MAX485 chip is electrically connected to the base of the second NPN transistor after being serially connected with the 20th resistor. The collector of the second NPN transistor is serially connected with the 18th resistor and then electrically connected to the 8th functional pin of the MAX485 chip. The 8th function of the MAX485 chip is serially connected with the 22nd resistor and then electrically connected to the 4th functional pin of the MAX485 chip. The collector of the fourth PNP transistor, the emitter of the second NPN transistor, and the 5th function of the MAX485 chip are all electrically connected to the power input ground electrode; the 7th functional pin of the MAX485 chip is serially connected with the 17th resistor and then electrically connected to the power input ground electrode. The 6th functional pin of the MAX485 chip is serially connected with the 19th resistor and then electrically connected to the positive output terminal of the third power supply chip. This automatically shields the data received by the infrared receiving circuit of this module, making the transmission and reception of data more concise and efficient.
[0008] Preferably, the third power supply chip uses a three-terminal voltage regulator chip with the model number PW6206. This improves the simplicity, stability, and effectiveness of the 3.3V DC power supply voltage.
[0009] Preferably, the input terminal of the three-terminal voltage regulator chip is serially connected with the fifth resistor and then electrically connected to the 4th insertion terminal of the first P4 terminal interface connector. The 1st insertion terminal of the first P4 terminal interface connector is electrically connected to the 7th function of the MAX485 chip. The 2nd insertion terminal of the first P4 terminal interface connector is electrically connected to the 6th function of the MAX485 chip. The 3rd insertion terminal of the first P4 terminal interface connector is electrically connected to the power input ground electrode. This improves the convenience and effectiveness of the electrical connection and plugging for the transparent transmission conversion of infrared data and serial port data by the first P4 terminal interface connector.
[0010] Preferably, the second P4 terminal interface connector and the first P4 terminal interface connector are respectively located at two corner edge areas adjacent to a 90-degree corner on the PCB printed board in the PCB layout of the circuit for realizing the mutual conversion between infrared communication and serial communication. This improves the rationality, stability, and effectiveness of the PCB layout. It increases the component distribution density and improves the signal effectiveness of the PCB board.
[0011] Preferably, the MAX485 chip and the infrared signal receiving chip are distributed and provided inside the adjacent area of the 90-degree corner on the PCB printed board for the first P4 terminal interface connector and the second P4 terminal interface connector. This improves the rationality, stability, and effectiveness of the PCB layout.
[0012] Preferably, the infrared signal receiving chip uses the chip model VS1838B.
[0013] Preferably, the PWM carrier signal output by the single-chip microcomputer can be programmed to modify the carrier frequency and duty cycle; the RS485 differential signal receive data and transmit data directions are automatically controlled by the circuit to be switched; when the single-chip microcomputer outputs a PWM signal, the infrared reception signal is automatically blocked to filter the infrared reflection signal during transmission. After the PWM signal is sent, it automatically switches to the infrared signal reception state.
[0014] The beneficial effects of the present utility model are as follows: Through this solution, it is more convenient to perform transparent transmission between the serial port and infrared. In the field of collecting electrical parameters of Internet of Things electricity meters, there is no need to wire with the electricity meter, and contactless data transmission can be carried out through the infrared interface. The data transmission distance of the infrared interface can reach more than 3 meters, fully meeting the data collection requirements for electricity meters. In addition, through the RS485 interface of the module, cascading can be easily achieved. One RS485 bus can cascade up to 250 modules (one module corresponds to one electricity meter, and one bus can cascade up to 250 electricity meters). By using the RS485 interface, stable data transmission over a long distance of up to 1KM can be achieved, and remote infrared communication can be easily realized. Since the module is a transparent transmission, it does not limit any communication protocol and can freely perform transmission of any communication protocol. The module has a very low static current and can be applied to battery-powered occasions. Two or more modules can be networked in an infrared manner. In special occasions, it can be used as a wireless beacon. This signal has high performance, can be precisely controlled, and effectively improves the transmission stability of the infrared signal.
[0015] This module can collect the electrical parameters of the electricity meter without wiring through infrared communication. The module is equipped with an infrared transmitting circuit and a receiving circuit.
[0016] When sending data, the module circuit can automatically block the data received by the infrared receiving circuit of this module, making the sending and receiving of data more concise, without the need for other devices to filter data.
[0017] This circuit can achieve transparent transmission of infrared data and serial port data directly without any special conversion.
[0018] Two or more modules can form an infrared signal wireless communication network, which can be used as an identity beacon for slow-moving devices. One such module is installed on the ladle and the equipment in the aluminum processing industry respectively. Cooperating with the host computer, the identity recognition of the ladle can be achieved. Description of the Drawings
[0019] The following further describes the present utility model in detail in conjunction with the drawings and specific embodiments.
[0020] Figure 1 It is a schematic diagram of the circuit structure of a circuit for realizing the mutual conversion between infrared communication and serial port communication of the present utility model.
[0021] Figure 2 It is a schematic diagram of the PCB layout structure of a circuit for realizing the mutual conversion between infrared communication and serial port communication of the present utility model. Specific Embodiments
[0022] Figure 1 、 Figure 2In the illustrated embodiment, a circuit for realizing the mutual conversion between infrared communication and serial communication includes a DC power supply voltage, an RS485 differential signal conversion circuit, and a serial port signal processing and mutual conversion output circuit. The RS485 differential signal conversion circuit uses the MAX485 chip UM2, and the serial port signal processing and mutual conversion output circuit uses the single-chip microcomputer chip U1 with the model number STC8G1K08. The RS485 bus signal is connected to the input of the 6th pin of the MAX485 chip, and the RS485 bus signal is connected to the output of the 7th pin of the MAX485 chip UM2; the 1st pin of the MAX485 chip is electrically connected to the 6th TXD function pin of the single-chip microcomputer chip U1, and the 4th pin of the MAX485 chip is electrically connected to the 8th pin of the single-chip microcomputer chip U1. The 5th RXD function pin and the 6th TXD function pin of the single-chip microcomputer chip are respectively electrically connected to the 3rd insertion terminal and the 2nd insertion terminal of the second P4 terminal interface connector J2. The 3rd insertion terminal of the second P4 terminal interface connector J2 is electrically connected to the 1st pin of the infrared signal receiving chip. The 7th pin of the single-chip microcomputer chip U1 is the output pin of the converted PWM signal. The 7th pin of the single-chip microcomputer chip U1 is connected to the base of the 1st PNP transistor Q1 in series with the 2nd resistor R2. The collector of the 1st PNP transistor Q1 is connected to the positive output terminal of the 3rd power supply chip (the positive output terminal of the 3rd power supply chip is also the positive pole of the 3.3V DC power supply voltage) in series with the 1st light-emitting diode D1 and the 1st resistor R1. The emitter of the 1st PNP transistor Q1 is connected to the power supply input. The 2nd pin of the single-chip microcomputer chip U1 is connected to the positive output terminal of the 3rd power supply chip, and the 4th pin of the single-chip microcomputer chip is connected to the power supply input. A 1st capacitor C1 and a 2nd capacitor C2 are connected in parallel between the 2nd pin and the 4th pin of the single-chip microcomputer chip.The first functional pin of the MAX485 chip UM2 is electrically connected to the base of the fourth PNP transistor Q4 after being serially connected with the fourth resistor R4. The emitter of the fourth PNP transistor Q4 is electrically connected to the second and third functions of the MAX485 chip. The first functional pin of the MAX485 chip is electrically connected to the fourth functional pin of the MAX485 chip after being serially connected with the fifteenth resistor R15 and the twenty-second resistor R22 in sequence. The fourth functional pin of the MAX485 chip is serially connected with the twentieth resistor and then electrically connected to the base of the second NPN transistor Q2. The collector of the second NPN transistor Q2 is serially connected with the eighteenth resistor R18 and then electrically connected to the eighth functional pin of the MAX485 chip. The eighth function of the MAX485 chip is serially connected with the twenty-second resistor R22 and then electrically connected to the fourth functional pin of the MAX485 chip. The collector of the fourth PNP transistor Q4, the emitter of the second NPN transistor Q2, and the fifth function of the MAX485 chip are all electrically connected to the power input ground GND. The seventh functional pin of the MAX485 chip is serially connected with the seventeenth resistor R17 and then electrically connected to the power input ground. The sixth functional pin of the MAX485 chip is serially connected with the nineteenth resistor R19 and then electrically connected to the positive pole of the positive output of the third power chip. The third power chip uses a three-terminal voltage regulator chip U3 with the chip model PW6206. Through the three-terminal voltage regulator chip U3, the wide voltage input DC supply voltage of 6 - 30V is converted into a 3.3V DC supply voltage. The 3.3V DC supply voltage is serially connected with the fifth resistor at the input end of the three-terminal voltage regulator chip U3 and then electrically connected to the fourth plug-in terminal of the first P4 terminal (i.e., 4P terminal) interface connector J1 (i.e., the wide voltage input DC supply voltage of 10 - 30V is input through the fourth plug-in terminal of the first 4P terminal interface connector J1, and after being serially connected with the fifth resistor R5, it is electrically connected to the input end 3 pin of the three-terminal voltage regulator chip U3). The first plug-in terminal of the first P4 terminal interface connector J1 is electrically connected to the seventh function of the MAX485 chip. The second plug-in terminal of the first P4 terminal interface connector is electrically connected to the sixth function of the MAX485 chip. The third plug-in terminal of the first P4 terminal interface connector is electrically connected to the power input. The second P4 terminal interface connector J2 and the first P4 terminal interface connector J1 are respectively located at the two corner edge areas of adjacent 90-degree corners on the PCB printed board in the PCB layout of the circuit for realizing the mutual conversion between infrared communication and serial communication (see Figure 2)。The first P4 terminal interface connector J1 and the second P4 terminal interface connector J2 are distributed with a MAX485 chip and an infrared signal receiving chip inside the adjacent area with a 90-degree turn on the PCB printed circuit board. The infrared signal receiving chip U2 uses the chip model VS1838B. The PWM carrier signal output by the single-chip microcomputer can modify the carrier frequency and duty cycle through single-chip microcomputer programming; the RS485 differential signal receive data and transmit data direction control is automatically switched by the circuit; when the single-chip microcomputer outputs a PWM signal, the infrared reception signal is automatically blocked to filter the infrared reflection signal during transmission. After the PWM signal is sent, it automatically switches to the infrared signal receiving state.
[0023] This circuit realizes converting the serial port RS485 differential signal into a TTL signal, modulating the signal content onto a 38KHZ carrier, and transmitting the signal through an infrared diode. It can receive infrared signals of 38KHZ carrier, demodulate them into TTL signals, and then modulate them into serial port RS485 differential signals. This module can be compatible with RS485 bus cascading. When the infrared signal is sent, the received interference signals are automatically blocked.
[0024] The working principle of the solution of the present utility model is as follows:
[0025] The positive pole of the 10 - 30V DC power supply is input through the 4th pin of the first P4 terminal interface connector J1 interface, passes through the R5 resistor for current limiting and voltage reduction, and is input to the 3rd pin of the three-terminal voltage regulator chip U3 high-precision LDO power supply voltage reduction chip. The 2nd pin of the three-terminal voltage regulator chip U3 outputs a DC 3.3V voltage to supply power to other devices.
[0026] The 3.3V power supply of the three-terminal voltage regulator chip is filtered by the C1 electrolytic capacitor (100UF), and then filtered by the C2 ceramic capacitor (0.1UF), and input to the 3rd pin of the single-chip microcomputer chip U1 (STC8G1K08). The 4th pin of the single-chip microcomputer chip U1 is the DC ground. The 8th pin of the single-chip microcomputer chip U1 is configured as an external rising edge and falling edge interrupt input pin in the program. When the falling edge of the TTL signal of the serial port circuit is received, a PWM signal with a frequency of 38KHZ and a duty cycle of 50% is output through the 7th pin of the single-chip microcomputer chip U1. When the rising edge of the TTL signal of the serial port circuit is received by the 8th pin of the single-chip microcomputer chip U1, the 7th pin of the single-chip microcomputer chip U1 stops outputting the PWM signal and continuously outputs a high level (restores the default state). The 6th pin and the 5th pin of the U1 single-chip microcomputer are connected to the 2nd pin and the 3rd pin of the second P4 terminal interface connector J2 socket. The function is to write a program for the single-chip microcomputer. The 1st pin and the 4th pin of the second P4 terminal interface connector J2 socket are powered by 3.3V. When writing a program, external power supply can be not used, and the single-chip microcomputer chip U1 is powered by the programmer to achieve the purpose of quickly updating the program.
[0027] The RS485 bus signal is input and output through pins 6 and 7 of the MAX485 chip UM2. R19 connects pin 6 of the MAX485 chip to the DC 3.3V to provide an initial positive voltage for the RS485 bus. R17 connects pin 7 of the MAX485 chip to the DC ground to provide an initial negative voltage for the RS485 bus. The sixth capacitor C6 (ceramic capacitor) filters the input DC 3.3V power supply, which can make the power supply entering the MAX485 chip purer and increase the anti-interference ability. The 8th pin of MAX485 is the power input terminal, and the 5th pin is the power ground. The 1st pin of MAX485 is the RS485 bus receive data output pin. Pins 2 and 3 of the MAX485 chip are data direction selection pins. When pins 2 and 3 are at low voltage, it is in the state of receiving the RS485 bus signal. When pins 2 and 3 are at high level, it is in the state of sending data to the RS485 bus. The 4th pin of MAX485 is the data sending pin. R15 is connected to pin 1 of the MAX485 chip and the DC power supply terminal to provide an initial high level for the data receive pin. R22 is connected to pin 4 of the MAX485 chip and the DC power supply terminal to provide an initial high level for the sending signal pin. The 4th pin of MAX485 is also connected to R20. R20 is connected to the base of the Q2 triode. The emitter of the Q2 triode is connected to the power ground and is conducting. R20 provides current limiting for the base of Q2 to prevent excessive current from damaging Q2. The collector of Q2 is connected to R18 and pins 2 and 3 of the MAX485 chip. After Q2 conducts, the potentials of pins 2 and 3 of the MAX485 chip are pulled low, and the chip is in the state of receiving the RS485 bus signal. R18 provides current limiting and potential raising for Q2, Q4 and pins 2 and 3 of the MAX485 chip. The 1st pin of the MAX485 chip is also connected to R4. R4 is connected to the base of the Q4 triode. R4 is the current limiting resistor for the base of Q4. In the initial state, the 1st pin of MAX485 is at high level, and the base of Q4 is also at high level, so the Q4 triode is cut off.
[0028] The 485 bus signal is converted into an infrared signal: When pins 2 and 3 of the MAX485 chip are at low level, the chip receives the signal sent by the RS485 bus, and the converted signal is output through the 1st pin of MAX485.
[0029] When the signal level of pin 1 of the MAX485 chip is high, the level passes through the R4 resistor and reaches the base of the Q4 transistor. The Q4 transistor is cut off, and the levels of pins 2 and 3 of the MAX485 chip remain low. At the same time, pin 1 of the MAX485 chip is also connected to pin 8 of the U1 single-chip microcomputer. Pin 8 is at a high level, and pin 7 of the U1 single-chip microcomputer maintains an output high level. The high level passes through the R2 current-limiting resistor and reaches the base of the Q1 transistor. Q1 is cut off, and the infrared emitting diode D1 is not turned on, and no signal is emitted.
[0030] When the signal level of pin 1 of the MAX485 chip is low, the level passes through the R4 resistor and reaches the Q4 transistor. The emitter of the Q4 transistor is turned on, and the collector of the Q4 transistor is also turned on, pulling down the levels of pins 2 and 3 of the MAX485. At the same time, pin 1 of the MAX485 chip is connected to pin 8 of the U1 single-chip microcomputer, and pin 8 of the U1 single-chip microcomputer is also at a low level. Pin 7 of the U1 single-chip microcomputer outputs a square wave with a frequency of 38KHZ and a duty cycle of 50%. After passing through the R2 current-limiting resistor, it reaches the base of the Q1 transistor. When the square wave is high, the emitter of the transistor is reverse-biased, and Q1 is cut off. The infrared transmitting diode D1 emits no signal. When the square wave is low, the emitter of the transistor is forward-biased, the emitter of Q1 is turned on, and the collector of Q1 is also turned on. The infrared transmitting diode D1 emits an infrared signal. The resistor R1 provides current limiting for the infrared transmitting diode D1 and the transistor Q1 to prevent damage due to excessive current.
[0031] Conversion of infrared signal to RS485 signal: U2 is an infrared signal receiving chip. Pin 1 of U2 is connected to pin 4 of the MAX485 chip. Pin 2 of U2 is the power ground. Pin 3 of U2 is the DC power input. The capacitor C3 provides a filtering function for the input power of U2 to make the power more pure, improving the anti-interference ability and stability of the circuit. When the levels of pins 2 and 3 of the MAX485 chip are high, the chip converts the signal of pin 4 into an RS485 signal and sends it to the RS485 bus through pins 6 and 7 of the chip.
[0032] When U2 does not receive the 38KZH infrared signal, pin 1 of U2 outputs a high level, and pin 4 of the MAX485 chip returns to a high level. The high-level signal passes through the R20 current-limiting resistor and reaches the base of Q2. Q2 is turned on, and pins 2 and 3 of the MAX485 chip are at a low level. The chip switches to the receiving mode. Since there is no signal on pin 1 of the MAX485 chip, pins 6 and 7 of the MAX485 chip return to the default state.
[0033] When U2 receives a 38KHz infrared signal, the 1st pin of U2 outputs a low level, pulling down the 4th pin of the MAX485 chip to a low level. The low-level signal reaches the base of Q2 through the current-limiting resistor R20. The emitter of Q2 is cut off, and Q2 is turned off. Due to the existence of the pull-up resistor R18, the levels of the 2nd and 3rd pins of the MAX485 chip are pulled up, and the chip enters the data transmission state. The states of the 6th and 7th pins of the MAX485 chip are reversed, and the data on the 4th pin is sent to the RS485 bus.
[0034] The characteristic functions of the present utility model:
[0035] In any case, it always gives priority to receiving RS485 bus signals. When the infrared signal is sent, the infrared reflection signals received by U2 are automatically filtered out.
[0036] Implementation principle: When there is no data to be sent, the 4th pin of the MAX485 chip is at a high level, the triode Q2 is in a conducting state, and the 2nd and 3rd pins of the MAX485 chip are at a low level, and the chip is in the data receiving state.
[0037] When there is data to be sent and data is received simultaneously, when the 4th pin of the MAX485 is at a low level, it represents that there is data to be sent. It reaches the base of Q2 through the resistor R20, and Q2 is turned off. At the same time, when there is data received, the 1st pin of the MAX485 chip is also at a low level, and it reaches the base of Q4 through the resistor R4, and Q4 is turned on. The 2nd and 3rd pins of the MAX485 chip remain at a low level to continue receiving data.
[0038] The positions of the fixing screw holes correspond to the fixing studs of the circuit housing, and the circuit board can be well fixed inside the housing. The two semicircular cutouts on the circuit board correspond to the fixing studs of the circuit housing, and cutting them can prevent interference.
[0039] The infrared emitting diode and the infrared signal receiving chip are placed in the middle of the circuit board and are placed parallel to each other, which can well adapt to the on-site environment and meet the installation requirements at various angles. At the same time, there are requirements for the infrared signal sending and receiving angles. Being parallel and relatively close can better receive signals. The filtering capacitors C1, C2, C6, and C3 on the circuit should be as close as possible to the power input pins of their respective chips to provide better filtering and anti-interference capabilities and improve the EMC capabilities of the circuit. The signal input and output of each chip follow the principle of minimizing the trace length, and the components for realizing the same function are placed as close as possible to reduce signal loss and improve the anti-interference ability. The power supply and the RS485 signal socket have both power input and RS485 signal input and output functions. The 3rd pin of the socket is defined as the power ground, which can well isolate the influence of the communication signal on the positive power supply and improve the circuit stability. The front and back sides of the circuit board are copper-clad on a large area, which is also to improve the circuit stability and anti-interference ability.
[0040] The above content and structure describe the basic principle, main features and advantages of the product of the present utility model, which should be understood by those skilled in the art. The examples and descriptions in the above specification only illustrate the principle of the present utility model. Without departing from the spirit and scope of the present utility model, the present utility model will have various changes and improvements, and these changes and improvements all fall within the scope of the present utility model claimed. The scope of protection claimed by the present utility model is defined by the appended claims and their equivalents.
Claims
1. An infrared communication and serial communication mutual conversion implementation circuit, characterized in that: It includes a DC power supply voltage, an RS485 differential signal conversion circuit, and a serial port signal processing and interchange output circuit. The RS485 differential signal conversion circuit uses a MAX485 chip, and the serial port signal processing and interchange output circuit uses a single-chip microcomputer chip with the model number STC8G1K08. The RS485 bus signal is connected to the input of the 6th pin of the MAX485 chip, and the RS485 bus signal is connected to the output of the 7th pin of the MAX485 chip; the 1st pin of the MAX485 chip is electrically connected to the 6th TXD function pin of the single-chip microcomputer chip, the 4th pin of the MAX485 chip is electrically connected to the 8th pin of the single-chip microcomputer chip, the 5th RXD function pin and the 6th pin of the single-chip microcomputer chip are respectively electrically connected to the 3rd insertion terminal and the 2nd insertion terminal of the second P4 terminal interface connector, the 3rd insertion terminal of the P4 terminal interface connector is electrically connected to the 1st pin of the infrared signal receiving chip, and the 7th pin of the single-chip microcomputer chip is the output pin of the modulated PWM signal.
2. The infrared communication and serial communication mutual conversion implementation circuit according to claim 1, wherein: The 7th pin of the single-chip microcomputer chip is connected to the base of the 1st PNP transistor in series with the 2nd resistor. The collector of the 1st PNP transistor is connected to the positive output terminal of the 3rd power supply chip in series with the 1st light-emitting diode and the 1st resistor. The emitter of the 1st PNP transistor is connected to the power input ground electrode.
3. The infrared communication and serial communication mutual conversion implementation circuit according to claim 1 or 2, characterized in that: The 2nd pin of the single-chip microcomputer chip is connected to the positive output terminal of the 3rd power supply chip, the 4th pin of the single-chip microcomputer chip is connected to the power input ground electrode, and a 1st capacitor and a 2nd capacitor are connected in parallel between the 2nd pin and the 4th pin of the single-chip microcomputer chip.
4. The infrared communication and serial communication mutual conversion implementation circuit according to claim 1, characterized in that: The 1st function pin of the MAX485 chip is connected to the base of the 4th PNP transistor in series with the 4th resistor. The collector of the 4th PNP transistor is connected to the 2nd function and the 3rd function of the MAX485 chip. The 1st function pin of the MAX485 chip is connected to the 4th function pin of the MAX485 chip in series with the 15th resistor and the 22nd resistor; the 4th function pin of the MAX485 chip is connected to the base of the 2nd NPN transistor in series with the 20th resistor. The collector of the 2nd NPN transistor is connected to the 8th function pin of the MAX485 chip in series with the 18th resistor. The 8th function of the MAX485 chip is connected to the 4th function pin of the MAX485 chip in series with the 22nd resistor. The collector of the 4th PNP transistor, the emitter of the 2nd NPN transistor, and the 5th function of the MAX485 chip are all connected to the power input ground electrode; the 7th function pin of the MAX485 chip is connected to the power input ground electrode in series with the 17th resistor, and the 6th function pin of the MAX485 chip is connected to the positive output terminal of the 3rd power supply chip in series with the 19th resistor.
5. The infrared communication and serial communication mutual conversion implementation circuit according to claim 2, characterized in that: The 3rd power supply chip uses a three-terminal voltage regulator chip with the model number PW6206.
6. The infrared communication and serial communication mutual conversion implementation circuit according to claim 5, characterized in that: The input terminal of the described three-terminal voltage regulator chip is connected in series with the 5th resistor and then electrically connected to the 4th plug-in terminal of the first P4 terminal interface connector. The 1st plug-in terminal of the first P4 terminal interface connector is electrically connected to the 7th function of the MAX485 chip. The 2nd plug-in terminal of the first P4 terminal interface connector is electrically connected to the 6th function of the MAX485 chip. The 3rd plug-in terminal of the first P4 terminal interface connector is electrically connected to the power input ground electrode.
7. The infrared communication and serial communication mutual conversion implementation circuit according to claim 1, characterized in that: The second P4 terminal interface connector and the first P4 terminal interface connector are respectively located at the two corner edge regions of adjacent 90-degree corners on the PCB printed board in the PCB layout of the circuit for realizing the mutual conversion between infrared communication and serial communication.
8. The infrared communication and serial communication mutual conversion implementation circuit according to claim 2, characterized in that: The MAX485 chip and the infrared signal receiving chip are distributed and arranged inside the adjacent 90-degree corner area on the PCB printed board for the first P4 terminal interface connector and the second P4 terminal interface connector.
9. The infrared communication and serial communication mutual conversion implementation circuit according to claim 1, wherein: The described infrared signal receiving chip uses the chip model VS1838B.
10. The infrared communication and serial communication mutual conversion implementation circuit according to claim 1, characterized in that: The PWM carrier signal output by the single-chip microcomputer can be programmed to modify the carrier frequency and duty cycle; the data receiving and data sending directions of the RS485 differential signal are automatically switched by the circuit; when the single-chip microcomputer outputs a PWM signal, the infrared receiving signal is automatically shielded to filter the infrared reflection signal during transmission. After the PWM signal transmission is completed, it automatically switches to the infrared signal receiving state.