Dear friends welcome back! In this Arduino Bluetooth tutorial, we’re going to see how to connect and use a Bluetooth module with Arduino and control our Arduino project by an Android cell phone! Let’s start!

Intro to the Arduino Bluetooth Tutorial

As you can see in the above video with a simple application that they have developed for Android I can turn this LED on or off wirelessly. As you can see when I touch this button here the LED goes ON or off. This is a very useful functionality and the great thing is that it is very easy to implement.

The parts needed for this project are those: An HC-06 Bluetooth module. A bidirectional level converter, an Arduino Uno an LED and a cell phone or tablet that runs Android. Let’s start. The HC-06 Bluetooth module is cheap. It costs around 5$.

——————–
WHERE TO BUY
——————–

1. Bluetooth Module: https://educ8s.tv/part/HC06

2. Level Converter: https://educ8s.tv/part/LevelConverter

3. Arduino Uno: https://educ8s.tv/part/ArduinoUno

4. LED: https://educ8s.tv/part/LEDs

5. Large Breadboard: https://educ8s.tv/part/LargeBreadboard

6. Wires: https://educ8s.tv/part/Wires

Full disclosure: All of the links above are affiliate links. I get a small percentage of each sale they generate. Thank you for your support!

[adsense]

The HC-06 module has four pins to connect. The pins are Vcc GND Tx and Rx. Rx and Tx pins require 3.3V in order to work correctly. Standard Arduino boards use 5V levels so we can’t connect it directly to Arduino. that’s why we’re going to use a bidirectional level converter. This level converter all it does is to convert the 5V signals from Arduino to 3.3V signals in order to use them with the Bluetooth module. It also converts the 3.3V signals to 5V signals.

This module is a two channel module, and it costs around 1$. One side of the module is the high voltage side, the 5V side, this one here that is going to be connected with Arduino and the other side is the low voltage side the 3.3V side which is going to be connected with the Bluetooth module. Let’s connect them. I have connected Vcc from the Bluetooth module to breadboard Vcc and High Voltage pin (HV) from the level converter to the breadboard Vcc as well. Now I have connected all the Grounds to the breadboard. The High Voltage ground and the Low Voltage side ground to the breadboard Ground.

Rx pin from the Bluetooth module goes to Low Voltage Rx pin on the level converter. Tx pin from the Bluetooth module goes to Tx pin on the level converter. Now let’s connect those modules to Arduino. 5V from Arduino goes to breadboard Vcc. Ground from Arduino goes to breadboard Ground. 3.3V from the Arduino goes to the Low Voltage pin (LV) on the level converter, TX pin from the level converter goes to the digital pin 10 on Arduino, and Rx pin from the high voltage side of the level converter goes to digital pin 11. And lastly the LED, the positive goes to digital pin 13.

If we connect the power you can see that the red LED on the Bluetooth module is flashing. It’s time to pair it with our Android cell phone. Ok we go to our cell phone’s settings the Bluetooth and we search for devices. As you can it has already found that the HC-06 module is here. Now we have to enter the code is 1234. We press OK. It is now pairing… OK, the devices are now paired now we have to open the Android application that I have developed. We have open the Application, we have to press the connect button. that’s the Bluetooth module here, we connect to it…

Now as you can see when it is connected the red LED stopped flashing. Now we can turn the LED on or off. That’s it.

The Software of the Arduino Bluetooth Tutorial

Now let’s go to the computer and see the software side of the project, for the Arduino and the Android application. Arduino and the Bluetooth module use the Serial data connection in order to communicate with each other. That makes things very easy. All we have to do is to receive data from the Serial connection and respond to that data. So if we receive a 0 on the serial port we turn the LED off. And if we receive character 1 we turn the LED on.

The Android application was developed using App Inventor, a great online tool for quick development of Android apps. This application simple connects to a Bluetooth device and sends the character 1 when we check the LED checkbox or 0 when we uncheck it. Arduino then receives that data and turn the LED on or off. You can find the code of the project in the description of the video. Along with the code, you can find the .apk file of the Android app in case you want to test it on your phone. That’s how easy it is to add Bluetooth capabilities to your Arduino projects.

I hope you enjoyed this Arduino Bluetooth tutorial. I’m going to work more about because it is a very useful functionality. As you may know, I work as an Android developer, so I am going to develop an Android app soon, not with App Inventor this time but with Android Studio, which will allow us to better communicate with Arduino and I will prepare a more advanced Arduino Bluetooth tutorial. Please post any ideas for that application to the comments section below. I hope that you find this video useful and if you have any comments post them below.

——————–
CODE
——————–

 

 

 

——————–
SUBSCRIBE ON YOUTUBE
——————–
Never miss a video: Subscribe to educ8s.tv