Using relays Please help

Hello. I am a teacher at the end of an indoor automated garden project. I am getting frustrated with my relays working correctly.

2 relays one for light and one for pumping water.

The system just kind of clicks on and off on both relays.

Lets say a very simple program to turn on lights for 2 minutes then off and pump on for 2 minutes and off.

The relay has 3 pins. One for 5 volts (VCC) one for ground and one for input.

If I run the program it just switches one and off weirdly.

If I unplug either one relay the other works fine.

I keep trying different things, separate power supply for the relay. Have one relay hooked to the 3.7 volt pin. nothing fixes the problem.

Now I see the project I built as a demonstration for a hydroponic set up has 2 relays plug to the arduino and it has been great for 2 months working fine? The relays are of an older type?

Any thoughts? all arduinos are the UNO kind.

Thanks for any help. I want to put the projects in eth art show next week so I am running out of time.


We need more information.

Show us a schematic.

Show us a good image of your wiring.

Show us your current complete sketch, use code tags.
Click the </> icon in the posting menu.

What are you teaching?

You need to provide more information

  • Links to the datasheet for the relays
  • A diagram showing how everything is connected (including power supply details)
  • Your Arduino program

I don't know what you mean by "the 3.7 volt pin". An Uno has a 3.3v pin but I can't imagine why you would "hook a relay" to it. Indeed I don't know what you mean by "hook a relay".

...R Simple Image Guide