Skip to the content
2 layers80 × 46 mmRelay DriverBJT, the printed circuit board in 3D

5V MCU-controlled relay driver PCB designed in KiCad for switching a 12V DC motor load using a P2N2222A transistor, flyback diode protection, and LED status indication.

Size
80 × 46 mm
Copper layers
2
Thickness
1.6 mm
Parts
16
Nets
9
Pads
33
Tracks, vias
31, 0
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
19 Jun 2026
Updated
19 Jun 2026

Overview

Relay DriverBJT is an open-source printed circuit board by SriHarshini2701, from the SriHarshini2701/5V-Relay-Driver-PCB repository on GitHub. It is a 2-layer board of 80 × 46 mm with 16 parts on 9 nets, routed with 31 tracks and 0 vias.

It is built around the PN2222A. Its parts include 3 resistors, 3 diodes, 3 connectors, 1 capacitor and 1 transistor. It belongs with the home automation and IoT and robots and motor control boards of this library.

Main components

1

README

README.md

5V-Relay-Driver-PCB

Project Overview

This project implements a 5V MCU-controlled relay driver PCB designed in KiCad for switching a 12V DC motor load. The relay coil is driven using a P2N2222A NPN transistor operating in saturation mode. A flyback diode is included across the relay coil to suppress inductive voltage spikes and protect the transistor during turn-off.

The project covers the complete hardware design flow including schematic capture, LTspice simulation, PCB layout, ERC/DRC verification, BOM generation, and manufacturing file generation.


Design Specifications

ParameterValue
MCU Control Voltage5 V
RelayOmron G5LE-1 DC5
Relay Coil Voltage5 V
Relay Coil Current79.4 mA
Load Voltage12 V DC
Load TypeDC Motor
Switching DeviceP2N2222A NPN Transistor
Base Resistor1 kΩ
ProtectionFlyback Diode
PCB Layers2-Layer PCB
Design ToolKiCad
Simulation ToolLTspice

Circuit Operation

The MCU output drives the base of a P2N2222A transistor through a 560Ω resistor. When the MCU output goes HIGH, the transistor enters saturation and energizes the relay coil. The relay contacts then connect the 12V supply to the motor load.

A flyback diode connected across the relay coil suppresses the back-EMF generated when the relay is switched OFF, protecting the transistor from high-voltage transients.


Schematic

Schematic

Relay driver schematic showing MCU interface, transistor driver stage, relay coil protection diode, status LED, and motor switching contacts.


PCB Layout

Top Layer

PCB Top

Top layer PCB layout generated in KiCad.

3D View

PCB 3D

3D rendering of the completed relay driver PCB.


LTspice Simulation Results

Relay Coil Current Verification

Relay Coil Current

Measured relay coil current ≈ 77.8 mA, validating proper energization of the Omron G5LE-1 relay.


Base and Collector Current Verification

Base Collector Current

Base current ≈ 7.38 mA and collector current ≈ 77.8 mA verify correct transistor drive and base resistor selection.


Flyback Diode Verification

Flyback Verification

Flyback diode suppresses the inductive voltage spike generated by the relay coil during turn-off, protecting the switching transistor.


Design Verification

Electrical Rules Check (ERC)

✔ No ERC errors

Design Rules Check (DRC)

✔ No DRC violations

Manufacturing Outputs Generated

✔ Gerber Files

✔ Drill Files

✔ Bill of Materials (BOM)


Key Skills Demonstrated

  • Schematic Capture
  • Relay Driver Design
  • Transistor Switching Circuits
  • Component Selection
  • LTspice Simulation
  • PCB Layout Design
  • ERC and DRC Verification
  • BOM Generation
  • Gerber Generation
  • Hardware Design Documentation
  • Manufacturing Output Preparation

Author

Sri Harshini N

LinkedIn | GitHub

Parts

16
QtyValueFootprintReferences
4MountingHoleMountingHole:MountingHole_3.2mm_M3H1, H2, H3, H4
21N4007Diode_THT:D_DO-41_SOD81_P10.16mm_HorizontalD1, D3
2Conn_01x02_PinTerminalBlock:TerminalBlock_bornier-2_P5.08mmJ1, J3
1100nFCapacitor_SMD:C_0805_2012MetricC1
110kResistor_SMD:R_0805_2012MetricR2
11kResistor_SMD:R_0805_2012MetricR3
1560RResistor_SMD:R_0805_2012MetricR1
1Conn_01x03_PinTerminalBlock:TerminalBlock_bornier-3_P5.08mmJ2
1G5LE-1Relay_THT:Relay_SPDT_Omron-G5LE-1K1
1LEDLED_SMD:LED_0805_2012MetricD2
1PN2222APackage_TO_SOT_THT:TO-92_InlineQ1

Similar boards

  • 2 layers152.4 × 101.6 mm8088-FE2010A SBC, the printed circuit board in 3D

    8088-FE2010A SBC

    skiselev/micro_8088

    Micro 8088 - IBM XT Compatible Processor Board based on Faraday FE2010 chipset

    72 parts412GPL-3.0
  • 2 layers33.7 × 66 mmSmartbell, the printed circuit board in 3D

    Smartbell

    Staacks/there.oughta.be

    Projects featured on my blog at https://there.oughta.be

    27 parts108GPL-3.0
  • 4 layers100 × 100 mm2063-Z80, the printed circuit board in 3D

    2063-Z80

    Z80-Retro/2063-Z80

    Retro Z80 CPU Board

    86 parts96
  • 2 layers30.7 × 76.1 mmRepeater v2, the printed circuit board in 3D

    Repeater v2

    plusvic/simplebus2-intercom

    General description of the Simplebus2 protocol used by some Comelit's intercoms. Hardware for retransmitting Simplebus2 messages over UART.

    17 parts95CC0-1.0
  • 2 layers28.8 × 43.8 mmAdv pcb, the printed circuit board in 3D

    Adv pcb

    Vail-CW/vail-adapter

    Adapter for cw morse keys to USB

    13 parts81MIT
  • 2 layers23.2 × 52.1 mmOpenC64Saver, the printed circuit board in 3D

    OpenC64Saver

    SukkoPera/OpenC64Saver

    Protect your Commodore 64 from killer power supplies!

    17 parts79
  • 4 layers184.2 × 169.5 mmSB mini II, the printed circuit board in 3D

    SB mini II

    simonboak/SB-mini-II

    A homebrewed Apple II clone

    97 parts76MIT
  • 2 layers49.5 × 30 mmAirpcb smd old, the printed circuit board in 3D

    Airpcb smd old

    issalig/toshiba_air_cond

    AB protocol decoder for toshiba air conditioners

    30 parts65

Questions

How big is the Relay DriverBJT PCB?

It measures 80 × 46 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Relay DriverBJT use?

16 parts, built around the PN2222A. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Relay DriverBJT KiCad files?

From the SriHarshini2701/5V-Relay-Driver-PCB repository on GitHub, at the commit this page was made from: the board is Relay_DriverBJT.kicad_pcb and its schematic Relay_DriverBJT.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Relay DriverBJT design in my own project?

Its repository states no licence, so its author keeps all rights: ask SriHarshini2701 before reusing the design.