Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

cakraawijaya/Arduino-Mega-based-Smart-Home-Control-with-Voice-Instruction-via-Bluetooth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open Source Love License: MIT GitHub last commit Project Type

Arduino-Mega-based-Smart-Home-Control-with-Voice-Instruction-via-Bluetooth

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.



Project Requirements

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)



Download & Install

  1. Arduino IDE

    https://bit.ly/ArduinoIDE_Installer
    

  2. CH340 USB Driver

    https://bit.ly/CH340_USB_Driver
    



Project Designs

Block Diagram Pictorial Diagram
block-diagram pictorial-diagram
Wiring
wiring



Basic Knowledge

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.



Arduino IDE Setup

  1. Open the Arduino IDE first, then open this project by clicking File -> Open :

    arduinoMega_btvoice.ino


  2. Board Setup in Arduino IDE

    How to setup the Arduino Mega 2560 board

    Click Tools -> Board -> Arduino AVR Boards -> Arduino Mega or Mega 2560


  3. Port Setup in Arduino IDE

    Click Port -> Choose according to your device port (you can see in device manager)


  4. Before uploading the program please click: Verify.

  5. If there is no error in the program code, then please click: Upload.

  6. If there is still a problem when uploading the program, then try to check the driver / port / others section.



Bluetooth Voice Setup

  1. Open your smartphone, then in the Google Play Store search for the Bluetooth Voice application made by yashx, then install it.

  2. Turn on bluetooth.

  3. Search for your bluetooth device name -> pairing device by entering the password: 0000 or 1234.

  4. Open Bluetooth Voice app -> select JDY-31-SPP.

  5. Remove all existing built-in commands.

  6. 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



Get Started

  1. Download and extract this repository.

  2. Make sure you have the necessary electronic components.

  3. Make sure your components are designed according to the diagram.

  4. Configure your device according to the settings above.

  5. Please enjoy [Done].



Highlights

smart_home_btvoice



Appreciation

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.



LICENSE

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.