Author Topic: Protecting Inputs and Outputs in Digital Electronics  (Read 20502 times)

0 Members and 1 Guest are viewing this topic.

Online pascal_swedenTopic starter

  • Super Contributor
  • ***
  • Posts: 1539
  • Country: no
Protecting Inputs and Outputs in Digital Electronics
« on: May 08, 2016, 12:54:18 pm »
I stumbled on the following article this week:

http://www.digikey.com/en/articles/techzone/2012/apr/protecting-inputs-in-digital-electronics

Do they apply these techniques in most PCB designs for consumer electronics today?

Is it only applicable for direct connections to the inputs of the MCU?

Is it only applicable for digital inputs of the MCU? What about analog inputs of the MCU?

Are the 74HC series (multiplexer, demultiplexer, selection switch, etc.) already taking up some of this input protection?

What about protection of outputs? Can there also be taken some measures?

Appreciate if you know about similar articles which are concise and easy to understand.
This way I can share the article with my PCB design house for further discussion.
« Last Edit: May 15, 2016, 04:22:22 pm by pascal_sweden »
 

Offline Pack34

  • Frequent Contributor
  • **
  • Posts: 753
Re: Protecting Inputs in Digital Electronics
« Reply #1 on: May 08, 2016, 02:54:40 pm »
Anything going off-board needs some level of protection, such as a MAX13206 for basic ESD.

The big kicker is what you're interfacing with. Is it something inside an enclosure that's only connecting two boards that are under your control? Is it "customer facing" in that it's an exposed connector that a customer or operator has access to?

Typically for stuff that's internal I'll just stick with the MAX13206 and leave it at that. 

You need to be careful with stuff that's exposed. Especially if you're going for CE mark kind of stuff. Typically I'll try to bead everything and have a very weak RC filter installed (say 100-ohm and 100pF). You can add some zener diodes to clamp the voltage level if you're concerned this could be an issue.

An alternative to the zeners would be to have the input digitals go through a unity gain opamp to ensure that the TTL level of the input signal is safe for the FPGA or micro circuit that you're dealing with.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Protecting Inputs in Digital Electronics
« Reply #2 on: May 08, 2016, 08:11:05 pm »
Absolutely. Inputs and outputs.  Analog and digital.

What are you protecting against?  Do you know?  Are you required to meet a standard?  Should you reference one, if not?

IEC 61000-4 is the most common EMC standard including protective features, being for the European market (CE mark).  (In the US, the FCC doesn't regulate susceptibility, but does recommend testing.)  Its parts include ESD and surge.  ESD is only tested on exposed contacts: metal surfaces, screw heads, connectors, pins, etc.  You don't need to apply protective measures to every node in the circuit, or necessarily to every pin in a connector -- if those pins are inaccessible (which is what makes a small, shielded connector like HDMI so handy).

It's the simple electrical equivalent of "sanitize your inputs".  Don't allow unlimited voltage and current into your circuit!  At least, not unless you want those parts of the circuit to survive.  Starting from the levels in the standards, you can work backwards and solve for what kinds of resistors, capacitors, diodes, etc. you need.

Surge pertains mostly to mains inputs.  Any long wires in or between a building can pick up surges from shorted wires or lightning induced fields, though, and can be worth protecting with heavier means (big TVS diodes, MOVs).  Home security/automation and industrial controllers are a good example.

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

Online Alex Eisenhut

  • Super Contributor
  • ***
  • Posts: 3330
  • Country: ca
  • Place text here.
Re: Protecting Inputs in Digital Electronics
« Reply #3 on: May 09, 2016, 02:11:03 am »
On a related topic; you should also protect against the "unpowered board is actually powered by the inputs" thing. There are logic families specifically designed to solve that issue.
Hoarder of 8-bit Commodore relics and 1960s Tektronix 500-series stuff. Unconventional interior decorator.
 

Offline danadak

  • Super Contributor
  • ***
  • Posts: 1875
  • Country: us
  • Reactor Operator SSN-583, Retired EE
Love Cypress PSOC, ATTiny, Bit Slice, OpAmps, Oscilloscopes, and Analog Gurus like Pease, Miller, Widlar, Dobkin, obsessed with being an engineer
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12807
Re: Protecting Inputs in Digital Electronics
« Reply #5 on: May 09, 2016, 10:14:28 am »
Few seem to consider what will happen to the clamping levels under severe overload conditions.   Simple Schottky clamps are only safe to use if the maximum possible current through the upper clamp is less than the minimum load on the Vdd rail.   Also, if the clamp current is high enough, the clamping voltage can rise high enough to forward bias the internal ESD diodes.  If there is no resistor between the external clamps and the pin to limit the ESD diode current this can cause issues.  Even a fairly low resistance can make a big difference.

Done right, applying grossly excessive input voltage (but less than the flashover voltage) will just blow the input resistor - which should be a fusible type - without damaging the rest of the input protection circuit or the input itself.
 

Offline nowlan

  • Frequent Contributor
  • **
  • Posts: 649
  • Country: au
Re: Protecting Inputs in Digital Electronics
« Reply #6 on: May 09, 2016, 10:47:57 am »
That MAX13206 chip seems kind of expensive for 6 diodes.

I seem to recall MikesElectric mention he used some usb protection chip. I forget which episode.
 

Offline Pack34

  • Frequent Contributor
  • **
  • Posts: 753
Re: Protecting Inputs in Digital Electronics
« Reply #7 on: May 09, 2016, 01:23:15 pm »
That MAX13206 chip seems kind of expensive for 6 diodes.

I seem to recall MikesElectric mention he used some usb protection chip. I forget which episode.

Just using it as an example. A PESD1206 would be similar and cheaper.
 

Online tszaboo

  • Super Contributor
  • ***
  • Posts: 7307
  • Country: nl
  • Current job: ATEX product design
Re: Protecting Inputs in Digital Electronics
« Reply #8 on: May 09, 2016, 01:29:48 pm »
Yes, but i prefer TVS instead of zeners. And MCU pins should  never go outside the product (unlike in the article), there is something in-between, like a 74HCxx, optocoupler, etc. Depends on the application. Unless it is USB.
 

Offline Pack34

  • Frequent Contributor
  • **
  • Posts: 753
Re: Protecting Inputs in Digital Electronics
« Reply #9 on: May 09, 2016, 09:07:16 pm »
Yes, but i prefer TVS instead of zeners. And MCU pins should  never go outside the product (unlike in the article), there is something in-between, like a 74HCxx, optocoupler, etc. Depends on the application. Unless it is USB.

I never actually though of doing that. So you typically add an OR gate on each output and input line? If the ESD event is significant enough to damage the microcontroller, wouldn't it be able to damage the logic?

I've seen some opamps used to act as a buffer and clip the input signals.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Protecting Inputs in Digital Electronics
« Reply #10 on: May 09, 2016, 10:55:55 pm »
Well, just buffering inputs is a rather tedious use of board area and logic parts.

There is some logic behind using a PHY to isolate the brainy parts from the outside world, though.  But it still assumes that:
1. The board is useful with one or more failed channels, or
2. You intend to repair the board, rather than just swap in a new one.

If swap-to-repair is the way to go, then it doesn't matter if ESD knocks out a port or the IO bank* of the source device.  Fail is fail.  So you might as well save the board cost of buffers, if you can run it straight from the main chip.

IF, that is, the ESD sensitivity is comparable or equal.  Which won't be the case between something like an FPGA versus an HC logic gate, or LVDS transmitter.  But probably will be comparable between a microcontroller and an HC logic gate.

And if you're going to use protection diodes and filtering anyway, those will give you all your protection, so why bother with a buffer at all?

*I've seen an FPGA zapped before, such that one of its eight IO banks went down.  Supply current draw was a bit higher, and no pins functioned on that bank, but the rest of the chip was fine.  This is probably typical of most complex devices, which have the "brains plus PHY" architecture internally as well.  FPGAs more than most, given the diversity of available pin driver types.

Tim
« Last Edit: May 09, 2016, 10:57:49 pm by T3sl4co1l »
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online tszaboo

  • Super Contributor
  • ***
  • Posts: 7307
  • Country: nl
  • Current job: ATEX product design
Re: Protecting Inputs in Digital Electronics
« Reply #11 on: May 10, 2016, 08:08:20 am »
Yes, but i prefer TVS instead of zeners. And MCU pins should  never go outside the product (unlike in the article), there is something in-between, like a 74HCxx, optocoupler, etc. Depends on the application. Unless it is USB.

I never actually though of doing that. So you typically add an OR gate on each output and input line? If the ESD event is significant enough to damage the microcontroller, wouldn't it be able to damage the logic?

I've seen some opamps used to act as a buffer and clip the input signals.
(new) MCUs have usually have 2KV HMB ESD performance, while getting a 8KV transceiver is not an issue (should not have written 74HC ,but 74xx). But the more important aspects are the latch up and the non destructive ESD events. I've seen systems reset when an "ESD event happened". The MCU ESD doesnt guarantee that it will not do anything stupid, but it will not break. And people cannot be bothered to write ESD safe code. Yes, that exists.
So since I am usually designing high reliability stuff, none of these consumer rubbish, it does actually matter if the MCU resets or not.
And latch up. Dave even made a video, showing to power an MCU without power pin. If you connect something external to it, it can power it. If you have something inbetween, with enable pins, you decrease the chance of that happening. Best is that you can make a double footprint and replace the buffers (or gates) with just resistors.
 

Offline Jeroen3

  • Super Contributor
  • ***
  • Posts: 4067
  • Country: nl
  • Embedded Engineer
    • jeroen3.nl
Re: Protecting Inputs in Digital Electronics
« Reply #12 on: May 10, 2016, 11:34:45 am »
I recently had the same question.

Don't worry about ESD. Worry about EFT and (common mode) surges from nearby relays.

https://www.eevblog.com/forum/projects/plc-digital-input/msg916753/#msg916753
I now know that the simple buffer chips (74HC etc) provide enough clamping when you have sufficiently high input impedance.
Notice that you cannot use a normal 0603 to 1206 (mil) smd resistor for this because of the power and surge ratings.
You could also run it directly to the MCU, but this has less clamping (smaller silicon scale) and you might want to add additional clamping.
Main thing is the first capacitor and the first resistor, this attenuates and decouples the signal. Make sure there is an AC path to ground (earth).

This topic is often discussed, but always bodged together. Probably because you need to buy the standard. Or because people don't test their circuit. The required test equipment is expensive after all. As is buying a compliance test from a test institution.
Note: I have not tested my circuit yet. Still needs to be assembled.
« Last Edit: May 10, 2016, 11:39:14 am by Jeroen3 »
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Protecting Inputs in Digital Electronics
« Reply #13 on: May 10, 2016, 03:55:35 pm »
If you have the opportunity to use shielded cables, do so -- but make sure the shield is tightly grounded to the enclosure and PCB, otherwise it is for naught!

I had a situation where the customer insisted on USB, and also wanted to cheap out on the cables (custom assemblies, because water-tight and different supply voltage).  It ended up costing them over $20 extra per cable, because we couldn't solve EFT without using shielded cables and metallic connectors.

If you think about it, it's very tough indeed to solve.  EFT is a 2kV (give or take) pulse, driven from 50 ohms, a couple nanoseconds sharp, that washes over the system like a tsunami.  Your only choice is to close the hatches, and let it wash around you.  You must shield between connectors, and around the system, with a Faraday cage.  (If you have a two layer board, use stitched ground; four layers, use internal ground plane; metallic enclosure, shield and ground to that.  Bare boards are okay cages when designed this way, but not ideal.)  Even if the shield-to-ground connection has 50dB common mode rejection, that's still ~6V of common mode peak that's blowing out your signal -- even Full Speed USB (3.3V CMOS logic levels) is corrupted by this noise.  And you aren't likely to get that much performance, for example on a shielded cable that returns to a header: even if the unshielded length is on 1 cm!

If your signals are high bandwidth, shielding is the only option.  (Full Speed USB is 12Mbps, and High Speed is even more; with an even smaller amplitude, but the same common mode range.)  For lower bandwidth (<1Mbps?), you can remove quite a lot of noise (RFI and most EFT) by filtering.  This should be characteristic of any terminal block level signal, and allows very messy wiring and unshielded cabling (what hope do you have of grounding a shield to a terminal block, anyway?).

Tim
« Last Edit: May 10, 2016, 03:58:35 pm by T3sl4co1l »
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Online pascal_swedenTopic starter

  • Super Contributor
  • ***
  • Posts: 1539
  • Country: no
Re: Protecting Inputs and Outputs in Digital Electronics
« Reply #14 on: May 15, 2016, 04:23:35 pm »
Throwing this topic back in the group. Added Outputs to the title, as I am looking for Protecting
both the Inputs and the Outputs in my Digital Electronics design.
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Protecting Inputs and Outputs in Digital Electronics
« Reply #15 on: May 15, 2016, 09:14:06 pm »
Outputs depend on the type, obviously.  A small LVDS driver will need clamp diodes to increase ESD ratings.  LSTTL or HC CMOS output pins might be okay, naked, particularly if you're putting them inside a shielded cable like a parallel port (DB-25).  A high current output, like a gate driver, or ULN2003, or something custom (transistor switched, SSR or mechanical relay switched?) might not need any help at all, being beefy enough to handle it, or protected by design (an active-driven output, like a gate driver, has two clamp diodes implicitly, and they are as large as the MOSFETs doing the driving).

The nice thing about outputs is, at a certain point, they get more than beefy enough doing what they're supposed to be doing, that you don't have to worry at all about weak surges like ESD and EFT.  (Proper 61000-4-5 level surges may still need some assistance, or special cases, like crossed wiring, reversed polarity, and so on.)  A 48V, 100A DC motor drive won't even notice ESD, and probably handles surge up to a pretty good range.  However, connecting a 48V lead-acid battery to it, the wrong way around, might lead to more interesting results.

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

Offline bitslice

  • Frequent Contributor
  • **
  • !
  • Posts: 493
  • Country: gb
Re: Protecting Inputs and Outputs in Digital Electronics
« Reply #16 on: May 16, 2016, 12:04:56 am »
The other issue about outputs is that you may not want the output to remain on if your controller has just crashed,
some arrangement of pulses to keep a transistor on can be used.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26751
  • Country: nl
    • NCT Developments
Re: Protecting Inputs in Digital Electronics
« Reply #17 on: May 16, 2016, 12:33:04 am »
Yes, but i prefer TVS instead of zeners. And MCU pins should  never go outside the product (unlike in the article),
That is a bit strong. With the right input protection you can use a pin directly but it means there will be a resistor, some capacitance and overvoltage protection involved. I usually limit the upper frequency of the protection circuit just above the maximum frequency the input/output is used for.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline sarepairman2

  • Frequent Contributor
  • **
  • Posts: 480
  • Country: 00
Re: Protecting Inputs and Outputs in Digital Electronics
« Reply #18 on: May 16, 2016, 01:04:02 am »
no, its cheaper to make a new PCB. you want to keep the costs low.  blame the customer instead :-DD
 

Online pascal_swedenTopic starter

  • Super Contributor
  • ***
  • Posts: 1539
  • Country: no
Re: Protecting Inputs and Outputs in Digital Electronics
« Reply #19 on: June 08, 2016, 12:25:04 am »
If input pins and output pins of the processor and FPGA can not be exposed directly on a connector on the PCB board, what to do with SPI, I2C, JTAG, ISP, or in general a custom feature connector that makes unused processor pins available on a connector for future use?

This is not clear to me. Also to sense an analog signal you would expose an analog input pin on a connector.
Or for an external interrupt you would expose a digital input pin on a connector.
Or to drive an external relais module you would expose a digital output pin on a connector.

What about common protection techniques for the below common I/O interfaces on a PCB board?

1. SPI connector for external SPI peripherals

2. I2C connector for external I2C peripherals

3. JTAG connector for Programming and Debugging

4. ISP connector for In-Serial-Programming

5. Feature connector to expose unused digital input pins, analog input pins, digital output pins, analog output pins and make these unused processor pins available for future use (e.g. extra PCB module)?

6. USB port for data communication - Which chips provide good input protection? Do all of them also provide charging functionality? Is there a difference in charging capacitiy? How to implement a fast charger functionality when the USB port will act as a Host? Is Common Mode Choke always needed? FTDI recommends this in their guidelines, but they do not use it themselves in their evaluation boards. This is a bit confusing.

7. Serial port for data communication - Does the MAX232 provide enough protection as such?

8. Multiplexing I/O pins. What about the 1-to-16 and 16-to-1 multiplexer in the 74HC series?
Do these 74HC multiplexer chips specifically, and the 74HC chips in general,  provide enough input/output protection? What about ESD, a short, driving output pin with +5V by mistake?

Some other interfaces that come to my mind:

9. Telephone control application: What about an analog audio input interface on a PCB board, such as a DTMF decoder circuit connected to an input Coax connector to sense an audio signal? Is the DTMF chip as such tolerant to ESD and other issues?

10. Drone camera application: What about analog video input and output interfaces on a PCB board, such as a Video input Coax connector and a Video output Coax connector for OSD overlay on an analog CVBS video signal? Is the MAXIM chip for OSD overlay on a CVBS signal, tolerant to ESD and other issues?

11. Remote control application: What about an Infrared output circuit with a small connector mounted on the PCB board to drive an external mounted IR LED via a cable connected to the connector?
« Last Edit: June 08, 2016, 12:52:09 am by pascal_sweden »
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21606
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Protecting Inputs and Outputs in Digital Electronics
« Reply #20 on: June 08, 2016, 04:12:57 am »
If input pins and output pins of the processor and FPGA can not be exposed directly on a connector on the PCB board, what to do with SPI, I2C, JTAG, ISP, or in general a custom feature connector that makes unused processor pins available on a connector for future use?

There are good ideas and bad ideas.

Good idea: having foresight in the design process and accommodating possible expansion and stuff.
Bad idea: putting an edge connector near a whole in the enclosure and saying "fuck it, let the secondary market fix our problems".

Well, not in such condescending terms... but that's the sort of idea.

Compare early home PCs.  Designs like the ZX Spectrum and C64 had a header or edge connector or whatever, that exposed the processor bus.  ESD city right there!  It should be no wonder that all those computers needed metal cages to keep all the awful logic switching noise inside; most of them had PCB designs without any ground pour, just logic routed over logic.  Brutal, even at 3.58MHz!

And not that you can have perfect foresight, but you can at least think of a few possibilities and play with that.  A purpose-made expansion slot, instead of an accident.  Make it modular, add several (or an expandable option).  The IBM PC originally had eight slots!

The most important thing, as far as the circuit's survival, is preventing huge transients from blowing out pins and chips.  Just putting ESD diodes on a header, and leaving it exposed, is awfully minimal, but likely effective.  Adding an RC or LC filter will increase survivability even further, and add EMI filtering.

Quote
This is not clear to me. Also to sense an analog signal you would expose an analog input pin on a connector.

At least an RC or LC filter, and diode clamp or zener.  You don't want the signal being able to change any faster than you're sampling it at -- unless you're using that as a feature, not a bug.

Always filter your signals to the minimum bandwidth required for the application!

Quote
Or for an external interrupt you would expose a digital input pin on a connector.

A naked interrupt pin would be devastating to an edge triggered device!  Apply RF of a few MHz and the poor thing just locks up!

Always sanitize your inputs!

Quote
Or to drive an external relais module you would expose a digital output pin on a connector.

That kind of load would most likely require a buffer anyway, even if it's just a BJT.  A protected FET would be excellent, adding short circuit withstanding to the list of features.

Quote
What about common protection techniques for the below common I/O interfaces on a PCB board?

1. SPI connector for external SPI peripherals

1. Naked ~HC CMOS level logic: okay for short runs, especially with buffering.
2. Long runs require termination.  Use source termination for point-to-point links, or a beefy driver with load termination (on the last load in a linear chain).  Avoid star configurations.  This is typical of modest lengths (low to fractional meters).  Sort of related example: the old fashioned MFM/RLL hard drive interface used two ribbon cables, one carrying TTL level control signals, load terminated with a modest value resistor pack.  The pack was socketed, so you could plug it into the last hard drive on the port.
3. Long runs are even more prone to noise pickup and radiation.  Suggest RS-422/485.  Signals are unidirectional, so they can be converted to differential and back without any problems.  (The MFM drive interface also used RS-422, for the high speed data bits.  That was transferred over a single cable per drive, so the controller card had two data ports, and one control port shared between max. two drives.)
4. For even greater distances, you can still use an RS-422/485 sort of scheme, but you may want galvanic isolation (to increase common mode range even further), and other features like line loss compensation.  It may be more economical to go to an altogether more robust link method, like 10BASE-T, or a radio-over-copper method.

Always filter receiver inputs.  You don't want RF racking up a dozen extra clock SCK edges between bits!  This goes for differential as well as single ended!

Quote
2. I2C connector for external I2C peripherals

Recommend against it.  I2C can be carried short distances, but even then, it should use shielded cables.  It is difficult to buffer, because of the bidirectional (open collector) arbitration.

Even for modest distances, I'd recommend RS-422/485 or CAN instead.

Quote
3. JTAG connector for Programming and Debugging

N/A -- only ever used in a laboratory setting.  If you've put yourself into a situation where you must use JTAG in the field, you've already lost.

I haven't seen a single JTAG header and programmer that will actually withstand any tiny amount of RF.  The weak pull-ups are a worry; the lack of controlled signal quality is another (who's source-terminating what? Can it be chained, multi-dropped, or what?), and though most are provided with extra grounds (the 20-pin version is chock full of grounds: in fact, it's every other wire in the ribbon cable, precisely how you want it!), but they aren't usually well used (as soon as the ribbon cable enters the programmer, guess where the grounds go?..).

I've also seen a casual disregard for signal quality at the other end of most programmers and dongles: USB ports are so often connected utterly the wrong way, namely, with a ferrite bead from shield to ground.  They're intentionally bad.

Good "trap for young players", actually.  If you can ever imagine a situation where not being able to use the programmer means certain death to your development or product... try to take as many precautions as possible to avoid that!  For example, design a bootloader to work with one of those robust comm channels you'll have. :)

Quote
4. ISP connector for In-Serial-Programming

Similar, though potentially more troublesome because few-wire programmers may use open-collector arbitration.  That is, I2C but with RST being one of the active pins, basically.  Depends on the programmer.  In any case, I still haven't seen one that's shielded, so you have the same vulnerability during use.

Quote
5. Feature connector to expose unused digital input pins, analog input pins, digital output pins, analog output pins and make these unused processor pins available for future use (e.g. extra PCB module)?

1. Don't (see above discussion!).
2. Use protection and filtering.  Assume every pin is a potential hazard, and design accordingly.
3. Use covers and insulation to prevent damage to pins and ICs.
4. Use shielded covers and connectors to shunt ESD, short out EMI, and improve signal quality.

Good examples:
- Old timey game consoles.  Bus is exposed, but under a cover, or at the end of a slot.  The game cartridge itself may be vulnerable to ESD, but it's replaceable.
- PC expansion slots.  The connectors cover the pins, so you can't touch them easily.  (And if you're charged to the 10kV it takes to jump the remaining distance, frankly you're a retard and deserve the dead motherboard you'll get!)  Furthermore, they are internal, and require tools to access (remove covers, mounting screws).
- USB, HDMI, basically any high speed data connection today.  It's not possible to provide robust ESD protection, while keeping capacitance low enough to carry the data.  So, the connector's metal shell protrudes, shunting ESD from outside sources, and being the first to mate with the plug.  The sensitive data pins are tucked away inside.  The male pins are on the peripheral, where again, they may be more vulnerable, but they're more replaceable too.
- Or Ethernet, which is transformer coupled, so can withstand quite a lot of craziness from the outside world.

Quote
6. USB port for data communication - Which chips provide good input protection?

Again, protection is somewhat unfeasible on High Speed links, but, if you know it will only be operated up to Full Speed, then the ESD protection and filtering can be quite robust.

These features are usually provided by outside parts; you'd have to look and see if any controllers offer ESD > 2kV HBM on the USB pins themselves.

Quote
Do all of them also provide charging functionality?

No, that's software.

USB host devices usually have a "protected switch" type device for the 5V output.  Often.. they don't even have that, just a polyfuse or something.  The peak surge currents through those can be devastating, even if the total energy is limited by the fuse.

Ideally, a multilevel "protected switch" is used, to provide a negotiated load current draw.

Such is the spec on USB3, which offers more voltage and current after negotiation.

Quote
Is Common Mode Choke always needed? FTDI recommends this in their guidelines, but they do not use it themselves in their evaluation boards. This is a bit confusing.

No, in fact it is almost always worse.

USB is not fully differential.  The packet start and end symbols are unbalanced.  For these to be communicated with fidelity, the entire connector-to-cable-shield-to-connector signal path must be maintained.  A common mode choke of any useful value will deform these pulses, closing the eye and reducing the amount of interference that can be tolerated.

Furthermore, USB is source terminated only, so there is no load impedance for a CMC to work against, only the receiver input pin capacitance.  You can add some RC damping to fake it, but this unavoidably attenuates the signal some, and still can't be very much (less than 100 ohms, say).

Absolutely solid shielding, from end to end, is the only good solution.

It should be no surprise that:
1. USB always uses shielded cables, even for very short links (except HMI devices usually, but those run at ~UART speeds),
2. Maximum link length is only a few meters.

Quote
7. Serial port for data communication - Does the MAX232 provide enough protection as such?

Yes-- those are usually on the order of 10kV HBM ESD rating, which is good enough not to need outside protection, even for reliable links.

The ISL3280 series (RS-422/485) are even rated for 16.5kV of ESD!

RS-232 is quite slow (the pin driver output current, and slew rate, are intentionally limited), but if this is tolerable, it's another physical-layer candidate for SPI.  SPI is usually fast enough that you'll want 422 though.

Quote
8. Multiplexing I/O pins. What about the 1-to-16 and 16-to-1 multiplexer in the 74HC series?
Do these 74HC multiplexer chips specifically, and the 74HC chips in general,  provide enough input/output protection? What about ESD, a short, driving output pin with +5V by mistake?

Not recommended, but probably tolerable in practice.  CMOS output pins are more robust than input pins, though not by a huge margin.  Not sure what the actual rating is (2kV? 4kV?).

Again, would recommend diodes and filtering.

Quote
Some other interfaces that come to my mind:

9. Telephone control application: What about an analog audio input interface on a PCB board, such as a DTMF decoder circuit connected to an input Coax connector to sense an audio signal? Is the DTMF chip as such tolerant to ESD and other issues?

Telephone has additional problems.  Phone lines are long, and infrequently have been known to carry Zeus's ESD.  Lines of this type must be isolated, as you would connect to mains lines: and for much the same reasons!

However you'd like to arrange communicating those signals over the isolation barrier... be my guest.  (Transformers are common -- phone audio has limited and known bandwidth.  The ring tone and DC bias stink, but can be dealt with.  Otherwise, your basic DSP/DAQ signal chain, with digital isolators back to the processor, would be a fine way to go.)

Quote
10. Drone camera application: What about analog video input and output interfaces on a PCB board, such as a Video input Coax connector and a Video output Coax connector for OSD overlay on an analog CVBS video signal? Is the MAXIM chip for OSD overlay on a CVBS signal, tolerant to ESD and other issues?

Unfamiliar with that chip.

Video might be okay, but realize it's intended to be connected to shielded connectors again.  They may make the assumption that it'll be okay...

Video, and RF in general, often has the bad habit of making things as small, and as vulnerable, as possible.  That USB and digital logic pins are as robust as they are; that they can be as robust as they are, is pretty remarkable.  Not everyone makes the same efforts, though...

Quote
11. Remote control application: What about an Infrared output circuit with a small connector mounted on the PCB board to drive an external mounted IR LED via a cable connected to the connector?

Why not just put the IR LED on the board? ;D

An LED drive would be much like a digital logic or RS-232 (single line, odd as that sounds..) application.  Limited current, bandwidth.

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: nowlan, helius, PamelaS

Online pascal_swedenTopic starter

  • Super Contributor
  • ***
  • Posts: 1539
  • Country: no
Re: Protecting Inputs and Outputs in Digital Electronics
« Reply #21 on: June 11, 2016, 09:49:01 pm »
I found two extremely nice interactive tutorials from Texas Instruments about this subject matter:

ESD Protection Basics
Circuit Isolation Techniques

http://www.digikey.com/en/ptm?f=1431913583&f=549771276

The first tutorial contains a table with common I/O interfaces and a specific solution from TI for protection.

Note that DigiKey has an extensive library with Product Training Modules (over 2400 interactive tutorials):

http://www.digikey.com/en/ptm

Good stuff! And all for free! Unbelievable actually.
 

Online tszaboo

  • Super Contributor
  • ***
  • Posts: 7307
  • Country: nl
  • Current job: ATEX product design
Re: Protecting Inputs and Outputs in Digital Electronics
« Reply #22 on: June 28, 2016, 03:12:30 pm »
...
Tim
I agree with everything. Connecting GPIO pins together is fine on an arduino and such. The same design tecniques cannot be used for an end product. This is one of the reason, that those are designed by engineers, not hackers. Have you ever seen a printer with a JTAG port? Or any consumer product? If the signal leaves the product, then no direct path to the MCU. There are some grey areas though. For example a battery pack contacts might be direct, if they are those fingerproof type, and it is covered usually by a removable piece. Stuff like this.
 

Offline dmills

  • Super Contributor
  • ***
  • Posts: 2093
  • Country: gb
Re: Protecting Inputs and Outputs in Digital Electronics
« Reply #23 on: June 28, 2016, 04:13:41 pm »
This tends to be one of the areas that separate the industrial stuff from the domestic kit.

It is not at all uncommon to see industrial kit with **extensive** EMC/RFI measures, to the point that half the component count can go on 100pF caps, 100 ohm resistors, ESD diodes, inductors and opto isolators, you typically don't see that in domestic kit to anything like the same extent.

I would second the comment about making sure you have a reliable means to push new firmware to the box without needing to take the lid off to find a JTAG or ISP port, we tend to spend a lot of time on this (Also, make sure there is a way to force the bootloader to take the update even is there is an apparently valid main program found, sometimes that main program turns out to be broken).

Usually I will include a jtag chain (For production boundary scan as much as anything else), but it is likely only available by a bed of nails on production test and if there are high value parts (BIG fpgas for example) then buffering and protecting this is well worth the parts.

Generally an internal use only connector may or may not have much protection, you have to take a view but anything going outside the box gets at least a robust buffer and lowpass filter, and anything coming in gets some sort of ESD clamp and lowpass arrangement if at all possible.

Increasingly there are networks (often in really inconvenient 0.4mm DFN type things) for ESD (and to some extent EMC) protection of the modern high speed LVDS/TMDS busses which can be actually worth thinking about for some applications.

A nice gotcha with RS485 is the common mode range, particularly if there is a long cable in play with significant current flow, a 60M cable with a 6A DC supply doing remote battery charging for example had me because the screen formed the return and could put the data link outside the common mode range due the IR drop (How we laughed, the other end was 30M underwater).

Composhite video is slow enough that you can reasonably protect it with an ESD diode and can limit the bandwidth to below 10MHz (The filter will need to be higher to avoid phase shifting the croma subcarrier), SDI-12G not so much!

I have actually seen I2C buffered and taken outside the box, but it always strikes me as being a poor plan (Mind you in my view I2C is usually a last resort anyway), TI IIRC do a bidirectional buffer for it (The thing is kind of weird about exactly how you setup the pullups IIRC but it does work).

One of the more annoying interfaces for this stuff is parallel LVDS of the reasonably fast sort (A Few hundred MHz DDR, but lots of pairs), the mobile phone industry has some tempting parts, but 0.4mm DFN, still when the other end is a $1,000 FPGA....

73 Dan.
 

Offline prasimix

  • Supporter
  • ****
  • Posts: 2022
  • Country: hr
    • EEZ
Re: Protecting Inputs and Outputs in Digital Electronics
« Reply #24 on: June 28, 2016, 06:21:36 pm »
Maybe you can borrow some ideas from discussion posted here.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf