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

Arduino UNO Bluetooth-Controlled Smart Light with Relay

View and Edit Project In Cirkit DesignerImage of Arduino UNO Bluetooth-Controlled Smart Light with Relay

Circuit Documentation

Summary

This circuit involves an Arduino UNO microcontroller, an HC-06 Bluetooth module, a 5V relay, a bulb, a rocker switch, and a power source. The Arduino UNO controls the relay based on commands received via the HC-06 Bluetooth module. The relay, in turn, controls the bulb connected to a 220V power source. The rocker switch is used to manually control the bulb.

Component List

  1. Arduino UNO

    • Description: A microcontroller board based on the ATmega328P.
    • Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
  2. HC-06

    • Description: A Bluetooth module used for wireless communication.
    • Pins: RXD, TXD, GND, VCC
  3. Bulb

    • Description: An electrical bulb.
    • Pins: GND, power
  4. Rocker Switch

    • Description: A switch used to manually control the bulb.
    • Pins: 1, 2
  5. 5V Relay

    • Description: A relay module used to control high voltage devices.
    • Pins: Normally Open, Common terminal, Normally Closed, In, GND, VCC
  6. Power 220V

    • Description: A 220V power source.
    • Pins: hot wire, neutral wire
  7. Type-B to USB

    • Description: A cable used to connect the Arduino UNO to a computer.
    • Pins: Type-B, USB

Wiring Details

Arduino UNO

HC-06

Bulb

Rocker Switch

5V Relay

Power 220V

Code Documentation

Arduino UNO Code

char val;

void setup() {
    pinMode(13, OUTPUT);
    Serial.begin(9600);
    digitalWrite(13, HIGH);
}

void loop() {
    if (Serial.available()) {
        val = Serial.read();
        Serial.println(val);
    }
    if (val == '1') {
        digitalWrite(13, LOW);
    } else if (val == '2') {
        digitalWrite(13, HIGH);
    }
    delay(100);
}

Explanation: