TTL serial port to Ethernet circuit of single-chip microcomputer
By designing a TTL serial-to-Ethernet circuit for a microcontroller, the problems of short communication distance, low speed, and inability to remotely monitor microcontroller serial ports are solved. This enables efficient and transparent data transmission and remote management between the microcontroller and the host computer, and is suitable for industrial control and Internet of Things applications.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- HUARUAN TECH CO LTD
- Filing Date
- 2025-05-09
- Publication Date
- 2026-05-01
AI Technical Summary
In the existing technology, serial communication of microcontrollers has problems such as limited communication distance, low transmission rate and inability to achieve remote monitoring, making it difficult to achieve efficient data transmission and remote management between microcontrollers and host computers.
Design a TTL serial-to-Ethernet circuit for a microcontroller. Through a microcontroller chip interface circuit, a power supply circuit, and a serial-to-Ethernet circuit, the TTL serial port data of the microcontroller is converted into Ethernet protocol data, realizing transparent data transmission between the microcontroller and the host computer.
It enables efficient data transmission and remote management between the microcontroller and the host computer, increases the communication types of the device, and meets the flexibility and efficiency requirements of industrial control and Internet of Things applications.
Smart Images

Figure CN224190494U_ABST
Abstract
Description
A TTL serial-to-Ethernet circuit for a microcontroller Technical Field
[0001] This application relates to the field of electronic control technology, and in particular to a TTL serial-to-Ethernet circuit for a microcontroller. Background Technology
[0002] In the field of industrial control, microcontrollers are a commonly used embedded controller, often used for tasks such as data acquisition, equipment control, and program execution status monitoring. To record program execution or print data, microcontrollers typically need to communicate with a host computer to transmit data for storage and analysis.
[0003] Traditionally, this type of communication is mainly achieved through serial ports (such as RS232, RS485, etc.). However, with the development of industrial automation and IoT technologies, traditional serial communication methods have gradually revealed the following shortcomings:
[0004] Limited communication distance: Serial communication is typically suitable for short-distance transmission and cannot meet the needs of long-distance data transmission;
[0005] Low transmission rate: Serial communication typically has a low rate, making it difficult to meet the real-time transmission requirements of large amounts of data.
[0006] Unable to achieve remote monitoring: Traditional serial communication methods cannot be directly connected to the network, which limits the remote monitoring and management capabilities of the device. Summary of the Invention
[0007] The purpose of this application is to provide a TTL serial-to-Ethernet circuit for a microcontroller, which solves the problem that it is difficult to achieve bidirectional transparent data transmission from the microcontroller's serial port to the Ethernet port in the existing technology, and that there are limited communication types between the microcontroller and the host computer.
[0008] To achieve the above objectives, this application provides a TTL serial-to-Ethernet circuit for a microcontroller. The TTL serial-to-Ethernet circuit consists of a microcontroller chip interface circuit, a power supply circuit, and a serial-to-Ethernet circuit. The power supply circuit is connected to both the microcontroller chip interface circuit and the serial-to-Ethernet circuit.
[0009] The microcontroller chip interface circuit is used to control the high and low levels of the pins, thereby controlling the transmission and reception of data information via the serial port. The TX and RX pins of the microcontroller serial port of the microcontroller chip interface circuit are respectively connected to the serial-to-Ethernet chip in the serial-to-Ethernet circuit, which is used to convert the data information transmitted and received via the serial port into Ethernet protocol data.
[0010] Furthermore, the information transmission of the serial port USART1 of the microcontroller chip interface circuit is controlled by pin PA9, with the network label USART1_TX, and pin PA9 is the TX pin used for transmitting information;
[0011] Information reception is controlled by pin PA10, network label USART1_RX, and pin PA10 is the RX pin used for transmitting information.
[0012] Furthermore, the power supply circuit includes a first step-down circuit and a second step-down circuit, wherein the first step-down circuit converts the voltage from 24V to 5V, and the second step-down circuit converts 5V to 3.3V.
[0013] Furthermore, the first buck circuit consists of a PWM converter, resistors, capacitors, and diodes, specifically including:
[0014] The boot pin of the PWM converter is connected to capacitor C55, the other end of capacitor C55 is connected to the PH pin, the EP pin is grounded, the first NC pin and the second NC pin are disconnected, the VSENSE pin is connected to resistors R150 and R151 respectively, the other end of resistor R150 is connected to the 5V network, the other end of resistor R151 is connected to the GND network, the PH pin is also connected to the cathode of diode D81 and inductor L2, the VIN pin is connected to capacitor C64 and the 24V network, the other end of capacitor C64 is connected to the anode of diode D81, the GND network and the GND pin respectively, and the ENA pin is disconnected.
[0015] Furthermore, the other end of the inductor L2 is connected to the positive terminal of the polarized capacitor C56, the positive terminal of the polarized capacitor C57, the capacitor C58, the cathode of the transient suppression diode T7, and the 5V network.
[0016] The anode of the diode D81 is connected to the cathode of the polarized capacitor C56, the cathode of the polarized capacitor C57, the capacitor C58, and the anode of the transient suppression diode T7, respectively.
[0017] Furthermore, the second step-down circuit consists of a voltage regulator chip, a capacitor, and a transient suppression diode, specifically including:
[0018] The GND pin of the voltage regulator chip is connected to the GND network, and the VOUT pin is connected to the TAB pin, the positive terminal of the polarized capacitor C60, capacitors C66 and C62, the cathode of the transient suppression diode T8, the positive terminal of the polarized capacitor C61, and capacitor C63.
[0019] The positive terminal of the polarized capacitor C60, capacitors C66 and C62, the cathode of the transient suppression diode T8, the positive terminal of the polarized capacitor C61, and capacitor C63 are also connected to a 3.3V network.
[0020] The negative terminal of the polarized capacitor C60 is connected to capacitors C66 and C62, the anode of transient suppression diode T8, the negative terminal of polarized capacitor C61, and capacitor C63. At the same time, the negative terminal of polarized capacitor C60, capacitors C66 and C62, the anode of transient suppression diode T8, the negative terminal of polarized capacitor C61, and capacitor C63 are also connected to the GND network.
[0021] The VIN pin is connected to the 5V network and one end of capacitor C65, the other end of which is connected to the GND network.
[0022] Furthermore, the power supply circuit also includes an LED display circuit, which is composed of resistors and LED light-emitting diodes, specifically including:
[0023] A 3.3V network is connected to a resistor R152, the other end of which is connected to the anode of a light-emitting diode D82, and the cathode of the light-emitting diode D82 is grounded.
[0024] Furthermore, the serial-to-Ethernet circuit consists of a serial-to-Ethernet chip, capacitors, and filter resistors, specifically including:
[0025] Pin 8 of the serial-to-Ethernet chip is connected to resistor R12, and the other end of resistor R12 is connected to USART1_TX. Pin 9 is connected to resistor R13, and the other end of resistor R13 is connected to USART1_RX. Pins 10, 13, and 14 are grounded. Pin 11 is connected to filter capacitors C12 and C13, respectively, and the other ends of filter capacitors C12 and C13 are grounded.
[0026] The ends of the filter capacitors C12 and C13 connected to pin 11 are also connected to the 3.3V network.
[0027] As can be seen from the above, the technical solution provided in this application can convert the TTL serial port data of the microcontroller into Ethernet protocol data through the microcontroller chip interface circuit, power supply circuit, and serial-to-Ethernet circuit, realizing transparent transmission of microcontroller serial port data and TCP / IP / UDP data, enabling devices to communicate via the network. This achieves efficient data transmission and remote management while retaining the compatibility of traditional serial port devices, providing a flexible and efficient solution for industrial control and IoT applications, and increasing the types of communication between the microcontroller and the host computer. Attached Figure Description
[0028] Figure 1 is a schematic diagram of the architecture of a TTL serial-to-Ethernet circuit for a single-chip microcomputer in an embodiment of this application;
[0029] Figure 2 is a schematic diagram of the microcontroller chip interface circuit in a TTL serial-to-Ethernet circuit of a microcontroller in an embodiment of this application;
[0030] Figure 3 is a schematic diagram of the power supply circuit in a TTL serial-to-Ethernet circuit of a microcontroller in an embodiment of this application.
[0031] Figure 4 is a schematic diagram of the serial-to-Ethernet circuit in a TTL serial-to-Ethernet circuit of a microcontroller in an embodiment of this application. Detailed Implementation
[0032] To enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this application.
[0033] In the field of industrial control, if a microcontroller wants to print out data information and record the program's running status, a host computer needs to save the data information. In this case, the communication between the microcontroller and the host computer will use serial-to-Ethernet technology.
[0034] Alternatively, the goal might be to achieve transparent transmission of microcontroller serial port data and TCP / IP / UDP data, enabling devices to communicate over a network, also using serial-to-Ethernet technology. Based on these scenarios, a microcontroller TTL serial-to-Ethernet circuit needs to be developed to meet these requirements.
[0035] This utility model provides a TTL serial-to-Ethernet circuit for a microcontroller. Please refer to Figure 1. The TTL serial-to-Ethernet circuit consists of a microcontroller chip interface circuit, a power supply circuit, and a serial-to-Ethernet circuit. The power supply circuit is connected to the microcontroller chip interface circuit and the serial-to-Ethernet circuit respectively.
[0036] The microcontroller chip interface circuit is used to control the high and low levels of the pins, thereby controlling the transmission and reception of data information via the serial port. The TX and RX pins of the microcontroller serial port of the microcontroller chip interface circuit are respectively connected to the serial-to-Ethernet chip in the serial-to-Ethernet circuit, which is used to convert the data information transmitted and received via the serial port into Ethernet protocol data.
[0037] Further, referring to Figure 2, the information transmission of the serial port USART1 of the microcontroller chip interface circuit is controlled by pin PA9, network label USART1_TX, and pin PA9 is the TX pin used for transmitting information; the information reception is controlled by pin PA10, network label USART1_RX, and pin PA10 is the RX pin used for transmitting information.
[0038] The microcontroller's serial port is USART1. Transmission is controlled by pin PA9 (network label: USART1_TX), and reception is controlled by pin PA10 (network label: USART1_RX). By controlling the high and low levels of these pins, the transmission and reception of data via the serial port are controlled.
[0039] Further, referring to Figures 1 and 3, the power supply circuit includes a first step-down circuit and a second step-down circuit. The first step-down circuit converts the voltage from 24V to 5V, and the second step-down circuit converts 5V to 3.3V.
[0040] In the power supply circuit, the first step-down circuit uses the TPS5450DDAR chip, which reduces the input voltage from 24V to 5V. Since the microcontroller and serial-to-Ethernet converter are powered by 3.3V, a stable step-down chip is needed to reduce the voltage from 5V to 3.3V. Therefore, the AMS1117 chip is selected to provide a stable and continuous power supply to the microcontroller and other circuits that require 3.3V.
[0041] Further, referring to Figure 3, the first buck circuit consists of a PWM converter, resistors, capacitors, and diodes, specifically including:
[0042] The boot pin of the PWM converter is connected to capacitor C55, the other end of capacitor C55 is connected to the PH pin, the EP pin is grounded, the first NC pin and the second NC pin are disconnected, the VSENSE pin is connected to resistors R150 and R151 respectively, the other end of resistor R150 is connected to the 5V network, the other end of resistor R151 is connected to the GND network, the PH pin is also connected to the cathode of diode D81 and inductor L2, the VIN pin is connected to capacitor C64 and the 24V network, the other end of capacitor C64 is connected to the anode of diode D81, the GND network and the GND pin respectively, and the ENA pin is disconnected.
[0043] The other end of the inductor L2 is connected to the positive terminal of the polarized capacitor C56, the positive terminal of the polarized capacitor C57, capacitor C58, the cathode of the transient suppression diode T7, and the 5V network.
[0044] The anode of the diode D81 is connected to the cathode of the polarized capacitor C56, the cathode of the polarized capacitor C57, the capacitor C58, and the anode of the transient suppression diode T7, respectively.
[0045] The second step-down circuit consists of a voltage regulator chip, a capacitor, and a transient suppression diode, specifically including:
[0046] The GND pin of the voltage regulator chip is connected to the GND network, and the VOUT pin is connected to the TAB pin, the positive terminal of the polarized capacitor C60, capacitors C66 and C62, the cathode of the transient suppression diode T8, the positive terminal of the polarized capacitor C61, and capacitor C63.
[0047] The positive terminal of the polarized capacitor C60, capacitors C66 and C62, the cathode of the transient suppression diode T8, the positive terminal of the polarized capacitor C61, and capacitor C63 are also connected to a 3.3V network.
[0048] The negative terminal of the polarized capacitor C60 is connected to capacitors C66 and C62, the anode of transient suppression diode T8, the negative terminal of polarized capacitor C61, and capacitor C63. At the same time, the negative terminal of polarized capacitor C60, capacitors C66 and C62, the anode of transient suppression diode T8, the negative terminal of polarized capacitor C61, and capacitor C63 are also connected to the GND network.
[0049] The VIN pin is connected to the 5V network and one end of capacitor C65, the other end of which is connected to the GND network.
[0050] Referring to Figures 1 and 3, the power supply circuit also includes an LED display circuit, which consists of resistors and LED light-emitting diodes, specifically including:
[0051] A 3.3V network is connected to a resistor R152, the other end of which is connected to the anode of a light-emitting diode D82, and the cathode of the light-emitting diode D82 is grounded.
[0052] Further, referring to Figure 4, the serial-to-Ethernet circuit consists of a serial-to-Ethernet chip, capacitors, and filter resistors, specifically including:
[0053] Pin 8 of the serial-to-Ethernet chip is connected to resistor R12, and the other end of resistor R12 is connected to USART1_TX. Pin 9 is connected to resistor R13, and the other end of resistor R13 is connected to USART1_RX. Pins 10, 13, and 14 are grounded. Pin 11 is connected to filter capacitors C12 and C13, respectively, and the other ends of filter capacitors C12 and C13 are grounded.
[0054] The ends of the filter capacitors C12 and C13 connected to pin 11 are also connected to the 3.3V network.
[0055] Referring to Figure 4, U5 is a serial-to-Ethernet chip. At this point, the microcontroller network label USART1_TX needs to be connected to pin 8 on the U5 module, and the microcontroller network label USART1_RX needs to be connected to pin 9 on the U5 module. Pins 10, 13, and 14 of U5 should be connected to ground, and pin 11 of U5 should be connected to a 3.3V voltage source. C12 and C13 are filter capacitors to ensure circuit stability and reliability.
[0056] The foregoing description of various embodiments of this application is provided to those skilled in the art for illustrative purposes. It is not intended to be exhaustive or to limit the invention to a single disclosed embodiment. As mentioned above, various alternatives and variations of this application will be apparent to those skilled in the art to which the foregoing pertains. Therefore, while some alternative embodiments have been specifically discussed, other embodiments will be obvious or readily apparent to those skilled in the art. This application is intended to include all alternatives, modifications, and variations of the invention already discussed herein, as well as other embodiments falling within the spirit and scope of the foregoing application.
Claims
1. A TTL serial-to-Ethernet circuit for a microcontroller, characterized in that, The TTL serial-to-Ethernet circuit consists of a microcontroller chip interface circuit, a power supply circuit, and a serial-to-Ethernet circuit. The power supply circuit is connected to both the microcontroller chip interface circuit and the serial-to-Ethernet circuit. The microcontroller chip interface circuit controls the high and low levels of its pins, thereby controlling the transmission and reception of data information via the serial port. The TX and RX pins of the microcontroller's serial port in the microcontroller chip interface circuit are connected to the serial-to-Ethernet chip in the serial-to-Ethernet circuit, converting the data information transmitted and received via the serial port into Ethernet protocol data.
2. The TTL serial-to-Ethernet circuit according to claim 1, characterized in that, The microcontroller chip interface circuit's serial port USART1 transmits information via pin PA9, network label USART1_TX, and pin PA9 is the TX pin used for transmitting information; information receives information via pin PA10, network label USART1_RX, and pin PA10 is the RX pin used for transmitting information.
3. The TTL serial-to-Ethernet circuit according to claim 1, characterized in that, The power supply circuit includes a first step-down circuit and a second step-down circuit. The first step-down circuit converts the voltage from 24V to 5V, and the second step-down circuit converts 5V to 3.3V.
4. The TTL serial-to-Ethernet circuit according to claim 3, characterized in that, The first step-down circuit consists of a PWM converter, resistors, capacitors, and diodes. Specifically, the boot pin of the PWM converter is connected to capacitor C55, the other end of capacitor C55 is connected to the PH pin, the EP pin is grounded, the first NC pin and the second NC pin are disconnected, the VSENSE pin is connected to resistors R150 and R151 respectively, the other end of resistor R150 is connected to the 5V network, the other end of resistor R151 is connected to the GND network, the PH pin is also connected to the cathode of diode D81 and inductor L2, the VIN pin is connected to capacitor C64 and the 24V network, the other end of capacitor C64 is connected to the anode of diode D81, the GND network and the GND pin respectively, and the ENA pin is disconnected.
5. The TTL serial-to-Ethernet circuit according to claim 4, characterized in that, The other end of the inductor L2 is connected to the positive terminal of the polarized capacitor C56, the positive terminal of the polarized capacitor C57, the capacitor C58, the cathode of the transient suppression diode T7, and the 5V network; the anode of the diode D81 is connected to the negative terminal of the polarized capacitor C56, the negative terminal of the polarized capacitor C57, the capacitor C58, and the anode of the transient suppression diode T7.
6. The TTL serial-to-Ethernet circuit according to claim 3, characterized in that, The second step-down circuit consists of a voltage regulator chip, capacitors, and a transient voltage suppressor diode. Specifically, the GND pin of the voltage regulator chip is connected to the GND network, and the VOUT pin is connected to the TAB pin, the positive terminal of the polarized capacitor C60, capacitors C66 and C62, the cathode of the transient voltage suppressor diode T8, the positive terminal of the polarized capacitor C61, and capacitor C63. The positive terminal of the polarized capacitor C60, capacitors C66 and C62, the cathode of the transient voltage suppressor diode T8, the positive terminal of the polarized capacitor C61, and capacitor C63 are also connected to... The capacitor is connected to the 3.3V network. The negative terminal of the polarized capacitor C60 is connected to capacitors C66 and C62, the anode of transient suppression diode T8, the negative terminal of polarized capacitor C61, and capacitor C63. At the same time, the negative terminals of polarized capacitors C60, C66, C62, T8, C61, and C63 are also connected to the GND network. The VIN pin is connected to the 5V network and one end of capacitor C65, and the other end of capacitor C65 is connected to the GND network.
7. The TTL serial-to-Ethernet circuit according to claim 6, characterized in that, The power supply circuit also includes an LED display circuit, which consists of a resistor and an LED light-emitting diode. Specifically, a 3.3V network is connected to a resistor R152, the other end of the resistor R152 is connected to the anode of the light-emitting diode D82, and the cathode of the light-emitting diode D82 is grounded.
8. The TTL serial-to-Ethernet circuit according to claim 1, characterized in that, The serial-to-Ethernet circuit consists of a serial-to-Ethernet chip, capacitors, and filter resistors. Specifically, pin 8 of the serial-to-Ethernet chip is connected to resistor R12, the other end of resistor R12 is connected to USART1_TX, pin 9 is connected to resistor R13, the other end of resistor R13 is connected to USART1_RX, pins 10, 13, and 14 are grounded, and pin 11 is connected to filter capacitors C12 and C13 respectively, the other ends of filter capacitors C12 and C13 are grounded; the ends of filter capacitors C12 and C13 connected to pin 11 are also connected to a 3.3V network.