Arduino R3 not responding

Write a simple bit of code that JUST switches your relays on and off in sequence and then all together.
This will establish quickly if your relays are okay.

Do you have a DMM to measure the 5V to the relay board while you do these tests?

Your diagram only shows 4 relay inputs connected.

Tom... :smiley: :+1: :coffee: :australia:

Relays are 100% ok
Measuring with DMM after reset the board voltage is 4.8v, main supply at 12.5V and remains constant.
Measuring with only 1 relay on the pin voltage is 4.4v
By the 4th relay coming on the voltage is draining slowly starting from 3.6v and goes down to 3.07v

This is why i suspected there is a voltage problem

If you're powering the relay board from the Arduino, there is a power problem.

Your relay board appears to be a SunFounder eight 5V relay one. Their site says this:

5V 8-Channel Relay interface board and each one needs 15-20mA Driver Current

Assuming worst case, by the time you get to four relays, you're pulling 80mA and the Arduino can only provide a max of 150mA, of which some goes to run the CPU itself plus whatever your other peripherals pull. Sagging voltage and problems past four relays suggests you're pulling more than the Arduino can manage.

Any solution?

I have just now wired up the LM7805 with heatsink to only power the relay board with 5V
Measured voltage is 4.8V

Sounds good, should be able to provide more than enough current to run all eight relays.

Maybe try @TomGeorge's suggestion about trying each relay in turn & then all.

But remove the jumper and don't connect Arduino ground.


Have you included the two bypass capacitors that are recommended in the datasheet?

Tom... :smiley: :+1: :coffee: :australia:

Yesterday i tested the relay board with all led's connected using the "knight rider" code
When starting up everything works but after a minute the voltage degrades to 3volt and below so that the relay's onboard do not even click anymore.

Using a 12V 5amp power supply is definitely not underrated.

I was hoping that 7805 will hold, i could only find 2 x 10uF cap for the voltage in and out.(electronic stores like 180Km away)
This was doing a bit better but same result that the voltage also dropped too low when heatsink started heating up little bit.

This morning i found an old car dashcam power supply from 12v to 5v and fitted this.
On relay board i removed GND is Pin_in, and powered pins GND and vcc where the jumper is on right hand side.

Behold Frankenstein started to work without issues.
Now i can properly test and see where is more issues.

Good news! I do wonder how much current those relay coils really pull though - it seems odd that the 7805 couldn't manage 160mA.

just that 8 relay board with the led's was 360mA

This might explain it - in the comments at the site's page on the relay board I see this:

The description claims 20mA per relay but I am measuring 60mA for each on
 relay (just on the JDVcc/5v side alone--I'm using 3.3v for the control side). 

The data sheet for the relays says 90mA each (
at a full 5 volts, which these probably aren't seeing in practice).

Now that the relays are running, how is the system working out?

Thank you to everyone here for comments and suggestions.
So far so good, no issues.
There were suggestions that's beyond my capabilities.

I can see though there are room for improvement
a) Add RTC to have time control also: (seems easy enough)
Geyser and irrigation only to work within certain times ranges.

b) A small screen would display nice, i will need to get a spare board/Oled screen and tinker on that when i do have time. (level expert)

c) If pump not powered, then add UV_THRESHOLD to other outputs:
So if minimum UV threshold is reached for pump but pump is off cause water level is ok, add example 50 threshold to next output.

On point c, how to do this?
I'm thinking:

const int UV_THRESHOLD5 = 450;
const int UV_THRESHOLD6 = 550;

const int AddUVsun = 50;

  if (pumpOverride == 0 && pumpTime == 0)

I have not tested this yet or thought this through to be practical

Let me know for any improvements.

If you are going to have time based restrictions on some items, you might consider replacing the threshold logic. If something is allowed to run and there is enough power to do so, run it. Repeat for all relays, reducing the available power for each device that gets powered up.

That way, If the pump's off and the geyser is outside it's window, you can irrigate even if you're way below the irrigation threshold.

It's is tricky situation but putting all logic together it will work better as expected.

Reason for adding time based is sunrise is now about 6:30 am, UV threshold indicates to run everything is about 8am.

I have to keep in mind the solar batteries needs to charge which should be fully charged by 11am on cloudless day.
The solar power charging at around 120A+ (6400W) by 9am.
The combined wattage consumption possible on house, pumps and so on is about 7.3Kw or 37amp
Max possible wattage solar can give me on the brightest laboratory day is around 16Kw

The RTC will prevent the irrigation and geyser to come on too early even if the UV module permits, same to switch off at 3:30PM making sure not to drain batteries.

Only to fine tune in coming week or so.

Most of the difficulty with things of this sort is figuring out what the requirement is. Yours is a bit complex and I suspect that there are pieces that will become apparent only after using the system for a while.

For example, how much irrigation would you want to do if you had power to spare? It looks like your current setup will run for hours if there's enough sun.

To make it more complicated, have you considered pulling a weather forecast to find out how much sunshine you can expect over the coming days?