I've recently acquired an 8-channel relay from China. I've been reading and watching a lot about how to connect them to the RPi. For now I've only tried it out on an old RPi Model B (I didn't want to fry my new Pi), and it seemed to work great.

However, from what I've been gathering online, the best practice is to connect the relay to external power, so it doesn't draw too much from the RPi, but also so I can use the 5 V and 3.3 V for different purposes. My question is now, how would I go about doing this, and is it in fact the best practice?

The relay I've purchased looks like this:

RPi Relay

and I've bought it from this page, which contains some (quite limited) documentation of the product:

AliExpress - 5v 8-channel Relay

I hope some of you accomplished makers can help me with this problem.


Each relay uses ~0.3W when closed (NC). That's ~2.4W, so you need a power supply of at least 5V/500mA, but more is better, up to 1A. You may need to power other stuff. Use a phone charger with a stripped USB cable.

Connect positive lead of power supply to VCC, and negative to GND on relay.

Use common ground, i.e. connect the Pi's GND to the power supply's GND. Do it on the relay board. You can also shift a jumper to avoid needing this. Since this board is 5V logic, use a MOSFET/BJT to turn on each relay, each using 5V on C-E or D-S, and 3V on B/G. Or use a levelshifter. It will take you 30 minutes to solder a perfboard with 8 switchers, and several days to get a hold of a level shifter (if you don't have one), so that's up to you.

The board has optocouplers and diodes, so you don't need to worry about flyback. Example: Connect 5V signal to positive terminal of relay (S+) and from relay GND, connect to DRAIN of a 2N7000 N-MOSFET. Wire SOURCE to GND. An N- MOSFET likes a 4K7 pull-down resistor, but a BJT (like the venerable BC239 NPN) doesn't need this. For that you need a 1K resistor to BASE. Use what you have.

Let me know if you need clarification.

  • Thanks for the answer so far, I'm not sure I quite understand how to connect everything. Do you have an example schematic? – user68902 Jul 4 '17 at 16:50
  • @AndreasVoss No, but words are just as good. Get a pen and draw it, it will be easier for you. – user2497 Jul 4 '17 at 16:53
  • It's a real pretty relay, congratulations ;) – user2497 Jul 4 '17 at 16:55
  • Have you figured it out now? – Fusseldieb Jul 4 '17 at 17:24
  • 2
    @Fusseldieb By all means, make a drawing. I was of course not calling dibs on Andreas Voss. He likes drawings. – user2497 Jul 4 '17 at 17:26

Your Answer

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