loading

At present people like to control electric equipment remotely. So this device helps to control electric equipment like Table Fans, Night Lamps from an android smart phone. There are number of advantages of this device.

  • Easy to move
  • Not expensive
  • Easy to operate
  • Can control remotely from a smartphone

So lets build this !!!

Step 1: Things You Need..

  • Arduino Uno Board
  • Jump Wires
  • HC-05 Bluetooth Module
  • 2 Channel Relay Module
  • Android Phone
  • Android App - [Get it!]
  • Old phone charger
  • Soldering Iron
  • Screwdriver
  • Scissor
  • Paper Cutter
  • Wires
  • Insulation Tape
  • Double tape
  • Plug base wall sockets - 2
  • Sunk Box - 3
  • Sunk Box Cap - 1
  • Ply wood
  • Self-tapping 1 inch

Step 2: Setting Up Sunk Boxes & Wall Sockets

  1. Cut the plywood according to the measurements of the sunk boxes.
  2. Fit sunk boxes to the plywood using self-tappings.
  3. You can build this according to your imagination :-)

Step 3: Coding the Arduino

Use the following code or download the ino file. Upload this code to arduino.

#include

SoftwareSerial mySerial(10, 11); //Pin10 RX ,Pin 11 TX connected to-- > Bluetooth TX, RX

#define relay1 2

#define relay2 3

#define relay3 4

#define relay4 5

char val;

void setup()

{ pinMode(relay1, OUTPUT);

pinMode(relay2, OUTPUT);

pinMode(relay3, OUTPUT);

pinMode(relay4, OUTPUT);

digitalWrite(relay1, HIGH);

digitalWrite(relay2, HIGH);

digitalWrite(relay3, HIGH);

digitalWrite(relay4, HIGH);

mySerial.begin(9600);

Serial.begin(9600);

}

void loop()

{ //cek data serial from bluetooth android App

if ( mySerial.available() > 0 )

{

val = mySerial.read();

Serial.println(val);

}

//Relay is on

if ( val == '1' )

{

digitalWrite(relay1, LOW);

}

else if ( val == '2' )

{

digitalWrite(relay2, LOW);

}

else if ( val == '3' )

{

digitalWrite(relay3, LOW);

}

else if ( val == '4' )

{

digitalWrite(relay4, LOW);

}

//relay all on

else if ( val == '9' )

{ digitalWrite(relay1, LOW);

digitalWrite(relay2, LOW);

digitalWrite(relay3, LOW);

digitalWrite(relay4, LOW);

}

//relay is off

else if ( val == 'A' )

{

digitalWrite(relay1, HIGH);

}

else if ( val == 'B' )

{

digitalWrite(relay2, HIGH);

}

else if ( val == 'C' )

{

digitalWrite(relay3, HIGH);

}

else if ( val == 'D' )

{

digitalWrite(relay4, HIGH);

}

//relay all off

else if ( val == 'I' )

{ digitalWrite(relay1, HIGH);

digitalWrite(relay2, HIGH);

digitalWrite(relay3, HIGH);

digitalWrite(relay4, HIGH);

}

}

Step 4: Fitting Arduino to Sunkbox Cap

Attach arduino uno to the sunkbox cap using a piece of double tape.

Step 5: Wiring Things

Use the old phone charger to power arduino uno.

Here I soldered it to arduino uno.

Connect Arduino Uno, HC-05 Module and 2 Channel Relay Module according to given diagram.

Then connect Wall Scokets and 2 Channel Relay Module as the diagram.

Check the wiring completely and plug the extension cord to the power.

Arduino Uno and Bluetooth Module will turn on.

Then Proceed to next step.

Step 6: Get the App & Connect to Bluetooth Module

Download and install the app. [Here]

Then open settings on your phone, Go to bluetooth settings and pair the HC-05 Module with your phone. Use 1234 as the password.

After that open the app, Click on "Find BT Device".

Then it will automatically discover the HC-05 Module.

Then press "Connection" button.

Now you phone is connected to HC-05 Module. Try pressing 1, 2, 3, 4 buttons and two buttons will work with the relay module. You can hear a tick inside the relays.

Step 7: Packing Things Into the Sunkbox

Pack phone charger, Arduino Uno and other components into the sunkbox. Use double tape to attach them. Do this carefully. You might damage wires or circuit boards.

Step 8: Final View

Now you have finished building Bluetooth Controlled Extension Cord.

Play Around!

<p>Excellent work, Can we also switch on/off this manually?</p>
<p>wow.. amazing mind blowing project if you can create bluetooth controlled then you have to go for wifi controlled its one of amazing <a href="http://www.theengineeringprojects.com/2016/11/engineering-projects.html" rel="nofollow">engineering projects</a> i have seen ever.</p>
<p>thank you very much! u</p><p>i'm working on it now..</p>
<p>Neat! I'd love to set this up in the garage for my projects :)</p>
<p>thank you very much!</p>

About This Instructable

3,476views

58favorites

More by sachithSA2:BLUETOOTH CONTROLLED EXTENSION CORD 
Add instructable to: