Actuator Digital

Relay

A relay is an electrically controlled switch that uses a coil and moving contacts to open or close another circuit.

Part images

Relay. The case marking identifies a Songle SRS-05VDC-SL relay family part. Image source: SunFounder Pico 2 W Starter Kit documentation, Components section, © 2026 SunFounder.
Relay schematic. SunFounder diagram showing coil, armature, spring, and contacts. Image source: SunFounder Pico 2 W Starter Kit documentation, Components section, © 2026 SunFounder.
KY-019 Module Photo. Module Photo for the KY-019 5V Relay Module. Image source: Joy-IT SensorKit KY-019 module documentation
KY-019 Pinout / Module Diagram. Pinout / Module Diagram for the KY-019 5V Relay Module. Image source: Joy-IT SensorKit KY-019 module documentation
KY-019 Arduino Wiring Diagram. Arduino Wiring Diagram for the KY-019 5V Relay Module. Image source: Joy-IT SensorKit KY-019 module documentation
KY-019 Raspberry Pi Wiring Diagram. Raspberry Pi Wiring Diagram for the KY-019 5V Relay Module. Image source: Joy-IT SensorKit KY-019 module documentation

What it is

A relay is an electrically controlled switch that uses a coil and moving contacts to open or close another circuit.

How students use it

Students use relays to switch a separate low-voltage load while the Pico controls only the relay-driver side.

Pins and power

Coil pins plus contact pins for normally open, normally closed, and common. Confirm against the relay package/datasheet before wiring.

The relay image shows a Songle SRS-05VDC-SL marking with 5V coil family and printed contact ratings of 3A 250VAC / 30VDC. ObsoleteHQ beginner projects keep relay loads low-voltage DC only.

SunFounder explains normally open contacts connect when activated, normally closed contacts connect when inactive, and the coil moves the armature.

Voltage and safety

A relay coil is not a GPIO load. Use a driver circuit and flyback protection as required. Do not use mains-voltage loads in beginner ObsoleteHQ projects.

Keep relay projects low-voltage DC. Never switch wall power in student projects. Power off before moving contact wiring.

Module internals

Main component: Songle SRS-05VDC-SL relay marking visible in the SunFounder source image.

Electromagnet coil, iron core, armature, spring, normally open contact, normally closed contact, common contact, and molded frame.

Datasheet notes

The SunFounder image visibly marks Songle SRS-05VDC-SL. Use the SRS-series datasheet and the exact package marking to confirm coil/contact pinout and ratings.

Common libraries

No special library is needed. Use machine.Pin to control the relay-driver circuit.

Common mistakes

Confusing NO and NC, driving the coil directly from GPIO, forgetting flyback protection, using contact ratings as permission to switch mains, and not sharing ground on the control side.