Raspberry pi relay module wiring

How is the right way to wire the relay module?

The Raspberry pi GPIO operates with 3,3V,
but the relay needs 5V to operate.
=> Open JD-VCC/VCC Jumper to isolate the two circuits
In addition no resistors are necessary.
They are already build in the relay module.

4 Channel 5V optical isolated relay module with Raspberry pi

a) Using external 5V power supply

  • open JD-VCC/VCC Jumper
  • connect external 5V to JD-VCC pin of Jumper
  • connect GND with ground of external power supply
  • connect Raspberry 3,3V to VCC pin of Jumper
  • connect In1 with Raspberry GPIO-PIN of your choice
    (no extra resistor necessary for GPIO → already on relay board)*

b) Using Raspberry as power supply

  • open JD-VCC/VCC Jumper
  • connect Raspberry 5V to JD-VCC pin of Jumper
  • connect GND with ground of Raspberry
  • connect Raspberry 3,3V to VCC pin of Jumper
  • connect In1 with Raspberry GPIO-PIN of your choice
    (no extra resistor necessary for GPIO → already on relay board)*

*Current flows from 3.3V, delivered by the Raspberry through an on board mounted resistor to the diode of the optical couppler and afterwards into the GPIO-PIN of the Raspberry when the GPIO-PIN is set to LOW.
At this side of the circuit no extra ground needed!