Author Topic: ESD protection of keyboard electronics  (Read 7477 times)

0 Members and 1 Guest are viewing this topic.

Offline vvp

  • Thread Starter
  • Posts: 887
ESD protection of keyboard electronics
« on: Sun, 25 May 2014, 16:53:25 »
I'm thinking about building a keyboard and I was asked to make left and right side connected by something which can be disconnected (e.g. RJ45 (ethernet) jack). This results in a lot of problems one of them being electrostatic discharge (ESD) protection. In my case, it would mean that an ESD can happen to a connector pins (when the left/right side connection cable is not plugged in). This means a possible ESD to ATmega32u4 port pin or some pins of shift registers (e.g. SN74HC164).

When I roughly looked at Kinesis Advantage keyboard it does not seem like it is protected in any special way against ESD. FS1, FS2, FS3 (foot switch) pins are all exposed outside at the 4-pin "phone" connector but inside there is only a low pass CLC filter before they are connected to the controller pins (AT89S8253). It does not look enough to me.

AT89S8253 (also SN74HC164) data sheet does not mention ESD protection at all.
ATmega32u4 mentions ESD protection only for the USB data pins.

Questions:
  • Do you protect your keyboard designs against ESD?
  • Is there some standard how much ESD common parts can withstand without damage? I know there are some standards about ESD protection. The problem is when a part data sheed does not mention it at all. In such a case, is there a "default" as for as ESD protection?
  • What is typical voltage which permanently damages a ATmega32u4 or a common shift register pin?
  • Any idea how much returns happens because ESD fried unprotected product? In other words: is ESD protection worth it?

Offline xwhatsit

  • Posts: 297
  • Location: NZ
Re: ESD protection of keyboard electronics
« Reply #1 on: Mon, 26 May 2014, 04:56:08 »
Typically with modern CMOS logic (74HC and that sort of thing), as well as modern microcontrollers of most description, there is already a limited amount of ESD protection built in.

This is implemented in the usual way, with clamp diodes for each external pin.

For instance, if you take a look at NXP's datasheet for the 74HC595 ( http://www.nxp.com/documents/data_sheet/74HC_HCT595.pdf ), and scroll down to "8. Limiiting Values" on page 6, you will see `Input clamping current' and `Output clamping current'. You will see they're both ±20mA. This means the clamp diodes can take up to 20mA (either sink or source) if they're over VCC or under GND. So if you've got it powered at 5V and you touch it with 1000V+ from your nylon carpet walk, the clamp diodes will safely conduct that current up to the 5V power supply (which will absorb it), as long you don't supply more than 20mA. That's 20mA continuous, by the way, so that's why you can get away with putting 24V on a microcontroller/CMOS logic input all day as long as you have a 100K resistor inline to limit the current.

In practice, most things don't really need ESD protection. USB lines would be one to argue for, as that's hot-pluggable and you can get some decent build-up of charge there with a long cable when you first plug it in.

If you were worried about it, you could use this classic circuit, which shrinks right down to a pretty small board area if you use 0805 components; it will protect against pretty much anything you throw against it:
66040-0

It works because the 100K resistor limits current—even at 1000V it's only going to be 1mA. You also have extra (discrete, external) clamp diodes which will be rated for much higher current than the microcontroller/logic IC's internal clamp diodes. The pull-up resistor and capacitor to GND aren't necessary, but help smooth out transients and glitches due to noise and switch bounce (easier than doing it in software).

Or, you can use something off the shelf; even smaller in SOT-23 size. This example from ST is typical: http://www.farnell.com/datasheets/1671027.pdf
« Last Edit: Mon, 26 May 2014, 05:03:56 by xwhatsit »
Beam spring IBM 5251 (7361073/7362149) & IBM 3727 (5641316) | Model F IBM 122-key terminal & IBM PC-AT 84-key | Model M Unicomp 122-key terminal | Cherry MX Blue Leopold Tenkeyless

Offline hasu

  • Posts: 3474
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: ESD protection of keyboard electronics
« Reply #2 on: Mon, 26 May 2014, 21:42:26 »
AVR I/O itself has protection diodes, datasheet indicates. Fortunately I've for one never had suffering of ESD on electronic DIY projects including keyboards.
So I don't use explicit ESD protection on my keyboard, but be still interested in it.

I've seen several Ergodox users suspcted ESD damage of their Teensy and some of them uses aluminum cases/plate, IIRC. Metal cases tends to suffer from ESD more than Plastic one? I'm curious how should we deal with grounding/earthing.

And I found this application note, I'll read it later. Also looks like useful to you.
http://www.atmel.co.jp/Images/doc1619.pdf

Offline xwhatsit

  • Posts: 297
  • Location: NZ
Re: ESD protection of keyboard electronics
« Reply #3 on: Mon, 26 May 2014, 21:47:37 »
The metal case might simply be that you haven't provided a ground wire from case to 0V. I have to do this from a shielding point of view in my IBM Capsense USB controllers, but I suppose ordinarily you wouldn't bother. In this case it would be reasonably important as it's easy to produce a voltage drop between case and controller, and because they're so close together it's easy to touch them at the same time.



The solution would be as simple as running a wire from 0V to some grounding point on the metal chassis somewhere.
Beam spring IBM 5251 (7361073/7362149) & IBM 3727 (5641316) | Model F IBM 122-key terminal & IBM PC-AT 84-key | Model M Unicomp 122-key terminal | Cherry MX Blue Leopold Tenkeyless

Offline mkawa

  •  No Marketplace Access
  • Posts: 6562
  • (ツ)@@@. crankypants
Re: ESD protection of keyboard electronics
« Reply #4 on: Mon, 26 May 2014, 22:49:26 »
AVR I/O itself has protection diodes, datasheet indicates. Fortunately I've for one never had suffering of ESD on electronic DIY projects including keyboards.
So I don't use explicit ESD protection on my keyboard, but be still interested in it.

I've seen several Ergodox users suspcted ESD damage of their Teensy and some of them uses aluminum cases/plate, IIRC. Metal cases tends to suffer from ESD more than Plastic one? I'm curious how should we deal with grounding/earthing.

And I found this application note, I'll read it later. Also looks like useful to you.
http://www.atmel.co.jp/Images/doc1619.pdf
short damage seems more likely than ESD. a thin metal case would make shorting sensitive parts more likely (obviously shorting the key matrix is a nop.

anyway, in general i don't feel esd is a huge issue. heat and humidity pose much greater risks to modern ICs, and these are packaging issues, not circuit or layout issues.

to all the brilliant friends who have left us, and all the students who climb on their shoulders.

Offline vvp

  • Thread Starter
  • Posts: 887
Re: ESD protection of keyboard electronics
« Reply #5 on: Tue, 27 May 2014, 08:31:18 »
Thanks for the information.

I read the links and the only thing which is not clear is the ground loops. Atmel notes recommend ground grid (if full ground plane is not possible). But a grid is a just a bunch of loops. The data-sheet for PESDxL4UF (ESD protector) recommends no to have any loops there. The loop is counted as valid only if it is bigger than wavelength/10. But the frequency spike at discharge seems to be about 0.5 GHz. That would lead to maximum loop size only 6 cm which is not that bad. Or if we would want to be sure then it should be wavelength/100 which gives 6 mm which is rather small.

Anyway I do not intend to add additional ESD protection there at the first attempt. It can be added later if needed since it needs to be just next to the connector and there will be place there.

I would tell makwa is right that people with aluminium case have more of a shorting problem than an ESD problem. And either rows or columns are output pins so their shorting to aluminium plate may be a significant problem.

Offline MOZ

  • KING OF THE NEWBIES
  • * Maker
  • Posts: 3981
  • Location: Jo'burg
  • Busy making stuff
Re: ESD protection of keyboard electronics
« Reply #6 on: Tue, 27 May 2014, 14:09:45 »
I did build some basic ESD stuff my Blox project, it is mainly what the Arduino team uses. You can check the thread for schematics.

Offline xwhatsit

  • Posts: 297
  • Location: NZ
Re: ESD protection of keyboard electronics
« Reply #7 on: Tue, 27 May 2014, 19:53:07 »
Atmel notes recommend ground grid (if full ground plane is not possible). But a grid is a just a bunch of loops. The data-sheet for PESDxL4UF (ESD protector) recommends no to have any loops there. The loop is counted as valid only if it is bigger than wavelength/10. But the frequency spike at discharge seems to be about 0.5 GHz. That would lead to maximum loop size only 6 cm which is not that bad. Or if we would want to be sure then it should be wavelength/100 which gives 6 mm which is rather small.
The ground grid is just a compromise if you're using a 2-layer board and your signal traces are that many and complex that you need to do significant routing on your bottom layer. I would think that would be very unlikely for a keyboard—hell, even my capsense boards (which require way more routing than a normal old ohmic keyboard controller) get by with a reasonably solid ground plane for the bottom layer.

Much of the Atmel datasheet is discussing noise, rather than ESD, however. For ESD protection (for hotplugging long wires) much of that stuff is pretty much moot. Your main concern is preventing flashover if you're in a really high-transient environment; in that case, you use a long 1206-size resistor (or two), dig a trench underneath it. Ground plane is relatively unimportant. You're talking automotive environments here, though, not a hotpluggable footswitch underneath a desk!
Beam spring IBM 5251 (7361073/7362149) & IBM 3727 (5641316) | Model F IBM 122-key terminal & IBM PC-AT 84-key | Model M Unicomp 122-key terminal | Cherry MX Blue Leopold Tenkeyless

Offline vvp

  • Thread Starter
  • Posts: 887
Re: ESD protection of keyboard electronics
« Reply #8 on: Wed, 28 May 2014, 15:19:06 »
Yes, I'm aware the Atmel notes are mostly about noise and I understand how ground plane (net) helps to prevent EMI noise.

What I'm not sure is why a loop in the ground wiring is a problem from the point of view of ESD protection.

Offline xwhatsit

  • Posts: 297
  • Location: NZ
Re: ESD protection of keyboard electronics
« Reply #9 on: Wed, 28 May 2014, 17:06:42 »
If you have a negative transient coming into a TVS diode, then the TVS will conduct the negative straight to ground. When this happens, you want to get that multi-kilovolt pulse as quickly as possible into something that can absorb it, and a solid (low-inductance) plane is a must. If it has to follow a higher-inductance path to ground, it will be prevented from dissipating quickly and will cause the local ground level to drop with respect to the other ground levels; this might mean Vcc-Gnd is no longer 3.3V or 5V, but much, much more. As well, the high current travelling through the inductive path will cause local EMI around the trace radiating into other parts of the board.
Beam spring IBM 5251 (7361073/7362149) & IBM 3727 (5641316) | Model F IBM 122-key terminal & IBM PC-AT 84-key | Model M Unicomp 122-key terminal | Cherry MX Blue Leopold Tenkeyless