Introduction:
(Another set of sloppy works by DataSheet boy)
(The PCB and physical pictures of the released version are slightly different from those shown here. This is because the physical pictures are all made and debugged based on the semi-finished version, with many bugs. The released version has corrected these bugs)
The reason for doing this is that when debugging the microcontroller, the computer USB needs to hang a string of devices: serial port, STLINK/USBASP/USB-BLASTER, logic analyzer, etc. These must be connected to a HUB and then connected to the computer, otherwise the interface will not be enough.
I often debug some power supply works, many of which have high voltages that can damage fragile digital circuits. So one day, when I unplugged the DuPont line on the power evaluation board, a burnt smell came from the HUB, scrapping all the debuggers on it, and the mouse receiver and the computer's native USB were also implicated and burned.
So this Swiss Army knife-style design was produced, which may be convenient for some embedded hardware dogs or provide reference
parameters for those who design similar products:
L*W*H: 98*75*30mm
DC port input voltage: 4.5~15.5V
Type-C port power supply voltage: 4.5~5.5V (DIRUPWR connected)
4.5~15.5V (DIRUPWR disconnected)
Type-C port PD application voltage: 15V
Input interface: USB type-C USB2.0 480MBps
Output interface: USB-A female port USB2.0 480MBps non-isolated *4
USB-A female port USB2.0 12MBps isolated *4
UART 2M BRR isolated *1
UART 2M BRR isolated *1 or I2C >400K isolated *1
Maximum output current: 0.5A
Usage:
The HUB has 3 power sources: USB-C port direct supply, USB-C port PD high voltage, DC port external high voltage (external negative and internal positive)
In the former mode, please press the "DIRUPWR" button to ensure that each circuit that relies on 5V voltage to work gets enough voltage. In the latter two modes, be sure to disconnect this switch to prevent high voltage from damaging these circuits.
After the 5V circuit is powered on, the red "PWR" LED lights up.
The power supply of the isolation interface part can be controlled by the "ISOPWR" switch.
After the isolation part generates enough voltage, the yellow "ISO5V" LED lights up.
The pin definition of the debugging interface is provided on the PCB board. If the isolated power supply is disconnected, these interfaces will not work.
The power supply of the CH340 host side cannot be disconnected
. CH341 has two mutually exclusive functions of I2C/UART, which are determined by the state of the toggle switch when powered on. The "CH341PWR" switch provides a way to switch the CH341T function without disconnecting the main power supply. It can also be disconnected when not in use to reduce power consumption.
The green "UART" LED lights up in UART mode and the blue "I2C" LED lights up in I2C mode.
Design and options:
(See the schematic illustration for the specific architecture)
The 4-port low-speed isolation and 4-port high-speed non-isolation solution should meet most embedded debugging needs.
This requires 3 4-port USB HUB chip, FE8.1 Under the premise of meeting the speed, the peripheral
interface is simple and the short port and vertical plug style are selected.
The USB isolation uses ADI's ADUM4160. The peripheral is simple, but the speed is limited to 12MBps.
The remaining two USB channels are used for the built-in debugging interface.
One UART dedicated channel chooses the commonly used CH340G (CH340C can also be used, and the crystal oscillator can be omitted).
The other channel has I2C debugging requirements, so CH341T is selected, which is moderately priced.
UART isolation uses CA-IS3721, which can provide high-speed bidirectional isolation; UART signal isolation chooses Π131U31, which does not require speed; I2C isolation uses Π220N31
USB-C The PD decoy chip uses IP2721, which provides 15V decoy voltage output. When used in an interface that supports PD output, the external power supply can be omitted.
The power supply step-down chip uses MT2496, which provides high efficiency and 2A current output in a small SOT23-6 package (can be replaced by SY8113).
The isolated power supply uses a flyback topology circuit with a boost chip as the core. For calculation details, see the schematic diagram notes.
Four 15mm high copper columns/nylon columns are also required for support, as well as matching screws, nuts and other hardware.
Welding and debugging:
Use LiChuang EDA to design, and free proofing is also available for 4-layer board designs. The board thickness can be selected from 1 to 1.6mm. Thicker boards have higher mechanical strength.
Welding must be distributed. After welding and debugging one part, proceed to the next part to prevent possible damage from spreading and facilitate DEBUG.
First, plug in 8 USB ports:
Then use solder paste to solder the patch parts of the primary power supply:

Test the input decoy and 5V step-down circuit; then solder the patch part of the isolated power supply:

Then start winding the isolated power supply transformer: Based on EE16 4+4 horizontal bobbin (parameters are provided in the schematic diagram notes)
Wind 1/2 primary winding according to the pin position and direction shown in the figure. The total length is 120cm. 0.35 enameled wire is wound in parallel for 9 turns: (the other half of the bobbin was accidentally broken)

The remaining wire ends are used as the remaining half of the primary winding, and 9mm high-temperature tape is wound around 3 turns;
then wind the secondary main winding (5V winding) as shown in the figure. 64cm triple insulated wire with a diameter of 0.2mm is wound in parallel for 6 turns, and after winding a circle of high-temperature tape, it is folded back

and wound 2 more circles of high-temperature tape
. Then wind the other two secondary windings as shown in the figure:

After 3 turns of high-temperature tape, wind the remaining wire ends of the primary winding back from the other end of the transformer and weld them to the frame, wrap the last insulating tape
and install the magnetic core. Use methods such as padding air gap/grinding air gap to control the primary open-circuit inductance to 7uH. At this time, the height of the padding air gap is 0.9mm.

Solder the primary HUB circuit, install the transformer and other isolated power supply direct plug-in

test these two circuits.
Please weld and debug the remaining isolated HUB, CH340, and CH341 by yourself step by step
This design does not have any programmable devices and does not require programming, but requires drivers for CH340 and CH341.
Physical pictures and debugging pictures:

(Front side during operation)

(Back side during operation)

(Simplified finished product of 1cm heat sink and 15mm nylon column)

(CH340 XIN)

(CH340 XOUT)

(CH341T XIN)

(CH341T XOUT)
Some waveforms of 5V step-down power supply:

(MT2496 15VIN no-load SW)

(MT2496 15VIN 500mAOUT SW)

(XL4019 5VIN 500mA SW)

(XL6019 5V no-load SW)

(XL6019 15V no-load SW)

(XL6019 15V 500mAOUT SW)
Use the software provided in the attachment to test CH340 CH341T:

(CH340 CH341T serial port pairing)

(CH341T I2C mode reads LM75A temperature register)