A multi-channel RS-232 serial gateway circuit based on Air101

By using a multi-channel RS-232 serial gateway circuit based on Air101, the problems of insufficient number of channels, poor level compatibility, and complex power supply of traditional serial servers are solved, realizing low-cost, high-reliability, and easy-to-maintain wireless networking of multiple RS-232 devices.

CN122372367APending Publication Date: 2026-07-10CHULIANG TECHNOLOGY (HK) LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHULIANG TECHNOLOGY (HK) LTD
Filing Date
2026-06-08
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Traditional single-channel RS-232 serial server solutions suffer from problems such as insufficient number of channels, poor reliability of level conversion, unreasonable power supply scheme, and inconvenient debugging and maintenance, resulting in complex system wiring, high hardware costs, poor communication stability, and low development efficiency.

Method used

The circuit adopts a multi-channel RS-232 serial gateway circuit based on Air101, including a power management module, an MCU main control module, an RS-232/TTL level conversion module, a USB to serial port module, and a GPIO expansion module. It realizes four independent communication channels through four SP3232EEN-L/TR dual-channel RS-232 transceivers, integrates a USB debugging interface and LDO power management, and supports Wi-Fi network communication.

Benefits of technology

It enables parallel access for multiple devices without the need for device stacking, resulting in a smaller system size, reduced wiring complexity, reliable level conversion, simple power supply, convenient debugging, high communication stability, and low cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122372367A_ABST
    Figure CN122372367A_ABST
Patent Text Reader

Abstract

This invention discloses a multi-channel RS-232 serial gateway circuit based on Air101, belonging to the field of industrial communication interconnection technology. It aims to solve the problems of insufficient channel quantity, unreliable level conversion, complex power supply, and inconvenient debugging in traditional serial server circuits. The circuit adopts a single-power-input, dual-rail-output architecture, with a microcontroller with built-in wireless communication function as its core. It achieves bidirectional conversion between four independent TTL and RS-232 levels through at least two dual-channel RS-232 transceivers. It integrates a USB-to-serial module to support automatic MCU program download and online debugging, and provides a general-purpose GPIO expansion interface. Each RS-232 external connector integrates an auxiliary power supply pin. This invention can simultaneously connect four RS-232 devices for wireless networking, with low communication error rate, low power supply noise, convenient development and maintenance, and strong scalability. It is suitable for scenarios such as industrial automation, intelligent buildings, and networking of traditional instruments and meters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of industrial communication interconnection technology, and in particular relates to a multi-channel RS-232 serial port gateway circuit based on Air101. Background Technology

[0002] In applications such as industrial communication, IoT data acquisition, and smart device interconnection, it is often necessary to exchange data between multiple wired serial port devices using the RS-232 standard and wireless networks. Traditional single-channel serial server solutions suffer from the following technical problems: 1. Insufficient number of channels: Mainstream commercial products only provide 1 to 2 independent RS-232 channels. When 3 or more devices need to be connected on site, multiple serial port servers must be stacked, which leads to an exponential increase in system cabling complexity, a significant increase in hardware costs, and difficulty in achieving unified network management and data synchronization among multiple devices.

[0003] 2. Poor reliability of level conversion: The RS-232 interface uses a ±12V differential level standard, while modern microcontrollers generally use a 3.3V TTL single-ended level, making direct connection impossible. Some low-cost solutions use discrete components to build level conversion circuits, which suffer from severe signal distortion, high communication error rate, and weak anti-interference capability, making communication interruptions highly likely in strong electromagnetic environments in industrial settings.

[0004] 3. Inadequate power supply design: The RS-232 transceiver requires a 5V power supply to generate a ±12V drive voltage via an internal charge pump, while the MCU and peripheral circuits require a 3.3V power supply. Existing solutions often employ a single power domain or an unreasonable power distribution method, leading to crosstalk between different voltage domains, severely affecting the stability of Wi-Fi communication and the transmission accuracy of serial data.

[0005] 4. Low debugging and maintenance efficiency: Most traditional serial servers do not integrate onboard USB debugging interfaces. Development, debugging and on-site firmware upgrades require external dedicated serial adapters, which are cumbersome and prone to download failures due to poor contact, greatly reducing development efficiency and on-site maintenance convenience. Summary of the Invention

[0006] The purpose of this invention is to overcome the above-mentioned defects of the prior art and provide a multi-channel RS-232 to Wi-Fi serial port gateway circuit based on Air101. This invention proposes a multi-channel RS-232 serial port gateway circuit based on Air101 to solve the problems of insufficient number of channels, poor level compatibility, complex power supply and inconvenient debugging of traditional serial port servers, and realize low-cost, high-reliability and easy-to-maintain wireless networking of multiple RS-232 devices.

[0007] To achieve the above objectives, the technical solution of the present invention is as follows: In a first aspect, the present invention provides a multi-channel RS-232 serial port gateway circuit based on Air101, including a power management module, an MCU main control module, an RS-232 / TTL level conversion module, a USB to serial port module, a GPIO expansion module, and four RS-232 external connectors. The power management module adopts a USB 5V single power input and dual-rail output architecture, directly supplying the input +5V power to the RS-232 / TTL level conversion module, GPIO expansion module and RS-232 external connector, and converting it to +3.3V power through a low dropout linear regulator (LDO) to supply the MCU main control module and USB to serial port module. The MCU main control module uses the Air101 microcontroller with built-in 2.4GHz Wi-Fi function as its core. It is connected to the RS-232 / TTL level conversion module through 4 independent hardware UART interfaces to realize the parallel reception, processing and transmission of 4 serial port data, and complete the Wi-Fi network communication and protocol conversion functions. The RS-232 / TTL level conversion module uses two SP3232EEN-L / TR dual-channel RS-232 transceivers. Each transceiver implements bidirectional conversion between two TTL levels and RS-232 levels, forming four completely independent RS-232 communication channels, supporting a maximum transmission rate of 235Kbps. The USB-to-serial module uses the CH340N chip to achieve bidirectional conversion between USB and UART protocols. It is used for MCU program downloading and online debugging, and supports automatic MCU reset and entry into download mode via the RTS# pin. The GPIO expansion module brings out four MCU general-purpose IO pins and +5V and GND power supply pins to expand functions such as LED status indication, button input, relay control, and sensor access. The RS-232 external connector adopts 4 independent WAFER-PH2.0-4PWB horizontal surface mount interfaces. Each interface includes GND, RS232_RX, RS232_TX and +5V auxiliary power supply pins, which can directly power external low-power RS-232 devices.

[0008] As a further embodiment of the present invention, the power management module includes a USB-Micro female connector USB1, an LDO chip ME6211C33M5G-N (LDO1), and a pull-up resistor R1; The VCC pin of USB1 is connected to the +5V main power network, the D+ and D- pins are connected to the corresponding pins of the USB to serial port module, and the GND pin is connected to the system common ground network. The VIN pin of LDO1 is connected to the +5V network, the VOUT pin outputs the +3.3V power supply network, and the CE pin is connected to the +5V network through a 330Ω pull-up resistor R1 to ensure that the LDO immediately enters the enabled state after power-on and continuously and stably outputs 3.3V. The +5V network simultaneously powers the VCC pin (pin16) of the two SP3232E transceivers (U2, U3), pin6 of the GPIO expansion interface U4, and pin4 of the four RS-232 external connectors (U5~U8). The +3.3V network powers all VDD33 pins (pins 7, 9, 10, 11, 17, 24, 31) of the Air101 (U1), the PA_07 pin (pin 16, RF / analog power), and the VCC pin (pin 1) of the CH340N (U9).

[0009] As a further embodiment of the present invention, the MCU main control module includes an Air101 microcontroller U1, a 40MHz crystal oscillator X1, load capacitors C1 / C2, and multi-stage power supply decoupling capacitors C3 to C8. The PB_06 (pin26) / PB_07 (pin27), PB_02 (pin20) / PB_03 (pin21), PB_00 (pin18) / PB_01 (pin19), and PB_04 (pin22) / PB_05 (pin23) pins of U1 form four independent UART interfaces, which are connected to the corresponding TTL side pins of the two SP3232E transceivers. The PB_19 (pin2) / PB_20 (pin1) pins of U1 are connected to the RXD (pin7) / TXD (pin6) pins of CH340N to form a USB debugging serial port; The RESET pin (pin4) of U1 is connected to the RTS# pin (pin5) of CH340N through a 330Ω current-limiting resistor R2 to realize the automatic reset download function; Crystal X1 is connected between the XTAL_IN (pin6) and XTAL_OUT (pin5) pins of U1. C1 and C2 are connected between the two ends of X1 and GND respectively, to match the 15pF load capacitance requirement of the crystal oscillator. Decoupling capacitors C3 (1μF) and C4 (1nF) are connected in parallel to the digital power supply pin of U1. C5 (4.7μF) is connected to the main power supply pin of U1 as an energy storage capacitor. C6 (1μF) and C7 (100nF) are connected in parallel to the RF / analog power supply pin of U1. C8 (4.7μF) is connected to the CAP pin (pin25) of U1 as an internal regulator bypass capacitor.

[0010] As a further embodiment of the present invention, the RS-232 / TTL level conversion module includes two SP3232E transceivers U2 and U3, each transceiver being equipped with 4 charge pump capacitors and 2 EMI filter capacitors; The T1IN (pin11) / R1OUT (pin12) and T2IN (pin10) / R2OUT (pin9) pins of U2 are connected to the PB_06 / PB_07 and PB_02 / PB_03 pins of U1, respectively. The T1OUT (pin14) / R1IN (pin13) and T2OUT (pin7) / R2IN (pin8) pins are connected to the RS-232 external connectors U5 and U6, respectively, to realize the level conversion between channel 1 and channel 2. The T1IN (pin11) / R1OUT (pin12) and T2IN (pin10) / R2OUT (pin9) pins of U3 are connected to the PB_04 / PB_05 and PB_00 / PB_01 pins of U1, respectively. The T1OUT (pin14) / R1IN (pin13) and T2OUT (pin7) / R2IN (pin8) pins are connected to the RS-232 external connectors U8 and U7, respectively, to realize the level conversion between channel 4 and channel 3. A 100nF voltage multiplier capacitor is connected between C1+ (pin2) and C1- (pin3) of each SP3232E chip, a 100nF anti-inverting capacitor is connected between C2+ (pin4) and C2- (pin5), and a 100nF filter capacitor is connected between V+ (pin15) and GND, and between V- (pin6) and GND. Each RS-232 interface transmit and receive lines are connected to GND with a 150pF EMI filter capacitor: C23 and C18 for channel 1, C22 and C19 for channel 2, C24 and C20 for channel 3, and C25 and C21 for channel 4.

[0011] As a further embodiment of the present invention, the USB to serial port module includes a CH340N chip U9 and a reset filter capacitor C17. U9's VCC (pin1) is connected to the +3.3V network, GND (pin4) is connected to the common ground network, and UD+ (pin3) and UD- (pin2) are connected to the D+ and D- pins of USB1, respectively. U9’s TXD (pin6) is connected to U1’s PB_20 pin (MCU_RX0), and RXD (pin7) is connected to U1’s PB_19 pin (MCU_TX0). U9's RTS# (pin 5) is connected to U1's RESET pin through a 330Ω current-limiting resistor R2. C17 (100nF) is connected between the RESET network and GND to filter out noise in the reset signal and prevent false resets.

[0012] As a further embodiment of the present invention, the GPIO expansion module adopts a GH1.25-6PWBPZ1×6P horizontal surface-mount interface U4, with pin1 connected to pin PB_08 of U1, pin2 connected to pin PB_09 of U1, pin3 connected to pin PA_01 of U1, pin4 connected to pin PA_04 of U1, pin5 connected to GND, and pin6 connected to a +5V power supply; the four GPIO pins can be independently configured as input or output modes by software, with a maximum drive current of 12mA.

[0013] As a further embodiment of the present invention, the RS-232 external connector includes four WAFER-PH2.0-4PWB1×4P horizontal mounting interfaces U5 to U8. For each interface, pin1 is GND, pin2 is RS232_RX, pin3 is RS232_TX, and pin4 is +5V auxiliary power supply. The maximum total current of the +5V auxiliary power supply is limited by the 1.8A rated current of the USB interface.

[0014] Compared with the prior art, the multi-channel RS-232 serial gateway circuit based on Air101 provided in this application has the following advantages: The multi-channel RS-232 serial gateway circuit based on Air101 provided by this invention uses two SP3232E dual-channel transceivers to achieve four completely independent RS-232 communication channels. A single circuit board can meet the parallel access requirements of multiple devices, eliminating the need to stack multiple devices, thus reducing system size and wiring complexity. The SP3232E integrates a high-efficiency charge pump circuit, which can generate a stable ±12V drive voltage without the need for an external transformer, conforming to the EIA / TIA-232 standard. With a 150pFEMI filter capacitor, it effectively suppresses high-frequency electromagnetic interference introduced by long-distance RS-232 transmission. It adopts a USB 5V single power input and dual-rail output architecture. The +5V is directly supplied to the RS-232 transceiver to meet the charge pump requirements, and the 3.3V is regulated by a low-noise LDO to supply the MCU and USB to serial port chip, physically isolating noise interference from different voltage domains. A multi-level wideband decoupling network ensures that the power ripple of the MCU is less than 50mV when the peak Wi-Fi transmission current is 300mA. Attached Figure Description

[0015] Figure 1 This is a circuit diagram of the power management module in a multi-channel RS-232 serial gateway circuit based on Air101 provided by the present invention; Figure 2 This is a circuit diagram of the MCU main control module in a multi-channel RS-232 serial gateway circuit based on Air101 provided by the present invention.

[0016] Figure 3 This is a circuit diagram of an RS-232 / TTL level conversion module in a multi-channel RS-232 serial gateway circuit based on Air101 provided by the present invention.

[0017] Figure 4 This is a circuit diagram of the GPIO expansion module in a multi-channel RS-232 serial gateway circuit based on Air101 provided by the present invention. Detailed Implementation

[0018] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0019] To address the issues of insufficient channel quantity in single-channel serial servers, the ±12V level standard of RS-232 and the 3.3V TTL level of the MCU, which prevent direct connection and result in inconsistent power supply schemes, making debugging and firmware download inconvenient, this invention provides a multi-channel RS-232 serial gateway circuit based on the Air101. This 4-channel RS-232 serial communication gateway, based on the Air101 Wi-Fi MCU, achieves bidirectional TTL / RS-232 level conversion for four independent serial ports using two SP3232E dual-channel RS-232 transceivers. It integrates a USB debugging interface and LDO power management, enabling data bridging between Wi-Fi networks and multiple RS-232 devices. The circuit offers advantages such as a large number of channels, reliable level conversion, simple power supply, and convenient debugging.

[0020] See Figures 1 to 4 As shown, this invention provides a multi-channel RS-232 serial gateway circuit based on Air101, including a power management module, an MCU main control module, an RS-232 / TTL level conversion module, a USB to serial port module, a GPIO expansion module, and four RS-232 external connectors. The modules are connected through a unified power network and signal network to achieve bidirectional transparent data transmission and protocol conversion.

[0021] See Figure 1As shown, the power management module, serving as the energy core of the entire system, uses a USB-Micro female connector (USB1) as its sole power input and data interface. It supports the full-speed USB 2.0 standard, with a maximum input current of 1.8A, and can be powered via a standard mobile phone charger or a computer's USB port. Specifically, the power management module employs a USB 5V single-supply-input, dual-rail-output architecture. It directly supplies the +5V input to the RS-232 / TTL level conversion module, GPIO expansion module, and RS-232 external connector. Simultaneously, it converts the +5V input to +3.3V via a low-dropout linear regulator (LDO) to supply the MCU main control module and the USB-to-serial module.

[0022] In this embodiment, the power management module includes a USB-Micro female connector USB1, an LDO chip ME6211C33M5G-N (LDO1), and a pull-up resistor R1; The VCC pin of USB1 is connected to the +5V main power network, the D+ and D- pins are connected to the corresponding pins of the USB to serial port module, and the GND pin is connected to the system common ground network. The VCC pin of USB1 outputs the +5V main power supply, which is divided into two paths: one path is directly connected to the VCC pin (pin16) of RS-232 level conversion chips U2 and U3, the pin6 of GPIO expansion interface U4, and the pin4 of the four RS-232 external connectors U5 to U8, providing 5V power to these devices; the other path is input to the VIN pin (pin5) of LDO chip LDO1 (ME6211C33M5G-N).

[0023] The LDO1's VIN pin connects to the +5V network, its VOUT pin outputs a +3.3V power supply, and its CE pin is connected to the +5V network via a 330Ω pull-up resistor R1. This ensures that the LDO immediately enters the enabled state after power-on and continuously and stably outputs 3.3V. The LDO1 uses an SOT-23-5 package and features a wide input voltage range (2.5V to 6V), high output voltage accuracy (±2%), low voltage drop (260mV@200mA), and low noise (30μVrms), making it ideal for powering devices sensitive to power supply noise, such as Wi-Fi MCUs. The LDO1's CE pin (pin 4) is connected to the +5V network via a 330Ω pull-up resistor R1, ensuring that the LDO immediately enters the enabled state after power-on and continuously outputs 3.3V without external control signals. The LDO1's VOUT pin (pin3) outputs a +3.3V power supply, which is connected to all VDD33 pins (pin7, 9, 10, 11, 17, 24, 31), PA_07 pin (pin16, RF / analog power supply), and the VCC pin (pin1) of the CH340N chip U9.

[0024] The +5V network simultaneously powers the VCC pin (pin16) of the two SP3232E transceivers (U2, U3), pin6 of the GPIO expansion interface U4, and pin4 of the four RS-232 external connectors (U5~U8). The +3.3V network powers all VDD33 pins (pins 7, 9, 10, 11, 17, 24, 31) of the Air101 (U1), the PA_07 pin (pin 16, RF / analog power), and the VCC pin (pin 1) of the CH340N (U9).

[0025] All devices' GND pins are connected to the system's common GND network, and connected to the USB host ground via the USB1 GND pin, forming a complete current loop. The 3.3V / 500mA output current of LDO1 is sufficient to meet the power supply requirements of Air101 (typical power consumption 100-150mA, peak current of about 300mA during Wi-Fi transmission) and CH340N (typical power consumption about 20mA), with ample current margin reserved.

[0026] The LDO1 enable path is: +5V (VIN) → R1 (330Ω) → LDO1 CE pin. R1 pulls the CE pin up to VIN, ensuring that LDO1 is always enabled and can continuously output 3.3V without external control signals.

[0027] The GND loop is as follows: GND pins of all devices → GND common network → USB1 GND pin → USB host ground, forming a complete current loop.

[0028] The USB1 model is USB-MICRO XNJ JB, with key parameters: Micro-B female connector, USB 2.0, 5P+4EH, 1.8A, and network connections: +5V, GND, D+, D-; it is used for USB power input and data interface, providing +5V system power. The LDO1 model is ME6211C33M5G-N, with key parameters: SOT-23-5, input ≤6V, output 3.3V / 500mA, voltage drop 260mV@200mA, and network connections: VIN=+5V, VOUT=+3.3V, GND, CE=+5V; it is used to step down the USB +5V to +3.3V to power the MCU (U1) and CH340N (U9). R1 is model RC0603JR-07330RL, with key parameters of 330Ω, ±5%, 100mW, 0603, and connection to the network: LDO1 CE→+5V(VIN). It is used as a pull-up resistor for the LDO1 CE enable pin, connected to VIN, to ensure that the LDO is always in an enabled working state.

[0029] This invention employs a dual power supply scheme. The +5V power supply directly powers the RS-232 level conversion chips (U2, U3), meeting the charge pump boost requirements of the RS-232 interface. The +3.3V power supply powers the MCU (U1) and CH340N (U9), matching the MCU's operating voltage. GND serves as the common ground network, connecting the ground pins of all devices to form a complete current loop. The LDO1 outputs 3.3V / 500mA, sufficient to meet the power supply requirements of the MCU (typical power consumption approximately 100-150mA including Wi-Fi transmission) and CH340N.

[0030] See Figure 2 As shown, the MCU main control module uses the Air101 microcontroller with built-in 2.4GHz Wi-Fi functionality as its core. It connects to the RS-232 / TTL level conversion module through four independent hardware UART interfaces to achieve parallel reception, processing, and transmission of four serial port data channels, and to complete Wi-Fi network communication and protocol conversion functions. The MCU main control module serves as the control core of the entire system, using the Air101 microcontroller U1 as the main processor. This chip uses a 32-bit RISC-V core with a maximum clock frequency of 240MHz, a built-in 2.4GHz Wi-Fi 802.11b / g / n protocol stack, supports STA / AP / STA+AP operating modes, integrates rich peripheral interfaces, operates at 3.3V, and has advantages such as small size, low power consumption, and high cost-effectiveness.

[0031] In this embodiment, the MCU main control module includes an Air101 microcontroller U1, a 40MHz crystal oscillator X1, load capacitors C1 / C2, and multi-level power supply decoupling capacitors C3 to C8; The PB_06 (pin 26) / PB_07 (pin 27), PB_02 (pin 20) / PB_03 (pin 21), PB_00 (pin 18) / PB_01 (pin 19), and PB_04 (pin 22) / PB_05 (pin 23) pins of U1 form four independent UART interfaces, which are connected to the corresponding TTL side pins of the two SP3232E transceivers. Specifically, the serial communication pin functions of U1 are as follows: PB_06 (pin 26) / PB_07 (pin 27) are UART1_TX / RX, connected to the T1IN / R1OUT pins of U2. The pins correspond to RS-232 channel 1; PB_02 (pin20) / PB_03 (pin21) are UART2_TX / RX, connected to the T2IN / R2OUT pins of U2, corresponding to RS-232 channel 2; PB_00 (pin18) / PB_01 (pin19) are UART3_TX / RX, connected to the T2IN / R2OUT pins of U3, corresponding to RS-232 channel 3; PB_04 (pin22) / PB_05 (pin23) are UART4_TX / RX, connected to the T1IN / R1OUT pins of U3, corresponding to RS-232 channel 4.

[0032] The PB_19 (pin2) and PB_20 (pin1) pins of U1 are connected to the RXD (pin7) and TXD (pin6) pins of CH340N to form a USB debug serial port. The RESET pin (pin4) of U1 is connected to the RTS# pin (pin5) of CH340N through a 330Ω current-limiting resistor R2 to realize the automatic reset download function. Specifically, the debugging and reset pin functions of U1 are assigned as follows: PB_19 (pin2) and PB_20 (pin1) are UART0_TX / RX, connected to the RXD / TXD pins of U9 as a USB debug serial port; RESET (pin4) is the reset pin, active low, connected to the RTS# pin of U9 through R2 to realize automatic reset download.

[0033] Crystal X1 is connected between the XTAL_IN (pin 6) and XTAL_OUT (pin 5) pins of U1. C1 and C2 are connected between the two ends of X1 and GND respectively, to match the 15pF load capacitance requirement of the crystal oscillator. Specifically, the clock pins of U1 are configured as follows: XTAL_IN (pin 6) / XTAL_OUT (pin 5) are crystal oscillator input / output pins, connected to the 40MHz crystal oscillator X1.

[0034] Decoupling capacitors C3 (1μF) and C4 (1nF) are connected in parallel to the digital power supply pin of U1. C5 (4.7μF) is connected to the main power supply pin of U1 as an energy storage capacitor. C6 (1μF) and C7 (100nF) are connected in parallel to the RF / analog power supply pin of U1. C8 (4.7μF) is connected to the CAP pin (pin 25) of U1 as an internal regulator bypass capacitor. The extended GPIO pins and power supply pins of U1 are functionally assigned as follows: PB_08 (pin 28), PB_09 (pin 29), PA_01 (pin 14), and PA_04 (pin 15) are general-purpose GPIO pins, leading to the GPIO expansion interface U4. VDD33 (pins 7, 9, 10, 11, 17, 24, 31) are digital power supply pins, PA_07 (pin 16) is an RF / analog power supply pin, and CAP (pin 25) is an internal regulator bypass pin.

[0035] The crystal oscillator circuit uses a 40MHz surface-mount crystal oscillator X1 (TXM40M0004322HBCEO00T), with a frequency accuracy of ±10ppm, a load capacitance of 15pF, an ESR of 30Ω, and an SMD3225-4P package. The two ends of X1 are connected to the XTAL_IN and XTAL_OUT pins of U1, respectively, and grounded through 15pF NP0 capacitors C1 and C2. The NP0 capacitors feature a small temperature coefficient and high stability, ensuring stable oscillation of the crystal oscillator within an industrial temperature range of -40℃ to +85℃, meeting the clock accuracy requirements of Wi-Fi communication.

[0036] To ensure power supply stability, the power supply pins of U1 are equipped with a multi-stage wideband decoupling capacitor network: C3 (1μFX5R) is connected to the VDD33 pin of pin7 / 9 to filter out low-frequency ripple from the digital power supply; C4 (1nFX7R) is connected to the VDD33 pin of pin10 to filter out high-frequency digital noise at the level of hundreds of MHz; C5 (4.7μFX5R) is connected to the VDD33 pin of pin11 as an energy storage capacitor to handle the transient high current during Wi-Fi transmission; C6 (1μFX5R) and C7 (100nFX7R) are connected in parallel to the PA_07 pin to achieve wideband decoupling of RF / analog power supply and suppress RF noise; C8 (4.7μFX5R) is connected to the CAP pin to provide a bypass for the MCU's internal voltage regulator, improving power supply stability.

[0037] The current path and working principle of the MCU main control module are as follows: The MCU (U1) operates on a single 3.3V power supply. Power is supplied from the +3.3V network via the VDD33 pin (pins 7 / 9 / 10 / 11), while the PA_07 pin (pin 16) provides independent power to the RF / analog circuitry. C3 to C8 form a multi-stage decoupling network, covering the entire frequency band from low frequency (4.7µF) to high frequency (1nF), ensuring power stability for the MCU during Wi-Fi transmission (instantaneous current can reach over 300mA).

[0038] The crystal oscillator circuit current path is: +3.3V → U1 internal oscillation circuit → X1 (40MHz) → C1 / C2 (15pF load capacitor) → GND. C1 and C2 are connected between the XTAL_IN and XTAL_OUT terminals of X1 and GND respectively, matching the 15pF load capacitor requirement to ensure stable oscillation of the crystal oscillator at 40MHz, with an accuracy of ±10ppm meeting the clock requirements of Wi-Fi communication.

[0039] The MCU, as the core controller of the system, communicates with four RS-232 devices through four UART serial ports (PB_00~PB_07), performs USB debugging communication with the CH340N through PB_19 / PB_20, and provides GPIO expansion through PB_08 / PB_09 / PA_01 / PA_04. MCU_RES is the reset signal, which controls the MCU reset via the CH340N's RTS# pin after current limiting by R2 (330Ω). R2 limits the reset current to prevent damage to the CH340N's output pins. C17 (100nF) provides filtering and debouncing functions for the RESET network. The MCU operates at 3.3V, compatible with TTL level standards.

[0040] See Figure 3 As shown, the RS-232 / TTL level conversion module is a bridge for communication between RS-232 devices and MCUs. The RS-232 / TTL level conversion module uses two SP3232EEN-L / TR dual-channel RS-232 transceivers. Each transceiver realizes bidirectional conversion between two TTL levels and RS-232 levels, forming four completely independent RS-232 communication channels, supporting a maximum transmission rate of 235Kbps.

[0041] In this embodiment, the RS-232 / TTL level conversion module includes two SP3232E transceivers U2 and U3, each transceiver is equipped with 4 charge pump capacitors and 2 EMI filter capacitors; The T1IN (pin11) / R1OUT (pin12) and T2IN (pin10) / R2OUT (pin9) pins of U2 are connected to the PB_06 / PB_07 and PB_02 / PB_03 pins of U1, respectively. The T1OUT (pin14) / R1IN (pin13) and T2OUT (pin7) / R2IN (pin8) pins are connected to the RS-232 external connectors U5 and U6, respectively, to realize the level conversion between channel 1 and channel 2. The T1IN (pin11) / R1OUT (pin12) and T2IN (pin10) / R2OUT (pin9) pins of U3 are connected to the PB_04 / PB_05 and PB_00 / PB_01 pins of U1, respectively. The T1OUT (pin14) / R1IN (pin13) and T2OUT (pin7) / R2IN (pin8) pins are connected to the RS-232 external connectors U8 and U7, respectively, to realize the level conversion between channel 4 and channel 3. A 100nF voltage multiplier capacitor is connected between C1+ (pin2) and C1- (pin3) of each SP3232E chip, a 100nF anti-inverting capacitor is connected between C2+ (pin4) and C2- (pin5), and a 100nF filter capacitor is connected between V+ (pin15) and GND, and between V- (pin6) and GND. Each RS-232 interface transmit and receive lines are connected to GND with a 150pF EMI filter capacitor: C23 and C18 for channel 1, C22 and C19 for channel 2, C24 and C20 for channel 3, and C25 and C21 for channel 4.

[0042] In this embodiment, the signal paths for the four RS-232 channels are as follows: (1) Signal path of channel 1 (U2.CH1): Transmission direction: U1.PB_06 outputs TTL level data (0~3.3V) → U1_TTL_TX network → U2.T1IN (pin11) input → internal level conversion circuit converts TTL signal to RS-232 level (±5.5V~±12V) → U2.T1OUT (pin14) output → U1_RS232_TX network → C23 (150pF) EMI filter → U5.pin3 → external RS-232 device.

[0043] Receiving direction: External RS-232 device outputs RS-232 level data (±3V~±15V) → U5.pin2 → U1_RS232_RX network → C18 (150pF) EMI filter → U2.R1IN (pin13) input → Internal level conversion circuit converts RS-232 signal to TTL level → U2.R1OUT (pin12) output → U1_TTL_RX network → U1.PB_07 input.

[0044] (2) Signal path of channel 2 (U2.CH2): Transmission direction: U1.PB_02→U2_TTL_TX→U2.T2IN (pin10)→Level conversion→U2.T2OUT (pin7)→U2_RS232_TX→C22 filter→U6.pin3→External device.

[0045] Receiving direction: External device → U6.pin2 → U2_RS232_RX → C19 filter → U2.R2IN (pin8) → Level conversion → U2.R2OUT (pin9) → U2_TTL_RX → U1.PB_03.

[0046] (3) Signal path of channel 3 (U3.CH2): Transmission direction: U1.PB_00 → U3_TTL_TX → U3.T2IN (pin10) → Level conversion → U3.T2OUT (pin7) → U3_RS232_TX → C24 filter → U7.pin3 → External device.

[0047] Receiving direction: External device → U7.pin2 → U3_RS232_RX → C20 filter → U3.R2IN (pin8) → Level conversion → U3.R2OUT (pin9) → U3_TTL_RX → U1.PB_01.

[0048] (4) Signal path of channel 4 (U3.CH1): Transmission direction: U1.PB_04 → U4_TTL_TX → U3.T1IN (pin11) → Level conversion → U3.T1OUT (pin14) → U4_RS232_TX → C25 filter → U8.pin3 → External device.

[0049] Receiving direction: External device → U8.pin2 → U4_RS232_RX → C21 filter → U3.R1IN (pin13) → Level conversion → U3.R1OUT (pin12) → U4_TTL_RX → U1.PB_05.

[0050] In this embodiment, the charge pump circuit of each SP3232E is configured as follows: C11 (U2) and C15 (U3): 100nFX7R capacitors, connected to C1+ (pin2) and C1- (pin3) pins, serve as the first-stage voltage multiplier capacitors. They store +5V charge during the charging phase and superimpose the charge onto the +5V power supply during the transition phase, generating a V+ voltage of approximately +10V. C10 (U2) and C14 (U3): 100nFX7R capacitors, connected to C2+ (pin4) and C2- (pin5) pins, serve as the second-stage inverting capacitors, inverting the V+ voltage to generate a V- voltage of approximately -10V; C12 (U2), C16 (U3): 100nFX7R capacitors, connected to V+ (pin15) and GND pins, filtering positive voltage multiplier output and smoothing voltage ripple; C9 (U2) and C13 (U3): 100nFX7R capacitors, connected to V- (pin 6) and GND pins, to filter the negative and inverted outputs and smooth voltage ripple.

[0051] The charge pump operates as follows: The SP3232E integrates a charge pump boost circuit, converting a +5V power supply to the RS-232 level voltage required for ±5.5V to ±12V. During operation, C11 (C1+→C1-) acts as the first-stage voltage multiplier capacitor, storing +5V charge during the charging phase and superimposing it onto +5V during the transition phase to generate approximately +10V (V+) output. C10 (C2+→C2-) acts as the second-stage inverting capacitor, inverting the V+ voltage to generate approximately -10V (V-) output. C12 (V+→GND) and C9 (V-→GND) are filter capacitors for the positive and negative outputs, respectively, smoothing the charge pump output ripple. C13 to C16 in group U3 have the same function.

[0052] The EMI filtering principle is as follows: eight 150pF capacitors (C18 to C25) are connected between the transmit and receive lines of the four RS-232 interfaces and GND, forming a low-pass filter with a cutoff frequency of approximately 1 / (2π×150pF×3kΩ)≈350kHz, which is higher than the maximum RS-232 rate of 235Kbps. This does not affect normal communication signals but can effectively suppress high-frequency EMI interference introduced by long-distance RS-232 transmission.

[0053] In this embodiment, the EMI filtering circuit uses eight 150pF FX7R capacitors (C18-C25), connected in parallel between the transmit and receive lines of the four RS-232 interfaces and GND. Based on the RC low-pass filter cutoff frequency formula f_c=1 / (2πRC), where R is the typical output impedance of the RS-232 interface (3kΩ), the calculated cutoff frequency is approximately 350kHz, higher than the maximum RS-232 transmission rate of 235Kbps. Therefore, it will not affect normal communication signals, but it can effectively suppress the high-frequency electromagnetic interference of hundreds of MHz introduced by long-distance RS-232 transmission, improving the system's electromagnetic compatibility.

[0054] In this embodiment, the USB-to-serial module is crucial for enabling MCU program download and online debugging. This module uses a CH340N chip to achieve bidirectional conversion between USB and UART protocols for MCU program download and online debugging, and supports automatic MCU reset and entry into download mode via the RTS# pin. In this embodiment, the USB-to-serial module includes a CH340N chip U9 and a reset filter capacitor C17; the pin connections of U9 are as follows: VCC (pin1): Connect to the +3.3V power supply network; GND (pin4): Connects to the system's public GND network; UD+ (pin3) and UD- (pin2): These are connected to the D+ and D- pins of USB1 respectively to transmit USB differential signals. TXD (pin6): Connects to pin PB_20 (MCU_RX0) of U1 to send data to the MCU; RXD (pin7): Connects to pin PB_19 (MCU_TX0) of U1 to receive data sent by the MCU; RTS# (pin5): Connected to the RESET pin of U1 through a 330Ω current-limiting resistor R2, it outputs a reset control signal.

[0055] In this embodiment, U9's VCC (pin1) is connected to the +3.3V network, GND (pin4) is connected to the common ground network, and UD+ (pin3) and UD- (pin2) are connected to the D+ and D- pins of USB1, respectively. U9's TXD (pin6) is connected to U1's PB_20 pin (MCU_RX0), and RXD (pin7) is connected to U1's PB_19 pin (MCU_TX0). U9's RTS# (pin5) is connected to U1's RESET pin through a 330Ω current-limiting resistor R2. C17 (100nF) is connected between the RESET network and GND to filter out noise in the reset signal and prevent false resets.

[0056] In this embodiment, the working principle of the USB-to-serial module is as follows: When the USB host is connected to the system through the USB1 interface, the CH340N converts the USB differential signal into a standard UART serial signal, and communicates with the Air101 in full-duplex mode through the TXD / RXD pins to achieve program download and online debugging functions. When firmware needs to be downloaded, the download software on the PC sends a control command through USB, causing the RTS# pin of the CH340N to output a low level. After current limiting by R2, the RESET pin of U1 is pulled low, resetting the MCU and automatically entering the download mode. After the firmware download is completed, the RTS# pin returns to a high level, the MCU automatically resets and runs the user program. C17 (100nF) is connected between the RESET network and GND to filter out high-frequency noise in the reset signal and prevent false resets caused by power fluctuations or electromagnetic interference.

[0057] See Figure 4 As shown, the GPIO expansion module provides four general-purpose MCU I / O pins and +5V and GND power supply pins for expanding functions such as LED status indication, button input, relay control, and sensor access. The GPIO expansion module uses a GH1.25-6PWBPZ1×6P horizontal mount interface U4. Pin 1 connects to U1's PB_08 pin, pin 2 connects to U1's PB_09 pin, pin 3 connects to U1's PA_01 pin, pin 4 connects to U1's PA_04 pin, pin 5 connects to GND, and pin 6 connects to the +5V power supply. The four GPIO pins can be independently configured as input or output modes via software, with a maximum drive current of 12mA.

[0058] The four GPIO pins can be independently configured as input or output modes via software. Typical applications include: Output mode: Drives LED indicators to indicate power status, Wi-Fi connection status, and communication status of 4 RS-232 channels through different flashing frequencies; Input mode: Connect to the touch button to achieve functions such as device reset, parameter factory reset, and manual triggering of data acquisition; Control mode: The relay is driven by a transistor or optocoupler to realize the switching control of external devices; Sensor interface: Connects to analog sensors (requires an external ADC) or digital sensors (such as temperature and humidity sensors) to collect environmental parameters.

[0059] The connection between the GPIO expansion interface U4 (GH1.25-6P) and the MCU is as follows: pin1 (PB_08) connects to the PB_08 pin of U1, pin2 (PB_09) connects to the PB_09 pin of U1, pin3 (PA_01) connects to the PA_01 pin of U1, pin4 (PA_04) connects to the PA_04 pin of U1, pin5 connects to the GND common ground network, and pin6 connects to the +5V power supply network. The four GPIO pins (PB_08, PB_09, PA_01, PA_04) can be used for extended functions. Typical applications include LED status indicators, button inputs, relay control, and sensor interfaces. The specific functions of the GPIOs are defined by software; hardware design must consider pin drive capability (maximum approximately 12mA) and 3.3V level compatibility. The +5V power supply pins can provide power to external modules; the maximum power supply capability is limited by the 1.8A rated current of the USB interface.

[0060] The RS-232 external connector uses four independent WAFER-PH2.0-4PWB surface mount interfaces U5 to U8, with a pin pitch of 2.0mm, a rated current of 2A, reliable connection, and easy plugging and unplugging. Each interface includes GND, RS232_RX, RS232_TX, and a +5V auxiliary power supply pin, which can directly power external low-power RS-232 devices. Specifically: pin1=GND, pin2=RS232_RX, pin3=RS232_TX, pin4=+5V. The +5V pin can provide auxiliary power to external low-power RS-232 devices (such as serial sensors and small PLCs). The maximum total power supply current is limited by the USB interface's rated current of 1.8A. When using it, you should carefully calculate the total power consumption to avoid exceeding the USB interface's capacity. In this embodiment, the RS-232 external connector includes four WAFER-PH2.0-4PWB1×4P horizontal mounting interfaces U5 to U8. For each interface, pin1 is GND, pin2 is RS232_RX, pin3 is RS232_TX, and pin4 is +5V auxiliary power supply. The maximum total current of the +5V auxiliary power supply is limited by the 1.8A rated current of the USB interface.

[0061] The overall workflow of the gateway circuit of this invention is as follows: 1. Power-on Initialization: The system obtains +5V power through the USB1 interface, and LDO1 immediately outputs 3.3V power to supply the MCU and CH340N. After power-on, C17 provides approximately 10ms power-on delay for the MCU reset pin, ensuring that the MCU completes the power-on reset after the power supply stabilizes. After the Air101 starts up, it sequentially completes the system clock configuration, initialization of the 4-channel UART serial ports (default baud rate 9600bps, 8 data bits, 1 stop bit, no parity), GPIO direction configuration, and Wi-Fi network connection (default STA mode, SSID and password can be configured via AT commands).

[0062] 2. Level Conversion Preparation: After the two SP3232E chips are powered on, the internal charge pump starts working and completes the establishment of ±10V voltage within about 10ms, preparing for RS-232 level conversion.

[0063] 3. Data Transmission (MCU → External Device): The Air101 receives data frames from the host computer via Wi-Fi, parses them, and assigns them to the corresponding UART serial port according to the target channel number. The data is then transmitted to the T1IN / T2IN pins of the SP3232E at TTL level (0~3.3V). The SP3232E's internal driver converts the TTL signal to RS-232 level (±5.5V~±12V), outputs it through the T1OUT / T2OUT pins, filters out high-frequency interference through a 150pF EMI filter capacitor, and then transmits it to the corresponding external device through the RS-232 external interface.

[0064] 4. Data Reception (External Device → MCU): Data frames sent by external RS-232 devices enter the system through the RS-232 external interface. After being filtered by a 150pF EMI filter capacitor, they are input to the R1IN / R2IN pins of the SP3232E. The internal receiver of the SP3232E converts the RS-232 signal to TTL level and outputs it to the corresponding UART serial port of the Air101 through the R1OUT / R2OUT pins. After receiving the data, the Air101 encapsulates it into TCP / IP data packets and uploads them to the host computer via the Wi-Fi network.

[0065] 5. USB Debugging and Firmware Download: Developers connect the PC to the gateway via a USB cable. The serial port debugging software on the PC communicates with the Air101 through the CH340N to view system operation logs, modify serial port parameters, and configure the Wi-Fi network. When firmware updates are required, the download software automatically controls the RTS# pin of the CH340N to pull down the MCU reset signal, causing the MCU to enter download mode. After the firmware is burned, it automatically resets and runs.

[0066] 6. Parallel Communication and Status Indication: The four RS-232 channels operate completely independently without interference. The Air101 achieves parallel transmission and reception of data across the four channels through a multi-tasking mechanism. GPIO pins can be connected to LED indicators; for example, a solid power indicator indicates normal system power supply, a flashing Wi-Fi indicator indicates network connection is in progress (solid light indicates successful connection), and flashing channel indicators indicate data transmission is in progress on the corresponding channel.

[0067] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit the scope of protection of the invention. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on these embodiments, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art can still combine, add, delete, or otherwise adjust the features of the various embodiments of the present invention according to the circumstances without conflict or creative effort, thereby obtaining different technical solutions that do not fundamentally depart from the concept of the present invention. These technical solutions also fall within the scope of protection of the present invention.

Claims

1. A multi-channel RS-232 serial gateway circuit based on Air101, characterized in that, Includes a power management module, an MCU main control module, an RS-232 / TTL level conversion module, a USB to serial port module, a GPIO expansion module, and a 4-channel RS-232 external connector; The power management module adopts a single power input and dual-rail output architecture, outputting two independent power supplies: a first voltage and a second voltage. The first voltage powers the RS-232 / TTL level conversion module, the GPIO expansion module, and the RS-232 external connector, while the second voltage powers the MCU main control module and the USB to serial port module. The MCU main control module has a built-in microcontroller with wireless communication function. It is connected to the RS-232 / TTL level conversion module through 4 independent hardware UART interfaces to realize the parallel reception, processing and transmission of 4 serial port data, and complete the protocol conversion between wireless and wired. The RS-232 / TTL level conversion module uses at least two dual-channel RS-232 transceivers. Each transceiver implements bidirectional conversion between two TTL levels and RS-232 levels, together forming four completely independent RS-232 communication channels. The USB-to-serial module enables bidirectional conversion between USB and UART protocols, is used for MCU program downloading and online debugging, and supports automatic control of MCU reset to enter download mode; The GPIO expansion module brings out multiple general-purpose IO pins and power supply pins. The four RS-232 external connectors are connected one-to-one with the four channels of the RS-232 / TTL level conversion module. Each interface integrates an auxiliary power supply pin.

2. The multi-channel RS-232 serial gateway circuit based on Air101 as described in claim 1, characterized in that, The power management module uses a single USB 5V power input, with the first voltage being +5V and the second voltage being +3.3V; The power management module includes a USB-Micro female connector USB1, a low dropout linear regulator LDO1, and a pull-up resistor R1; The VCC pin of USB1 is connected to the +5V main power network, the D+ and D- pins are connected to the corresponding pins of the USB to serial port module, and the GND pin is connected to the system common ground network. The VIN pin of LDO1 is connected to the +5V network, the VOUT pin outputs the +3.3V power supply network, and the CE pin is connected to the +5V network through a 330Ω pull-up resistor R1, ensuring that the LDO immediately enters the enabled state after power-on and continuously and stably outputs 3.3V.

3. The multi-channel RS-232 serial gateway circuit based on Air101 as described in claim 2, characterized in that, The LDO1 uses the ME6211C33M5G-N chip, with an input voltage ≤6V, an output current of 500mA, and a voltage drop of 260mV@200mA. The +5V network simultaneously powers the VCC pins of the two RS-232 transceivers, the +5V pins of the GPIO expansion module, and the +5V pins of the four RS-232 external connectors. The +3.3V network powers all VDD33 pins of the microcontroller, the RF / analog power pins, and the VCC pin of the USB to serial module.

4. The multi-channel RS-232 serial gateway circuit based on Air101 as described in claim 1, characterized in that, The microcontroller is an Air101 Wi-Fi microcontroller, which uses a QFN-32 package, has a built-in 2.4GHz Wi-Fi 802.11b / g / n protocol stack, and operates at 3.3V. The PB_06 / PB_07, PB_02 / PB_03, PB_00 / PB_01, and PB_04 / PB_05 pins of the Air101 form four independent UART interfaces, which are connected to the corresponding TTL side pins of the two RS-232 transceivers. The PB_19 / PB_20 pins of the Air101 are connected to the RXD / TXD pins of the USB to serial port module to form a full-duplex USB debug serial port. The RESET pin of the Air101 is connected to the control pin of the USB to serial port module through a 330Ω current-limiting resistor R2 to realize the automatic reset download function.

5. The multi-channel RS-232 serial gateway circuit based on Air101 as described in claim 4, characterized in that, The MCU main control module also includes a 40MHz crystal oscillator X1, load capacitors C1 / C2 and multi-stage power supply decoupling capacitors C3 to C8; Crystal X1 is connected between the XTAL_IN and XTAL_OUT pins of Air101. C1 and C2 are both 15pF NP0 capacitors, which are connected between the two ends of X1 and GND respectively, to match the 15pF load capacitance requirement of the crystal oscillator and provide a master clock reference with ±10ppm accuracy. Decoupling capacitors C3 and C4 are connected in parallel to the digital power pin of Air101, C5 is connected to the main power pin as an energy storage capacitor, C6 and C7 are connected in parallel to the RF / analog power pin, and C8 is connected to the CAP pin as an internal regulator bypass capacitor, forming a wideband decoupling network covering 1nF to 4.7μF.

6. The multi-channel RS-232 serial gateway circuit based on Air101 as described in claim 1, characterized in that, Both dual-channel RS-232 transceivers are SP3232EEN-L / TR chips, supporting a wide voltage supply of 3.0V to 5.5V. Each chip integrates two independent transmitters and receivers, with a maximum transmission rate of 235Kbps. The T1IN / R1OUT and T2IN / R2OUT pins of the first SP3232E transceiver U2 are connected to the first and second UART interfaces of the microcontroller, respectively, and the T1OUT / R1IN and T2OUT / R2IN pins are connected to the first and second RS-232 external connectors, respectively. The T1IN / R1OUT and T2IN / R2OUT pins of the second SP3232E transceiver U3 are connected to the fourth and third UART interfaces of the microcontroller, respectively, and the T1OUT / R1IN and T2OUT / R2IN pins are connected to the fourth and third RS-232 external connectors, respectively.

7. A multi-channel RS-232 serial gateway circuit based on Air101 as described in claim 6, characterized in that, Each SP3232E transceiver is equipped with four 100nFX7R charge pump capacitors. A voltage multiplier capacitor is connected between C1+ and C1-, an anti-inverting capacitor is connected between C2+ and C2-, and filter capacitors are connected between V+ and GND and between V- and GND to convert the +5V power supply into an RS-232 drive voltage of ±5.5V to ±12V. Each RS-232 interface transmit and receive lines are connected to GND with a 150pF FX7REMI filter capacitor to form a low-pass filter with a cutoff frequency of 350kHz, which suppresses high-frequency electromagnetic interference introduced by long-distance RS-232 transmission.

8. The multi-channel RS-232 serial gateway circuit based on Air101 as described in claim 1, characterized in that, The USB to serial port module includes a CH340N chip U9 and a reset filter capacitor C17. The VCC pin of U9 is connected to the +3.3V network, the GND pin is connected to the common ground network, and the UD+ and UD- pins are connected to the D+ and D- pins of USB1, respectively. The TXD pin of U9 is connected to the debug serial port receive pin of the microcontroller, and the RXD pin is connected to the debug serial port transmit pin of the microcontroller. The RTS# pin of U9 is connected to the RESET pin of the microcontroller through a 330Ω current-limiting resistor R2. C17 is connected between the RESET network and GND to filter out noise in the reset signal and prevent false resets.

9. A multi-channel RS-232 serial gateway circuit based on Air101 as described in claim 1, characterized in that, The GPIO expansion module adopts the GH1.25-6PWBPZ1×6P horizontal mounting interface U4, which brings out 4 general-purpose IO pins and +5V and GND power supply pins. Pins 1 to 4 of U4 are connected to the microcontroller's pins PB_08, PB_09, PA_01, and PA_04 respectively. Pin 5 is connected to GND, and pin 6 is connected to the +5V power supply. The four GPIO pins can be independently configured as input or output modes via software, with a maximum drive current of 12mA and support for 3.3V level input and output.

10. A multi-channel RS-232 serial gateway circuit based on Air101 as described in claim 1, characterized in that, The four RS-232 external connectors all use WAFER-PH2.0-4PWB1×4P horizontal surface mount interface. For each interface, pin1 is GND, pin2 is RS232_RX, pin3 is RS232_TX, and pin4 is +5V auxiliary power supply. The maximum total current of the +5V auxiliary power supply is limited by the 1.8A rated current of the USB interface.