Dear, good afternoon.
I write because I have a problem with a web server made in arduino.
The issue is like this: I have to control the temperature of 4 tanks, 4 probes through Dallas. Depending on the type, the delta temperature changes, so I decided to build an LCD panel with buttons to make changes.
To the user has better control of the system, place a webserver and an HTML page that is updated through XML.
The issue is that unexpectedly from time to time, the web server does not receive more requests and to restart Arduino, This occurs when the page is open too long, try to access another computer or send data from the same system pag.
Sometimes it happens that the arduino is restarted only when data is sent from the web to the system. This does not always happen.
I leave a copy of the sketch
The system is an Arduino DUE, with an ETHERNET SHIELD.
You will notice that in the code of WebServer, there are lines to extract data from the WEB. This is so that the user can modify the DELTA temperature from the web, also from the panel.
On the other hand, the values of the probes are stored in 4 different variables, this is because I need to show them with decimals, but when starting the pump need integers.
I made some proves, and I arrive a conclusion.
When I test the Web page only with Arduino everything works fine, but, when I connect the Rele shield to Arduino, and Activate any rele, the ethernet traffic is down.
The Arduino is connected to 5v. 1 A power supply and the relé shield to 5v 800 mA independent power supply.
Sounds like you have an EMF or surge problem. If you haven't already, try the relay will no load connected. Is it a Seeedstudio relay shield? It gets its power for the primary coils from the 5V bus. The ethernet shield and the relay shield may put a strain on the 5V bus. Is the relay shield on top of the ethernet shield?
Ok, I will try to activate the relé without load.
The Rele shield has a independent power supply 5v 800 mA to primary coils.
Only Digital pins are connected to Arduino.
One of those relé activates a bomb of 0.5 hp. 220v.
That board has optoisolators; they're the big four-pin chips. The transistor is tiny to the left of it and above the two resistors.
There should be no jumper between VCC and JD-VCC for optoisolation.
Arduino VCC -> Board VCC
Arduino digital pins -> Board pins (IN1, IN2, IN3, IN4). digitalWrite(pin, LOW) will activate the relay. You're using the pins as "ground" to sink current. There should be no other "GND" connection between the Arduino and the relay board.
Board JD-VCC -> External power supply
Board GND -> External power supply.
@Chagrin: You are probably correct. I couldn't download the schematic for the Sunfounder board, but if it is wired like the SainSmart board (I could get the schematic for it), the connections you suggest are correct.
I comment what I isolate the ground and I connect the Relay Shield through JD-Vcc Pin, but I notice what the ground is floating. So the system is more stable but keep restarting, but without lost connection.
I will do the discharge of ground connection to physical discharge to ground.
I'll do that and I notice you how is works.
PD. the logical connection to Shields has been made through 5v from Arduino.