Electronics > Microcontrollers

[Arduino]Trouble with eth shield & relay shield

(1/1)

gab_22:
Hi everyone!
I'm working on a little project with :
- Official Arduino Uno ( https://store.arduino.cc/products/arduino-uno-rev3/ )
- Official Arduino Eth shield V2 ( https://store.arduino.cc/collections/shields/products/arduino-ethernet-shield-2 )
- Relay Shield V3.0 from Seed Studio ( https://wiki.seeedstudio.com/Relay_Shield_v3/ )

The goal of the project is to control the relays through HTTP web page.

I tried each board separately with success (Uno + Eth Shield) and (Uno + Relay shield)

But unfortunately, it's not working when all shields are stacked :-\ 

The code on the Arduino is : https://www.arduino.cc/en/Tutorial/LibraryExamples/WebServer

-When the relay shield is stacked on the eth shield I have this message on the serial
--- Code: ---Ethernet shield was not found.  Sorry, can't run without hardware. :(
--- End code ---
the LEDs on the Arduino and eth shield seems ok

-When it's only the Uno + eth shield it works fine.

I know there is a conflict with pin 4, it's both used by relay shield and eth shield for the SD card. But I don't have an SD card here.

I tried with an external power supply (12V / 1A) but with the same result. :(

Do you have any idea?

Thank you

Foxxz:
You may not be using the SD card but pin 4 still controls its access to the SPI bus which the Ethernet is also trying to use. Try setting pin 4 high and see if you're able to use the Ethernet with the relay board also connected. This may mean you will not be able to use the relay controlled by pin 4.

Alternatively once you have tested that it's indeed that pin causing you problem. You can clip that pin off on the Ethernet board and tie it high with a wire soldered to it

gab_22:
Hi, thank you for your message it was very helpful :)

Indeed pin 4 was in conflict in this setup. I reworked the relay shield PCB to swap pin 4 with another pin (unused by ETH shield) and it works fine now.

Navigation

[0] Message Index

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod