I have read quite a few threads regarding this same subject with varying answers.I plan on using the relay to turn on and off a 3d printer.I have read a few threads stating that the 3.3v from the Raspberry will have issues triggering the relays and that a few resistors,diodes and transistors will be needed to ensure safe and trouble free operation.I read a response on here by a user named Gerben and he states
You don't need any additional hardware.
The board uses active low optocoupler to switch on the relay. But since the Pi is 3.3V, when the Pi put a pin high (3.3V). But if the relay board is powered by 5v, this 3.3V is still 1.7V lower, and the optocoupler will (apparently) trigger.
To fix this you can just remove the jumper that connects JD-VCC to VCC. Next connect 5V to the JD-VCC pin, and connect 3.3V to the VCC pin. If you look at the schematic on sainsmart you'll see that VCC is only used to power the led inside the optocoupler. While JD-VCC is used to activate the relay. Originally the jumper connected JD-VCC to VCC so both would be 5V.
Another option would be to set the GPIO pins to INPUT when the relay needs to be turned off. This will prevent any current from flowing (where it did when you'd set it to 3.3V). To activate the relay, set the GPIO pin to OUTPUT and LOW
Third option would be to add a resistor between the GPIO pin and the IN of the board. You'd have to find a suitable value that will disable the optocoupler when 1.7V is applied, but not too high that it won't work on 5V.
I would just like to know what is the correct way to wire this for safe operation of the relay and Pi?Here are a few pics of the parts I am talking about and the schematic that has the transistors and other odds and ends.
Here is a link to his the thread where he chimed in.He seems to know quite a bit but I figured I would ask and maybe things have changed.The relay has no data sheet that I can find.I also posted the link to adafruits pdf of the logic converter.