USB isolator to prevent earth/ground loop when connecting microcontroller to PC - Page 1
Forum section: electronics / projects

author: Tadaspadas
author_rank: Newbie
timestamp: June 17, 2021, 01:19:06 pm
content: Hello everyone,I am facing a ground/earth loop problem when connecting my device to the PC through the USB cable. The device has a sensor immersed in conductive water together with other electronics there, some of which are potentially connected to the earth. When I want to log data I connect the microcontroller through the USB cable to a PC workstation and suddenly I create an earth loop through the socket and the grid. The microcontroller is sending data to the computer at 2 Hz frequency with a baud rate of 115200.In order to prevent this issue, I should use an optocoupler or other type of isolator. The question is whether these cheap 12 Mbps isolators will be quick enough to transfer data to the computer and what potential alternatives do I have?If any of you have used good USB isolators, please give me your recommendations.Kind regards,Tadas

author: ledtester
author_rank: Super Contributor
timestamp: June 17, 2021, 02:09:44 pm
content: There are high-speed optoisolators, e.g. the 6n135/6 rated for 1 megabaud:https://www.vishay.com/docs/83604/6n135.pdfAlso found this forum thread:https://www.eevblog.com/forum/reviews/chinese-usb-isolator-test/

author: Tadaspadas
author_rank: Newbie
timestamp: June 17, 2021, 02:33:04 pm
content: Hi ledtester,Thanks for your contribution. However, I think it is a bit misleading suggestion. I am talking about full microUSB isolation, not only a single line optocoupler, as you identified in the link above.Also, to add more info to the case, I would prefer a complete device rather than spare components, due to a short time scale as this unexpected problem needs tp be resolved quickly. Thanks

author: bdunham7
author_rank: Super Contributor
timestamp: June 17, 2021, 02:55:08 pm
content: You can get the Analog Devices eval board:https://wiki.analog.com/resources/eval/user-guides/circuits-from-the-lab/cn0419As far as whether a particular cheapo isolator from Aliexpress will work in your application, it's hard to tell and you may just have to try a few. I would think even the slow ones would be fast enough, but there are always random issues that can come up.

author: ajb
author_rank: Super Contributor
timestamp: June 17, 2021, 03:02:41 pm
content: What is the device that you are connecting to the PC? Is it a microcontroller in a device you made, or is it a USB to serial adapter or something? Honestly chances are the answers to those questions don't really matter because the 12Mbps that most of those isolators offer is a hundred times more throughput than the 115kbaud you need to transport, so even with protocol overhead that shouldn't be an issue at all. I think most of the ones you find on the internet use the same AD4160/3160 parts, so all should perform about the same as the CN0419 eval board you can get directly from Analog Devices. It may be more a of a question how good their isolated power supplies are, especially if your device is relatively high power, but if necessary you should be able to provide a separate power supply and only use the isolator to carry the data.

author: voltsandjolts
author_rank: Unknown
timestamp: June 17, 2021, 03:09:17 pm
content: +1 for the ADUM3160It's used on the USB isolators you can find on eBay, e.g.https://www.ebay.co.uk/itm/324127452071

author: Terry Bites
author_rank: Super Contributor
timestamp: June 17, 2021, 03:12:18 pm
content: I've also used the CN0419 and it worked fine. Not cheap, but probably chepaer than blowing up your kit.USB over network wired or wirelss is a bit slow but very cheap to implement. USB over wire is by definition isolated. You can upgrade the magnetics if you need to. 4kV is avaialble.USB to bluetooth ADU2B02P?? Never tried it. Hate bluetooth.

author: Tadaspadas
author_rank: Newbie
timestamp: June 17, 2021, 03:32:31 pm
content: Thank for all contributions.To ajb,Quote from: ajb on June 17, 2021, 03:02:41 pmI am using an arduino Due microcontroller board in this prototype. Everything inside the box, including my own made PCB, is powered by isolated power supply, so there is no earth tied connection coming to the main system. Investigations shown that the USB connector causes the main issue. I have read about these ADUM4160 modules and it seems that it is mainly used in all cheap USB isolators, while others rely on a better Silanna ICE09USB chips (which is discontinued already for a couple of years).Also, it is worth mentioning that I am not powering anything through the USB port, since Arduino Due is supplied from +12V "inside the box" converter. This ground/ earth in this case is just a reference for USB serial data transfer.

author: ajb
author_rank: Super Contributor
timestamp: June 17, 2021, 04:29:54 pm
content: Yeah, your application isn't terribly demanding so I doubt that any of those isolators would be a problem as long is they're not *complete* garbage. Alternatively, you could redirect your output to one of the UARTs on the Arduino and connect it to an offboard USB-Serial adapter through a regular digital isolator IC (or even optocouplers). That would be a good deal cheaper and if you've already got a couple of optos and one of those little FTDI boards (or equivalent) on hand you've got your solution right there.

author: Nominal Animal
author_rank: Super Contributor
timestamp: June 17, 2021, 04:53:42 pm
content: I regularly use cheap eBay ADuM3160-based isolators with Arduino-compatible microcontrollers. They are direct implementations of the datasheet, and only the isolated DC-DC converter on them varies (providing isolated 5V from the host computer); they also typically provide less power than they draw from the host (due to losses). I would not expect more than 350mA (while drawing max. 500mA from the host computer).In Europe, theOlimex USB-ISOis a viable option too.TheADuM3160 datasheetis short and the circuit really is very simple, and theCN0373reference design (lower left corner of figure 1) shows you really only have a couple of resistors (24 Ohm 1% for 12 Mbit/s operation, none for 1 Mbit/s) and a couple of capacitors, and maybe a ferrite bead; plus whatever circuitry you need for the isolated 5V-5V DC-DC conversion. Which isn't much.Personally, I just checked the DC-DC converter on my cheapies when I bought them, and verified they are isolated DC-DC converters (and they were), and they seem to work absolutely fine for me. (Whenever I poke around with the connections on my microcontrollers, I use an isolator as a final safety measure against my own butterfingery. In theory, USB should be tolerant of even shorting USB 5V to ground, but with my luck, I'd manage to release the Magic Smoke without the isolator somehow.)Do note that the ADuM3160-based ones typically have a dip switch selecting 1 MBit/s (low-speed USB) and 12 MBit/s (full-speed USB); I always use mine in the 12 MBit/s mode. These do limit the speed, and high-speed USB (480 MBit/s) wont work – or rather, they work, but will be limited to 12 MBit/s.Using Teensies and ATmega32u4 Pro Micro clones (with Arduino Leonardo boot loaders), I get the same ~ 1 Mbyte/sec transfer rate over the isolator as I do without. (These all have native USB, and not an USB-to-serial converter like most Arduinos have.)

author: fordem
author_rank: Regular Contributor
timestamp: June 17, 2021, 05:15:57 pm
content: There's perhaps a much simpler approach - use a laptop and power it off of the battery when isolation is required.This, I believe, you will find is the norm in the UPS industry, field techs carry laptops which are required to perform diagnostic tests on units that should be properly grounded, but may not be, depending on the fault that particular unit may have developed. I've seen Dell Latitudes used with dual battery slots, those can be kept running without AC power for as long as you have charged batteries available, I currently use a T-series Thinkpad with one internal & one external battery - this like the Dell units, can be run without AC power for as long as there are charged batteries.

author: Miyuki
author_rank: Frequent Contributor
timestamp: June 17, 2021, 05:27:20 pm
content: Here is not yet available any high-speed USB isolator?

author: Gyro
author_rank: Super Contributor
timestamp: June 17, 2021, 06:08:29 pm
content: Quote from: Miyuki on June 17, 2021, 05:27:20 pmI believe there are a few fully packaged off the shelf commercial products, but at high cost.You need to check their specs very carefully to make sure you aren't accidentally buying a USB2 full speed rather than USB2 high speed. Some advertisements are quite misleading.

author: ejeffrey
author_rank: Super Contributor
timestamp: June 17, 2021, 10:34:09 pm
content: If price is no object and you need it immediately, there are USB-to-fiber extenders, such as these:https://www.l-com.com/usb-icron-usb-20-ranger-2324-4-port-multimode-duplex-lc-usb-extender-system-500-maxhttps://www.amazon.com/Transwan-Extender-Supports-Devices-Industrial/dp/B0798HHNJV

author: bson
author_rank: Unknown
timestamp: June 17, 2021, 11:30:16 pm
content: You could also modify your board to have a floating VCP serial chip (such as Silabs CP210x) powered off USB. Then all you need is to isolate RX/TX with a pair of optocouplers between the VCP IC and your microcontroller. This way you get all the convenience of plugging directly in to USB on a host or hub, without additional isolator boxes and stuff.

author: NiHaoMike
author_rank: Super Contributor
timestamp: June 18, 2021, 12:25:11 am
content: Quote from: Miyuki on June 17, 2021, 05:27:20 pmThere is - it's called a Raspberry Pi running USB/IP.

author: Nominal Animal
author_rank: Super Contributor
timestamp: June 18, 2021, 07:33:09 am
content: Quote from: fordem on June 17, 2021, 05:15:57 pmI do that too. I personally don't need the isolator to break ground loops, but to protect my more expensive hardware from my butterfingery when I experiment with microcontrollers. Technically, USB is supposed to handle even VUSB-GND shorts indefinitely, but spending 8-18€ for an isolator to be certain was a no-brainer to me.The ones I got off eBay do have nice isolation, BTW, typically 1 kV (due to the cheaper DC-DC converters used). They really are very simple devices, with just a few passives (resistors and capacitors) in addition to the ADuM3160 and DC-DC isolator parts. There is nothing to cut out to reduce price, so as long as those two components are legitimate, and the board itself looks okay (not a reject or something), they really are acceptable for the task here.The Olimex one has one very useful additional feature: you can use an isolated DC supply, 8 - 15 VDC, to supply up to 750mA at 5VDC to the device. This supply is not isolated from the device, it is directly provided, so you do need to use an isolated AC-DC supply.If it matters any, putting an ADuM3160 to your own design in externally provided devices, is similarly trivial. Keep traces short and according to the datasheet, use the recommended passives, and it will Just Work.(Similar ground loop and noise issues occur with 3D printer and other robotics controller boards, if connected to a PC via USB. These controllers almost always share motor ground with logic ground, you see. This is also why most 3D printers are not connected to your PC via USB so you could control them directly from software (and disconnect the USB after "uploading" the files to an SD card), and instead you have to use a physical SD card to transfer the files.)

author: croma641
author_rank: Regular Contributor
timestamp: November 22, 2021, 12:22:58 am
content: There's a new T.I. USB2 ISOUSB211 High/Full/Low Speed Isolated USB Repeater, now in pre-production :1 Features• Compliant to USB 2.0• Supports low speed (1.5 Mbps), full speed (12Mbps) and high speed (480 Mbps) signaling• Automatic speed and connection detection• Programmable equalization to compensate boardtrace loss in high speed mode• CDP advertising on downstream side• Supply OK indication on opposite side• Supports automatic role reversal• High CMTI: 100 kV/μs• VBUS voltage range: 4.25 V to 5.5 V– 3.3 V and 1.8 V internal LDOs• Meets CISPR32 class B emissions limits• Ambient temperature range: –40°C to +120°C• Small footprint 28-SSOP package• Safety-related certifications:– 8000-VPK VIOTM and 2121-VPK VIORM(Reinforced and Basic Options) per DIN VDEV 0884-11– 5700-VRMS isolation for 1 minute per UL 1577– IEC 62368-1, IEC 60601-1 and IEC 61010-1certifications– CQC, TUV and CSA certifications– All certifications plannedhttps://www.ti.com/store/ti/en/p/product/?p=XISOUSB211DPR

author: niconiconi
author_rank: Frequent Contributor
timestamp: November 26, 2021, 11:02:48 pm
content: This year I've considered, tested (and am still testing) a few ASIC solutions for 480 Mbps USB galvanic isolation, and I plan to write a detailed article about it, but here's a quick summary. TI's new ISOUSB211 ASIC is going to be the real game-changer, solves the problem completely, and it will also make my entire year's experiments, described below, almost meaningless. If you just want a working 480 Mbps USB 2 solution, don't read this post, just wait for TI's ISOUSB211.- There are ASICs specifically made for this purpose, for example the Silanna USBB. But they are not available on the open market, so they practically don't exist. On the other hand, I found there are some useful USB ASICs you can actually buy, they're designed for cable length extension. But these chips can be abused for galvanic isolation, with an important caveat: device compatibility and performance is not guaranteed (more on that later).* WCH CH317 (both CH317Q & CH317L): USB 2.0 extension ASIC via Ethernet. Made by the same company, WCH, known for its CH341 USB serial chips. The CH317 ASIC has a custom USB controller, the USB traffic is converted to Ethernet (but not TCP/IP) traffic in its proprietary protocol and sent to the on-chip Ethernet MAC, then it outputs the data via Gigabit Ethernet's RGMII interface. Just connect a Gigabit Ethernet PHY, and you're good to go. The chip on the far-side converts Ethernet to USB. The Ethernet transformer is for galvanic isolation. If that's not enough, you can also use Ethernet PHY with fiber-optics support for optical galvanic isolation, or - since it's standard Ethernet data in RGMII - even an FPGA for handling it in your own way.---(USB)---> CH317 ---(RGMII)---> Ethernet PHY ---> Transformer ---> Ethernet cableResult: Bad performance, no faster than 80-100 Mbps. So while USB 2 HS is technically supported, usefulness is very limited. Basically only usable for flash drives. Don't buy any device based on the CH317.Why? An educated guess is that USB 2.0 HS is not designed for long-distance communication in mind, but this chip is designed for up-to-kilometer extension, so it possibly uses some underhanded tricks to work around the problem - basically emulating a USB device on the near-side based on the data from the from far side, and vice verse. For example, if the far-side is not ready yet, the near-side may simply fake a NAK to trick the host to wait longer. Obviously such emulation can't be perfect, which limits compatibility, and also with a serious performance penalty.* Norelsys NS1021: USB 2.0 extension ASIC via CAT-5e/coax/phone line/USB cable. This ASIC has likely a custom USB controller with proprietary protocol, its output is a single-pair of true differential & DC-balanced signal, which then can be sent for transmission over single-pair phone line, CAT-6, or coax. Because it's truly differential, an AC-coupling capacitor or RF transformer can be used for isolation. The variant NS1021E, uses two differential pairs, so a 100 Mbps Ethernet transformer can be used. Full performance is advertised by the company, likely because it's only designed for a 50-meters extension, so it's is much less invasive to the USB logic than CH317.A potential limitation is that the output uses either full or half-duplex signaling (unsure, not documented), so the signal is bidirectional, not unidirectional, so again, same problem just like USB 2 HS traffic itself - you can't treat it as a standard digital signal output and hook it up to a standard differential transceiver like an FPGA or a SFP+ module, which limits your option. Ethernet or RF transformers cannot be relied upon for isolating serious voltages or high-frequency noises (but at least for the noise, the signal is now truly differential, you can just use common-mode chokes to suppress it).Result: work in progress.- USB 3.0 isolation* VL670/VL671 USB-3 to USB-2 transaction translation ASIC.There's also a way to solve this problem indirectly, by first creating an isolated pure USB-3 port (USB 3 is a system of its own with its own SSTX/SSRX connections, it's only backward compatible with USB 2 because the USB standard requires all USB 3 port to include the D+/D- connection to a legacy USB 2 controller, so theoretically you can have USB 3 without USB 2 support, which is what we're doing here).Then, we use the VL670/VL671 USB-3 to USB-2 ASIC to provide USB-2 support. The VL670/VL671 translates the legacy USB 2.0 traffic and transparently upgrades the device to an USB 3.0 SuperSpeed device by emulation. Just like a USB extension controller, this is not a perfect solution, device compatibility is limited due to imperfect emulation. But can be useful.Why USB 3? Because it's much easier than USB-2.USB 2 HS (480 Mbps) uses a nonstandard differential signaling scheme that is not truly differential - it also has single-ended signals like Single Ended Zero, essentially making USB 2 HS incompatible with standard differential transceivers, so you must use a USB 2 PHY and work at logic level rather than electrical level. Worse, the signaling has been further bastardized by using half-duplexing, the D+/D- signals are bidirectional, so you actually have to design a USB controller to read the protocol to do bus arbitration. The protocol, due to its synchronous and half-duplex nature, also has timing constricts that can be hard to meet.On the other hand, USB 3 is much simpler. It uses two pairs of unidirectional, 8b/10b encoded, CML-like differential signals, and operates asynchronously. This type of signal is commonly found in almost all high-speed digital systems. For example, you can literally just run the USB 3 signal into an SFP+ 10 Gigabit Ethernet optical transceiver (an SFP+ 10 Gigabit Ethernet transceiver is protocol-agnostic, it can be used to transmit any differential signal), and bingo, an isolated USB 3 port. Even better, it's fiber-optics, it can easily isolate 10 kV or more, including fast transients. (well, full-spec compliance, with proper support of power management is difficult, but a port that somewhat "works" to a certain degree for many applications is easy to create).Result: Successful. Almost done by now. VL670/VL671 was a success. Compatibility is good enough for my purposes. the USB 3 to SFP+ transceiver is work in progress, but an early prototype was almost a success. Implementing full-spec compliance, with proper support of power management was originally my long-term goal.Also attached are two considered but discarded solution.- The first solution is using a USB 2 PHY, the analog side is D+/D-, and the logic side is the ULPI or UTMI, which is basically a parallel digital data bus, and hook it up to a FPGA. Then use the FPGA to forward its logical status to another FPGA and its USB 2 PHY. Communicate and synchronize the status of both FPGAs with high-speed SERDES, isolate the parallel SERDES interface with high-speed digital isolators. But this is also difficult and it's only an option if you're an USB expert (I'm not), it means you're basically designing a custom USB controller. Also, theoretically, the second FPGA and the SERDES are not necessary, perhaps you can use a single FPGA, two USB PHYs, and put isolation on the ULPI/UTMI interface instead. But this data bus has more serious timing constraints and I'm not sure how practical it is.Result: idea considered but discarded, difficult and expensive, but can be an option for USB experts. Some industrial products use this solution.- The second possible solution is Inter-Chip USB or HSIC. It's basically USB but uses LVCMOS logic without analog PHY, avoiding the analog transceiver headache entirely. There are also USB-to-HSIC hub chips to convert USB to HSIC and vice verse. It looked promising and seemed to make things much easier at first glance, I felt like one can just put relatively dumb logic at the HSIC interface without caring too much about the protocol at all. But HSIC is still uses bidirectional, half-duplex signaling, so you still need to create a USB controller to read the protocol, do bus arbitration, with the USB and HSIC-bus latency constraints.Result: idea considered but discarded.

author: NiHaoMike
author_rank: Super Contributor
timestamp: November 27, 2021, 01:25:59 pm
content: Quote from: niconiconi on November 26, 2021, 11:02:48 pmHow does USB/IP using Raspberry Pi compare? Or perhaps the CH317 could perform better with the host side implemented as software communicating via a NIC?The CH317 could also be interesting to add a USB device port to a PC via a NIC.

author: Miyuki
author_rank: Frequent Contributor
timestamp: November 27, 2021, 04:23:14 pm
content: Quote from: NiHaoMike on November 27, 2021, 01:25:59 pmI expect it to have rather poor performance as you have a slow interrupt response with any user oriented OS. I'm not sure if R Pi or common x64 (it might brute force it at cost of high load) CPU has a fast enough interrupt handler for reaching reasonable speeds even on bare metal levels.

author: Terry Bites
author_rank: Super Contributor
timestamp: November 27, 2021, 05:22:34 pm
content: Save yourself the headache: ADUM3160 from ADhttps://www.ebay.co.uk/itm/274596660101?hash=item3fef3c8385:g:gFcAAOSw2Ppfxha-

author: Gyro
author_rank: Super Contributor
timestamp: November 27, 2021, 06:39:34 pm
content: Quote from: Terry Bites on November 27, 2021, 05:22:34 pmThe ADUM3160 has already been discussed further up the page. The discussions today relater to USB High Speed (480Mbps) isolation - The ADUM3160 only supports Full Speed (12Mbps).Edit: The USB hub function on the linked one might be handy in certain situations though, I hadn't seen one of those.

author: niconiconi
author_rank: Frequent Contributor
timestamp: December 08, 2021, 08:42:07 am
content: I've just received the XISOUSB211 chip ("X" stands for pre-production preview) I ordered from TI today. I'm still working on the development board design. I'll publish the full design and PCB layout when it's finished.

author: engineer_in_shorts
author_rank: Regular Contributor
timestamp: December 08, 2021, 09:40:34 am
content: Olimex do a USB isolator capable of 12MBit. Stocked in farnell as well. Part number is USB-ISO

author: Nominal Animal
author_rank: Super Contributor
timestamp: December 08, 2021, 10:11:20 am
content: Quote from: engineer_in_shorts on December 08, 2021, 09:40:34 amIs it really that hard to read the preceding posts for you? I explicitly mentioned it in post #9, and we moved on to discussing high-speed operation, which is currently not supported by existing cheap isolators, but the TI ISOUSB211 chip as described by niconiconi might change that.What is with this flood of"I don't have the time to read this thread, so I'll just post more of the same just to make sure even fewer people read the thread"recently?I hope the recent changes Dave made do not encourage that sort of behaviour – but I do fear it really does. When you cater to the lowest common denominator to get more quantity, you inevitably reduce the overall quality.

author: engineer_in_shorts
author_rank: Regular Contributor
timestamp: December 08, 2021, 08:01:10 pm
content: What's wrong with the 12Mbit route?

author: thm_w
author_rank: Super Contributor
timestamp: December 09, 2021, 10:45:11 pm
content: Quote from: Nominal Animal on December 08, 2021, 10:11:20 amI wouldn't blame it on just new individuals, this happens all the time with older posters who want to get their 2c in, even if its already been said.

author: Bassman59
author_rank: Super Contributor
timestamp: December 09, 2021, 10:47:38 pm
content: Quote from: engineer_in_shorts on December 08, 2021, 08:01:10 pmPerhaps the application requires High Speed USB?

author: niconiconi
author_rank: Frequent Contributor
timestamp: January 07, 2022, 08:10:38 am
content: Quote from: niconiconi on December 08, 2021, 08:42:07 amToday I'm glad to announce that my first prototype of the TI ISOUSB211 development board is now working. The Texas Instruments chip ISOUSB211 works as advertised, it really is the first USB 2.0 high-speed (480 Mbps, not 12 Mbps) galvanic isolation chip on the open market. All design files are available athttps://notabug.org/niconiconi/isousb211Quote myself.QuoteRead more in the link:https://notabug.org/niconiconi/isousb211FAQ:Q: Your board sucks!A: If you don't like my design, you can purchase an official development board from Texas Instruments, which is currently being sold at reasonable price, to be honest. The part number is ISOUSB211DPEVM, available at Mouser and Digikey, and it just costs $50, far below the regular inflated price level for development board.

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 12, 2022, 04:09:29 am
content: I was searching for a way to isolate I2S for a high power audio amplifier and found this part mentioned as an alternative for isolating USB instead:https://www.analog.com/en/products/adum4165.htmlLess than $7 in quantity.

author: moffy
author_rank: Super Contributor
timestamp: May 12, 2022, 06:31:39 am
content: Quote from: NiHaoMike on May 12, 2022, 04:09:29 amExcellent find.

author: SiliconWizard
author_rank: Super Contributor
timestamp: May 12, 2022, 06:19:32 pm
content: For I2S, why not use something like the ADuM251N, which is half the price, instead of isolating USB?

author: NiHaoMike
author_rank: Super Contributor
timestamp: May 14, 2022, 04:52:01 pm
content: Quote from: SiliconWizard on May 12, 2022, 06:19:32 pmJust a suggestion on a DIY audio forum. In my case, I was looking for something to isolate a surround DSP from an IGBT subwoofer amplifier (which is powered directly from rectified mains) so isolating USB is not relevant to that use case.