Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino-Controlled Relay Switch for Bulb Illumination

View and Edit Project In Cirkit DesignerImage of Arduino-Controlled Relay Switch for Bulb Illumination

Circuit Documentation

Summary

This circuit consists of an Arduino UNO microcontroller, a 12V single-channel relay, and two bulbs. The Arduino UNO is used to control the relay, which in turn switches the bulbs on and off. The relay is powered by the 5V output from the Arduino and is controlled by one of the Arduino's digital pins. The bulbs are connected to the relay such that one bulb is connected to the Normally Closed (NC) contact and the other to the Normally Open (NO) contact. The bulbs share a common ground connection through the relay's Common (COM) contact.

Component List

Arduino UNO

12V Single Channel Relay

Bulb 1

Bulb 2

Wiring Details

Arduino UNO

12V Single Channel Relay

Bulb 1

Bulb 2

Documented Code

Arduino UNO Code (sketch.ino)

void setup() {
  // Initialize serial communication at 9600 bits per second:
  Serial.begin(9600);
  
  // Set digital pin 13 as an OUTPUT:
  pinMode(13, OUTPUT);
}

void loop() {
  // Turn the relay on (connects NO to COM and disconnects NC from COM):
  digitalWrite(13, HIGH);
  delay(1000); // Wait for 1 second
  
  // Turn the relay off (connects NC to COM and disconnects NO from COM):
  digitalWrite(13, LOW);
  delay(1000); // Wait for 1 second
}

This code sets up the Arduino to communicate over the serial port at 9600 baud and configures pin 13 as an output. In the loop, it toggles pin 13 high and low, which turns the relay on and off, respectively, with a 1-second delay between each state change. This action causes the bulbs to alternate between being on and off.