2

This is a newbie on using the GPIO on the Raspberry Pi. I also did some search and reading about using the GPIO, but I am confused

What I'm going to do is to attach an 8 relay to the RPI.

This is the relay i have.

There is a link on the site for more info but it only relates to the relay.

I went for this relay after seeing this video on youtube .

Do I need some sort of buffer in-between the RPI and the relay board or can I use pin 2 and 6 on a Raspberry pi V2 to power the relay board or both?

  • There doesn't seem to be any schematic or documentation on that site. You will need a buffer between the RPi and the relays, but it's impossible to tell from the pictures what buffering they have on the board already – John La Rooy Mar 12 '13 at 5:51
  • Ah, ok there is a document link on the Description (not under Document) duh! – John La Rooy Mar 12 '13 at 6:02
  • You could try looking at susa.net/wordpress/2012/06/raspberry-pi-relay-using-gpio I'm not going to reproduce it here as it's probably not perfect, but you might get enough out of it to make a start. Just be careful - mains electricity is tricky stuff. – recantha Mar 12 '13 at 8:13
  • @recantha, this board already has drivers for the relays, the RPi just needs to turn on the LEDs in the optoisolators – John La Rooy Mar 12 '13 at 11:00
1

From the terrible schematic, it appears the signals are passed into opto-isolators and then onto ULN2803's to drive the relays.

The RPi will most likely not be able to drive the opto-isolators effectively. You could use an MCP23017 to drive the opto-isolators. This has the advantage of only using 2 GPIO's to controll the 16 outputs

Here is an example of how to use the MCP23017 with the RPi

  • The site says It can be controlled directly by Micro-controller But I cannot find anything on how to do it. But Arduino uses 5V Logic so I suppose just hook it up the GPIO's no the case with Pi – Piotr Kula Mar 14 '13 at 9:58
  • @ppumkin, many microcontrollers have stronger I/O than the ARM in the RPi. – John La Rooy Mar 14 '13 at 10:29
1

No, your stock Raspberry PI will not be able to operate this relay board.

The Raspberry PI uses 3.3v for its GPIO pins. The relay board that you have selected needs more voltage to switch the relay. From the link you have provided it looks like these relays require 5v to operate. You will need a lever shifter to be able to use these relays with the Raspberry PI

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.