Optical chip communication method based on RS232 interface
By using the MAX3232EUE+T integrated circuit chip and ESP32 microcontroller in the RS232 interface for level conversion and data processing, and using the optical chip for high-speed optical signal transmission, the problems of low transmission rate and insufficient anti-interference capability of the traditional RS232 interface are solved, and efficient and reliable data transmission is achieved.
Patent Information
- Application Number
- CN202510015311.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-06
- Publication Date
- 2025-04-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The traditional RS232 interface has low transmission rate, insufficient anti-interference capability and limited scalability, making it difficult to meet the needs of modern high data throughput and communication requirements of complex industrial environments.
By introducing the MAX3232EUE+T integrated circuit chip for level conversion, and using the multi-channel voltage source module and the ESP32 microcontroller for data analysis and conversion, it realizes efficient docking and conversion between the RS232 signal and the optical signal, and uses the optical chip for high-speed optical signal transmission.
It significantly improves the data transmission rate, enhances anti-interference capability and system scalability, and ensures efficient and reliable data transmission in complex industrial environments.
Smart Images

Figure CN119892236A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of optical communication and interface technology, and in particular to an optical chip communication method based on RS232 interface. Background Art
[0002] In the modern information society, data transmission and efficient communication between devices are the core elements for the normal operation of various industrial, medical, and consumer electronic devices. With the rapid development of the Internet of Things and intelligent manufacturing, a large number of industrial equipment need to be connected to the network to achieve intelligent management. As a classic serial communication interface, the traditional RS232 interface has a wide range of applications in industrial, medical, and military fields. With its stability and maturity, the RS232 interface has always played an important role in the control and communication of equipment. However, with the continuous increase in data transmission needs and the development of communication technology, the limitations of the traditional RS232 interface have gradually emerged, mainly manifested in its low transmission rate, poor interface compatibility, insufficient anti-interference ability, and limited scalability.
[0003] In the prior art, the RS232 interface often uses electrical signal transmission. Since its transmission rate is usually limited to around 115.2kbps, it is too slow for modern application scenarios with high data throughput requirements. In addition, the standard of the RS232 interface is not unified between different devices. There are differences in electrical level standards (such as ±12V and ±5V) and physical connection methods (such as DB9 and DB25 interfaces), resulting in poor compatibility between different devices, which greatly increases the complexity of system integration and maintenance costs. Especially in industrial environments, the traditional RS232 interface uses electrical signal transmission and is extremely susceptible to electromagnetic interference (EMI). This interference not only reduces the stability of communication, but may also cause data loss or errors, affecting the reliability of the system.
[0004] In order to solve the problem of insufficient transmission rate of RS232 interface, the existing technology attempts to convert RS232 signals into Ethernet or USB interface signals through serial port servers or intermediate gateway devices to improve communication rate and scalability. However, this method requires additional hardware devices, which not only increases costs but also complicates the system architecture. In addition, this solution usually relies on specific communication protocols or hardware platforms, making it difficult to achieve standardized communication between different devices, resulting in limited applicability.
[0005] On the other hand, optical communication technology has been widely used in the communication field in recent years due to its advantages of high speed, broadband and strong anti-electromagnetic interference ability. However, the direct connection between traditional optical communication equipment and RS232 interface equipment faces many challenges, such as complex electro-optical conversion of signals, inconsistent interface standards and high equipment upgrade costs. Although some existing technologies attempt to achieve the conversion between optical signals and RS232 electrical signals through optical fiber modules, these solutions are usually costly and have high requirements for environmental adaptability, making them difficult to promote in a wide range of industrial scenarios.
[0006] Therefore, how to provide an optical chip communication method based on RS232 interface is a problem that those skilled in the art need to solve urgently. Summary of the invention
[0007] One purpose of the present invention is to propose an optical chip communication method based on RS232 interface. The present invention completes level conversion by introducing MAX3232EUE+T integrated circuit chip, and uses multi-channel voltage source module and ESP32 microcontroller to perform data analysis and conversion, thereby realizing efficient docking and conversion between RS232 signal and optical signal. The present invention describes in detail how to realize high-speed transmission of optical signal and reliable restoration of electrical signal through optical chip, and supports synchronous transmission of multiple devices of data at the same time, thus solving the problems of low transmission rate, insufficient anti-interference ability and limited scalability of traditional RS232 interface.
[0008] According to an embodiment of the present invention, an optical chip communication method based on RS232 interface includes the following steps:
[0009] S1. Connect the ESP32 microcontroller as the core control unit to the system and configure the power supply and peripheral circuits.
[0010] S2, convert the RS232 signal into TTL level signal through RS232 to TTL module and connect it to TX and RX pins of ESP32 microcontroller;
[0011] S3, use MAX3232EUE+T integrated circuit chip to convert the level between RS232 interface and ESP32 microcontroller;
[0012] S4. Write a program in the ESP32 microcontroller to process the signal from the RS232 interface and perform data analysis and conversion;
[0013] S5, transmitting data to the optical chip through the multi-channel voltage source module, the optical chip outputs an optical signal, which is then converted into an electrical signal after being converted into an optical signal, and then transmitted to the control system, monitoring system and data acquisition equipment;
[0014] S6. Perform system testing to verify performance including compatibility, data transfer rate and stability, and optimize hardware configuration and program settings.
[0015] Optionally, the S2 specifically includes:
[0016] S21. Convert the RS232 signal to a TTL level signal through the RS232 to TTL module. The RS232 to TTL module contains the MAX3232EUE+T integrated circuit chip:
[0017] V TTL =α·(V RS232 -V ref );
[0018] Where α is the gain coefficient, V RS232 is the RS232 input signal level, V ref is the reference voltage, V TTL is the converted TTL signal level;
[0019] S22. Connect the TX pin of the RS232 to TTL converter module to the RX pin of the ESP32 microcontroller.
[0020] S23. Connect the RX pin of the RS232 to TTL converter module to the TX pin of the ESP32 microcontroller.
[0021] S24. Configure power and ground connections between the RS232 to TTL converter module and the ESP32 microcontroller.
[0022] S25. Configure the baud rate between the RS232 to TTL module and the ESP32 microcontroller:
[0023]
[0024] Among them, Baud_Rate is the baud rate, T bit is the bit time, L signal is the signal transmission length, R is the signal transmission rate, C is the signal quality coefficient, and F is the noise frequency.
[0025] Optionally, the S3 specifically includes:
[0026] S31. Use MAX3232EUE+T integrated circuit chip for level conversion. RS232 signal is converted through MAX3232EUE+T chip to output TTL level signal:
[0027]
[0028] Among them, V TTLis the converted TTL signal level, V RS232 is the RS232 input signal level, V ref is the reference voltage, K conversion is the conversion factor, f noise is the noise frequency, f signal is the signal frequency;
[0029] S32, connect the TX pin of the RS232 interface to the input pin of the MAX3232EUE+T chip to receive the RS232 signal;
[0030] S33, connect the output pin of the MAX3232EUE+T chip to the RX pin of the ESP32 microcontroller, and transmit the converted TTL level signal to the ESP32 microcontroller;
[0031] S34. Connect the input pin of the MAX3232EUE+T chip to the TX pin of the ESP32 microcontroller to receive the TTL signal sent by the ESP32 microcontroller.
[0032] S35, connect the output pin of the MAX3232EUE+T chip to the RX pin of the RS232 interface, and transmit the converted RS232 level signal to the RS232 interface;
[0033] S36. Provide power and ground connections for the MAX3232EUE+T chip to maintain signal stability and correctness during the level conversion process.
[0034] Optionally, the S4 specifically includes:
[0035] S41. Write a program in the ESP32 microcontroller to configure the baud rate, data bit, stop bit and check mode consistent with the RS232 interface;
[0036] S42, receiving a signal from the RS232 interface through a program, and storing the signal in a designated buffer;
[0037] S43, parsing the start bit and stop bit of the received signal in the buffer to extract valid data:
[0038]
[0039] Among them, P(t) is the data weight at time t, S i is the i-th data fragment received, W i is the data weight factor, N is the total number of data, and θ is the time decay coefficient during analysis;
[0040] S44, performing format conversion on the extracted valid data, converting the data from a serial format to a parallel format processable by the microcontroller;
[0041] S45, verify the parallel format data, and convert the verified data into a standard data packet format:
[0042]
[0043] Among them, Checksum is the checksum, k is the number of all data bytes in the data stream, To accumulate the power value of each data byte, D i represents the i-th data byte, β is the power check coefficient, γ is the adjustment coefficient, log(k) is the logarithmic transformation of the data length k, mod is the modular operation, and M represents the modulus.
[0044] Optionally, the S5 specifically includes:
[0045] S51, transmitting the electrical signal data to the input end of the optical chip through the multi-channel voltage source module;
[0046] S52, modulating the electrical signal data into an optical signal output inside the optical chip;
[0047] S53, performing photoelectric conversion on the optical signal output by the optical chip through a photoelectric conversion unit to obtain a corresponding electrical signal;
[0048] S54, connecting the converted electrical signal to a control system through a signal adaptation circuit;
[0049] S55, synchronously transmitting electrical signals to a monitoring system and data acquisition equipment;
[0050] S56. Perform distributed synchronization verification on the electrical signals received by the control system, monitoring system and data acquisition equipment:
[0051]
[0052] Among them, Δ error is the synchronization error, is the signal value received by the jth device, S ref is the reference signal, and p is the total number of receiving devices.
[0053] The beneficial effects of the present invention are:
[0054] The present invention provides an innovative solution by combining the advantages of optical communication technology and traditional RS232 interface, successfully overcoming the problems of low transmission rate, poor anti-interference ability and poor interface compatibility of RS232 interface in the prior art. By using MAX3232EUE+T integrated circuit chip to convert the RS232 signal level, then transmitting the electrical signal to the optical chip through a multi-channel voltage source module, using the optical chip to output the optical signal and restore the electrical signal after photoelectric conversion, and finally transmitting the data to multiple devices, the present invention realizes efficient and stable signal transmission and significantly improves the data transmission rate.
[0055] First of all, the present invention realizes high-speed data transmission through optical chips while ensuring the compatibility of RS232 interface and seamless connection with existing equipment. This method breaks through the bandwidth limitation of traditional RS232 interface, enables signals to be transmitted over long distances at high speeds, and meets the needs of modern industrial equipment and Internet of Things applications for large-capacity data transmission. In addition, optical communication has strong anti-interference ability, and is particularly suitable for industrial sites with complex electromagnetic environments. Through photoelectric conversion, it effectively avoids the influence of electromagnetic interference on data transmission, greatly improving the stability and reliability of the communication system.
[0056] In terms of system design, the present invention realizes the synchronous transmission and accurate verification of data among multiple devices through the collaborative work of the multi-channel voltage source module and the ESP32 microcontroller. This not only improves the scalability of the system, but also enhances the data consistency between devices, ensuring the collaborative work of multiple devices in complex environments. In addition, the ESP32 microcontroller can also process and parse RS232 data through programs to achieve accurate control and management of data flow, making data transmission more flexible and efficient.
[0057] The innovative design of the present invention effectively reduces the cost of the system, realizes the bidirectional conversion of optical and electrical signals through low hardware cost, and can support the synchronous transmission of multiple devices, meeting the needs of various industrial and commercial application scenarios. Compared with traditional optical communication solutions, the present invention has higher cost performance and stronger adaptability, which not only improves the speed and stability of data transmission, but also provides more possibilities for future equipment upgrades and expansions.
[0058] In summary, the present invention successfully solves the bottleneck in the prior art by effectively combining optical communication technology with the traditional RS232 interface, which not only improves the communication efficiency of the system, but also enhances the compatibility and scalability of the system while ensuring reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0060] Figure 1 A flow chart of an optical chip communication method based on RS232 interface proposed by the present invention;
[0061] Figure 2 This is a schematic diagram of the working principle of the photoelectric conversion module of the optical chip communication method based on RS232 interface proposed by the present invention. DETAILED DESCRIPTION
[0062] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0063] refer to Figure 1-2 , an optical chip communication method based on RS232 interface, comprising the following steps:
[0064] S1. Connect the ESP32 microcontroller as the core control unit to the system and configure the power supply and peripheral circuits.
[0065] S2, convert the RS232 signal into TTL level signal through RS232 to TTL module and connect it to TX and RX pins of ESP32 microcontroller;
[0066] S3, use MAX3232EUE+T integrated circuit chip to convert the level between RS232 interface and ESP32 microcontroller;
[0067] S4. Write a program in the ESP32 microcontroller to process the signal from the RS232 interface and perform data analysis and conversion;
[0068] S5, transmitting data to the optical chip through the multi-channel voltage source module, the optical chip outputs an optical signal, which is then converted into an electrical signal after being converted into an optical signal, and then transmitted to the control system, monitoring system and data acquisition equipment;
[0069] S6. Perform system testing to verify performance including compatibility, data transfer rate and stability, and optimize hardware configuration and program settings.
[0070] In this implementation, S2 specifically includes:
[0071] S21. Convert the RS232 signal to a TTL level signal through the RS232 to TTL module. The RS232 to TTL module contains the MAX3232EUE+T integrated circuit chip:
[0072] V TTL =α·(V RS232 -V ref );
[0073] Where α is the gain coefficient, V RS232 is the RS232 input signal level, V ref is the reference voltage, V TTL is the converted TTL signal level;
[0074] S22. Connect the TX pin of the RS232 to TTL converter module to the RX pin of the ESP32 microcontroller.
[0075] S23. Connect the RX pin of the RS232 to TTL converter module to the TX pin of the ESP32 microcontroller.
[0076] S24. Configure power and ground connections between the RS232 to TTL converter module and the ESP32 microcontroller.
[0077] S25. Configure the baud rate between the RS232 to TTL module and the ESP32 microcontroller:
[0078]
[0079] Among them, Baud_Rate is the baud rate, T bit is the bit time, L signal is the signal transmission length, R is the signal transmission rate, C is the signal quality coefficient, and F is the noise frequency.
[0080] In this implementation, S3 specifically includes:
[0081] S31. Use MAX3232EUE+T integrated circuit chip for level conversion. RS232 signal is converted through MAX3232EUE+T chip to output TTL level signal:
[0082]
[0083] Among them, V TTL is the converted TTL signal level, V RS232 is the RS232 input signal level, V ref is the reference voltage, K conversion is the conversion factor, f noise is the noise frequency, f signal is the signal frequency;
[0084] S32, connect the TX pin of the RS232 interface to the input pin of the MAX3232EUE+T chip to receive the RS232 signal;
[0085] S33, connect the output pin of the MAX3232EUE+T chip to the RX pin of the ESP32 microcontroller, and transmit the converted TTL level signal to the ESP32 microcontroller;
[0086] S34. Connect the input pin of the MAX3232EUE+T chip to the TX pin of the ESP32 microcontroller to receive the TTL signal sent by the ESP32 microcontroller.
[0087] S35, connect the output pin of the MAX3232EUE+T chip to the RX pin of the RS232 interface, and transmit the converted RS232 level signal to the RS232 interface;
[0088] S36. Provide power and ground connections for the MAX3232EUE+T chip to maintain signal stability and correctness during the level conversion process.
[0089] In this implementation manner, the S4 specifically includes:
[0090] S41. Write a program in the ESP32 microcontroller to configure the baud rate, data bit, stop bit and check mode consistent with the RS232 interface;
[0091] S42, receiving a signal from the RS232 interface through a program, and storing the signal in a designated buffer;
[0092] S43, parsing the start bit and stop bit of the received signal in the buffer to extract valid data:
[0093]
[0094] Among them, P(t) is the data weight at time t, S i is the i-th data fragment received, W i is the data weight factor, N is the total number of data, and θ is the time decay coefficient during analysis;
[0095] S44, performing format conversion on the extracted valid data, converting the data from a serial format to a parallel format processable by the microcontroller;
[0096] S45, verify the parallel format data, and convert the verified data into a standard data packet format:
[0097]
[0098] Among them, Checksum is the checksum, k is the number of all data bytes in the data stream, To accumulate the power value of each data byte, D irepresents the i-th data byte, β is the power check coefficient, γ is the adjustment coefficient, log(k) is the logarithmic transformation of the data length k, mod is the modular operation, and M represents the modulus.
[0099] In this implementation manner, S5 specifically includes:
[0100] S51, transmitting the electrical signal data to the input end of the optical chip through the multi-channel voltage source module;
[0101] S52, modulating the electrical signal data into an optical signal output inside the optical chip;
[0102] S53, performing photoelectric conversion on the optical signal output by the optical chip through a photoelectric conversion unit to obtain a corresponding electrical signal;
[0103] S54, connecting the converted electrical signal to a control system through a signal adaptation circuit;
[0104] S55, synchronously transmitting electrical signals to a monitoring system and data acquisition equipment;
[0105] S56. Perform distributed synchronization verification on the electrical signals received by the control system, monitoring system and data acquisition equipment:
[0106]
[0107] Among them, Δ error is the synchronization error, is the signal value received by the jth device, S ref is the reference signal, and p is the total number of receiving devices.
[0108] Embodiment 1:
[0109] In order to verify the feasibility of the present invention in implementation, the present invention is applied to a certain industrial automation production line, on which numerous devices need to communicate through a data interface to achieve collaborative work and monitoring management between devices. The traditional communication interface RS232, due to its relatively low transmission rate and the disadvantage of being easily subject to electromagnetic interference, causes poor stability and low transmission rate of data transmission between devices, affecting production efficiency and the real-time nature of data. Therefore, how to improve the transmission rate of the RS232 interface and ensure the reliability of data transmission in a complex electromagnetic environment has become a problem to be solved.
[0110] In the core control system of the production line, multiple devices exchange data through the RS232 interface, including PLC (programmable logic controller), monitoring equipment, data acquisition system, etc. In order to improve the efficiency of data transmission and ensure that data is not lost in a high-noise environment, we introduced the RS232 interface design method based on optical chip communication of the present invention, which uses the MAX3232EUE+T integrated circuit chip to achieve level conversion and uses optical chips for optical signal transmission, thereby greatly improving the data transmission rate and stability.
[0111] The equipment in the entire production line needs to communicate in real time through data transmission. By applying the technology of the present invention, the RS232 signal from each device is first converted into a TTL level signal through the MAX3232EUE+T chip, and then the electrical signal is transmitted to the optical chip through the multi-channel voltage source module. After receiving the electrical signal, the optical chip converts it into an optical signal for high-speed transmission. After passing through the photoelectric conversion module, the optical signal is converted back into an electrical signal and transmitted to the control system, monitoring system and data acquisition equipment of each device.
[0112] By using optical signal transmission, we have overcome the limitation of RS232 signal being subject to electromagnetic interference and reduced the bit error and packet loss problems in traditional electrical signal transmission. At the same time, due to the higher bandwidth of optical signals, we can significantly increase the data transmission rate and meet the needs of production line equipment for large data volume and fast response.
[0113] In the application process, the ESP32 microcontroller undertakes the functions of data parsing, format conversion and verification to ensure that the data received from the RS232 interface can be smoothly transmitted and processed in the system. At the same time, the use of a multi-channel voltage source module supports the synchronous transmission of signals from multiple devices, improving the overall reliability and data consistency of the system.
[0114] During the application of this production line, we compared the data transmission performance of the traditional RS232 interface communication and the technology of the present invention. The test site is located in the production workshop of an automobile parts manufacturer, which has a strong electromagnetic interference environment. The data transmission during the test mainly involves real-time data exchange between the control system and multiple monitoring devices and data acquisition devices.
[0115] Table 1 Data transmission performance comparison
[0116] Test items Traditional RS232 interface Application of the present invention Data transfer rate 115.2kbps 10Mbps Data packet loss rate 3.5% 0.1% Data transmission delay 250ms 50ms Synchronization error between devices 2.2% 0.05%
[0117] Table 2 Comparison of device response time
[0118] Test items Traditional RS232 interface Application of the present invention Control system response time 300ms 50ms Monitoring system response time 250ms 45ms Data acquisition device response time 220ms 40ms
[0119] Table 1 shows the comparison results of the traditional RS232 interface and the technology of the present invention in terms of data transmission rate, packet loss rate, transmission delay and synchronization error. By applying the technology of the present invention, the data transmission rate is significantly improved from 115.2kbps to 10Mbps, the data packet loss rate is reduced from 3.5% to 0.1%, the transmission delay is reduced from 250 milliseconds to 50 milliseconds, and the synchronization error between devices is reduced from 2.2% to 0.05%. These improvements show that optical communication technology has significant advantages in increasing transmission rate, reducing delay and packet loss, and improving synchronization accuracy.
[0120] Table 2 further shows the comparison of equipment response time. Through the technology of the present invention, the response time of the control system, monitoring system and data acquisition equipment is reduced from the traditional 300 milliseconds, 250 milliseconds and 220 milliseconds to 50 milliseconds, 45 milliseconds and 40 milliseconds respectively. The shorter response time significantly improves the real-time response capability of the equipment, allowing the production line to operate more efficiently.
[0121] Through the above comparative analysis, we can see the significant advantages of the technology of the present invention in various aspects. The increase in data transmission rate, the reduction in data packet loss rate and delay, and the reduction in synchronization errors between devices fully demonstrate the advantages of the technology of the present invention in improving data transmission efficiency, stability and real-time performance. Especially in high-noise and complex electromagnetic environments, the RS232 interface design method using optical chip communication not only solves the defects of the traditional RS232 interface, but also enables industrial production lines to operate under more efficient and reliable conditions, thereby providing a practical and cost-effective solution for various industrial applications.
[0122] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. An optical chip communication method based on RS232 interface, characterized in that: The steps include: S1. Connect the ESP32 microcontroller as the core control unit to the system and configure the power supply and peripheral circuits. S2, convert the RS232 signal into TTL level signal through RS232 to TTL module and connect it to TX and RX pins of ESP32 microcontroller; S3, use MAX3232EUE+T integrated circuit chip to convert the level between RS232 interface and ESP32 microcontroller; S4. Write a program in the ESP32 microcontroller to process the signal from the RS232 interface and perform data analysis and conversion; S5, transmitting data to the optical chip through the multi-channel voltage source module, the optical chip outputs an optical signal, which is then converted into an electrical signal after being converted into an optical signal, and then transmitted to the control system, monitoring system and data acquisition equipment; S6. Perform system testing to verify performance including compatibility, data transfer rate and stability, and optimize hardware configuration and program settings.
2. The optical chip communication method based on RS232 interface according to claim 1, characterized in that: The S2 specifically includes: S21. Convert the RS232 signal to a TTL level signal through the RS232 to TTL module. The RS232 to TTL module contains the MAX3232EUE+T integrated circuit chip: V TTL =α·(V RS232 -V ref ); Where α is the gain coefficient, V RS232 is the RS232 input signal level, V ref is the reference voltage, V TTL is the converted TTL signal level; S22. Connect the TX pin of the RS232 to TTL converter module to the RX pin of the ESP32 microcontroller. S23. Connect the RX pin of the RS232 to TTL converter module to the TX pin of the ESP32 microcontroller. S24. Configure power and ground connections between the RS232 to TTL converter module and the ESP32 microcontroller. S25. Configure the baud rate between the RS232 to TTL module and the ESP32 microcontroller: Among them, Baud_Rate is the baud rate, T bit is the bit time, L signal is the signal transmission length, R is the signal transmission rate, C is the signal quality coefficient, and F is the noise frequency.
3. The optical chip communication method based on RS232 interface according to claim 1, characterized in that: The S3 specifically includes: S31. Use MAX3232EUE+T integrated circuit chip for level conversion. RS232 signal is converted through MAX3232EUE+T chip to output TTL level signal: Among them, V TTL is the converted TTL signal level, V RS232 is the RS232 input signal level, V ref is the reference voltage, K conversion is the conversion factor, f noise is the noise frequency, f signal is the signal frequency; S32, connect the TX pin of the RS232 interface to the input pin of the MAX3232EUE+T chip to receive the RS232 signal; S33, connect the output pin of the MAX3232EUE+T chip to the RX pin of the ESP32 microcontroller, and transmit the converted TTL level signal to the ESP32 microcontroller; S34. Connect the input pin of the MAX3232EUE+T chip to the TX pin of the ESP32 microcontroller to receive the TTL signal sent by the ESP32 microcontroller. S35, connect the output pin of the MAX3232EUE+T chip to the RX pin of the RS232 interface, and transmit the converted RS232 level signal to the RS232 interface; S36. Provide power and ground connections for the MAX3232EUE+T chip to maintain signal stability and correctness during the level conversion process.
4. The optical chip communication method based on RS232 interface according to claim 1, characterized in that: The S4 specifically includes: S41. Write a program in the ESP32 microcontroller to configure the baud rate, data bit, stop bit and check mode consistent with the RS232 interface; S42, receiving a signal from the RS232 interface through a program, and storing the signal in a designated buffer; S43, parsing the start bit and stop bit of the received signal in the buffer to extract valid data: Among them, P(t) is the data weight at time t, S i is the i-th data fragment received, W i is the data weight factor, N is the total number of data, and θ is the time decay coefficient during analysis; S44, performing format conversion on the extracted valid data, converting the data from a serial format to a parallel format processable by the microcontroller; S45, verify the parallel format data, and convert the verified data into a standard data packet format: Among them, Checksum is the checksum, k is the number of all data bytes in the data stream, To accumulate the power value of each data byte, D i represents the i-th data byte, β is the power check coefficient, γ is the adjustment coefficient, log(k) is the logarithmic transformation of the data length k, mod is the modular operation, and M represents the modulus.
5. The optical chip communication method based on RS232 interface according to claim 1, characterized in that: The S5 specifically includes: S51, transmitting the electrical signal data to the input end of the optical chip through the multi-channel voltage source module; S52, modulating the electrical signal data into an optical signal output inside the optical chip; S53, performing photoelectric conversion on the optical signal output by the optical chip through a photoelectric conversion unit to obtain a corresponding electrical signal; S54, connecting the converted electrical signal to a control system through a signal adaptation circuit; S55, synchronously transmitting electrical signals to a monitoring system and data acquisition equipment; S56. Perform distributed synchronization verification on the electrical signals received by the control system, monitoring system and data acquisition equipment: Among them, Δ error is the synchronization error, is the signal value received by the jth device, S ref is the reference signal, and p is the total number of receiving devices.