Houses in Indonesia today generally have not implemented high-level technology, so to turn off or turn on the device it must be done manually. This is clearly inefficient (waste of time and energy). Therefore, this project was created to make it easier for users to condition the device (on/off). This project has been implemented and took approximately 3 days. This system is equipped with bluetooth, which allows users to control devices by voice. In this case, the devices include: alarms, fans, lights, and screens. UART communication protocol is used as a medium for data exchange between Bluetooth and Arduino Mega board. While the type of UART used is Hardware Serial. The benefit of making this project is none other than to add insight. The results of this research show that the smart home prototype can function properly.
Part | Description |
---|---|
Development Board | Arduino Mega 2560 |
Code Editor | Arduino IDE |
Application Support | Bluetooth Voice |
Driver | CH340 USB Driver |
Communications Protocol | • Inter Integrated Circuit (I2C) • Universal Asynchronous Receiver-Transmitter (UART) |
IoT Architecture | 3 Layer |
Programming Language | C/C++ |
Actuators | • Fan DC 5V (x1) • LED (x1) • Piezoelectric (x1) |
Sensor | JDY-31 SPP-C: Bluetooth Module (x1) |
Display | LCD I2C (x1) |
Other Components | • USB type B cable - USB type A (x1) • Jumper cable (1 set) • Adaptor DC 5V (x1) • Breadboard (x1) |
-
Arduino IDE
https://bit.ly/ArduinoIDE_Installer
-
CH340 USB Driver
https://bit.ly/CH340_USB_Driver
Block Diagram | Pictorial Diagram |
---|---|
Wiring |
---|
Basically, a device can be communicated with other devices either wirelessly or by cable. Communication between commonly used hardware is Serial Communication
. It can be known that there are three types of Serial Communication
, which include: UART (Universal Asynchronous Receiver-Transmitter)
, SPI (Serial Peripheral Interface)
, and I2C (Inter Integrated Circuit)
. There are two kinds of UART Serial Communication
, namely Hardware Serial
and Software Serial
. Hardware serial communication
can be done by connecting the TX
and RX
pins crosswise
on each development board, for example: RX-TX
, then TX-RX
. The TX
pin is for sending data
, while the RX
pin is for receiving data
. Serial Software Communication
is more or less the same as Serial Hardware Communication
in terms of cabling, but there are differences in terms of coding. By using this Serial Software
you can overcome the constraints of the limitations of RX
and TX
pins on the development board. To communicate with this Serial Software
is quite easy, namely by using certain Digital Pins
as a substitute for TX pins and RX pins
.
-
Open the
Arduino IDE
first, then open this project by clickingFile
->Open
:arduinoMega_btvoice.ino
-
Board Setup
in Arduino IDEHow to setup the
Arduino Mega 2560
boardClick
Tools
->Board
->Arduino AVR Boards
->Arduino Mega or Mega 2560
-
Port Setup
in Arduino IDEClick
Port
-> Choose according to your device port(you can see in device manager)
-
Before uploading the program please click:
Verify
. -
If there is no error in the program code, then please click:
Upload
. -
If there is still a problem when uploading the program, then try to check the
driver
/port
/others
section.
-
Open your smartphone, then in the
Google Play Store
search for theBluetooth Voice
application made byyashx
, then install it. -
Turn on
bluetooth
. -
Search for your bluetooth device name ->
pairing device
by entering the password:0000
or1234
. -
Open
Bluetooth Voice
app -> selectJDY-31-SPP
. -
Remove all existing built-in commands.
-
Create a new command as seen below :
Say Get Turn on the Alarm
1
Turn off the Alarm
2
Turn on the Fan
3
Turn off the Fan
4
Turn on the Lamp
5
Turn off the Lamp
6
Turn on the Screen
7
Turn off the Screen
8
Turn off All Devices
9
-
Download and extract this repository.
-
Make sure you have the necessary electronic components.
-
Make sure your components are designed according to the diagram.
-
Configure your device according to the settings above.
-
Please enjoy [Done].
If this work is useful to you, then support this work as a form of appreciation to the author by clicking the ⭐Star
button at the top of the repository.
MIT License - Copyright © 2024 - Devan C. M. Wijaya, S.Kom
Permission is hereby granted without charge to any person obtaining a copy of this software and the software-related documentation files to deal in them without restriction, including without limitation the right to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons receiving the Software to be furnished therewith on the following terms:
The above copyright notice and this permission notice must accompany all copies or substantial portions of the Software.
IN ANY EVENT, THE AUTHOR OR COPYRIGHT HOLDER HEREIN RETAINS FULL OWNERSHIP RIGHTS. THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, THEREFORE IF ANY DAMAGE, LOSS, OR OTHERWISE ARISES FROM THE USE OR OTHER DEALINGS IN THE SOFTWARE, THE AUTHOR OR COPYRIGHT HOLDER SHALL NOT BE LIABLE, AS THE USE OF THE SOFTWARE IS NOT COMPELLED AT ALL, SO THE RISK IS YOUR OWN.