LED Control with Relay

5:33

Planning relay module setup.

Consulting component datasheet.

Navigating the datasheet query.

Using file tool for datasheet.

Linking parts and components.

Searching web for: "SRD-05VDC-SL-C datasheet coil resistance current pickup voltage release voltage pin configuration"

Found 1 results.

Calculating.

Searching for components.

Searching library for: "2N2222"

Searching library for: "1N4007"

Searching library for: "330Ω Resistor"

Searching library for: "680Ω Resistor"

Searching library for: "10kΩ Resistor"

Searching library for: "Arduino Uno R4 WiFi"

Searching.

Searching.

Searching.

Creating search plan for: "2N2222"

Creating search plan for: "1N4007"

Creating search plan for: "330Ω Resistor"

Creating search plan for: "680Ω Resistor"

Creating search plan for: "10kΩ Resistor"

Creating search plan for: "Arduino Uno R4 WiFi"

Searching.

Searching.

Searching.

Searching.

Searching.

Searching.

Searching.

Found 72 results.

Searching: "2N2222"

Found 55 results.

Searching: "1N4007"

Searching.

Searching.

Searching.

Searching.

Searching.

Searching.

Searching.

Searching.

Searching.

Searching.

Found 76 results.

Searching: "680Ω Resistor"

Searching.

Searching.

Searching.

Found 35 results.

Searching: "Arduino Uno R4 WiFi"

Found 52 results.

Searching: "330Ω Resistor"

Found 57 results.

Searching: "10kΩ Resistor"

Finished searching for components.

Accessing knowledge base.

Searching for a component.

Searching library for: "330Ω Through Hole Resistor"

Creating search plan for: "330Ω Through Hole Resistor"

Searching.

Searching.

Searching.

Found 56 results.

Searching: "330Ω Through Hole Resistor"

Finished searching for a component.

Searching for a component.

Searching library for: "680Ω Through Hole Resistor"

Creating search plan for: "680Ω Through Hole Resistor"

Searching.

Searching.

Searching.

Searching.

Found 76 results.

Searching: "680Ω Through Hole Resistor"

Finished searching for a component.

Retrieving coil specifications.

Great—let’s use your 5 V Songle relay to switch an LED from an Arduino Uno R4 WiFi using a safe transistor driver and a flyback diode.
Parts you’ll need
Why a transistor + diode
  • According to the SRD datasheet, the 5 V coil draws about 70 mA (coil resistance ≈ 70 Ω, pull-in ≤ 75% VNOM, drop-out ≥ 10% VNOM). An Arduino GPIO cannot source that directly.
  • Best practice: drive the coil with an NPN transistor and place a flyback diode across the coil. Knowledge rule: the diode current rating should be at or above the relay’s steady-state coil current (≥ 70 mA). Both 1N4148-1 and 1N4007RLG satisfy this.
Wiring (breadboard)
  • Power and ground:
    • Arduino 5V -> relay coil pin A2 (either coil pin; coil is non-polarized).
    • Arduino GND -> transistor emitter AND the relay’s LED return resistor’s ground.
  • Transistor driver (example uses Arduino D8):
    • Arduino D8 -> MF3W-680Ω±5%-QT73 -> PN2222A base.
    • Optional: 10 kΩ from base to GND (keeps it off at boot).
    • PN2222A emitter -> GND.
    • PN2222A collector -> relay coil pin A1.
  • Flyback diode across coil:
    • 1N4148-1 cathode to 5V (coil A2), anode to transistor collector (coil A1).
  • Relay contacts to switch the LED from 5 V:
    • COM -> 5V.
    • NO -> LED anode -> CFR-12JB-52-330R -> GND.
    • When the relay energizes, NO closes to COM and the LED turns on. If you prefer LED ON by default, move from NO to NC.
Arduino sketch (example on D8)

Cpp


const int RELAY_CTRL = 8;
void setup() {
  pinMode(RELAY_CTRL, OUTPUT);
  digitalWrite(RELAY_CTRL, LOW); // keep OFF at power-up
}
void loop() {
  digitalWrite(RELAY_CTRL, HIGH); // energize relay -> LED ON
  delay(1000);
  digitalWrite(RELAY_CTRL, LOW);  // de-energize -> LED OFF
  delay(1000);
}
Notes
  • The 680 Ω base resistor targets solid saturation for the ~70 mA coil current; 1 kΩ will also usually work for this relay, but 680 Ω gives more margin.
  • Tie Arduino GND and the relay driver’s GND together. Do not power the coil from a GPIO pin—use 5V + transistor as shown.
Want me to add these exact parts into a small schematic in your Flux project so you can follow it 1:1 on a breadboard?
Confirm relay coil wiring
Ask for Flux schematic help
Use different GPIO pin
Drive multiple relays
Ask about external supply
110 days

To get started, talk to Flux or create a New Document.

Documents

    Documents are markdown text files which describe project goals, capture details, or even simulation outputs.

    Assets

    step

    SRD-05VDC-SL-C.step

    SRD-05VDC-SL-C-3D3D Model
    SRD-05VDC-SL-C.png

    SRD-05VDC-SL-C.png

    SRD-05VDC-SL-CThumbnail
    kicad_mod

    RELAY_SRD-05VDC-SL-C-Footprint_S.kicad_mod

    RELAY_SRD-05VDC-SL-C-Footprint_S
    SRD-05VDC-SL-C-Symbol-3.svg

    SRD-05VDC-SL-C-Symbol-3.svg

    SRD-05VDC-SL-C-Symbol-3Default

    SRD-05VDC-SL-C

    SRD-05VDC-SL-C thumbnail
    5V 15A SPDT (1 Form C) 5 Plugin,15.6x19.2mm Power Relays ROHS #CommonPartsLibrary #Relay #SPDT

    Properties

    Relay

    Ningbo Songle Relay

    SRD-05VDC-SL-C

    K

    Pricing & Availability

    Distributor

    Qty 1

    Controls