top of page
Dhanush

Want to make a Smart Lighting System with 3 LEDs using HC-05, RPi, and mobile?

Updated: Sep 29

Nowadays, the idea of a #Smart Lighting System is getting emerged rapidly. You would have watched the advertisements on television that a man will be controlling home lights from his workplace.

Do you know how that works? It's nothing but an integrated work of #Bluetooth and mobile application. As you proceed, you will get to know about the working of the Bluetooth device and how this circuit works?


However, this article provides step by step guide to perform the #interfacing, starting from the list of required components.





APPARATUS REQUIRED:


The following list provides the hardware and software components required to perform this interfacing.

Hardware components:


1.Bluetooth Module [HC-05]:

This module follows the IEEE 802.15.1 Standardized protocol. It helps us to construct a Wireless Personal Area Network (PAN), and for the transmission of data, the device employs frequency hopping spread spectrum (FHSS). To interact with other devices, it uses the mode of serial communication. The module consists of 6 pins and it can be operated either in master or slave configuration.

Bluetooth Module [HC-05]

2.Raspberry Pi 3:

We are using #Raspberrypi to connect with the Bluetooth HC-05 module and display the output. It contains several I/O pins using which we can connect the module and then by coding the Raspberry pi, we will receive the commands/signals that are sent from the mobile.

Raspberry Pi 3





3.USB Cable:

This cable is used to connect the #Raspberrypi to the power supply. It also helps in the transmission of data.

USB Cable

4. Jumper wires:


These are simple connecting wires, that are used to connect the ends without any soldering. The male wires have the ends that can be connected to other ends and the female wires are the ones that have the receiving end.

Jumper wires


Software components:


5.SSH Terminal:

The SHH Terminal is used in this project to connect the Raspberry Pi module to the terminal of another computer.

SSH Terminal




6.Python IDE:

Python Programming is done in an IDE (Integrated Development Environment) is a platform where we can write the code, run, and test the working.


CIRCUIT:



First, we shall connect the Bluetooth module HC-05 with a raspberry pi device.


What goes where?

  • The RED wire connects the VCC of the Bluetooth module to the 5V (VCC) of the raspberry pi.

  • The BLACK wire connects the ground pin of HC-05 to the ground pin of the raspberry pi.

  • The YELLOW wire connects the transmitting pin [TX] of HC-05 to the receiving pin [RX] of the raspberry pi device.

  • The BLUE wire connects the receiving pin [RX] of HC-05 to the transmitting pin[TX] of the raspberry pi.


After finishing this, we shall connect the LEDs fixed in the breadboard to the interface of HC-05 and raspberry pi.

We can connect the LEDs in any of these pins but should be mentioned accordingly in code files. In the above-given circuit, the PINK wire is connected with GPIO 27 pin and that shall be our first LED. The BLUE wire connects the second LED with GPIO 17 pin. And the ORANGE wire connects our third LED with GPIO 18 pin. The overall ground is then connected to the GND pin of the raspberry pi.


Then power supply is given to the circuit, the raspberry pi gets the boot-up and the LED of Bluetooth module HC-05 flashes rapidly indicating that it is ready to connect.





Code:



Note: This file is in the text format and should be converted to python-format (.py) before downloading.


Working:


The Bluetooth terminal HC-05 is the mobile application employed here to establish a connection with HC-05. In that application-specific buttons are created to perform the operations.

The application is now configured with buttons related to this experiment such as LED 1, LED 2, LED 3, all LED off, all LED on. The ASCII command of LED 1 On is 1 and LED 2 On is 2, LED 3 On is 3.

For all LEDs on, the command is 4 and all LED off its 5.

After making these configurations, we can check the credibility of this setup by giving the necessary commands in mobile application and the glow of LEDs respectively.


After the execution of code, according to the input commands given in the mobile application the LED glows.

The ASCII command is given as 1,

And the first LED glows,


The ASCII command is given as 2,





The second LED glows,


The ASCII command is given as 3,


The third LED glows,


The ASCII command is given as 4,





All LEDs are glowing,


The ASCII command is given as 5,


And no LED is glowing,


The practical implementation of this interfacing is presented here as a video.


Video credits: Sai Parimal


As mentioned before, nowadays the demand for a smart lighting system is getting increased. By experimenting with this prototype of controlling LEDs using mobile apps, we can understand the concept of controlling our smart home appliances from workplaces. Energy conservation is a big advantage of this theme.



See also:



Order Electronics Projects


Want us to guide you through your project or make the project for you? Click on the button below or reach out to us via Call/WhatsApp at (+91) - 7600948607


You can -


  • Order Basic Electronics Projects

  • Order Embedded Systems Projects

  • Order IoT Projects

  • Order FPGA Projects

  • Order VLSI Projects

  • Order Image Processing Projects

  • Order Matlab Projects

  • Order TinkerCAD Projects

  • Order Proteus Projects


Click on the button below to fill out the project inquiry form -





Create Various Projects


Check out our Free Arduino Projects Playlist - Arduino Projects 

Check out our Free Raspberry Pi Projects Playlist - Raspberry Pi Projects 

Check out our Free TinkerCAD Projects Playlist - TinkerCAD Projects 

Check out our Free IoT Projects Playlist - IoT Projects 

Check out our Free Home Automation Projects Playlist - Home Automation Projects 

Check out our Free NodeMCu Projects Playlist - NodeMCu Projects 


Follow us -


Please do follow us i.e. #learnelectronicsindia to get daily updates about new blogs, videos, courses, products, offers, competitions, quizzes, and Internship Opportunities.





228 views2 comments

2 Comments


Anushka Gupta
Anushka Gupta
Jul 29, 2023

Learn Electronics India has set the standard for DIY electronics tutorials with this brilliant blog! The Smart Lighting System guide is a perfect blend of theory and hands-on practice. It helped me improve my electronics skills while creating a genuinely useful home automation setup. A must-read for anyone interested in the fascinating world of smart devices.

Like

ashitanarvekar2002
Jul 17, 2023

Informative and concise! LearnElectronics India always delivers quality content.

Like
bottom of page