May 29, 2017

Arduino To Android Communication using Bluetooth

Arduino is one of the most popular microcontroller based electronics prototyping platforms available in the market. The area of applications of Arduino is huge ranging from simple Relay driving circuits to complex internet based weather monitoring circuits.

One of the in demand concepts is communication between Arduino board and Android based smartphone. Even though Arduino can be configured to perform many complicated operations, it would be more beneficial if those operations are controlled using an Android phone.

In order to allow communication between Arduino and Android based smartphone, we need to use Bluetooth communication. Almost all Android based devices have built in Bluetooth communication module. Hence, we need to use an external Bluetooth Module for Arduino board.

Components

  • Arduino UNO
  • Resistors
  • LED
  • HC – 05 Bluetooth Module
  • Android based smartphone

Arduino_Android_Bluetooth

Connections:

Step 1): Connect Ground and 5V from Arduino to breadboard.
Step 2): Connect the provided cable to the HC-05 Bluetooth module on one side and to the breadboard to the other side; connections are as follows:
VCC <–> 5V
GND <–> GND
TXD <–> Pin 0 (Rx)
RXD <–> Pin 1 (Tx)

The sketch will also make use of Arduino built-in relay on Digital Pin 13.

The connections of the Bluetooth module can be a little confusing since TXD goes to Rx and RXD goes to Tx: here’s an explanation. Transmit and Receive refer to each device, therefore a transmission coming out of TXD pin of the Bluetooth module must be received by Arduino on the Rx Pin 0; similarly a transmission going out of Arduino Tx Pin 1 must reach the HC – 05 Bluetooth module on its RXD pin.