Aug 28, 2026 — Digital Edition
Bradley Ideas
Independent Journalism & Insight
Feature

Arduino HC-05 Bluetooth Module Tutorial

Embarking on an electronics project and in need of wireless connectivity? Look no further than the HC-05 module, a classic Bluetooth SPP (Serial Port Protocol) adapter that pairs seamlessly with an Arduino board. This article delves into the world of the HC-05 module, its applications, and how to interface it with an Arduino, ensuring you're equipped with the knowledge to streamline your projects.

an electronic device with the components labeled
an electronic device with the components labeled

The HC-05, manufactured by HC-WiFi, is a modern module that facilitates communication between devices. It's compact, affordable, and exceptionally versatile, making it a gold standard in numerous Arduino projects. With a range of up to 10 meters and the capability to connect up to seven devices, it's an asset in various applications, from robotics to home automation.

an electronic device is connected to a breadboard with wires and connectors on it
an electronic device is connected to a breadboard with wires and connectors on it

Understanding the HC-05 Module

The HC-05 operates as a UART-to-Bluetooth adapter. It communicates with a paired device, like an Arduino, using UART (Universal Asynchronous Receiver/Transmitter) and converts the data into Bluetooth for wireless transmission. This makes it an indispensable tool for adding wireless functionality to your projects.

the wiring diagram for an automatic motor controller
the wiring diagram for an automatic motor controller

At its heart, the HC-05 is highly configurable. It can act as a master (initiating connections) or a slave (waiting for connections). You can also set its Bluetooth name, password, and communication baud rate, tailoring it to your specific project's needs.

Key Features of the HC-05 Module

Diferença entre os módulos bluetooth HC-05 e HC-06 - Arduino e Cia
Diferença entre os módulos bluetooth HC-05 e HC-06 - Arduino e Cia

The HC-05 module boasts several features that make it a popular choice among Arduino users:

  • Easy to setup and use.
  • Supports baud rates from 9600 to 115200.
  • Operates in both AT and commander modes.
  • Can be set to either master or slave mode.

HC-05 baud rates and communication

PCBWays
PCBWays

Baud rate is a critical consideration when using the HC-05 with an Arduino. Ensuring both devices use the same baud rate is paramount for successful communication. The HC-05 supports a range of baud rates, with common ones being 9600 and 115200.

To set the baud rate, use the AT command 'AT+UART_DEF=9600,0,0'. The first parameter sets the baud rate, the second enables hardware flow control, and the third enables software flow control.

Interfacing HC-05 with Arduino

Bluetooth HC-06 y HC-05 Android Arduino
Bluetooth HC-06 y HC-05 Android Arduino

Connecting the HC-05 to an Arduino involves linking the UART pins (TX and RX) of both devices. Here's a simple guide to get you started:

Before you begin, ensure your HC-05 is in slave mode and paired with your intended device. Connect the Arduino and HC-05 as follows:

a hand holding a small electronic device in it's right hand, with instructions on how to use it
a hand holding a small electronic device in it's right hand, with instructions on how to use it
an electronic device is connected to two wires
an electronic device is connected to two wires
Comment utiliser un module bluetooth HC-05 avec un Arduino ?
Comment utiliser un module bluetooth HC-05 avec un Arduino ?
Arduino и Bluetooth на основе HC-05 для чайников
Arduino и Bluetooth на основе HC-05 для чайников
Interfacing Arduino with HC-05 - The Engineering Projects
Interfacing Arduino with HC-05 - The Engineering Projects
HC-05 Bluetooth Module with Arduino-MIT App Inventor
HC-05 Bluetooth Module with Arduino-MIT App Inventor
Hc-05 bluetooth module interfacing with arduino uno
Hc-05 bluetooth module interfacing with arduino uno
an electronic device connected to a breadboard
an electronic device connected to a breadboard
Connecting HC-05 Bluetooth Module to Arduino
Connecting HC-05 Bluetooth Module to Arduino
HC-05 Arduino
TXD RX
RXD TX
GND GND

Arduino example code

Here's a basic Arduino sketch that sends data to the HC-05:

```cpp const int txPin = 2; // Connect Arduino pin 2 to HC-05 TXD void setup() { Serial.begin(9600); // Start serial communication at 9600 baud rate pinMode(txPin, OUTPUT); } void loop() { Serial.print("Hello from Arduino!"); delay(1000); } ```

Final thoughts and further exploration

The HC-05 module is a versatile, user-friendly tool that opens up ample possibilities in wireless communication for Arduino projects. With its rich feature set and easy interfacing, it's a top pick for hobbyists and professionals alike. As you dive deeper into the world of Bluetooth communication, consider exploring the HC-06 module, its sibling, or delving into more advanced topics like BLE (Bluetooth Low Energy) for optimized power consumption.