relay module control port question

Hello everyone,

I’m trying to make a relay module work.
This is the relay I have:
http://wiki.sunfounder.cc/index.php?title=4_Channel_5V_Relay_Module
If I understand well, the VCC pin has to connect to positive on a power source that is not the Arduino. The GND has to connect to the ground of that same power source and the IN1 (relay control port) has to be activated and deactivated by the Arduino.
Since this pin has to be connected to ground How is the Arduino supposed to activate it?

To use a non-Arduino power source, remove the jumper.

Then the external power goes to the JD-Vcc pin (not the Vcc pin) and ground.

The Arduino 5V goes to relay board Vcc and the Arduino digital outputs go to the INx pins, with no connection of the Arduino ground to the relay board ground.

D0upWXs_d.jpg

All right thank you

It's pretty clear for me about how to connect except for the INx pin. This pin has to connect to ground for the relay module to work. I don't get how the Arduino can close the channel or open the channel between INx and ground. I would understand how to do it if I could directly connect a digital pin to the INx but it has to be GND to INx.

For the relay to energise, you need to light the led inside the opto-isolator on the relay module. That led is just like any other led, where you could connect its anode to 5V and its cathode to 0V, and that's exactly what's happening here.

The Arduino 5V puts 5V on the opto-isolator's led's anode, and a low on an Arduino digital pin puts 0V on its cathode, an INx pin. The led lights up inside the isolator, the isolator's transistor conducts, and the circuit for the external power to the relay coil is complete.

edit:

it has to be GND to INx.

The low on the digital pin does that.

Perhaps this diagram of the internals will clarify?

The led inside U1 has Vcc on the anode, and 0V or 5V on the cathode depending on the state of the Arduino digital output.

It shows the jumper on, so the relay coil is getting Arduino power from the Vcc.

But if you mentally remove the jumper, and mentally apply external power to Jdd, it's your scenario.

(You don't HAVE to use external power, but if you don't you don't get full electrical isolation. And also, the Arduino's not a power supply :wink: )

The number of answers to this exact same question just clicked over to 10000001. :slight_smile: :confused:
Should low side switching be outlawed?

Do you mean open collector? :wink:

What I mean is most beginners seem to naturally understand circuit A, but have some kind of mental block against circuit B, which works exactly the same.
circuits.png
Any psychologists in the house :slight_smile:

circuits.png