Skip to content

Raspberry Pi Interface for the SainSmart 8-Channel 5V Relay Module

License

Notifications You must be signed in to change notification settings

fjung/RPi_SainSmart_Interface

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Raspberry Pi SainSmart Relay Module Interface Board

Overview

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

Parts List

Quantity Part Notes
8 12kΩ ¼ Watt Resistors
8 10kΩ ¼ Watt Resistors
8 2N3904 Transistors I used these.
1 2 inch x 2 inch single-sided PCB I cut this down.
1 3 inch jumper wire
1 26 pin header (2x13)
1 10 pin header (1x10)
Quantity Part Notes
4 12kΩ ¼ Watt Resistors
4 10kΩ ¼ Watt Resistors
4 2N3904 Transistors I used these.
1 2 inch x 2 inch single-sided PCB I cut this down.
1 3 inch jumper wire
1 26 pin header (2x13)
1 6 pin header (1x6)

Explanation

The SainSmart board is 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 Sainsmart Relay Module has opto-isolation on the input pins. To maintain this isolation you would need to use an external 5v power supply.

Files

  • eagle_files - Provided here are Eagle PCB schematic and layout files.
  • gerber_files - @lazylester provided these 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.
  • (the files with the '_4' are for the Sainsmart 4-Channel 5V Relay Module)

Video

Thanks

Thanks to the folks on the Raspberry Pi BB, without their guidance it would have taken me longer to figure this out.

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).

About

Raspberry Pi Interface for the SainSmart 8-Channel 5V Relay Module

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%