USB controller there is an ESD discharge on the USB Terminal from
whoever is plugging in the controller, ...
This discharge causes the raspberry pi to reboot, ...
Some way to isolate the USB plug ground from the raspberry pi ground? ...
Recently I have the same trouble when using an USB to TTL cable/adapter as a 5V power source to a ESP8266 module. A nearby Rpi3B+ has a floating (from mains ground) switching power supply (220VAC to 12VDC to 5VDC 5A).
When I switch 5V relays connecting mains appliances, from time to time, perhaps some back EMD or EMI causing Rpi to reboot, and in some worst cases even the switching power supply experienced a huge voltage spike (my guess) and even the 12V 5A PSU shuts down (neede to manually power off/power on to restart), by triggering PSU short circuit protection （my guess).
I have two prevention measures:
Use a dedicated 200VAC/12VDC PSU for Rpi. Sometimes I use a rechargeable battery pack (18650 3.7V x 3 = 11.1V) instead of the
mains powered PSU. I also used optoisolated 5V Songle relay modules,
and optoisolated L293D/L298N DC/Stepping motor driver modules. Then
the Rpi intermittently self rebooting problem disappeared.
I also used USB cables with ferrite beads. I read that this prevents the USB cable picking up EMI from spikes caused by ESD or
relay contact sparks/spikes.
- If using a USB/TTL cable, I often use one that has a big cap on the circuit board. I read that this kind of cable prevents many untended
Rpi/ESP8266 reset because of UART signals switching.
- And when in doubt or to play double safe, I have double beads! :)
I once tried to use my scope to display the mains voltage wavform when switching something. But the scope immediately triggered the home MCB and the whole house went dark, ... I know I don't know many things I don't know about mains grounding, so from then on I avoid using the scope to check anything connected to the mains. (I do have a hand held scope with everything floating to check the mains though).
Ferrite bead - Wikipedia
A ferrite bead or ferrite choke is a passive electric component that
suppresses high-frequency noise in electronic circuits. It is a
specific type of electronic choke. Ferrite beads employ high-frequency
current dissipation in a ferrite ceramic to build high-frequency noise
suppression devices. Ferrite beads may also be called blocks, cores,
rings, EMI filters, or chokes.
Ferrite beads prevent electromagnetic interference (EMI) in two
directions: from a device or to a device.
A conductive cable acts as an antenna – if the device produces
radio-frequency energy, this can be transmitted through the cable,
which acts as an unintentional radiator. In this case the bead is
required for regulatory compliance, to reduce EMI. Conversely, if
there are other sources of EMI, such as household appliances, the bead
prevents the cable from acting as an antenna and receiving
interference from these other devices. This is particularly common on
data cables and on medical equipment.
Large ferrite beads are commonly seen on external cabling. Various
smaller ferrite beads are used internally in circuits—on conductors or
around the pins of small circuit-board components, such as
transistors, connectors and integrated circuits.
Ferrite beads are used as a passive low-pass filter, by converting RF
energy to heat, by design. (Contrast this with inductors, which by
design do not convert RF energy to heat, but rather offer a high
impedance to RF.)