
Using Relays — SIK Circuit 13
Instrukcje
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
Materiały do tego kroku:
SparkFun Inventors Kit - V3.21 zestaw
Arduino Uno R31 sztuka
Breadboard1 sztuka
NPN Transistor (P2N2222A)1 sztuka
Diode (1N4148)1 sztuka
5mm LED1 sztuka
330 Ohm Resistor2 sztuk
Jumper Wires8 sztukTools 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.
Materiały do tego kroku:
NPN Transistor (P2N2222A)1 sztuka
Diode (1N4148)1 sztuka
5mm LED1 sztuka
330 Ohm Resistor2 sztuk
Breadboard1 sztuka
Jumper Wires8 sztukArduino Code
Arduino Code
Open the Arduino IDE and upload the following sketch to your Arduino board.
Materiały do tego kroku:
Arduino Uno R31 sztukaTools 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.
Materiały
9- 1 zestaw$105.00
- 1 sztukaPlaceholder
- 1 sztukaPlaceholder
- SPDT Relay1 sztuka
- 1 sztukaPlaceholder
- Placeholder
- $3.00
You can swap these in
Can't get one of the materials? Swap it for an equivalent — these work just as well.
- Instead of Relay Module, try:
Gadgeteer - Motor Driver L298 Module
MicroView - OLED Arduino Module
MPU6050 6-Axis Accelerometer & Gyroscope Module
ZigBee CC2530 Module
Arduino Relay Module (4-Channel)
MCP4725 12-Bit DAC Module (3-Pack)
IGBT Transistor Module (600V/25A)
Gadgeteer - Accelerometer Module
ADH8066 GSM Module - Instead of Arduino Uno R3, try:
Prototyping Shield for Arduino Uno (3-Pack) - Instead of 5mm LED Assortment Kit (300pcs, 5 Colors), try:
WS2812B NeoPixel LED Strip (1m, 60 LEDs) - Instead of Diode Kit, try:
Bridge Rectifier Diode Kit (20pcs)
Recommended for this build
Products makers often use with builds like this one.
Servo MotorUsed together and in similar builds
Resistor 10K Ohm 1/6th Watt PTH - 20 packUsed together and in similar builds
DC MotorUsed in similar builds
Push Button - 33mmFrequently used with this build's materials
Temperature SensorUsed in similar builds
Flex Sensor 2.2 InchUsed together and in similar builds
LED - RGB Diffused Common Cathode - 5mmFrequently used with this build's materials
USB CableFrequently used with this build's materialsRelated blueprints
Other builds that share materials, tools, or techniques with this one.






CC0 Domena publiczna
Ten plan jest udostępniany na licencji CC0. Możesz go swobodnie kopiować, modyfikować, rozpowszechniać i wykorzystywać do dowolnych celów, bez konieczności uzyskiwania zgody.
Wesprzyj Makera kupując produkty przez jego plan, za co zarabia Prowizja Makera ustalony przez sprzedawców, lub stwórz nową iterację tego planu i dołącz go jako połączenie w swoim własnym planie, aby dzielić się przychodami.