PerfBoardSign in

The circuit inside every relay module

The small circuit inside every hobby relay module: a transistor switch, a base resistor, a flyback diode and a status LED.

Component side layout of The circuit inside every relay module on a perfboard 16 by 28 holes
16 × 28 holes · 7 parts · 9 wires

Free build sheet

The parts, every wire with its length and bend points, a bend guide, both sides of the board and checkboxes to track your progress. Print it or keep it open at the bench.

Open the build sheet

What you need

7 parts on a perfboard 16 × 28 holes, plus hookup wire.

QtyPartWhere to buy
1
Diode (axial)
D1
1
Signal+Power Header (3-pin)
J1
1
Screw Terminal 2P (5.08mm)
J2
1
LED
LED1
Buy LED on Amazon
1
NPN Transistor (TO-92)
Q1
Buy NPN Transistor (TO-92) on Amazon
2
Resistor (axial)1k
R1, R2
Buy Resistor (axial) on Amazon

Check every pin against the datasheet of the exact part in your hands before wiring.

As an Amazon Associate I earn from qualifying purchases.

Cut list

9 wires, 240 mm (9.4 in) in total, in the order the build sheet cuts them. Wire numbers match the build sheet. Each length includes 5 mm per end to go through the hole.

WireColour and netLength
6
BlackCOIL
I15 → G22
33mm
5
BlueCOIL
J16 → L18
17mm
4
GreenCOIL
H16 → E16
18mm
7
Red5V
H20 → E22
23mm
1
RedGND
E12 → E5
28mm
3
WhiteBASE
I11 → F14
21mm
9
White5V
M10 → D5
46mm
2
YellowSIG
I5 → F5
18mm
8
Yellow5V
J20 → L11
38mm

About this build

Every hobby relay module hides the same small circuit. A microcontroller pin can't drive a relay coil on its own, so an NPN transistor does it as a low side switch, with a 1k resistor between the signal and the transistor's base.

A flyback diode sits across the coil. When the transistor turns off, the coil's collapsing field tries to spike the voltage, and the diode gives that current somewhere safe to go. A status LED with its own 1k resistor lights when the coil is energised.

The component catalog has no relay, so the coil comes in on a screw terminal. Signal, 5V and ground arrive on a 3 pin header. The transistor is a TO-92 part and lead orders vary, so wire it from the build sheet and the datasheet for your exact part.

More builds

See all builds