Coder Social home page Coder Social logo

rpi_relay_interface's Introduction

Raspberry Pi Relay Module Interface Board

Note / Warning

This was formerly stated to be for the SainSmart relay modules, but it was later pointed out to me that these boards actually already have this logic built in to them.

Overview

These interface boards will allow you to connect your Raspberry Pi (rev 2.0, at least) to a 4 or 8-Channel 5V Relay Module.

Parts List

8-Channel 5V Relay Module

Quantity Part Notes
8 12kΩ ¼ Watt Resistors This multi-pack has all the resistors you'll need for this, and much more.
8 10kΩ ¼ Watt Resistors
8 2N3904 Transistors Amazon.
1 2 inch x 2 inch single-sided PCB I cut this down.
1 3 inch jumper wire
1 26 pin header (2x13) [This] will be more than enough.
1 10 pin header (1x10)

4-Channel 5V Relay Module

Quantity Part Notes
4 12kΩ ¼ Watt Resistors This multi-pack has all the resistors you'll need for this, and much more.
4 10kΩ ¼ Watt Resistors
4 2N3904 Transistors Amazon.
1 2 inch x 2 inch single-sided PCB I cut this down.
1 3 inch jumper wire
1 26 pin header (2x13) [This] will be more than enough.
1 10 pin header (1x10)

Explanation

The relay boards are powered by 5v and the relays are triggered by taking the input pin to ground. Since the Raspberry Pi's GPIO pins output 3.3v I used a set of transistors to take the relay pins to ground.

I used 2N3904 transistors simply because they were cheap and readily available. In theory any NPN transistor should work, but the resistors may need to be adjusted.

To make the board I used the toner transfer method. There are plenty of instructions on the internet for this, so I won't go into it here.

The Relay Module I used has opto-isolation on the input pins. To maintain this isolation you would need to use an external 5v power supply instead of using the Pi's.

Files

  • eagle_files - Provided here are Eagle PCB schematic and layout files.
  • gerber_files - these are Gerber format files so it will be easy to have boards manufactured.
  • images - Images of my board and the files I printed to do the toner transfer.
  • test_scripts - Some python scripts to test the operation of the board.

Video

Thanks

  • Thanks to the folks on the Raspberry Pi BB, without their guidance it would have taken me longer to figure this out.
  • Thanks to @lazylester for the Gerber files for the 8-channel version.
  • Thanks to @fjung for the Eagle and Gerber files for the 4-channel version.

License

There is no license other than to say that I release this to the public domain... do with it as you wish (see the license file).

rpi_relay_interface's People

Contributors

fixedd avatar lazylester avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.