Bluetooth module with Arduino Skip to main content

How to control RGB LED using Arduino Uno

RGB LED is the abbreviation of ‘’Red Green Blue Light Emitting Diode’’. RGB LED is the most amazing type of The LED which has the ability to create millions of different shades of light-colors using red, green and blue colors.

Bluetooth module with Arduino




HC-05 Bluetooth module is used for wireless communication. It is designed to replace the wired connection. It requires a wireless serial connection setup to communicate with devices. HC-05 Bluetooth module can be operated in master or slave configuration. It uses serial port UART to communicate with devices. It can communicate with devices maximum range up to 10 meters with data transfer rate up to 1 Mbps. Because of its amazing features, it used in multiple applications such as home automation, wireless robot, industrial control units, wireless mouse, GPS receivers, etc.

Pin description:


 

The HC-05 Bluetooth module has 6 pins which are as follows:

EN: If EN pin is high then it operates under AT commands mode otherwise operates under by default data mode. In data mode, only the data can be exchanged among devices with a baud rate of 9600 bps. On the other side in the AT command mode, the setting of HC-05 can be changed according to the need with the baud rate of 38400 bps.

VCC: power supply pin can be connected with 3.3-volt or 5-volt voltage pin of the Arduino board.      

GND: Used for ground connections.

TXD: used to transmit serial data.

RXD: used to receive serial data.

STATE: It used to provide the connectivity status whether the Bluetooth module is connected or not.

In this tutorial, I will explain to you a very basic example which will help you to understand the Bluetooth module connectivity with Arduino Uno. In this example, I will operate an LED with the help of my mobile with a wireless connection. I will use the “Arduino Bluetooth controller app” to control the LED operation.

Required Hardware components:

1. 1 x Bluetooth module HC-05:..........................BUY
2.  1 x Arduino Uno..............................................BUY
3.  1 x LED............................................................BUY
4.  1 x Android mobile...........................................BUY
5.  1 x 220-ohm resistor.........................................BUY
6.   Few jumper wires.............................................BUY

Required software components:

  1.  Arduino IDE
  2. Arduino Bluetooth controller app: Download from here 
This is a free app (not made by me) which you can download from the Google play store for free.

Circuit connection:

HC-05 Bluetooth module has 6 pins. VCC pin of the Bluetooth module is connected with the 5-volt power supply pin of the Arduino Uno board. GND pin of Bluetooth module is connected with GND pin of Arduino. TXD pin is connected with pin 0 (RX) and RDX pin is connected with pin 1 (TX) of the Arduino Uno board. LED has two legs one is shorter and the other one is longer. The shorter leg (cathode) is connected with the ground pin of Arduino. The longer leg (anode) is connected with 220 resistor’s one end terminal. The other terminal of 220 resistor is connected with digital pin 8 of the Arduino Uno board. This was all about the circuit connection.

Circuit diagram:

Code: Click here

The code allows us to control the LED connected to pin 8, by pressing the 1 or 0. If 1 is entered by the app’s terminal keyboard than LED gets turned on. In the same manner, if ‘0’ is entered by the app’s terminal keyboard than LED gets turned off.

Arduino Bluetooth controller app’s important points:

  1.  Install the app from the Google play store.
  2.  Next turn on your phone’s Bluetooth.
  3. Select add a device option.
  4. Than search HC-05 from paired devices list and add it.
  5. You will ask for password then enter the default password 1234/0000 and get connected to it.
  6.  Now you are ready to use the terminal to control Arduino Uno. 

Output:





Comments

Post a Comment

Popular posts from this blog

Smart Plant Watering System Using ARDUINO UNO

As we all know, plants play an important role in our life, there are countless benefits we get from plants but the most important is fresh air and the pleasant atmosphere on the earth. Hence,   It is not only our social duty as well as the responsibility that we should plant trees as much as we can and also take care of them. But  the biggest challenge we face, is, taking care of them,

How to use LCD with Arduino Uno

Liquid crystal Display 16x2 (LCD) is the widely used electronic device to establish communication between the real world and electronics based machine world.

How to operate soil moisture sensor with Arduino

The soil moisture sensor is the most amazing sensor used to measure the quantity of water present in the soil and defines the moisture level of the soil as the output. Because of its amazing operating principle this sensor used in application such as automatic irrigation system, agriculture research applications, landscape irrigation, indoor planting system, and lawns. I have also made an advance level project  "Smart Plant Watering System" using a soil moisture sensor.

ad

ad