[sdiy] How to design out "usb noise"?

brianw brianw at audiobanshee.com
Sun Feb 4 23:13:31 CET 2024


As I mentioned, you can't opto-isolate ground. Ground is a DC "signal" that needs to pass current. For a USB Device that is Bus Powered, all of the current flows through ground.

If you look carefully, these USB isolation chips typically have Zener diodes to protect against over-voltage and static discharge. While they might optically isolate the data lines, D- and D+, they can only filter the VBUS and GND lines. VBUS and GND have to power the Device, unless the Device is self-powered. But even a self-powered Device needs to see a DC "5V" on VBUS before it can drive any of the Data lines.

When designing a synth, your approach depends upon whether you want the synth to be a USB Device, USB Host, or perhaps USB OTG (On The Go). If your synth is a USB Device, then it can connect to a computer to appear as a USB-MIDI Device for input and output, possibly also as a USB Audio Device for digital sound. If your synth is a USB Host - maybe it's just a sound module - then you could attach a USB MIDI piano keyboard and/or USB MIDI control surface. If you're up for a challenge, you could implement OTG and have the synth automatically choose either Host or Device mode depending upon what is attached.

As a USB Device, your synth would likely be self-powered, and only need to look at VUSB and GND on the USB port for the purposes of coordinating the USB firmware for proper communication with your computer. In this case, it might be possible to keep the USB GND completely separate from the rest of your ground. It really depends upon whether the CPU that handles USB has separate pins for USB GND versus the other grounds.

However, if you are designing a small, portable synth as a USB Device, it might make sense to use USB Bus Power, in which case your power comes entirely from the USB Host. In this case, you'll need to make sure that your power supply filters any noise from the USB Host, and you also need to make sure that your CPU and other digital components do not inject noise in your analog circuits.

As a USB Host, your synth might only have a USB port so that you can attach an external piano keyboard and/or control surface. In this case, your synth will be providing power to those external USB Devices, and you'll need to filter the USB power that you provide so that noise doesn't bleed into your analog circuits. As everyone has been saying, the handling of ground throughout the circuit and all interconnections is important.

Finally, as a USB OTG design, your synth would need a CPU that can handle both Host and Device modes of USB (although never both at the same time). USB OTG has all the challenges of USB Host. There's no option for Bus Powered for OTG, expect possibly as a way to change an on-board battery.

Brian


On Feb 1, 2024, at 2:51 PM, Mike Bryant wrote:
> There are plenty of USB opto-isolators on the market which isolate the data and ground line just fine.  However some of the cheaper ones seem to rely on both ends sourcing +5V through the USB connectors  which is a bit of a nonsense of course and can confuse some items that expect to receive +5V.  For these you'll also need a powered hub.
>> From: Mike Beauchamp
>> Sent: 01 February 2024 22:06
>>  
>> I recently stumbled across this post on reddit of someone showing usb 
>> connection causing some serious noise: 
>> https://www.reddit.com/r/synthesizers/comments/1aghqsa/how_to_get_rid_of_usb_noise/
>> 
>> Some comments suggest to use DIN MIDI instead of USB MIDI as a solution, 
>> but it got me wondering if there's a best practice for implementing MIDI 
>> OVER USB output that wouldn't cause this. MIDI spec includes schematics 
>> for hardware implementation of DIN MIDI connections as we know, 
>> including the use of opto-isolator, but I can't find the equivalent for 
>> the USB connection.
>> 
>> A typical USB-B connector has the following pins:
>> 
>> 1. VBUS
>> 2. D-
>> 3. D+
>> 4. GND
>> 5. SHIELD
>> 
>> How do you think these connections should be handled inside the synth, 
>> assuming a hostile environment where connections are also being made 
>> to/from a PC with audio cables, MIDI cables, power adapters to different 
>> outlets/circuits, etc.
>> 
>> Mike




More information about the Synth-diy mailing list