Designing a Bluetooth-controlled color-changing lamp.
The idea of the project is to create a lighting system that changes colors based on our control through a mobile application. It helps with creating a fresh atmosphere and improving productivity
Arduino IDE
breadboard
Project Connections
The connections were made as follows:
Starting from the Arduino:
GND is connected to the negative rail on the breadboard.
5V is connected to the positive rail on the breadboard.
Bluetooth Module:
GND → connected to the negative rail.
VCC → connected to the positive rail.
TX → connected to RX on the Arduino.
RX → connected to TX on the Arduino.
LED Connections:
Red LED → pin 9.
GND → GND
Green LED → pin 10.
Blue LED → pin 11.
I started with the wiring right away,as shown in the video.
You will need an LED, a Bluetooth module, an Arduino, and a breadboard.
Connect the LED and the Bluetooth module to the Arduino, and make sure all the pins are in their correct place.
In this project, I used an Arduino with a Bluetooth module so I could control the LED lights from my phone.
The idea is simple — the Bluetooth connection allows the app to communicate with the Arduino, and whenever I choose a color or brightness level on the phone, the Arduino receives that signal and changes the LED light accordingly.
I connected the Bluetooth module like this: TX on the module goes to RX on the Arduino, RX goes to TX, VCC is connected to 5V, and GND to GND.
As for the RGB LED, it’s connected to pins 9, 10, and 11 on the Arduino for the red, green, and blue colors, and each color has its own ground wire.
The code starts by defining these pins, then opens a Bluetooth serial connection at 9600 baud so it can receive data from the app.
When the phone sends a command like “R255,” the Arduino understands that the red color should light up at maximum brightness.
If the command is “G100,” it turns on the green light at a medium level, and so on for the blue.
The Arduino reads the first letter of each message to know which color to change, then converts the numbers that follow into a value between 0 and 255. It uses that value in the analogWrite() function to adjust the LED brightness.
In the end, the user can easily switch between colors or mix them together from the app, choosing the brightness they like. This makes the lighting look dynamic and interactive.
After transferring the code to the Arduino IDE, make sure to remove the Bluetooth TX & RX pins from their place to avoid damaging them. Once the code is uploaded, reconnect the wiring back to its position.
At the beginning, one of the problems I faced was connecting the Bluetooth module.
As shown in the video, each Bluetooth module has its own name and needs to be properly paired with the app.
I later discovered that the issue was caused by connecting TX to TX, when it actually should be TX to RX and RX to TX.
Also, it’s recommended to use a 220Ω resistor with each LED, because without it, the LED might burn out after long use.
This week, we worked on designing a fishing rod controlled by Bluetooth. It was a valuable experience from which I learned a lot about design, programming, and logical thinking, and it also helped me with the final project.