Relay Module and Optocouplers?

Newb here, i tried controlling a relay with an optocoupler (4n35), which I though was a basic task. But i came to a couple conclusions i don't understand.

  1. I bought http://www.ebay.com/itm/181262302398?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT It seems that when IN is LOW, the relay activates. SO when IN is LOW, i guess the coil energized in the relay and NC becomes open and NO becomes closed, thus indicated by the green light. Red light is always on signifying the relay is powered.

Idk if that logic is correct but it's what I ended up with

  1. How to wire the relay input to be controlled with the optocoupler. but still being powered with 5v. I have literally tried half a dozen circuits, tried my own and even when experimental (thus burning one of my IC's!) and I LITERALLY can't get the Arduino board to flawlessly control my relay through the 4n35.

I want this perfect so if something goes sour all my circuits have a layer of protection. (I know i can just connect the relays to Arduino pins)

The opto transistor turns on when the LED is lit, IE, when the input is HIGH. This turns on the relay in your circuit. The problem you may have is the current rating of the optoisolator transistor. You should use the optoisolator to operate a transistor capable of carrying the relay coil current. (Or use a SSR.)

RC is not needed and could prevent the coil operating.

Weedpharma

That relay module is made to connect directly to Arduino's 5volt, ground and a digital output.

If for some reason you want to use opto isolation???

Connect VCC and Ground pins to a separate 5volt supply.
And the opto transistor to VCC and in (collector to VCC).

Or to in and ground (collector to in). Depending on the logic of the module.

The module has already all the resistors, transistor and diode.

The opto LED needs a 1K current limiting resistor.
Leo..