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!

2 Replies to “Raspberry pi relay module wiring”

  1. I connected the 4 relay module to external power, let the jumper and connected the In to a GPIO pin in raspi 4 and everything OK.
    In this case the raspi GPIO pin will drive in HIGH will have a 2.7v difference between diode and then when LOW will have the 5v difference. Any comments?

Leave a Reply

Your email address will not be published. Required fields are marked *