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.
- Instructions for making backup batteries from an orange, charging nearly 40% of the battery for iPhone
- Instructions for making devices turn on and turn off lights automatically when the light / dark is super simple with only 50,000 VND
- 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 1
- A UNO R3 aduino circuit (cost about VND 130,000)
- A Bluetooth module HC-06 (cost about VND 120,000)
- Module relay 5v 1 to 8 channels depending on the number of devices you need to control (cost about 25,000 VND)
- 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 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 3
Connect RX and TX signals.
Instructions 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 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 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 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 8
Step 3:
Instructions 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 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 11
Step 4:
Instructions 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 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 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 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 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 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 18
Good luck!
You should read it
- Explore a special high-tech bathroom with the ability to control everything by voice from the toilet to the mirror
- How to use Voice Control in iOS 13
- How to control the entire Android device by voice
- How to turn off voice control on iPhone
- Instructions on how to turn off voice control on iPhone quickly
- How to enable Windows 11 voice control
- Users can control voice music on Spotify in the future
- The control commands are useful with Bixby Voice on Galaxy S8
- How to set up voice recognition in Windows 10
- Fake Voice 7.0 - Download Fake Voice 7.0 here
- Search Google by Vietnamese voice via Chrome
- Top 15 applications to 'transform' your voice on iPhone
May be interested
Math proves: 26 years old is the best time to get married!
Life will become easier with 9 quick calculation tips learned from elementary school
Using electric saws to cut water balloons, interesting things happened
Choose the most stupid friend in the picture!
Funny science: The shape of lips can reveal your personality
You will be surprised to know the uses of these very ordinary things