Using ESP32 based custom designed PCB for Android application and bluetooth controlled home device, in this article, we will make an Android application bluetooth controlled home automation system.
Now we can use the ESP32's bluetooth functionality to control our home appliances from our smartphone. In addition to this, we can also control the device through the manual switch buttons that we usually use.
To make this home automation system I will use my 2 node SMT home automation PCB and custom designed android application.
The best part of this project is that we don't need any internet connection or any local server to connect the android app to the ESP32.
Most people don't have a WIFI connection, so this home automation system is for them.
Here the App will communicate directly with the ESP32 via Bluetooth,
Using bluetooth is a very convenient way to make a home automation system for the local range, and it's the only downside of this project.
Solder the following components on the PCB:
High Link (HLK-5M05)
Double pole double throw switch
The rest of the component PCB after grinding looks neat, clean and well-aligned like this.
To flash the code into the esp32 chip, I will use an esp32 development board.
Connect as shown below:
Download the code below this article and open it in the Arduino IDE.
Before uploading the code, you need to make some changes to the code. First, you need to add the esp32 board in the Arduino IDE.
You also need to add this ace button library in the Arduino IDE to run this code.
To do this go to Tools then Manage Libraries, a popup will pop up, type ace-button in the search box.
Install the first library, close the window after the library is installed.
The name we give here will be the name of the bluetooth device which will appear when we pair the esp32 with the smartphone.
Now upload this code after selecting the correct board and com port.
Android App Configuration
I made this custom android app from kodular.
ESP32 Bluetooth pairing
Download the APK file of this application and install this application in your android smartphone.
After installing the app, open your phone's Bluetooth settings and click Pair new device. A bluetooth device with the same name as we mentioned in the code will appear.
Now click on this device and click pair to pair the ESP32 with our smartphone.
Now open the app again and tap connect, select the bluetooth device.
The bluetooth connected message is displayed, which means our smartphone is now connected to the ESP32 via bluetooth.
Connection of light bulbs and switches
Connect all bulbs and switches as shown below:
Now our home automation project is ready, this project is very useful for those areas without internet connection.