SMART HOME
Hello guys, this time we will discuss about how to make Smarthome using the Features of the Voice Commands on your Smartphone, before continuing to make the tools, we better know the important parts of the device, Arduino and Relay. Come on, check the discussion below !!
What is Arduino?
Arduino is an open-source single-board micro controller, derived from the Wiring platform, designed to facilitate the use of electronics in various fields. The hardware has the Atmel AVR processor and the software has its own programming language. Arduino is currently very popular throughout the world. Many beginners learn to know robotics and electronics through Arduino because it's easy to learn. But not only beginners, hobbyists or professionals also like to develop electronic applications using Arduino. The language used in Arduino is not a relatively difficult assembler, but the C language is simplified with the help of Arduino libraries. Arduino software itself is Arduino IDE, which can be installed on your PC or Laptop.
What is Relay?
Relay is an electrically operated Switch and is an Electromechanical component consisting of 2 main parts namely Electromagnet (Coil) and Mechanical (a set of Contact Switches / Switches). Relays use the Electromagnetic Principle to move the Contact Switch so that with a small electric current (low power) can conduct higher-voltage electricity.
Ingredients in making Smarthome
The ingredients needed include:
1. Arduino Uno R3
2. Module MB102
3. 2 channel relay
4. HC-05
5. Male to Male jumper cable
6. Male to Female jumper cable
8. Power Cord
10. Stop contact
11. Adapter
12. Projectboard
Making Steps
1. Prepare the ingredients needed
Prepare materials used for Electronic Circuits to support the work of your Smart Home such as, Arduino + Usb Cable, Projectboard, HC 05, Relay 2 ch, Jumper Cables, Electric Socket, Adapters and MB102 Modules.
2. The component set as shown
The next step is to assemble the components, like the picture above:
1. Plug in the MB102 Module with your Projectboard, and pay attention to the Polarity of the MB102 Module with the Projectboard (Positive to Positive, and Negative to Negative)
2. Connect the RX HC-05 with TX (pin 1) on Arduino
3. Connect TX HC-05 with RX (pin 0) on Arduino
4. Connect VCC and GND HC-05 with VCC (+) and GND (-) on the Projectboard
5. Connect VCC and GND on Arduino with VCC (+) and GND (-) on the Projectboard
6. Connect the VCC and GND Pins to Relay 2 CH with VCC (+) and GND (-) on the Projectboard
7. Connect pin IN1 on Relay 2 CH with Pin 2 on Arduino
8. Connect pin IN2 on Relay 2 CH with Pin 3 on Arduino
9. The circuit is complete
After the electronic circuit is complete, then string the circuit that leads to the lamp:
1. Connect the cable with the plug
2. Connect the cable to the right side of the (Zero) Socket
3. Then, connect the NC Terminal with the left part of the Outlet.
4. Then connect the cable section on the Wall Socket to the COM Terminal on the 1 channel relay
5, The circuit is complete, and starts to be programmed.
KODE PROGRAM
#include<SoftwareSerial.h>
SoftwareSerial module_bluetooth(0, 1); // pin RX | TX
char data = 0;
void setup()
{
Serial.begin(9600);
pinMode(2, OUTPUT); //inisialization PIN 2 to Output
pinMode(3, OUTPUT);
digitalWrite(2, HIGH);
digitalWrite(3, HIGH);
}
voidloop()
{
if(Serial.available() > 0)
{
data = Serial.read(); //baca data yang dikirim
if(data == '1'){
digitalWrite(2, LOW); //nyalakan relay
}
else if(data == '2'){
digitalWrite(2, HIGH); //matikan relay
}
else if(data == '3'){
digitalWrite(3, LOW);
}
else if(data == '4'){
digitalWrite(3, HIGH);
}
Then download the Arduino Bluetooth Controller App on Playstroe on your Smartphone.
Next, we adjust the data in the application to match the program, Press Turn ON and Hold, then the Configure Button will appear, you can change the "Button Name" as you wish, then set the "'ON' Command" by entering the number 1 , and "'OFF' Command" by entering the number 2. Then click "SAVE".
After that, press another Turn ON and Hold, then the Configure Button will appear, you can change the "Button Name" as you wish, then set "'ON' Command" by entering the number 3, and "'OFF' Command" with enter the number 4. Then click "SAVE".
For more details, you can watch the video below:
For those who are still unfamiliar with Arduino, please click ARDUINO with IDE 2020, here is also explained about Arduino in full, and where to download Arduino IDE.
Supporting references :
MRD Trick
https://www.arduino.cc/
https://zona-teknikk001.blogspot.com/2020/06/what-is-arduino-complete-with-ide.html
0 Response to "Control Equipment at home via Smartphone- Complete with Instructions"
Post a Comment