You are on page 1of 1

J

D
-
V
C
C
V
C
C
G
N
D
I
N
1
I
N
2
I
N
3
I
N
4
I
N
5
I
N
6
I
N
7
I
N
8
V
C
C
G
N
D
+5V
GND
USB
HDMI
ETHERNET
MICRO
USB
SD
CARD
+
3
.
3
V
TP1
TP2
1 2 3 4 5 6 7 8
AUDIO
VIDEO
Raspberry Pi
Model B
Rev 2.0
Sainsmart 8ch 5-V Relay Board
A B C A B C A B C A B C A B C A B C A B C A B C
RELAY
BOARD
INPUT
FROM
GPIO
PIN
2.2k
10k
2N222
NPN
TRANSISITOR
The relay board is active low which means the relays are
switched on when the inputs have a low voltage (0V) applied
to them. Since the GPIO pins output 3.3V when active, this
circuit will effectively short the relay board input to ground
making it 0V and will activate the relay.
During normal operation, when a relay is active, its terminals
A and B are connected. When de-activated, B and C are
connected. A and C are never connected.
Please note, there are differences between
Rev 1.0 boards and Rev 2.0 boards GPIO Pins! (Rev 2.0 shown)
Also, there are two widely used number schemes
that depend on which class library (BCM or Wiring Pi)
that you intend to use to control the pin outputs.
DNC = Do Not Connect
G
P
I
O

7
G
P
I
O

8
G
P
I
O

2
5
D
N
C
G
P
I
O

2
4
G
P
I
O

2
3
D
N
C
G
P
I
O

1
8
G
P
I
O

1
5
G
P
I
O

1
4
G
N
D
D
N
C
+
5
V
D
N
C
G
P
I
O

1
1
G
P
I
O

0
9
G
P
I
O

1
0
D
N
C
G
P
I
O

2
2
G
P
I
O

2
7
G
P
I
O

1
7
D
N
C
G
P
I
O

4
G
P
I
O

3
G
P
I
O

2
+
3
.
3
VB
C
M

#

s
:
G
P
I
O

1
1
G
P
I
O

1
0
G
P
I
O

6
D
N
C
G
P
I
O

5
G
P
I
O

4
D
N
C
G
P
I
O

1
G
P
I
O

1
6
G
P
I
O

1
5
G
N
D
D
N
C
+
5
V
D
N
C
G
P
I
O

1
4
G
P
I
O

1
3
G
P
I
O

1
2
D
N
C
G
P
I
O

3
G
P
I
O

2
G
P
I
O

0
D
N
C
G
P
I
O

7
G
P
I
O

9
G
P
I
O

8
+
3
.
3
V
W
i
r
i
n
g

P
i

#

s
:
Applying +5V to the Test Point 1 node (TP1) and
grounding the Test Point 2 (TP2) will supply power to
the Raspberry Pi if you do not wish to use the Micro
USB to supply power.
JUMPER

You might also like