From this choices, the better for protect Arduino digital PINS using relays?

Hi to y´all...

EXTRACT: The OP want to make an custom arduino control using relays, and has two alternatives for protecting the digital pins of the processor, not clear witch is more suitable for the present scenario.

Small Background: So, I Im making some controls for refrigeration walk in frezers, I have some of them working for almost two years know, But I want to manufacture a more "rugged" version.

|281x500 First experiments on Arduino control, Will Re-make the whole thing.

In the beggining I was using the Arduino with an 8 relay board (opto- isolated). My first experience were all good, until some random stuff start to "freeze" the program, after a little research, the transient voltage on the activation of the relay cause the "freeze", after some documentation, we use a "snubber" in each relay and the control works properly until know.

Since I want to produce a way more reliable protection for the processor, I dig in, and found two broad solutions, yet I dont know witch is more suitable for my situation or if there is necessary to use them both or in what order.

Small Description: The control, start and stop the refrigeration unit on demand of temperature (using one relay for on-off condenser), also it uses 5relays for each fan in the evaporator and decides when to start all of them, use just one for a litte while (aire circulation in the nigth) or use 2 of them for keep an smaller than normal airflow, yet effective to keep the temperature stable. In near future I will add some ultrasonic fogger to keep the humidity at perfect level.

Two Solutions founded:

Searching the web, I have seen several desing and schematics that relies on the famous UNL 2003:

UNL2003 So, they connect the digital pin, to the UNL 2003 and from there to the relay activation pin, the internal construction it seems very sturdy and more than capable of protec the pins from an over current and in my limited opinion on discrete components from a reverse voltage, yet it comes in an IC and the pcb is quite simple.

Using an ESP to manage relays same PCB UNL 2003

This is an old version of the idea, so I know may be is no the smallest pcb, is just the idea:

|500x281 https://imgur.com/6l550WL

Here is the basic PCB:

|500x281 https://imgur.com/O8ptHCu

Diode, capacitor, resisor Arrays The second design, uses an array from capacitor, diodes an resistances to protect the digital pins from an over voltage, and a reverse voltage.

I took the basic schematic from:

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

Here is the basic Idea:

|500x281 https://imgur.com/9Nzstv6 Basic Idea of the digital Pins Protectors.

Here is some diagrams of the board |500x281 https://imgur.com/doANrym Arduino Mega Basic Pinout

|500x281 https://imgur.com/DgP99zn Details on power source filter and reverse voltage protection diode.

The board itself:

|500x281 https://imgur.com/Mm3FOVx This board Includes an filter for the 5vcc of arduino, an wago conector for a relay separate power source, 8 digital pin protector arrays, leds for idicate power on the board, and two temperature probes conectors.

First of all, thanks for the reading and for the sincere thoughts.

Concrete question: In this case scenario witch will be more reliable way to protect the arduino?

Any suggestion is welcome.

If I make the PCB in a Two Layer, I can go even smaller, but it all depends on the most reliable way to protect the processor.

Kind Regards. -Alex.

I think, use of the ULN is the most simple. I am using ULN2803A in my designs. Very simple, no additional components, protection of I/Os, outputs up to 50V/500mA, outputs can be used in parallel for higher current.

Budvar10: I think, use of the ULN is the most simple. I am using ULN2803A in my designs. Very simple, no additional components, protection of I/Os, outputs up to 50V/500mA, outputs can be used in parallel for higher current.

It has the hability to block reverse current ¿¿¿ Or higher vcc pikes¿¿¿

Thanks for the comment.

Yes, it is "all in one". Each one from 8 ports has Darlington amp. and clamp diodes for switching inductive load. See the datasheet. The IC exists also in SOIC version if you need smaller dimensions.