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.
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.
This is an old version of the idea, so I know may be is no the smallest pcb, is just the idea:
Here is the basic PCB:
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:
Here is the basic Idea:
https://imgur.com/9Nzstv6 Basic Idea of the digital Pins Protectors.
Here is some diagrams of the board https://imgur.com/doANrym Arduino Mega Basic Pinout
https://imgur.com/DgP99zn Details on power source filter and reverse voltage protection diode.
The board itself:
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.