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

brianw brianw at audiobanshee.com
Sun Feb 4 22:54:59 CET 2024


You cannot optoisolate a (DC) power source. You can only optoisolate (AC) signals.

When it comes to power sources, you need to filter the supply rails thoroughly and ensure that ground is handled correctly. One big source of noise is high-frequency digital circuits that pull significant current from the supply rail, and thus create noise that analog circuits see. Adequate bypass for every chip can help, because the capacitors provide the switching current, and the supply rail stays rather clean. A small resistor between the cap and rail can help isolate the noise, but you might not always want to take that extreme. Any current that flows in the supply rail will also flow in the ground return, so it's crucial to keep power clean.

Many op-amps have good rejection of supply noise, but you shouldn't really design your circuits to be completely dependent upon power supply noise rejection.

USB Devices are powered by their Host, or a Hub. If I Hub can isolate a Host from a Device, then your USB ports can be isolated in the same way. I personally recommend against designing a USB product that requires a special Hub to be used in order to avoid analog noise.

Mike passed on the comments from Reddit about using DIN MIDI instead of USB-MIDI, but I think that suggestion misses out on something very important. Analog circuits that have no digital clocks are quieter than hybrid circuits, unless the latter is carefully designed. In order to use DIN MIDI, you need a CPU with a clock, and that is an easy way to introduce a lot of noise. Granted, the MIDI Manufacturers Association has lots of documentation on how to handle grounding and shielding and even filtering for (DIN) MIDI, and if you follow those instructions you'll have solved a lot of the potential problems. But you still need to keep the CPU from introducing noise on the ground and power rails.

It's probably true that DIN MIDI is less of a problem than USB-MIDI, but it's not necessarily easy to ensure DIN MIDI doesn't end up adding noise to associated analog signals.

Speaking of the MMA recommendations for ground/shield/filter, the USB Implementors Forum (USB.org) has tons of free documentation. If you dig deep enough, there are recommendations on how to properly connect the shield of the USB jack (and cable) using something like a 1MΩ resistor in parallel with a small capacitance. This gives the shield a connection to ground at high frequencies - where the switching noise is - and not at low frequencies - where DC ground loops can occur. i.e. Never connect the USB shield directly to ground. There are also recommendations for handling the data and power lines for the USB jack. Of course, you have to keep CPU noise out of the ground and supply rails, but you definitely want to get the USB jack filtered properly.

Brian


On Feb 1, 2024, at 2:41 PM, Matthew Skala via Synth-diy <synth-diy at synth-diy.org> wrote:
> On Thu, 1 Feb 2024, Mike Beauchamp wrote:
>> 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.
> 
> I think the real, fundamental problem is the ground.  As long as your
> synth format uses the same 0V for power return and signal reference,
> you're fighting a losing battle if that 0V also has to be connected to
> USB's 0V.
> 
> So if you really want to be serious about it, I guess you have to not have
> that connection:  put the USB "device" side on USB's +5V/0V power, and
> then optoisolate it from the synth's power system with no connections
> between the two.  It might make a lot of sense to translate USB-MIDI into
> the signal that would go over DIN-MIDI, send that through the
> optoisolator, and then everything on the other side is the same as a
> DIN-MIDI interface; however, that's not the only way that it could be
> done.
> 
> As Gerry said, in the message that came through as I was writing this.
> :-)
> 
> I don't know of anyone really doing that and I'm not sure it would be
> commercially viable.  A weaker thing to do would be to just keep the USB
> "device" side powered by USB power and have the 0V connection be the only
> connection shared between the two, at which point you can try to blame any
> remaining problems on the Eurorack power supply's grounding.
> 
> -- 
> Matthew Skala
> North Coast Synthesis Ltd.




More information about the Synth-diy mailing list