Hello,
I'm aware how a normal relay works.
I'm familar with how to use an n-Channel MOSFET with the Arduino. (I also build Box Mods).
But I'm stuck and need help understand how JD-Vcc works with the relay. Unlike the video and the drawing how he has it wired, my 4 Relay Module doesn't have two Gnds like his does.
Here's a drawing I did of my 4 relay module I just got yesterday. It has a JD-Vcc & Vcc with a double dupont jumper connecting the JD-Vcc & Vcc.
His wiring drawing..
My 4 Relay Drawing.. (InkScape)
Actual Image of my 4 Relay Module.. (HQ)
As you can clearly see, it only has a JD-Vcc & Vcc, with a jumper.
I purchased it from here.
http://goo.gl/QuzCHQ
Is it like a n-Channel Mosfet? Using a separate power source for the Gate..? If so, I still don't really understand it.
Here's a link to the video I'm referring to.
This one looks a little simpler..
http://goo.gl/Baag29
Drawing..
Hi,
See THIS PAGE: including the relay board schematic diagram.
Then see THIS: page and read down to the part about "Optical Isolation".. This shows the Jd-Vcc information.
You need a separate 5V supply fro the relay board. For true isolation you do NOT connect the relay board to Arduino ground..
Ralph_1982:
But I'm stuck and need help understand how JD-Vcc works with the relay. Unlike the video and the drawing how he has it wired, my 4 Relay Module doesn't have two Gnds like his does.
The input side of the optoisolator is an LED. The Anode of the LED is connected to Arduino Vcc. The Cathode side is connected to an Arduino output pin. When the pin is HIGH the LED is off (both ends are at +5v so no current flows). When the pin is LOW the LED is ON (Anode at +5V, Cathode at 0V).
The "JD-Vcc" provides power to the output side of the optoisolator and to the relay coils. Those are grounded to the negative side of the power supply feeding JD-Vcc.
1 Like
Thanks..
I think I got it now.
I've also figured out that using an n-Channel Mosfet with any relay, will allow me to use any relay.
Link to the MOSFET - Mouser Electronics
Mouser Electronics IRLB3034PBF n-Channel MOSFET.
A video was also done for this, but he doesn't use a resistor between the gate & source. I've built Box Mods, and we need to use a pulldown resistor, so the mod doesn't fire once the momentary button is pressed. So I used a 15k Ω resistor.
So here's the video. He's got other videos as well.
Ralph_1982:
I've also figured out that using an n-Channel Mosfet with any relay, will allow me to use any relay.
Use Any Relay with the aid of an n-Channel MOSFET - Album on Imgur
I've heard that it is good practice to put a resistor (~200 ohm) between the Arduino pin and the MOSFET Gate. The gate acts as a capacitor and charging it up can draw more than the 40ma Absolute Maximum rating of the Arduino pin.
Also, you forgot the snubber diode across the relay coil. The coil produces a high voltage spike when you turn it off and the magnetic field collapses. The snubber diode absorbs the spike to keep it from damaging other components like the MOSFET.