Go Down

Topic: Relay with TWO Input pins !!!! (Read 1 time) previous topic - next topic

arishy

I did a short test WITHOUT the resistor that you are suggesting and it worked..Then I had a beer ( Enjoyed every bit of it, I did cheer every one of you !!).

Now, I have the guts to ask you about your last remarks. What you are saying is ; the jumper will help NOT to ground the two parts (The module and Arduino) TOGETHER. If I take the jumper, I will have to connect the two manually.

As for the resistor, how to I check safely that I do not need a resistance ( No documentation as you know)




majenko

To check the presence of a resistor just either check the resistance between IN+ and the pin it connects to on the optocoupler (black chip) - just buzz it through with a DMM to find the right pin.  You can also do it visually by following the traces around from the IN+ pin.

The optocoupler is basically an LED on one side and a transistor on the other.  You are controlling the LED - making it light up.  Connecting the two pins of an LED to an Arduino, you connect the anode (+) to the output pin (through a resistor) and the cathode (-) to ground.  The LED lighting up switches the transistor on and off.  That transistor then switches the relay on or off.  The relay and transistor aren't connected to the LED at all (called "galvanic isolation"), so they do not need to share a ground.  You can think of the transistor as a pushbutton and the LED as a finger.  Your finger doesn't form part of the circuit at all, but it affects the circuit it's pressing.

So you can remove the jumper and connect the IN+ to the IO pin (as it is now) and the IN- to the ground on the Arduino.  The Vcc and GND pins on the relay module can then be connected to a completely different power supply, like a battery, which doesn't have a "ground" as such, and isn't connected to the arduino in any way at all.  And it works - in the same way that the light-switch works even though you're not plugged into the mains.

arishy

Thank you majenko.
I will have another beer, this one is for you...Cheers

Go Up