
This project introduces a DTU box based on the ESP32-S3 microcontroller,
using the ESP32-S3 as the main controller. It allows for network connectivity via Ethernet, 4G, and Wi-Fi, transmitting collected RS485 device data to a DTU box at a target IP address. The project offers flexible development options for the ESP32, including IDF, Arduino, and MicroPython. Wired or wireless connections are supported. Power can be supplied via 5V USB or a wide voltage DC power supply. A configurable serial port with a target IP address facilitates easy data transmission to the target platform. The DTU box is designed to fit standard dimensions, serving as a data development and verification platform.
I. Networking Modes
1. W5500 Ethernet Connection
: Ethernet provides a stable wired connection. Simply connect the box and router with a network cable for easy network connectivity. The W5500 uses an SPI interface for high data transfer rates, and the driver code is readily available for various driver methods. The W55500 has a built-in complete TCP/IP protocol stack, easily implementing network protocols such as TCP, UDP, and HTTP, and also supporting the more flexible MQTT protocol. The use of the W5500 chip reduces the network load on the main processor. Although the ESP32S3 chip itself can connect via Wi-Fi, wired Ethernet connections are more stable and can be used as a high-speed backup solution.
2. ML307R-4G Connection:
The ML307R is a newly launched 4G CAT1 module from China Mobile. It can be developed using AT commands, which is more lightweight than Ethernet protocol drivers. AT commands include instructions for data transmission to common telecom AEP platforms, Onenet platforms, or private MQTT personal server platforms, and can also be easily used for network development using TCP, UDP, and HTTP protocols. As a wireless wide area network connection, the 4G module is not limited by location, as long as a 4G network can be received.
3. WIFI Connection:
WIFI connection is the most readily available networking method and is an inherent networking method of the ESP32. It offers the best compatibility during development and is the most widely used and easiest to obtain among all development methods.
II. Power Supply Modes:
1. 5V USB Power Supply:
It can be directly powered using the 5V USB port. An adapter resistor is added to the interface. It can be directly connected to a computer via a USB data cable, serving both power supply and data download functions.
2. DC Wide Voltage Power Supply:
It uses a 12V to 24V DC power supply. This wide voltage supply can fully handle the peak current spikes that may occur during the instantaneous startup and connection of 4G, Ethernet, and WIFI modules. The TPS54331 chip is used for voltage conversion, supporting a maximum current drive capability of 2A.
III. Interfaces:
1. USB Interface:
The USB interface serves as the program download and debugging interface, directly connecting to the computer. The serial port chip used is CH340C, designed with an automatic download circuit.
2. Ethernet Interface:
A standard RJ45 interface.
3. The RS485 interface
features a TVS protection chip and has four wires: VCC (12V), 485A, 485B, and GND. It includes a 120Ω terminating resistor, and the jumper cap position can be changed to select whether to use it.
4. The antenna
is a commonly used rod-shaped 4G antenna with good gain.
5. The power supply interface
uses a DC power connector.
IV. Pictures and Attachments


