Instructions on how to make devices that turn on / off lights and fans in Vietnamese

With a device that turns on and off lights, fans and other home-made voice devices are guided in the article below, you can turn your room or house into a smart home at a cost only. very low.

With a device that turns on and off lights, fans and other home-made voice devices are guided in the article below, you can turn your room or house into a smart home at a cost only. very low.

  1. Instructions for making backup batteries from an orange, charging nearly 40% of the battery for iPhone
  2. Instructions for making devices turn on and turn off lights automatically when the light / dark is super simple with only 50,000 VND
  3. Homemade ultra-light light switch, only you can turn it on

Materials to prepare:

Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 1Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 1

  1. A UNO R3 aduino circuit (cost about VND 130,000)
  2. A Bluetooth module HC-06 (cost about VND 120,000)
  3. Module relay 5v 1 to 8 channels depending on the number of devices you need to control (cost about 25,000 VND)
  4. Power cord to connect.

Step 1:

First, connect the Bluetooth module with Arduino according to the diagram below:

Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 2Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 2

 

Connect the power cord to the bluetooth module HC-06.

Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 3Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 3

Connect RX and TX signals.

Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 4Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 4

Step 2:

Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 5Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 5

On the relay module, the power supply pins for the active module are DC + and DC-. Signal pins are IN.

Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 6Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 6

To turn off the devices, you connect the relay signal pins.

Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 7Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 7 Connect the IN pin of the Relay module to pins 2 or 3, 4 because pins 2, 3 and 4 on the Arduino are used to output relay signals.

Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 8Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 8

Step 3:

Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 9Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 9

3 pins COM, NC and NO on Relay act as a switch to control electrical equipment. COM is the middle foot, NO normally open and NC is normally closed.

Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 10Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 10

Just like a switch, connect the replay module to an electrical device.

Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 11Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 11

Step 4:

Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 12Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 12

Copy the following code into Braod Arduino using Arduino IDE.

String data;
int tb1 = 2;
int tb2 = 3;
int tb3 = 4;
void setup () {
Serial.begin (9600);
pinMode (tb1, OUTPUT);
pinMode (tb2, OUTPUT);
pinMode (tb3, OUTPUT);
}
void loop () {
while (Serial.available ()) {// Check the byte to read
delay (30); // Delay to be more stable
char c = Serial.read (); // proceed to read
if (c == '#') {break;} // Exit the loop when detecting the word #
data + = c; // data = data + c
}
if (data.length ()> 0) {
Serial.println (data);
if (data == "turn on device 1" || data == "Turn on device 1" || data == "1")
{digitalWrite (tb1, HIGH);}
else if (data == "turn off device 1" || data == "Turn off device 1" || data == "a")
{digitalWrite (tb1, LOW);}
// tb1
if (data == "turn on device 2" || data == "Turn on device 2" || data == "2")
{digitalWrite (tb2, HIGH);}
else if (data == "turn off device 2" || data == "Turn off device 2" || data == "b")
{digitalWrite (tb2, LOW);}
// tb2
if (data == "turn on device 3" || data == "Turn on device 3" || data == "3")
{digitalWrite (tb3, HIGH);}
else if (data == "turn off device 3" || data == "Turn off device 3" || data == "c")
{digitalWrite (tb3, LOW);}
// tb3
data = "";}} // Reset variables

Step 5:

Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 13Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 13

After connecting the modules on the phone, we download the Bluetooth Voice Control software here and install it on the Android phone.

Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 14Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 14

After installation, we open the software and select the device.

Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 15Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 15

Here, you choose to connect to the device named tail 06 HC.

Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 16Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 16

Now say "turn on device 1" and "turn off device 1" to turn on and turn off the light. To change this phrase into other phrases, you can edit it in the Arduino code file.

Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 17Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 17

With this software, you can set to turn on, turn off 3 devices. To be able to control all the devices in the house with this software, you can add more switches.

Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 18Instructions on how to make devices that turn on / off lights and fans in Vietnamese Picture 18

Good luck!

4 ★ | 1 Vote