8 relay module 12v not working as aspected

Hello everyone, this is my first post so please guide me if i do it wrong.

When i connect via USB, the leds from 12v relay module are all turned off, and some of them blink (at my command) but i don't listen "click". I think this is low power problem, so i powered the arduino with 12v transformer 2000mA.
When i connect with the 12v power all leds from relay turn on and i listen a mass "click" (all of them turning on) but then i let program run.. the leds blink dim, but does not turn off completely, and all other leds still on, and. i don't listen click when they dim.

i have connected the VCC from arduino to relay VCC, and GND to GND as normal
Im not using external power for relay module, im using the power from arduino that is 12v transformer.

void setup() {
  Serial.begin(9600);
  /* PIN MODES */
  pinMode(2, OUTPUT);
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(7, OUTPUT);
  pinMode(8, OUTPUT);
  pinMode(9, OUTPUT);

}

void loop() {
  digitalWrite(2, HIGH);
  delay(1000);
  digitalWrite(3, HIGH);
  delay(1000);
  digitalWrite(2, LOW);
  delay(1000);
  digitalWrite(3, LOW);
  delay(1000);
}





Thank you for help.

Wow! :astonished:

I suppose you do not realise that from your description we know just about nothing about what pieces of equipment you have or how you have connected them, or what code you might have used?

Perhaps you should read the instructions? :thinking:

1 Like

i have updated my message thank you for suggests.

OK, so I think - can't quite see but gather you have a 5 V relay module.

You need a 5 V power supply to power the relays and the Arduino. :astonished:

unplug jumper from vin ,then put it in 5v.

Last pictures shows relays are 12V.

That looks like the common 8-channel relay board.
Remove the jumper between VCC and JD-VCC. This jumper MUST be removed, otherwise you will apply 12V to the arduino 5V line!!!!

Connect the 12V supply to GND and JD-VCC of the 3-pin connector, no connection to VCC at that connector.

On the connector with GND, IN1-IN8, and VCC, connect ONLY the INx and VCC pins to the Arduino, with VCC going to 5V. There is no need to connect GND, and it should be left unconnected to provide isolation between the relay power supply and the arduino.

The relay board inputs (INx) are connector to opto-couplers, and are active LOW (a LOW turns the relay on, a HIGH turns it off).

1 Like

It may help @mudasty to see a picture showing what @david_2018 has said above. I found the diagram below here (post 8). The voltage to jd-vcc at bottom-right would of course be 12V not 5V in the case at hand; as david_2018 says "Connect the 12V supply to GND and JD-VCC of the 3-pin connector"

image

2 Likes

Thank you very much everyone, I will try make those changes and I will give feedback.

Worked like a charm. I opted to get a 5V relay and power with 5v pin.
Thankyou everyone

And you have a 5 V power supply to power the Arduino and relays? :thinking:

I have powered the Arduino via USB port

OK for three or four relays operated at once I suppose. :thinking:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.