Table of Contents
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. This article explains the key facts and context behind homemade voice control device.
- 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:
Step 1:
First, connect the Bluetooth module with Arduino according to the diagram below:

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

Connect RX and TX signals.

Step 2:

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

To turn off the devices, you connect the relay signal pins.
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.

Step 3:
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.
Just like a switch, connect the replay module to an electrical device.
Step 4:
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:
After connecting the modules on the phone, we download the Bluetooth Voice Control software here and install it on the Android phone.
After installation, we open the software and select the device.
Here, you choose to connect to the device named tail 06 HC.
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.
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.
Good luck!
FAQ
What is homemade voice control device?
Data + = c; // data = data + c. } If (data. length ()> 0) {.
What makes homemade voice control device notable?
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.
What are the key facts about homemade voice control device?
Now say "turn on device 1" and "turn off device 1" to turn on and turn off the light.
Reader Comments 0
Sign in with email or Google to join the discussion.