Author Topic: Why not use digital isolators in hobby microcontroller and USB designs?  (Read 2599 times)

0 Members and 6 Guests are viewing this topic.

Offline coppice

  • Super Contributor
  • ***
  • Posts: 8937
  • Country: gb
Clearly the ethernet approach is the right choice for this discussion. No tough decisions. Its just isolated however you use it. :)
 

Offline Nominal AnimalTopic starter

  • Super Contributor
  • ***
  • Posts: 6514
  • Country: fi
    • My home page and email address
One reason: EMI.

I designed a medical device (ECG, cardiac floating) that uses a multi-channel digital isolator and
because of the patient leakage current constraints you can't use capacitors between the different
sides to suppress EMI. It was very difficult to get the device within the limits.
This is very interesting to me; I'd like to learn more.  Could you roughly compare the EMI involved there to say that of a typical Cortex-M microcontroller?

If I understand correctly, the EMI issues are focused on the power rails (as opposed to signal rails), with the isolator current draw being very spiky, containing high-frequency switching noise for capacitive isolators like TI ISO67xx/77xx series.  I was under the impression (from the datasheets) that 100nF C0G/X7R bypass capacitors placed very close to the isolator IC suffices to bring that down to typical microcontroller levels, and a pi filter using ferrite beads on both supply and ground as inductors would suffice for e.g 16-bit ADC use (say, isolating I²S or SPI data lines), given a separately regulated reference voltage and analog supply for the ADC.  (I do not know enough to say if such a pi filter can turn each side of the isolator into a radiating antenna.)

Did you end up having to use overlapping but non-connected shield cans (each connected to one ground)?  Did you find a sufficient filtering scheme? Or did you switch to less noisy optoisolation?  (I've experimented a bit on using plastic optical TOSLINK transceivers and a pair of cables for signal-inverted UART a few years ago.  It worked surprisingly well for occasional short control type messaging at high baud rates.)
« Last Edit: July 01, 2024, 04:59:11 pm by Nominal Animal »
 

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2240
  • Country: 00
One reason: EMI.

I designed a medical device (ECG, cardiac floating) that uses a multi-channel digital isolator and
because of the patient leakage current constraints you can't use capacitors between the different
sides to suppress EMI. It was very difficult to get the device within the limits.
This is very interesting to me; I'd like to learn more.  Could you roughly compare the EMI involved there to say that of a typical Cortex-M microcontroller?

If I understand correctly, the EMI issues are focused on the power rails (as opposed to signal rails), with the isolator current draw being very spiky, containing high-frequency switching noise for capacitive isolators like TI ISO67xx/77xx series.  I was under the impression (from the datasheets) that 100nF C0G/X7R bypass capacitors placed very close to the isolator IC suffices to bring that down to typical microcontroller levels, and a pi filter using ferrite beads on both supply and ground as inductors would suffice for e.g 16-bit ADC use (say, isolating I²S or SPI data lines), given a separately regulated reference voltage and analog supply for the ADC.  (I do not know enough to say if such a pi filter can turn each side of the isolator into a radiating antenna.)

Did you end up having to use overlapping but non-connected shield cans (each connected to one ground)?  Did you find a sufficient filtering scheme? Or did you switch to less noisy optoisolation?  (I've experimented a bit on using plastic optical TOSLINK transceivers and a pair of cables for signal-inverted UART a few years ago.  It worked surprisingly well for occasional short control type messaging at high baud rates.)

I cannot go into the specifics because it's a commercial and proprietary design.
What I can say is that I experienced all the problems described in these documents:

https://www.analog.com/media/en/technical-documentation/app-notes/an-0971.pdf

https://www.analog.com/media/en/technical-documentation/application-notes/AN-1109.pdf


 

Offline Nominal AnimalTopic starter

  • Super Contributor
  • ***
  • Posts: 6514
  • Country: fi
    • My home page and email address
I cannot go into the specifics because it's a commercial and proprietary design.
Could you at least say how much EMI you initially saw from the digital signal isolator alone, roughly compared to a Cortex-M microcontroller?

I'm only looking to understand the magnitude (power of ten!), nothing specific.

What I can say is that I experienced all the problems described in these documents:
Thanks!

ADuM3160/4160/3165/3166/4165/4166 USB isolators use the same iCoupler technology with embedded transformers (inductive coupling) and those documents will help me (and anyone else interested!) understand the EMI issues with them much better.

However, TI 67xx/77xx signal isolators and the ISOUSB211 use capacitive coupling, which I understand generates significantly less EMI.
It would be so useful 😍 for us hobbyists to have someone describe the rough magnitudes involved, so we'd have an intuitive understanding of when we should go ask an experienced EE for help, instead of just implementing the datasheet design.

[ only idiots use USB isolation ]
To be clear, you don't need to use USB isolators for digital isolation in USB projects, so that picture is very much a low blow; deliberately misrepresenting my question and points.  It might be funny to you, but you're doing a disservice to all hobbyists with that: making them avoid digital isolators even more in their own designs, because they don't want to be made fun of by the likes of you.  :--

I already mentioned using a cheap TI ISO6721/7721 for an USB serial interface, to act both as the isolator and level shifter (from 1.8V or 2.25V–5V logic levels).  For audio projects, I would recommend using something like TI ISO6740/7740 to isolate the I²S bus (between MCU and DAC+amplifier), not just whack an USB isolator in there.  With audio projects, getting low-noise analog rails for an USBy project is already pretty difficult, most failing and getting USB supply noise in their output.  My own approach would be to use an isolated boosting DC-DC converter to filter and linearly regulate down to get low-noise rails.  It isn't that different to using a non-isolated boost DC-DC converter for doing the same.  Proper EMI suppression with isolated DC-DC converters and their input and output filtering is a separate question, though; all I know on that front is what I can read from the DC-DC module datasheets.

While Ethernet is extremely nice hardware-wise, it is an utter bitch to implement the software side both securely and efficiently.  Wiznet W5500, for example, has a hardwired TCP/IP stack and is thus quite robust, but it tops out at somewhere around 20-30 Mbits/second.  Compare that to my Teensy 4.0, which can easily exceed 200 Mbits/second over USB 2.0 (high-speed) using plain USB Serial and a simple Arduino sketch.  My Teensy 4.1 does have a 10/100 Ethernet port (DP83825 PHY and a MagJack), but the software side is not nearly as robust as the hardwired Wiznet stuff is, neither the lwip nor the qnet implementations.  I can easily make it technically work for my own projects, but I can just as easily write a simple program on my Linux machine that will utterly jam up that stack so it won't be able to process most of the legitimate packages at all (i.e., DOS it).

There Is No Such Thing As Free Lunch.  Every solution, including using an isolator, has its costs.  I am not wondering why isolators aren't used everywhere, I am wondering why I'm basically never seeing them in hobby projects, even though they have helped me solve some of the issues I see other hobbyists getting frustrated with all the time.
 

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 11997
  • Country: us

[ only idiots use USB isolation ]
To be clear, you don't need to use USB isolators for digital isolation in USB projects, so that picture is very much a low blow; deliberately misrepresenting my question and points.  It might be funny to you, but you're doing a disservice to all hobbyists with that: making them avoid digital isolators even more in their own designs, because they don't want to be made fun of by the likes of you.  :--
...

If I am working in an environment where I have to resort to isolating USB to get it to survive,  I am going to choose a more robust solution.  Not try and bandage the problem.   You may see it as a low blow and have your feelings hurt but having been down that path a few times,  I take it serious.   I would never design in USB for any device that I would plan to use in a hostile environment.   
 
The following users thanked this post: MK14

Online MK14

  • Super Contributor
  • ***
  • Posts: 4702
  • Country: gb
I am not wondering why isolators aren't used everywhere, I am wondering why I'm basically never seeing them in hobby projects, even though they have helped me solve some of the issues I see other hobbyists getting frustrated with all the time.

It perhaps is a sign, that you could improve your electronics design techniques, a little bit.  By sorting out any issues, that not using an isolator, seems to be causing your circuits.  By tweaking the design, as necessary.

Electronics can be a bit cruel at times.  Not only do better, low cost changes, that fix every day technical challenges work.

But also, changes, which add significant cost and possible problems, in other areas, might also appear to solve an electronic circuits, design issue.  Even if that solution, is not the best of ideas.
 

Offline coppice

  • Super Contributor
  • ***
  • Posts: 8937
  • Country: gb
If I am working in an environment where I have to resort to isolating USB to get it to survive,  I am going to choose a more robust solution.  Not try and bandage the problem.   You may see it as a low blow and have your feelings hurt but having been down that path a few times,  I take it serious.   I would never design in USB for any device that I would plan to use in a hostile environment.   
I would avoid isolated USB in a volume production environment. However, most development tools are now USB based, and a lot of things we develop are pretty hostile. So, we have little choice but to use isolated USB to develop them. I think that may be the main market for the various USB isolator devices on the market today.
 

Offline Nominal AnimalTopic starter

  • Super Contributor
  • ***
  • Posts: 6514
  • Country: fi
    • My home page and email address
If I am working in an environment where I have to resort to isolating USB to get it to survive,  I am going to choose a more robust solution.  Not try and bandage the problem.
Take the aforementioned USB-to-UART connection between a host computer and an appliance, say a TV box, with the appliance sharing ground with your TV/display, with the UART pins using 2.5V logic levels and directly connected to the SoC.

How is using a TI ISO6721/7721 or Si8621/8622 capacitive signal isolator on the RX and TX lines for both ground separation and logic level translation "bandaging the problem"?

Bandaging the problem is to tell the developer to use a laptop without connecting it to mains, to avoid ground loops.  Here, we do not have polarized mains connectors.  Typical electronics devices use CEE 7/16 "Europlug": two unpolarized pins with 240 VAC, no ground connection.  Because of EMI suppression Y capacitors in the supplies, the ground is close to the negative AC peak voltage.  If the two devices are in different circuits, they may have a potential difference (when mains derived from three-phase power, common outside cities), causing significant (several mA) ground current loops.

The same happens if I want to connect a desktop computer to my stereos using normal unbalanced audio cables, and the computer and stereos are powered from different mains circuits – typical if they're in different rooms.  A ground lift passive DI box is audiophoolery and a band-aid, and approximately halves the output power (volume).  Isolating the line out circuitry is a robust option, as long as you do the required DC-DC power supply correctly.

What is exactly the "non-band-aid solution" here you so strongly advocate for?

I am not wondering why isolators aren't used everywhere, I am wondering why I'm basically never seeing them in hobby projects, even though they have helped me solve some of the issues I see other hobbyists getting frustrated with all the time.
It perhaps is a sign, that you could improve your electronics design techniques, a little bit.  By sorting out any issues, that not using an isolator, seems to be causing your circuits.  By tweaking the design, as necessary.
What you are saying is that any circuit using an isolator to solve a problem is the wrong solution, because you have never used a digital isolator to solve a problem you haven't been able to avoid otherwise.  Let me guess: you have never used a digital isolator at all, outside an occasional optocoupler, right?

If I am correct, then your retort is just saying that "if you don't avoid them like I do, your skills are inferior", which has negative informational value in my opinion.  I am not interested in using digital isolators unless they are the best tool for the job; and I've described above at least two problems where I use them for.  What exactly is your "design tweak" there that makes the isolators unnecessary?
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21974
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
[ only idiots use USB isolation ]
To be clear, you don't need to use USB isolators for digital isolation in USB projects, so that picture is very much a low blow; deliberately misrepresenting my question and points.  It might be funny to you, but you're doing a disservice to all hobbyists with that: making them avoid digital isolators even more in their own designs, because they don't want to be made fun of by the likes of you.  :--

Yeah, not a good application of the meme...

It's not an easy meme to use, it's surprisingly subtle.  I only *think* I've used it correctly, but maybe not quite still.


Quote
There Is No Such Thing As Free Lunch.  Every solution, including using an isolator, has its costs.  I am not wondering why isolators aren't used everywhere, I am wondering why I'm basically never seeing them in hobby projects, even though they have helped me solve some of the issues I see other hobbyists getting frustrated with all the time.

To be clear -- for my part anyway, I've implied that hobbyists are frequently in the "inexperienced" camp, and that they might benefit some if they knew.  That basically sums it up as an answer.

Which part of the curve you consider yourself on, is another matter (I would assume closer to middle).  Give or take what the actual "hobbyist" distribution is, it might still be a misused meme, say if the inexperienced category is the actual population peak (which seems likely).  But that's hopefully taking a meme a little too seriously, and an excusable error.

There is also the converse case: using isolators when no isolation is actually even used.  You see optos in novice designs from time to time (I say that, but I've seen them in industrial designs too..) where it's not even doing a logic inversion or level shift, just 5V to 5V noninverting or whatever, but sometimes at least invert or level shift too, but something that fairly trivially could be made with a single BJT instead since it's still common ground.  These are likely mostly copy-paste designs, i.e. a result of imitation without understanding.  How this reflects amateur/hobbyist knowledge of isolation, I mean, it's not encouraging, but it's at best only suggestive overall.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 11997
  • Country: us
If I am working in an environment where I have to resort to isolating USB to get it to survive,  I am going to choose a more robust solution.  Not try and bandage the problem.
Take the aforementioned USB-to-UART connection between a host computer and an appliance, say a TV box, with the appliance sharing ground with your TV/display, with the UART pins using 2.5V logic levels and directly connected to the SoC.

I don't consider my home TV a hostile environment.   

Quote
What is exactly the "non-band-aid solution" here you so strongly advocate for?

Ethernet, CAN.   

Online MK14

  • Super Contributor
  • ***
  • Posts: 4702
  • Country: gb
What is exactly the "non-band-aid solution" here you so strongly advocate for?

I am not wondering why isolators aren't used everywhere, I am wondering why I'm basically never seeing them in hobby projects, even though they have helped me solve some of the issues I see other hobbyists getting frustrated with all the time.
It perhaps is a sign, that you could improve your electronics design techniques, a little bit.  By sorting out any issues, that not using an isolator, seems to be causing your circuits.  By tweaking the design, as necessary.
What you are saying is that any circuit using an isolator to solve a problem is the wrong solution, because you have never used a digital isolator to solve a problem you haven't been able to avoid otherwise.  Let me guess: you have never used a digital isolator at all, outside an occasional optocoupler, right?

If I am correct, then your retort is just saying that "if you don't avoid them like I do, your skills are inferior", which has negative informational value in my opinion.  I am not interested in using digital isolators unless they are the best tool for the job; and I've described above at least two problems where I use them for.  What exactly is your "design tweak" there that makes the isolators unnecessary?

It's tricky to comment, about your circuit(s)/schematic(s), which desperately need digital isolators, without seeing the schematics.

In terms of a minimum, circuit configuration.  What would a hobbyist MCU circuit, need to do, as a minimum.  Which suddenly, makes digital isolators, a useful circuit solution, to your issue(s)?
« Last Edit: July 01, 2024, 09:23:24 pm by MK14 »
 

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 11997
  • Country: us
If I am working in an environment where I have to resort to isolating USB to get it to survive,  I am going to choose a more robust solution.  Not try and bandage the problem.   You may see it as a low blow and have your feelings hurt but having been down that path a few times,  I take it serious.   I would never design in USB for any device that I would plan to use in a hostile environment.   
I would avoid isolated USB in a volume production environment. However, most development tools are now USB based, and a lot of things we develop are pretty hostile. So, we have little choice but to use isolated USB to develop them. I think that may be the main market for the various USB isolator devices on the market today.

Using USB based development tools to work on something designed for a hostile environment is fine.   It's only applications where I would expose USB to high common modes where I would steer away from USB. 

At home, I have not ran into a case where I was for example, attempting to design a circuit that rode on top of the mains where I need some type of debug port to communicate with a second device that was grounded to the same mains.    Some sort of AC motor control for example with a USB/JTAG interface attached to my PC.    I have had to do this in the dark ages with 422 using an isolator but that's been many years ago.   Still that's different from designing in the isolator.

With Ethernet, we have the advantage of transformer coupling and fiber if needed.   

Offline Nominal AnimalTopic starter

  • Super Contributor
  • ***
  • Posts: 6514
  • Country: fi
    • My home page and email address
To be clear -- for my part anyway, I've implied that hobbyists are frequently in the "inexperienced" camp, and that they might benefit some if they knew.  That basically sums it up as an answer.
That is what I thought, too, but seeing the many answers that imply that any use of digital isolators is a sign of a bad design has made me question myself.

There is also the converse case: using isolators when no isolation is actually even used.
Yeah; I am guilty of that with I²C level shifting, but only because the I²C isolators like ISO1640 allow me to put my 3.3V logic level MCU on side 1, and interface to any logic levels between 2.25V and 5.5V on the other side.  Compare to the standard PCA9306: with MCU at 3.3V, you can use PCA9306 for 1.2V/1.8V/2.5V, OR for 5V, but not both.  And if you have close to 3.3V on both sides, you need to remove the PCA9306 from the picture altogether.  With PCA9306, I'd need to make it a module I can insert and remove whenever needed; with ISO1640 I can spend about 2.5€ more and make it monolithic.

Mouser sells cheapest PCA9306 variants for about 0.57€ in singles, whereas ISO1640 is 3€.  If I know the logic level beforehand, or can use I²C devices that work with 3.3V logic levels, then of course I will do that.  But, when say testing various I²C sensors or sensor modules, that is not always possible; but I can still spend a couple of euros more to simplify my designs and misuse the ISO1640 isolator as a "more robust I²C level translator".
(I have looked, but have not found a comparable I²C level translator, one without requiring one supply to be lower than the other, or having very asymmetric logic level thresholds and outputs –– in particular, one side output low being higher than the low threshold on the other side.)

For the UART cable, I like TI ISO6721/7721 being able to handle both level translation (from 1.8V/2.25V-5.5V) and isolation whenever I happen to need one or both.  This way, I only need one cable for all my USB-to-UART needs.

It's tricky to comment, about your circuit(s)/schematic(s), which desperately need digital isolators, without seeing the schematics.
Is it?  You already confidently implied my use of digital isolators is an indication of my lack of design skill, so how come it is now suddenly tricky to back up your claim?

Here.  This is the core part of my USB-to-UART cable.
On the right side, you have either a cheap microcontroller with a native USB interface like CH554G or a cheap Cortex-M0, or a dedicated USB-serial chip like FT230X, CH340, etc.  In my case, I've used various microcontrollers at 3.3V and 5V logic levels, but nowadays the right side VCC is always 3.3V.

On the left side, you have the serial console UART pins on various single-board computers, routers and switches, and even 3D printer mainboards.  The logic levels vary, from 1.8V (many Linux SoCs) to 3.3V (common) to 5V (older things using 5V logic).  The idea of this cable is to be able to safely power both my host computer and the target SBC/appliance, while accessing the Linux terminal console on the target.  Note that such pins are often just through holes on the target board, only sometimes labeled in the silkscreen.

With this cable, all I need to worry about is the baud rate, bits, and stop bits.  Even if the device uses a cheap wall wart that floats the negative side to peak negative mains voltage (being double-isolated with a class Y capacitor between the isolated side and the mains side), with a couple of hundred volts between its ground and the ground on my properly true-earth grounded PC, this cable is safe to use.  I don't have to first use a multimeter to check if there is a potential difference, and check if I bridge their two grounds I see a ground current I need to worry about.

The digital isolator costs $1.21 at JCLPCB assembly, 1.46€ in singles at Mouser, and the two 0.1µF capacitors are bog-standard X7R 16V or higher ceramic caps in 0603.  You can save something like $1.5 or 1.6€ if you bodge the level translation using transistors or whatever components you have at hand, like most do when they need level translation with their USB-UART cable, but you likely won't get very high baud rates with such, and if the target has a particularly low (< 0.3V) logic low threshold voltage, bidirectional translators low-level glitch when they temporarily confuse the actual direction of the signaling can ruin your transmitted signal (TX to the SBC/SoC).

My suggestion is to avoid both voltage translation and ground loop/ground current issues by spending an additional $1.30/1.60€ here.  My question is about why one can find dozens of hobbyist DIY USB-UART projects, but none using such a digital isolator.  Is it because you and joeqsmith are right, and using a digital isolator is only papering over a bad design?  Or for some other reason?

I am fully aware that price is a key factor in commercial designs, well exemplified in the Audio USB Isolator niche, where they don't even bother to describe the isolator characteristics, only the effects they claim audiofiles will benefit from.  The lack of digital isolators in hobbyist and custom-purpose projects is surprising to me – as well as suspicious, because I am fully aware of the risk of falling into the Dunning-Kruger trap.  As I often repeat, on the electronics side, I still am only a hobbyist.
« Last Edit: July 01, 2024, 10:59:42 pm by Nominal Animal »
 
The following users thanked this post: MK14

Online MK14

  • Super Contributor
  • ***
  • Posts: 4702
  • Country: gb
What you are saying is that any circuit using an isolator to solve a problem is the wrong solution, because you have never used a digital isolator to solve a problem you haven't been able to avoid otherwise.  Let me guess: you have never used a digital isolator at all, outside an occasional optocoupler, right?

If I am correct, then your retort is just saying that "if you don't avoid them like I do, your skills are inferior", which has negative informational value in my opinion.  I am not interested in using digital isolators unless they are the best tool for the job; and I've described above at least two problems where I use them for.  What exactly is your "design tweak" there that makes the isolators unnecessary?

Actually, I'm disappointed with my posts, in this thread.  I failed to spend enough time, reading it through and digesting the information properly.  Sorry.

I skim-read bits of it, far too quickly, and then jumped in and made some posts.

As long as the grounds are NOT shared, and significant interfaces are involved, such as USB.  Then using isolators, makes perfect sense, and seems very reasonable.

If the grounds are shared, but the interface voltages are different, or even if you want to well protect your circuitry.  It still makes sense to use isolators, unless you are confident and/or there are easy ways of converting or coping with the differing interface voltages.

The 'Tweaking' I was referring to.  Was techniques, such as for allowing MCU inputs to safely handle much higher input voltages, in a well protected manner, or their outputs to do the same.  Such as by using transistors and op-amps, as necessary.
You may well know all that, already.

Ideally, I'd try and avoid such problems, in the first place.  By using modules, which run from the same supply voltage, and are basically compatible with the circuit.  E.g. all 3.3V.
« Last Edit: July 01, 2024, 11:02:57 pm by MK14 »
 

Online MK14

  • Super Contributor
  • ***
  • Posts: 4702
  • Country: gb
It's tricky to comment, about your circuit(s)/schematic(s), which desperately need digital isolators, without seeing the schematics.
Is it?  You already confidently implied my use of digital isolators is an indication of my lack of design skill, so how come it is now suddenly tricky to back up your claim?

Here.  This is the core part of my USB-to-UART cable.
On the right side, you have either a cheap microcontroller with a native USB interface like CH554G or a cheap Cortex-M0, or a dedicated USB-serial chip like FT230X, CH340, etc.  In my case, I've used various microcontrollers at 3.3V and 5V logic levels, but nowadays the right side VCC is always 3.3V.

On the left side, you have the serial console UART pins on various single-board computers, routers and switches, and even 3D printer mainboards.  The logic levels vary, from 1.8V (many Linux SoCs) to 3.3V (common) to 5V (older things using 5V logic).  The idea of this cable is to be able to safely power both my host computer and the target SBC/appliance, while accessing the Linux terminal console on the target.  Note that such pins are often just through holes on the target board, only sometimes labeled in the silkscreen.

With this cable, all I need to worry about is the baud rate, bits, and stop bits.  Even if the device uses a cheap wall wart that floats the negative side to peak negative mains voltage (being double-isolated with a class Y capacitor between the isolated side and the mains side), with a couple of hundred volts between its ground and the ground on my properly true-earth grounded PC, this cable is safe to use.  I don't have to first use a multimeter to check if there is a potential difference, and check if I bridge their two grounds I see a ground current I need to worry about.

The digital isolator costs $1.21 at JCLPCB assembly, 1.46€ in singles at Mouser, and the two 0.1µF capacitors are bog-standard X7R 16V or higher ceramic caps in 0603.  You can save something like $1.5 or 1.6€ if you bodge the level translation using transistors or whatever components you have at hand, like most do when they need level translation with their USB-UART cable, but you likely won't get very high baud rates with such, and if the target has a particularly low (< 0.3V) logic low threshold voltage, bidirectional translators low-level glitch when they temporarily confuse the actual direction of the signaling can ruin your transmitted signal (TX to the SBC/SoC).

My suggestion is to avoid both voltage translation and ground loop/ground current issues by spending an additional $1.30/1.60€ here.  My question is about why one can find dozens of hobbyist DIY USB-UART projects, but none using such a digital isolator.  Is it because you and joeqsmith are right, and using a digital isolator is only papering over a bad design?  Or for some other reason?

I am fully aware that price is a key factor in commercial designs, well exemplified in the Audio USB Isolator niche, where they don't even bother to describe the isolator characteristics, only the effects they claim audiofiles will benefit from.  The lack of digital isolators in hobbyist and custom-purpose projects is surprising to me – as well as suspicious, because I am fully aware of the risk of falling into the Dunning-Kruger trap.  As I often repeat, on the electronics side, I still am only a hobbyist.

As I've mentioned in my previous post.
I'd NOT read this thread properly, and just jumped in.

I thought, you were talking about straight forward, hobbyist projects.  Which only had to deal with supply voltage differences, between your MCU circuit and an external module, or similar situation.

But going back on topic.

At a very quick glance at the circuit you kindly have drawn, and before spending time, to check my thoughts.

I would have thought line senders and receivers, would make more sense here.

I.e. These:
https://www.digikey.co.uk/en/products/filter/interface/drivers-receivers-transceivers/710

With appropriate input/output voltages, and suitable baud rates.

But don't necessarily assume, I'm knocking your solution(s), as they could still be better.

EDIT: I'm assuming the grounds are either common between the two circuits, or can be.  If not, then some form of isolator, may well be a good solution.

EDIT2: ok, I stand corrected, after rereading, and better understanding your post, I quoted here.
Yes, if they have different power supplies and you don't want to risk joining them (grounds), which if they are floating, probably is not a good idea, anyway.
The isolator, makes a lot of sense.
« Last Edit: July 01, 2024, 11:45:14 pm by MK14 »
 

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 11997
  • Country: us
My question is about why one can find dozens of hobbyist DIY USB-UART projects, but none using such a digital isolator.  Is it because you and joeqsmith are right, and using a digital isolator is only papering over a bad design?  Or for some other reason?

Right?  All designs are a compromise.  I typically start with the requirements, which include common mode.    Again, I am only concerned when using USB in cases with high common mode.   USB is well suited for single ended devices, like mice for example.  Why? Because you avoid any common mode, in most applications.   So if I am designing for cases where I know the common mode may be a problem, I am not going to choose USB.   In the majority of cases where this is not a concern, USB is fine.   

So, why the big deal about common mode?  Can't we just ground the two devices to keep the signals within the range?   In my experience, that has proved to be far more difficult in practice.  Some attempts to make USB work under such conditions were out right comical.  In every case, these have failed which included attempting to isolate the two devices.   

For your TV/audio applications, will it matter?  I doubt it.   For the environment I work in, I cringe at the thought of USB.  For my home projects, I just use Ethernet.   Don't like my responses, don't ask in a public forum.  Problem solved.

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14893
  • Country: fr
To be clear -- for my part anyway, I've implied that hobbyists are frequently in the "inexperienced" camp, and that they might benefit some if they knew.  That basically sums it up as an answer.
That is what I thought, too, but seeing the many answers that imply that any use of digital isolators is a sign of a bad design has made me question myself.

That claim is mind-blowing.
 

Online MK14

  • Super Contributor
  • ***
  • Posts: 4702
  • Country: gb
My question is about why one can find dozens of hobbyist DIY USB-UART projects, but none using such a digital isolator.  Is it because you and joeqsmith are right, and using a digital isolator is only papering over a bad design?  Or for some other reason?

Good question!

I suspect, it is poor/marginal designs, on their part.  Hobbyist designs, can often be of substandard quality.

But also, it is because (I suspect, educated guess, rather than fact based), much of the time, such a solution would work, just fine.

It is just poor practice (opinions may vary), to connect, two relatively unknown, floating  (i.e. unearthed power bricks) devices, together.

So, you may have a better design.

But also, those digital isolators, are a bit pricey, and possibly harder to obtain, compared to many other electronic parts.
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 7856
  • Country: ca
For the UART cable, I like TI ISO6721/7721 being able to handle both level translation (from 1.8V/2.25V-5.5V) and isolation whenever I happen to need one or both.  This way, I only need one cable for all my USB-to-UART needs.

Warning about these type of capacitor based isolators, even though they say they can withstand 3kv isolation, their operating conditions are way down below 450vac.

If all you require is <1mb, but you want the robust isolation operating at >3kv, you will need to use 2 optocouplers, 1 for each direction.

I have used the 2 optocoupler for my isolated RS232 link in one of my test exercise bike designs where my brushed DC motor's commutator noise with the added human rider acting as a random static ground erased all data glitch errors.  Though, the modern ISO6721 should be fine if you don't expect regular 400v spikes between the grounds of both sides in your design.
 
The following users thanked this post: MK14

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21974
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
For the UART cable, I like TI ISO6721/7721 being able to handle both level translation (from 1.8V/2.25V-5.5V) and isolation whenever I happen to need one or both.  This way, I only need one cable for all my USB-to-UART needs.

Warning about these type of capacitor based isolators, even though they say they can withstand 3kv isolation, their operating conditions are way down below 450vac.

If all you require is <1mb, but you want the robust isolation operating at >3kv, you will need to use 2 optocouplers, 1 for each direction.

But not 6N136.  >:D

Taking https://www.ti.com/lit/ds/symlink/iso6721.pdf for instance:
We have CMTI min 100kV/us at 1200V step (p.12); that's more than good enough for me, that's like offline GaN converter gate drive territory.  And that's a characteristic, it's measured. (Optos are not tested equally in these parameters; beware!)

The insulation specs (p.8 ) are type ratings under various agencies: 450Vrms might be a nominal maximum plus transients of some category implied.  It may be a safe long-term (sufficiently long, or ~forever, depending on statistics of the barrier) rating.  You'll have to check the standard to see.  (Fig. 9-8 suggests the latter. And that it's perhaps the plastic package barrier limiting lifetime, not the SiO2 barrier.)   450Vrms isn't enough for 480V industrial US, but US isn't subject to DIN and the UL rating likely suffices for that application, perhaps even for 600V, or give or take what lifetime you [the manufacturer] expect from it.

As I recall, the ADI parts use a polyimide barrier, which does degrade over time, at most any voltage (so, following a similar life curve), but that they are suitable for comparable impulse and long-term voltages.

Incidentally, notice they're only type-rated for basic insulation (relevant for both CE and US markets, e.g. under coordinated standards like 60950-1; and perhaps UL 1577 or others use such a type system as well, I don't know).  That means, for example, earthed logic on one side, mains on the other.

Hm, I don't recall optos usually having such a lifetime calculation or tradeoff reported.  I wonder if that's because they're so old, they've stuck with old standards (that just dictated some impulse or short-duration test for some other given nominal type-rated voltage), or does anyone rate them the same way (under the same standards and clauses)?  I admit I don't read safety tables in enough detail to recall, I'll have to take notice next time I'm looking at one.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: MK14

Offline Berni

  • Super Contributor
  • ***
  • Posts: 5008
  • Country: si
Yep usually the bigger problem is power.

Isolated DC/DC modules are large, expensive, noisy, come in not so convenient packages... etc, building one yourself takes a fair bit of parts too and can cause a lot of noise problems if you don't know what you are doing.

Isolation can also cause other issues where things float up to some high voltage and then you get an arc over in some spot that kills things.

So for short distances isolation usually does not make sense. You can still blow up isolated interfaces if you wire them up wrong enough, while protocols meant to go over a reasonable length of cable are designed with some sort of immunity to common mode noise (be it large signal levels or diff pairs). If you have ground loop issues corrupting data on external digital interfaces then you are doing something wrong, disconnect your stick welders output from that ground. Where ground loops are a serious problem is analog things like audio (where microvolts can cause interference). If you are going large distances, just go ethernet (Can still stick non TCP/IP data trough it).

Isolation can start to make sense in more cases if you lower the barrier to entry some. Like for example if you only need to pass a binary on/off signal to something, you can receive it with a optocoupler , no isolated power needed as the signal is the power for the isolated side LED. Similar for using an optocoupler as a open collector output, no isolated power needed. So you see this done a lot in PLCs, heck even MIDI does it.
 
The following users thanked this post: MK14

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 11997
  • Country: us
..., while protocols meant to go over a reasonable length of cable are designed with some sort of immunity to common mode noise...

I don't think you can fix a USB common mode problem with a protocol.   Or, maybe let me ask.  What do you think happens when you exceed the common mode voltage when using USB?   Do you think it just causes some errors in the data stream?   

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2240
  • Country: 00
I cannot go into the specifics because it's a commercial and proprietary design.
Could you at least say how much EMI you initially saw from the digital signal isolator alone, roughly compared to a Cortex-M microcontroller?

I'm only looking to understand the magnitude (power of ten!), nothing specific.

All measurements we did in test labs where performed during acquisition of signals.

(EN 55011 group 1 class B)

Here's a pic of a pre-compliance measurement:



And this one is the official one used for certification:



They were done in different test labs. First one was done in peak mode. Second one was done in quasi-peak mode.
« Last Edit: July 02, 2024, 11:52:15 am by Karel »
 
The following users thanked this post: Nominal Animal

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 11997
  • Country: us
All measurements we did in test labs where performed during acquisition of signals.

(EN 55011 group 1 class B)

Here's a pic of a pre-compliance measurement:

Micro with 50MHz clock?  If so, you couldn't improve that area?  Just curious. 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21974
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
..., while protocols meant to go over a reasonable length of cable are designed with some sort of immunity to common mode noise...

I don't think you can fix a USB common mode problem with a protocol.   Or, maybe let me ask.  What do you think happens when you exceed the common mode voltage when using USB?   Do you think it just causes some errors in the data stream?

The hidden (and real / more important) question being, is the above question even meaningful.  >:D

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf