4 relays shield

Hello There,

I am trying to implement the following example

when i use

Arduino - Home and
Arduino - Home

everything works fine

If i use

Arduino Uno Rev3 — Arduino Official Store and
Arduino - Home

relay 4 doesn't respond.

If i use

Arduino Uno Rev3 — Arduino Official Store and
Arduino - Home
Arduino - Home

not even relay 4 doesn't respond but also all the three boards freeze when "NO" contact of relay 1 is under voltage.

Relays draw quite a bit of power.
Are you using an external source for that as you may be finding that the board does not have enough to work all 4 at once.

With almost all relays its better to use an external source and just use the ARduino to trigger them.

I use an external source but the problem remain.

After a few tries i realize that

If i use

Arduino Uno Rev3 — Arduino Official Store and
Arduino - Home

without ethernet shield everything works fine.

If i use

Arduino Uno Rev3 — Arduino Official Store and
Arduino - Home and
Arduino - Home

without assign ip address to ethernet shield

all freeze.

If i switch-off relay 1 relays 2,3,4 works

If i assign ip address to ethernet shield


#include <SPI.h>
#include <Ethernet2.h>
#include <EthernetUdp2.h>

byte mac[] = { 0x90, 0xA2, 0xDA, 0x11, 0x14, 0x30 };

IPAddress dnServer(10, 11, 12, 1);
IPAddress gateway(10, 11, 12, 1);
IPAddress subnet(255, 255, 255, 0);
IPAddress ip(10, 11, 12, 145);
.
.
.
Ethernet.begin(mac, ip, dnServer, gateway, subnet);

relay 4 doesn't respond

if I comment

// Ethernet.begin(mac, ip, dnServer, gateway, subnet);

relay 4 works.