
Using Relays — SIK Circuit 13
Talimatlar
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
Bu adım için malzemeler:
SparkFun Inventors Kit - V3.21 kit
Arduino Uno R31 adet
Breadboard1 adet
NPN Transistor (P2N2222A)1 adet
Diode (1N4148)1 adet
5mm LED1 adet
330 Ohm Resistor2 adet
Jumper Wires8 adetGerekli aletler:
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.
Bu adım için malzemeler:
NPN Transistor (P2N2222A)1 adet
Diode (1N4148)1 adet
5mm LED1 adet
330 Ohm Resistor2 adet
Breadboard1 adet
Jumper Wires8 adetArduino Code
Arduino Code
Open the Arduino IDE and upload the following sketch to your Arduino board.
Bu adım için malzemeler:
Arduino Uno R31 adetGerekli aletler:
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.
Malzemeler
9- $105.00
- 1 adetYer Tutucu
- 1 adetYer Tutucu
- SPDT Relay1 adet
- Yer Tutucu
- Yer Tutucu
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 Kamu Malı
Bu plan CC0 lisansıyla yayınlanmıştır. İzin almadan kopyalayabilir, değiştirebilir, dağıtabilir ve herhangi bir amaçla kullanabilirsiniz.
Planı üzerinden ürün satın alarak Maker'ı destekleyin, böylece Maker Komisyonu Satıcılar tarafından belirlenen komisyonu kazanırlar veya bu Planın yeni bir versiyonunu oluşturun ve gelir paylaşımı için kendi Planınıza bağlantı olarak ekleyin.