How to properly protect all the pins of arduino due?

Hello Guys,

I have bought two arduino due for one of my home automation project. I want to protect all the digital and analog input output pins along with the 5V, GND, TX, RX pins of my arduino due board for overcurrent, overvoltage or any spikes etc. Can you guys please suggest me some ways using which I can protect all the available pins on the arduino due board?

I was also thinking about implementing https://www.diodes.com/assets/Datasheets/ds11006.pdf these diodes. But not sure which model to use for what pins. Please do clarify this.

Any help would be highly appreciated. Thank You.

You can get protection for 4 lines at a time with these: https://www.diodes.com/assets/Datasheets/ds30195.pdf,
but remember adding some series resistance will further improve protection (although reduce
output driving ability).

If you apply hard overvoltage through schottky protection diodes you'll risk lifting the entire 3.3V
rail to a higher voltage and destroying the chip that way - so a crowbar circuit on the 3.3V rail
is a good idea too.

Output overcurrent: you have to be careful with the max current each pin can deliver, plus the total max current a DUE can deliver (Max 800 mA if powered with a 9V battery pack on the jack).

https://www.arduino.cc/en/Hacking/PinMappingSAM3X

Overvoltage: For digital input pins, whenever you are using 5V devices, connect these pins thru bidirectional logic level shifters (3.3V <->5V). The DUE likes neither voltages above 3.3V nor negative voltages.

Spikes over digital input pins: usually a pull-down resistor suppresses most EMI spikes. You may also consider using the Sam3x PIO registers dedicated for suppression of EMI glitches and debounce upon GPIOs (page 631, Sam3x datasheet ). For I2C lines, a fast-mode compliant isolator like the PCA9517A filters 50ns glitches for input and output and increases fall time.

Input spikes over analog pins (A0, …A11): For non periodic signals with a voltage above 3.3V, 2 resistors as voltage divider are helpful. For periodic signals, an RC filter with a time constant above 10 times the period signal is helpful. Don’t use long wires and be careful with breadboards since they act as small antennas and capture EMI spikes, that’s not good with a 12-bit ADC.

For better results, power your board with a 9V battery pack since power thru the USB cable to the PC is very unstable.

These are mostly hardware solutions; nonetheless there are also additional software solutions specific to the peripheral you will be using.

Can you guys please provide me a schematic of what you are recommending on arduino due board? I am confused after reading the text. A schematic for the overall protection system for all the pins would be easy to understand. Thank You.

you could take a look at the Rugged Circuits products, although I think that they're all AVR based.

A due isn't really mean to be used where all the pins need to be protected. You'd probably be better off connecting (some small number of) unprotected pins to IO expanders that provide additional protection.

No idea what is an I/O expansion board is. By the way, I cannot buy those rugged boards now because I have already spend on two arduino due boards. According to my design there won't be any possible situations which can destroy the arduino due board or any of the pins. But just to make sure that it never happens if electrically anything goes wrong with my components, I want to take this extra step for securing all the I/O pins on the arduino due boards.

https://www.rugged-circuits.com/10-ways-to-destroy-an-arduino

This article showing some zener and fuse methods to protect the arduino pins. Should I follow this? Or should I go with the shotcky diode approach?

"All the available pins" is a very large number. You would spend more on the protection circuit than on the Due itself.

The basic principle of protection is to protect any wire that leaves or enters your box. Establish a safe perimeter, then you don't need to protect every individual wire inside.

The second basic principle is that you can't protect against everything. Any time you make something "foolproof" you just discover that there is a bigger fool. Natural disasters like lightning also fit into this category. The best you can hope for if your box is struck by lightning is that it doesn't set fire to anything else.

The Due chip already has protection diodes on every input and output pin. It would be damaged by static electricity if it wasn't protected like this.

Professional circuit-protection designers are always looking at the energy in each "oops!" event. A car battery hooked up backwards has enough energy to burn a hundred Arduino Due's. A static zap from walking on nylon carpet doesn't really have a lot of energy, even if it is 15KV. Most protection circuits are designed to absorb energy so you need to know how much energy is in each type of event that the circuit has to deal with.

So back to the perimeter protection. What kinds of things are likely to happen? The biggest one for me is hooking up power backwards. That depends on the plugs you use. If you're powered from USB then it's extremely unlikely that you'll get the power reversed. So I don't put that kind of protection on USB lines. If you've got bare wires hooked up to a car battery, then you'll get it backwards in about 1 out of 5 attempts. So definitely do include protection for that.

For most inputs and outputs a simple 1K resistor is an exceptionally good protection device. You can't easily push enough energy through the 1K resistor to damage the Due on the other end. Whatever does get through can be handled by the protection diodes built into the chip.

However high-speed data lines and power can't be protected with a resistor. USB, SPI and so on. My go-to device is the TVS diode. This is like a zener diode but with a much sharper switch-on voltage. you can even get neat little packages like the TPDE2E001DZDR which will protect two 5V data lines and a power line.