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

Arduino UNO and Bluetooth HC-06 Controlled Smart Home Automation System

View and Edit Project In Cirkit DesignerImage of Arduino UNO and Bluetooth HC-06 Controlled Smart Home Automation System

Circuit Documentation

Summary

This circuit integrates an Arduino UNO microcontroller, a Bluetooth HC-06 module, a 9V battery, a 120V fan, two 12V single-channel relays, a bulb, and a 220V power source. The Arduino UNO controls the relays based on commands received via Bluetooth, which in turn control the fan and the bulb.

Component List

Bluetooth HC-06

Arduino UNO

9V Battery

120V Fan

12V Single Channel Relay (Relay 1)

12V Single Channel Relay (Relay 2)

Bulb

Power 220V

Wiring Details

Bluetooth HC-06

Arduino UNO

9V Battery

120V Fan

12V Single Channel Relay (Relay 1)

12V Single Channel Relay (Relay 2)

Bulb

Power 220V

Code Documentation

Arduino UNO Code

int fanrelay = 8;
int lightrelay = 7;
char sms;

void setup() {
  pinMode(fanrelay, OUTPUT);
  pinMode(lightrelay, OUTPUT);

  digitalWrite(fanrelay, HIGH);
  digitalWrite(lightrelay, HIGH);
  Serial.begin(9600);
}

void loop() {
  if (Serial.available() != 0) {
    sms = Serial.read();
  }
  if (sms == '1') {
    digitalWrite(fanrelay, LOW);
  }
  if (sms == '2') {
    digitalWrite(fanrelay, HIGH);
  }
  if (sms == 'a') {
    digitalWrite(lightrelay, LOW);
  }
  if (sms == 'b') {
    digitalWrite(lightrelay, HIGH);
  }
}

This code initializes the relays connected to pins 8 and 7 of the Arduino UNO. It reads commands from the Bluetooth module via the serial port and controls the relays accordingly. Commands '1' and '2' control the fan relay, while commands 'a' and 'b' control the light relay.