Arduino Mega driving 6 relays problem

Hi, I am working on a project and I need to drive 6 relays that will turn on and off 6 solenoid valves. For some reason my Arduino fails to turn on all 6 relays ( and solenoid valves ) at the same time. Does anyone know what might cause this ? I was looking at all my specs and I feel like Arduino should be able to power all 6 at the same time, but it is just not the case here. It powers only 5 solenoid valves at the same time, but if I alternate and turn lets say 3 of them for 1 sec and then turn them off and power the rest of valves it works. I will provide links to parts that I am using below. Please also see attached photo for diagram.

Arduino board :

Relays :

Solenoid valves:

Hi, Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.,148850.0.html then look down to item #7 about how to post your code. It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

We need to see how you are driving the relays and how you are powering your project.

Thanks.. Tom.. :)

Use clickable links, don't make us copy and past.

Are you connected as in this diagram?



Ok, I solved my problem. Just in case if anyone else is going to need info, I am going to provide explanation to my problem.

This is my initial diagram

This is what I did, and it worked

I am new to electronics and still trying to figure out how everything works (I am Computer Scientist)
But I believe that previously Arduino was the one to provide power to drive the relays, and in 2nd diagram I am providing the voltage from external source.

I am not sure if this is how it works or not, but after making the change everything works for me.

Ok, I solved my problem.

Congratulations on you solving your problem ;)

If you look at the schematic I gave you in post #2 you see how to wire those relay boards.

You don't attach the Arduino GND to the relay board.


If those solonoids are DC, you need kickback diodes across the solonoid coils, observe polarity!