
Using Relays — SIK Circuit 13
උපදෙස්
Parts & Introduction
Parts & Introduction
A relay is an electrically-operated mechanical switch. A small current energizes a coil that physically moves a contact arm, switching a separate circuit. Relays can control high-power devices (motors, lights, appliances) from low-power Arduino signals. This experiment uses an SPDT (Single Pole Double Throw) relay to alternate between two LEDs.
Parts Needed
- 1x Arduino Uno + USB cable
- 1x Breadboard
- 1x SPDT Relay
- 1x NPN Transistor (P2N2222A)
- 1x Diode (1N4148)
- 2x LEDs (different colors)
- 2x 330Ω Resistors
- 14x Jumper Wires
Materials for this step:
SparkFun Inventors Kit - V3.21 kit
330 Ohm Resistor2 pieces
Jumper Wires8 piecesTools needed:
Hardware Hookup
Hardware Hookup
Wiring Instructions
Transistor + Relay Coil
- Connect transistor Base through 330Ω resistor to Arduino Digital Pin 2.
- Connect transistor Emitter to GND.
- Connect one side of the relay coil to transistor Collector.
- Connect other side of relay coil to 5V.
- Flyback Diode: Band (cathode) to 5V, anode to Collector.
Relay Contacts + LEDs
- Connect relay COMMON through a 330Ω resistor to 5V.
- Connect relay NC (Normally Closed) to LED 1 positive leg.
- Connect relay NO (Normally Open) to LED 2 positive leg.
- Connect both LED negative legs to GND.
Materials for this step:
330 Ohm Resistor2 pieces
Jumper Wires8 piecesArduino Code
Arduino Code
Open the Arduino IDE and upload the following sketch to your Arduino board.
Materials for this step:
Tools needed:
Test & Experiment
Test & Experiment
What You Should See
You should hear the relay clicking, and see the two LEDs alternating — one on, one off — switching every second.
Troubleshooting
- LEDs not lighting: Check LED polarity — longer leg is positive.
- No clicking sound: The transistor or coil circuit isn't working. Verify transistor orientation and coil connections.
- Relay not making good contact: The SIK relay is designed for soldering, not breadboarding. Press it firmly to ensure all pins contact.
- Confusion: Don't mix up the TMP36 temperature sensor with the transistor!
Experiments to Try
- Replace the LEDs with a motor on the NO contact — use the relay as a motor on/off switch.
- Use a button to control when the relay toggles.
- Add variable delay to create morse code patterns.
ද්රව්ය
9- $105.00
- SPDT Relay1 piece
- $3.00
- $5.00
Related blueprints
Other builds that share materials, tools, or techniques with this one.






CC0 පොදු වසම
මෙම බ්ලූප්රින්ට් CC0 යටතේ නිකුත් කර ඇත. ඔබට අවසර නොමැතිව පිටපත් කිරීම, වෙනස් කිරීම, බෙදා හැරීම සහ භාවිතා කිරීම කළ හැක.
බ්ලූප්රින්ට් හරහා නිෂ්පාදන මිලදී ගැනීමෙන් නිර්මාතෘට සහාය වන්න නිර්මාතෘ කොමිසම විකුණුම්කරුවන් විසින් නියම කළ, හෝ මෙම බ්ලූප්රින්ට්හි නව අනුවාදයක් සාදා ආදායම බෙදා ගැනීමට ඔබේ බ්ලූප්රින්ට්හි සම්බන්ධතාවයක් ලෙස ඇතුළත් කරන්න.