The article is being published in collaboration with JLCPCB. It is one of the most experienced PCB manufacturers with more than a decade in the field of PCB prototype and fabrication, they are committed to meeting the needs of their customers from different industries in terms of quality, delivery, cost-effectiveness and any other demanding requests.
IntroductionHello friends, Welcome to another home-automation project article, In this article, we are going to make Android app Bluetooth controlled home-automation system,
Now we can control our home appliances through our smartphone using Bluetooth feature of ESP32. and apart from this we can also control devices from manual switch buttons that we conventionally do.
For making of this home-automation system, I will use my 2 node SMT home-automation PCB and custom design android app.
Best part of this project is that we don't need any internet connection or any local server to connect android application to ESP32.
Most of people don't have WIFI connection, so this home-automation system is for them.
Here App will directly communicate to the ESP32 via Bluetooth,
Using Bluetooth is very convenient way of making home-automation system for local range and also this is the only downside of this project.
Apart from this 2 node, 4 node and 8 node SMT home automation PCBs are also available, if you want to purchase these PCBs, click here.
Designing the PCB.To design the circuit and PCB, we used EasyEDA which is a browser based software to design PCBs.
Designing the circuit works like in any other circuit software tool, you place some components and you wire them together.
Then, you assign each component to a footprint.
Having the parts assigned, place each component. When you’re happy with the layout, make all the connections and route your PCB.
Save your project and export the Gerber files.
Ordering the PCBs at JLCPCB.This project is sponsored by JLCPCB. JLCPCB is a full feature Printed Circuit Board manufacturing service.
Turn your DIY breadboard circuits into professional PCBs– get 10 boards for approximately $5 + shipping (which will vary depending on your country).
Once you have your Gerber files, you can order the PCB. Follow the next steps.
1. Download the Gerber files –click here to download the.zip file.
2. Go to JLCPCB website and Click on Quote Now button.
3.Upload the Gerber file you downloaded in the last step. Upload the.zip file or you can also drag and drop the Gerber files.
After uploading the zip file, you’ll see a success message at the bottom if the file is successfully uploaded. You can review the PCB in the Gerber viewer to make sure everything is good.
JLCPCB can grab all the PCB details and automatically fills them for you.
To place the order, click on “SAVE TO CART” button.
Now select the shipping method, the one you prefer and has cost efficient.
Before finalizing your order you can use the promotional code JLC-REBE to get a discount and then click pay.
Now grab all the components whose list is mention below, and soldered on the PCB.
1.ESP32 Chip.
2.Highlink (HLK-5M05).
3.Relay (5volts).
4.Terminal connectors.
5.Optocoupler(PC817).
6.DPDT Switch.
After soldiering rest of components PCB look like this neat, clean and well arranged.
CODETo flash the code into esp32 chip I will use esp32 development board.
Make the connections as shown in the schematic below.
Download this code and open it in Arduino ide.
Before you upload the code you need to make some changes in the code., first of all you need to add the esp32 boards in your Arduino IDE.
And also you need to add this ace button Library in your Arduino IDE to run this code.
For this go to tools then manage libraries, a popup will come, In the search box type ace- button,
Install the first library that has come, after installing the library close the Window.
One little change if you want you could change, Bluetooth device name,
The name we give here will be name of the Bluetooth device, and this will appear when we pair esp32 with our smartphone.
Now Upload this code after selecting right board and com port.
Android App Configuration.
I have made this custom android app from kodular.
Click here to download the APK file of this app.
ESP32 Bluetooth Pairing.
Download APK file of this app and install this app in your android smartphone.
After installing the app, Open Bluetooth Settings of your phone and click on pair new device...a Bluetooth device with the same name that we mention in the code will appear.
Now tap on this device and click on pair to pair the ESP32 with our smartphone.
Now open the app again & tap on connect, select the Bluetooth device.
Bluetooth is connected message shown, Which means our smartphone is now connected with the ESP32 via Bluetooth.
Connection of bulb & Switches.Make the connection of all the bulb and switches as per the schematic diagram shown below.
Now our home-automation project is ready, this project is very useful for those areas where internet connection is not able.
This is the best home-automation system for local area.
Video Tutorial is also available on my YouTube channel, if you want you check out.
Thank you so much for reading.
Comments