Is my relay broke?

Hello.

So I recently bought a 12v 2 channel relay (well 4 of them actually) for a little project of mine. Iv'e hooked the relay up in the way I believe should work but unfortunately no LEDs are lighting up. Below is a picture of the relay I am using.

So basically I have one 12v power supply. I have attached the negative wire to the gnd pin and then the positive to vcc, in1 and in2 (all circled in red) so that basically when 12v is supplied it should trigger both relays. So is my relay broken or is my wiring theory just completely wrong?

Thanks in advanced!

SamuelCB:
.... attached the negative wire to the gnd pin and then the positive to vcc, in1 and in2

So is my relay broken or is my wiring theory just completely wrong?

No (well it might be, coincidentally), Yes.

These relays trigger with a negative, so if you put the negative on the inputs they should trigger. (But I'm not sure if the inputs can take 12V; they are just an led with series resistor inside an optocoupler, and so the current in that led depends on the size of resistor.)

(That's as long as the yellow jumper's in place. If it's off, you need to put the coil voltage of 12V+ on the JD-Vcc pin and supply ground to the relay module gnd. Then, you put a different, isolated, supply like from an Arduino 5V on Vcc, no ground, and that 5V's -ve onto the relay inputs.

See here for the internals of those things. (That pic shows 5V on the relay coils, yours would of course be 12V)

Fantastic, you're a life saver! I tired so many different things but never thought to try triggering with a negative. Just swapped the in1 and in2 from vcc to gnd and it works!

I ordered the 12v version specifically for this project because I knew I would be triggering them with a 12v source, I have no micro controller involved in this setup at all.

Thanks again!

The reason is that the cathode of the led inside the isolator is to the IN pin. So you need to make IN opposite from the led anode which is at Vcc to light that led.

Ah ok I get you!

Well thanks again, projects working perfectly now!

SamuelCB:
I ordered the 12v version specifically for this project because I knew I would be triggering them with a 12v source, I have no micro controller involved in this setup at all.

Good thing too as there might have been some very nasty things happening.

To use with a microcontroller, you must remove the link. Connect GND and "JD-VCC" to the 12 V supply. On the other set of pins, connect "VCC" and the "IN" pins to the microcontroller 5 V and outputs respectively but not GND. Outputs are written LOW to actuate the relay.

Paul__B:
To use with a microcontroller, you must remove the link.

Since those things are usually billed as opto-isolated, which only happens when the link is off, it would be nice if they were actually shipped with the link only dangling off the Vcc pin for safe-keeping, but not connected to JD-Vcc so that isolation is the default condition.

You do realise just how many "It doesn't work" complaints that would cause? Or the link - if not lost - would be put back on the wrong two pins?

OK we know - the fact is - these modules are pretty useless unless you adequately understand what they are. But then there are Web pages and "instructables" that purport with various degrees of competence, to describe how to use them. It is a terrible mess, and there is no easy answer! :roll_eyes:

Except us I suppose. :grinning:

Paul__B:
these modules are pretty useless unless you adequately understand what they are.

I guess this style is more intuitive, what with no messing around with jumpers and no pretense at isolation. At about 70mA per, you can (probably) get away with one or two powered from the Arduino 5V. (YMMV, T's and C's apply.)

Willpatel_Kendmirez:
I guess this style is more intuitive, what with no messing around with jumpers and no pretence at isolation.

Indeed.

Willpatel_Kendmirez:
At about 70mA per, you can (probably) get away with one or two powered from the Arduino 5V. (YMMV, T's and C's apply.)

Yes, as long as you do not try and power it with the internal regulator via the "Barrel Jack" or "Vin".

Powered via the USB jack it will work just fine. :grinning:

Paul__B:
Good thing too as there might have been some very nasty things happening.

To use with a microcontroller, you must remove the link. Connect GND and "JD-VCC" to the 12 V supply. On the other set of pins, connect "VCC" and the "IN" pins to the microcontroller 5 V and outputs respectively but not GND. Outputs are written LOW to actuate the relay.

Yes, fortunately I had researched the use of that jumper as part of my troubleshooting steps. It's very good to know in case I introduce a microcontroller in the future!