Concept
Ideation
This week's task is to control via Bluetooth using the mobile phone application, and the idea is to control the RGB LED via Bluetooth using the mobile phone.
Inspiration
Luminous hanger
A continuation of my final project is a smart lighting unit in the shape of a hanger
software : Tinkercad
It is online software from Autodesk, I think it is a discovery for me. It is used in modeling and building electronic circuits and simulating them, and this is the best part about using it. It allows you to build any electronic circuit because it has a large library of electronic components and the wonderful feature of writing codes through blocks that are built, in addition to the usual method of writing using text.
This program is used through which we transfer to the Arduino, where the code was copied from the Tinker Cad and checked to ensure that there are no errors. Then the download was done and made sure to choose the Arduino Uno from the drop-down list at the top.
To control the Bluetooth module via the phone, we use the Arduino Bluetooth Control application, which has a different set of features that facilitate the control process with easy and different user interfaces according to your needs.
components of circuit
RGB LED
Jumpers Wires
Breadbord
bluetooth Module
3 resistor
Arduino UNO
Design / preparation process
Input Components
The following is a simple procedure to control a Bluetooth device on a smartphone. First, you need to arrange the wires so that they connect with each other across a breadboard as shown in the diagram.
The Vcc of Bluetooth module goes to the 5V connection in Uno. Similarly, the ground goes to the ground, The Tx, or transmit pin, goes to Rx in Uno or pin number 0. The Rx of Bluetooth goes to Tx of Uno or pin number 1.
Ideally, the 5V voltage may be too high for the Bluetooth component, so you might further need a couple of 10 ohm resistors to divide the voltage.
As soon as you connect the power supply, the Bluetooth LED should start blinking. This means there is no Bluetooth pairing at the moment. You need to create one to have better control over the device/project.
Output Components
RGB LED
There are two kinds of RGB LEDs: common anode LED and common cathode LED. The figure below illustrates a common anode and a common cathode LED.
In a common cathode RGB LED, all three LEDs share a negative connection (cathode). In a common anode RGB LED, the three LEDs share a positive connection (anode).
This results in an LED that has 4 pins, one for each LED, and one common cathode or one common anode.
The best way to distinguish between a common cathode and common anode RGB LEDs is using a multimeter.
Put you multimeter is in continuity mode.
Place the red multimeter tip on the longest LED lead. Then, place the black tip on one of the other leads.
If the LED lights up, this means you have a common anode LED.
The breadboard is considered one of the solutions through which electronic circuits and smart circuits can be created using Arduino without having to make welds between wires and using complex boards, as it is used in Prototype.
As is clear in the pictures, how to connect, the difference between the slots, and how to use them
I connected the (RX ) from Bluetooth Module to pin ( TX ) from Arduino
I connected the (TX ) from Bluetooth Module to pin ( RX ) from Arduino
Connect the vcc to the 5V Arduino
And connect the Ground with the Ground in Arduino
While connecting the RGB LED...
The red terminal is connected to pin 8
Connect the green terminal to pin 9
Connect the blue terminal to pin 10
GUI on My Phone 📱
I turned on Bluetooth and choose the name Bluetooth Module
the name Bluetooth Module is ( MD- BT-44)
I selected this user interface ( Buttons & Slider )
I saw this interface that contains a group of buttons that can control an entry code, whether it is a number or a letter.
I set them up as letters so they fit my code
Now I can control the lighting colors
Implementation Process
CODE
Using this code... When you press one of the application buttons on the phone on the letter R, the LED will light up red.
When you press the letter G, the LED will light up green.
When you press the letter B , the LED will light up in blue.
When you press the letter W, the LED will light up white.
Smart circuit
I connected the (RX ) from Bluetooth Module to pin ( TX ) from Arduino
I connected the (TX ) from Bluetooth Module to pin ( RX ) from Arduino
Connect the vcc to the 5V Arduino
And connect the Ground with the Ground in Arduino
While connecting the RGB LED...
The red terminal is connected to pin 8
Connect the green terminal to pin 9
Connect the blue terminal to pin 10
💡Note: When transferring the code from the laptop to the Arduino using the connection cable, you must remove the connection wires for (RX - TX)
Final 🤩
finally
Now, using the phone, I can control the three lighting colors along with the white color, which achieves the idea of my project, and this feature can be added to it.
Challenges 🥹
I connected the resistors incorrectly by placing the two resistor terminals on the same row with the LED terminal
I placed one end of the resistor with the LED end and the other end on another row on the breadboard
Files & Resources💾