How to connect HC-05 Bluetooth Module to Arduino


In this tutorial, you will learn how to integrate the HC-05 Bluetooth module with Arduino and control some DC motors from a Bluetooth app on your phone.


Category:  Arduino

Difficulty:  Beginner

Submitted by: Gideon

Date: 28th January, 2018


HC-05 bluetooth module is a wireless module at connect with bluetooth devices like andriod and with an interface, allows controls. This module is used in robotics, home automation and other interesting projects. There are other types of bluetooth module in the market  but HC-05 bluetooth module is easy to use and widely used. In this tutorial, we are going to control two dc motors connected to a motor driver wirelessly from an android up.


A bluetooth device has the ability to connect to a device at a time. There is always a master and slave. The slave connects to the master and receives data. The vice-versa happens with the HC-05 bluetooth module. The HC-05 bluetooth module has six pins. The pins are the ends of the module are not considered in this tutorial. The four pins in the middle are the GND(ground), VCC(+5v), TXD(transmit) and RXD(receive). The module uses AT commands for configuration. The transmit pin is used to send data to another device in the connection. The receive pin is the point where the module gets data from other devices.

These are the components that are used in this tutorial. This tutorial is linked with the motor driver tutorial


The module uses serial for communication. The arduino has a serial pins at pins 0 and 1. Instead of using these pins which usually prevents uploading during code editting, you use software serial. This library allows you to have a new set of serial pins using the normal GPIO pins. In this tutorial, we are using pin 7 as RXD and pin 8 as TXD. The motors  are connected to four digital and PWM pins( pin 3,5,6 and 9). In this setup an andriod app call bluetooth controller is used to send characters to the HC-05 bluetooth module, the arduino receives it and executes the appropriate action.

This is a fritzing picture of the set up


This is the setup of the tutorial


This is the arduino code that will run the setup


This is how the bluetooth controller at google play store looks



Thank you for going through this tutorial and we are highly excited because we have been able to help you breakthrough in this area. Visit our website to buy all the components that you need and we wish you a steady study.


Leave a Comment

Notify of

This is the tutorials website for Invent Electronics. We are a top online retailer of electronics components, microcontrollers and sensors in Ghana. Besides providing customers with good quality electronic components we want to help them build great projects with the components they buy for us so we’ve put together a ton electronics resources, projects and tutorials on this site just for you!

Looking for electronic components to buy in Ghana?

Get all your sensors, electronic components, Arduinos, Raspberry Pi and other parts for your project at great prices from our online store.

Join Our Community

We’re more than just an electronics store. We are also a community of makers, engineers, enthusiasts and more. Join our community today, meet and learn from other people like you.