Arduino Bluetooth Basic Tutorial

About the project

Ever thought of controlling any electronic devices with your smart phone? Today I will show how to do it. using arduino and bluetooth module

Project info

Difficulty: Easy

Platforms: AndroidArduino

Estimated time: 1 hour

License: Creative Commons Attribution CC BY version 4.0 or later (CC BY 4+)

Items used in this project

Hardware components

Ultrasonic Sensor Hc-sr04 Ultrasonic Sensor Hc-sr04 x 1
1Sheeld+ for iOS and Android 1Sheeld+ for iOS and Android x 1
Resistor Network - 10K Ohm (6-pin bussed) Resistor Network - 10K Ohm (6-pin bussed) x 1
Tiny Breadboard Tiny Breadboard x 1
Genuino Uno Rev3 Genuino Uno Rev3 x 1

Software apps and online services

Arduino IDE Arduino IDE
LED Controller LED Controller

Story

Update  : Updated version of this article is available hereWatch how does it Works ?

Watch the video tutorial

Let’s Start Building

The circuit is so simple and small , there is only few connection to be made

Arduino Pins           Bluetooth Pins

RX (Pin 0)     ———->      TX

TX (Pin 1)      ———->      RX

5V                ———->      VCC

GND             ———->      GND

Connect a LED negative to GND of arduino and positive to pin 13 with a resistance valued between 220Ω – 1KΩ. And your done with the circuit

Note : Don’t  Connect RX to RX and TX to TX of Bluetooth to arduinoyou will receive no data , Here TX means Transmit and RX means Receive

How Does it Works?

HC 05/06 works on serial communication.here the android app is designed sending serial data to the Bluetooth module when certain button is pressed. The Bluetooth module at other end receive the data and send to ardunio through the TX pin of Bluetooth module(RX pin of arduino). The Code fed to arduino check the received data and compares.If received data is 1 the LED turns on turns OFF when received data is 0

Open the serial monitor and watch the received data

;

;

1 / 2

Android Application

In this tutorial I will not be covering tutorial on android app development.You can download the android application from here and the source code of the entire project

How to use the App ?

Watch in video how to pair to Bluetooth module

  • Download the Application from here or here
  • Pair your device with HC 05/06 Bluetooth module1) Turn ON HC 05/06 Bluetooth module2) Scan for available device3) Pair to HC 05/06 by entering default password 1234 OR 0000
  • Install  LED application on your android device
  • Open the Application

splash screen

  • Press paired devices
  • Select your Bluetooth module from the List (HC 05)

Paring screen

caption (optional)

  • After connecting successfully
  • Press ON button to turn ON LED and OFF button to turn OFF LED

  • Disconnect button to disconnect from Bluetooth module

This is just basic tutorial on interfacing Bluetooth  module with arduino This project can improved to higher level like Home automation using smartphone, Smartphone controlled robot and much more.

Schematics, diagrams and documents

Bluetooth arduino connection schematics

Code

Bluetooh Basic: LED ON OFF

This program lets you to control a LED on pin 13 of arduino using a bluetooth module

Credits

Photo of mayoogh1997

mayoogh1997

Mayoogh Girish is a electronics engineering student, and a DIY Maker by passion. He is interested in open source technology, robotics ,3D printing and much more. A big fan of open source hardware and software community

   

Leave your feedback...