I got two 4-relay-modules and I am probably doing something wrong because none of them seems to work:
My first try was using a breadboard 5v power supply, connecting VCC and In1 to 5V and GND to GND. I was expecting the first relay to switch, but nothing happened. I tried with all In pins but nothing
The module seems to have some LEDs to indicate when the relay should be on, they do not light.
I also tried 3v instead of 5, and connecting to another Power supply the JD-VCC. Nothing works I tested with the multimeter and all the pins I connected are getting power, so either I am missing something (very probable) or I both boards are broken
Another thing i noticed is that if i apply 5v and GND, then all IN seems to have around 3v
The relay model: JQC3F-5VDC-C
My module is generic, and I couldn’t find the official schematics. Thank you very much @tlfong01 for pointing me to this one, that seems to be the right one: relayshareedit follow flagedited 22 hours agoasked Jun 13 at 9:02Carlos Garcia10933 bronze badges
- 3Try connecting GND to the INx pins, the board might be wirded up active low. – Turbo J Jun 13 at 9:12
- 1haha… i am such a beginner XD. Please post it as an answer. Thank you! – Carlos Garcia Jun 13 at 9:15
- 2Data sheet link to the part please. – Andy aka Jun 13 at 9:47
- 1Thanks Andy, @TurboJ answered my question. The board requires GND in the INs, and not VCC – Carlos Garcia Jun 13 at 9:49
- 1@Andy aka, yes, I agree that the question needs to be fixed. Actually the OP’s relay with the JD-Vcc jumper is a bit tricky to handle. He might like to read my posts for a schematic and wiring for 3V3 Rpi and 3V3 Arduino: (1) “Forbes Low Level Trigger Relay Module with JD-Vcc jumper Basics – rpi.org.forum 2018jul14”: raspberrypi.org/forums/…, (2) “Forbes Low Level Trigger Relay Module with JD-Vcc jumper Wiring – rpi.org.forum 2018jul14”: raspberrypi.org/forums/…. Cheers. – tlfong01 Jun 27 at 13:47
The OP has a 4 channel relay module similar to one shown below. How should he use it?
The OP’s 4 channel relay module is “Low Logical Level Triggerable” (Low Trigger) with the “JD-Vcc jumper” to suit different configurations of relay power and control signal levels. One very simple wiring method is shown below.
Using the 3V3 Raspberry Pi (or 3V3 Arduino) as an example, The Songle relay switch power is from external 5V power source, Vcc is connect to Rpi’s 3V3 logic power, and IN is connected to an Rpi GPIO pin in output mode.
If signal at IN is Low (0V, Ground), then current flows (sinks) from Vcc to IN, optical coupler EL817C is activated, Songle switch is activated (energized), contact COM is connected to NO (Normal open).
If signal is High (~3V) then current sinking is too small to activate the optocoupler, therefore Songle switch is deenergized, and relay switched off.
The simple wiring and operation described above does not involve the JD-Vcc jumper which is a very clever electronic circuit design. The long answer here describes the JD-Vcc thing in detail, starting from the most basic ideas of High and Low trigger relays with and without optical isolation.
To explain the idea of Low and High trigger relays, let us start with the no optical method and look the the respective schematics below.
The over simplified schematics give a rough idea of the operations of High and Low trigger circuit. Real circuits must have a “flyback diode” to absorb the energy of flyback current when switching off energizing current. An “optical isolator” is usually used to prevent/reduce EMI (ElectroMagnetic Interference) noise going back to the signal source (Raspberry Rpi). Noise usually also goes through the ground wires. That is why the “JD-Vcc jumper” coming in, to do “Total Optical Isolation” (More about his later).
I am only making an educated guess that the OP’s relay is low level triggered. There is a small chance that his module is actually High level triggered, as shown below. In this circuit, High signal activates/turns on relay switch.
One important clarification is that whether a module is High or Low triggered, if the Rpi/Arduino is not powered, or if GPIO pin is in input mode in booting or otherwise, then no current drives or sinks to activate optocoupler, relay is always off.
A related warning to newbies is that you always use the NO pin, never the NC pin, otherwise relay is on at boot or GPIO in input mode.
/ to continue, …