How to connect relay to Raspberry PI

1.Step – Configuration GPIO Pins.
  • Log-in to your R PIHome+
  • Go to the Settings tab =>GPIO Input/Output settings
  • Select a free GPIO pin, set:
    • function = Output Pulse/Output State
    • home = select if you wish to display the GPIO Pin on home page*
    • name

and Save settings.

connect Relay to raspberry pi
Input Settings R PiHome+

 

2.Step – Connect Relay to Raspberry PI.
  • Connect GND pin of the Relay with GND pin of the Raspberry PI
  • Connect VCC pin of the Relay with 5V pin of the Raspberry PI
  • Connect IN1-IN4 pin with GPIO pins, which you set in GPIO configuration page of the R PIHome.

 WARNING:

MAINS USE should NEVER be attempted by anyone unfamiliar, not competent and not qualified. The whole board including Pi should be enclosed in an isolated enclosure. We accept no responsibility for misuse at any voltage, including mains. MAINS CAN KILL!

* only for INPUT/VIRTUAL INPUT
Relay to raspberry pi
Relay & Raspberry Pi – Connecting diagrem

 

 

 

3 thoughts on “How to connect relay to Raspberry PI

  1. Usually that kind of relay are driven by 0-5V signal (arduino compatible), how can raspberry GPIO pins (3,3 V) drive relay inputs?
    I guess it needs a transitor to do this, isn’t right?

Leave a Reply