Power shortage


I have an Arduino Mega powered by a 12v 1.5a wall plug. This is connected to 2x 4 channel relay boards and 1x 1 channel relay board all with a 5v VCC. All of the 5v VCC share the same output from the Arduino via a breadboard.

I originally left the 4 channels out of the coding and just had the single relay switching on and off at certain times which worked fine. Now I have added code for the the other two relays, every time I disconnect the Arduino USB from my laptop (only leaving the 12v wall supply) all of the relays seem to just come on... go off... come on... go off. Any ideas why? Could it be that all together they are trying to pull either too much current or too much voltage and so it all turns off?

It sounds like you may have a missing/floating ground. Check the circuit and make sure everything that should be grounded is.

I have and all is grounded. It works fine if the 12v power supply AND the USB is connected to te laptop, but as soon as I take the USB out, it starts flicking on off on off.

You are telling us you have all the relays operating directly off the Arduino pins. Right?


Yes, the constant 5v from arduino along with the switch signals. Is that wrong?

Can you post the schematic?

Will post it when I get home.

Will post it when I get home.

Are you home yet?

Lol. Sorry. Had a busy weekend. This is a hand drawn (badly hand drawn) rough schematic of how it is now. I am assuming is should power the relay boards with their own 5v supply from other than the arduino?

photo hosting


I'm guessing I need to have a separate 5v power supply positive and negative running to each relay board. The Arduino can then solely run the data pins telling the relay boards whether to open them or shut them. However, will I need to link this new separate ground to the arduino ground to make the data lines work?

All grounds of all boards must be connected together, and all Arduino inputs and outputs must have a ground return lead.

Cheers mate.