Zbotic Logo Zbotic Logo
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

  • Shop
  • About Us
  • Contact Us
  • Reseller
  • Blogs
020 69134444
1800 209 0998
[email protected]
Help Desk
Facebook Twitter Instagram Linkedin YouTube
Zbotic Logo Zbotic Logo
0 0

View Wishlist Add all to cart

0 0
0 Shopping Cart
Shopping cart (0)
Subtotal: ₹0.00

View cartCheckout

All departments
  • 3D Print Service
  • 3D Printer
  • Batteries & Chargers
  • Development Boards
  • Drone Parts
  • EBike parts
  • Sensor Modules
  • Electronic Components
  • Electronic Modules
  • IoT and Wireless
  • Mechanical Parts and Workbench Tools
  • Motors & Drivers & Pumps & Actuators
  • DIY and Robot Kits
  • Show more
  • Home
  • Shop
  • Sale
  • 3D Print Service
  • PCB Service
  • B2B
  • Blogs
  • Contact Us
Return to previous page
Home Communication & Wireless Modules

Bluetooth Module HC-05: Serial Communication with Arduino

Bluetooth Module HC-05: Serial Communication with Arduino

April 1, 2026 /Posted by / 0

The Bluetooth HC-05 Arduino combination is one of the easiest ways to add wireless control to your projects. With this tiny module costing under ₹200, you can control an Arduino-powered robot from your Android smartphone, send sensor data wirelessly to a laptop, or build a Bluetooth-based home automation system. This guide covers HC-05 interfacing, AT command configuration, master-slave pairing, and building a complete mobile-controlled project.

Table of Contents

  • HC-05 Module Overview
  • HC-05 vs HC-06: Which to Buy
  • Wiring HC-05 to Arduino
  • AT Command Mode Configuration
  • Sending Data: Arduino to Phone
  • Receiving Commands: Phone to Arduino
  • Project: Bluetooth Robot Control
  • Frequently Asked Questions

HC-05 Module Overview

The HC-05 is a Bluetooth 2.0 Serial Port Profile (SPP) module based on the BC417 chip. It creates a wireless serial link, effectively replacing a physical wire between your Arduino and another Bluetooth device. Key specifications:

  • Bluetooth Version: 2.0 + EDR (Enhanced Data Rate)
  • Range: Up to 10 metres (Class 2)
  • Baud Rate: Default 9600 bps, configurable up to 1382400 bps
  • Operating Voltage: 3.3V (module), 3.6-6V (breakout board with regulator)
  • Mode: Master or Slave (configurable via AT commands)
  • Default PIN: 1234 or 0000
  • Profiles: Serial Port Profile (SPP)
🛒 Recommended: HC-05 Bluetooth Module (Master/Slave) with Button — The version with the KEY button makes it easy to enter AT command mode for configuration.

HC-05 vs HC-06: Which to Buy

Feature HC-05 HC-06
Modes Master + Slave Slave only
AT Commands Full set (name, PIN, role, baud) Limited (name, PIN, baud)
Auto-connect Yes (master mode) No
LED Indicator Fast blink (searching), slow blink (connected) Fast blink (searching), solid ON (connected)
Price (approx) ₹150-250 ₹100-180

Our recommendation: Always buy the HC-05. It can do everything the HC-06 does and more. The master mode capability lets you connect two Arduinos wirelessly without a phone in the middle — useful for remote sensor networks.

Wiring HC-05 to Arduino

HC-05 Pin Arduino Uno Notes
VCC 5V Breakout board has regulator
GND GND Common ground
TXD D10 (SoftwareSerial RX) HC-05 TX to Arduino RX
RXD D11 (SoftwareSerial TX) Use voltage divider for 3.3V

Voltage divider for RXD: The HC-05 RX pin operates at 3.3V. Connect a 1K resistor between Arduino TX (pin 11) and HC-05 RX, and a 2K resistor from HC-05 RX to GND. This creates a safe 3.3V signal level.

AT Command Mode Configuration

To configure the HC-05, you need to enter AT command mode. There are two ways:

Method 1: Press-and-Hold KEY Button

  1. Disconnect HC-05 power
  2. Press and hold the KEY/EN button on the module
  3. Reconnect power while holding the button
  4. The LED will blink slowly (every 2 seconds) indicating AT mode
  5. Release the button

In AT mode, the default baud rate is 38400 (not 9600!).

#include <SoftwareSerial.h>
SoftwareSerial btSerial(10, 11); // RX, TX

void setup() {
  Serial.begin(9600);
  btSerial.begin(38400); // AT mode uses 38400
  Serial.println("HC-05 AT Command Mode");
  Serial.println("Type AT commands:");
}

void loop() {
  if (btSerial.available()) Serial.write(btSerial.read());
  if (Serial.available()) btSerial.write(Serial.read());
}

Useful AT Commands

AT              → Test (returns OK)
AT+NAME=MyBot   → Set Bluetooth name to "MyBot"
AT+PSWD="4321"  → Change PIN to 4321
AT+UART=115200,0,0 → Set baud rate to 115200
AT+ROLE=0       → Set as Slave (default)
AT+ROLE=1       → Set as Master
AT+ADDR?        → Show module's Bluetooth address
AT+RESET        → Reset module

Sending Data: Arduino to Phone

Once the HC-05 is paired with your phone, data sent over Serial goes straight to the Bluetooth connection:

#include <SoftwareSerial.h>
SoftwareSerial btSerial(10, 11);

float temperature = 0;
int lightLevel = 0;

void setup() {
  Serial.begin(9600);
  btSerial.begin(9600);
  Serial.println("Bluetooth Sensor Monitor");
}

void loop() {
  // Read sensors
  temperature = analogRead(A0) * 0.48828; // LM35 sensor
  lightLevel = analogRead(A1);
  
  // Send to phone via Bluetooth
  btSerial.print("TEMP:");
  btSerial.print(temperature, 1);
  btSerial.print(",LIGHT:");
  btSerial.println(lightLevel);
  
  // Also print to Serial Monitor
  Serial.print("Temp: ");
  Serial.print(temperature);
  Serial.print("C, Light: ");
  Serial.println(lightLevel);
  
  delay(1000);
}

On Android, use the “Serial Bluetooth Terminal” app (free on Play Store) to view the incoming data. For a graphical dashboard, try “Bluetooth Electronics” or “RemoteXY”.

Receiving Commands: Phone to Arduino

#include <SoftwareSerial.h>
SoftwareSerial btSerial(10, 11);

int ledPin = 13;
int relayPin = 7;

void setup() {
  Serial.begin(9600);
  btSerial.begin(9600);
  pinMode(ledPin, OUTPUT);
  pinMode(relayPin, OUTPUT);
  Serial.println("Bluetooth Home Control Ready");
}

void loop() {
  if (btSerial.available()) {
    char command = btSerial.read();
    
    switch (command) {
      case '1': // LED ON
        digitalWrite(ledPin, HIGH);
        btSerial.println("LED ON");
        break;
      case '0': // LED OFF
        digitalWrite(ledPin, LOW);
        btSerial.println("LED OFF");
        break;
      case 'A': // Relay ON (e.g., fan or light)
        digitalWrite(relayPin, HIGH);
        btSerial.println("Relay ON");
        break;
      case 'B': // Relay OFF
        digitalWrite(relayPin, LOW);
        btSerial.println("Relay OFF");
        break;
      default:
        btSerial.print("Unknown: ");
        btSerial.println(command);
    }
  }
}
🛒 Recommended: HC-05 4-Pin Bluetooth Module (Master+Slave) — Compact 4-pin version without button, ideal for final project integration where AT configuration is already done.

Project: Bluetooth Robot Control

Here is a complete example for controlling a 2-wheel robot using an Android app:

#include <SoftwareSerial.h>
SoftwareSerial btSerial(10, 11);

// Motor A (Left)
int enA = 5;
int in1 = 8;
int in2 = 9;

// Motor B (Right)
int enB = 6;
int in3 = 12;
int in4 = 4;

int speed = 200; // 0-255

void setup() {
  btSerial.begin(9600);
  
  pinMode(enA, OUTPUT);
  pinMode(in1, OUTPUT);
  pinMode(in2, OUTPUT);
  pinMode(enB, OUTPUT);
  pinMode(in3, OUTPUT);
  pinMode(in4, OUTPUT);
  
  analogWrite(enA, speed);
  analogWrite(enB, speed);
}

void loop() {
  if (btSerial.available()) {
    char cmd = btSerial.read();
    
    switch (cmd) {
      case 'F': forward(); break;
      case 'B': backward(); break;
      case 'L': turnLeft(); break;
      case 'R': turnRight(); break;
      case 'S': stopMotors(); break;
      case '1': speed = 100; updateSpeed(); break;
      case '2': speed = 170; updateSpeed(); break;
      case '3': speed = 255; updateSpeed(); break;
    }
  }
}

void forward() {
  digitalWrite(in1, HIGH); digitalWrite(in2, LOW);
  digitalWrite(in3, HIGH); digitalWrite(in4, LOW);
}

void backward() {
  digitalWrite(in1, LOW); digitalWrite(in2, HIGH);
  digitalWrite(in3, LOW); digitalWrite(in4, HIGH);
}

void turnLeft() {
  digitalWrite(in1, LOW); digitalWrite(in2, HIGH);
  digitalWrite(in3, HIGH); digitalWrite(in4, LOW);
}

void turnRight() {
  digitalWrite(in1, HIGH); digitalWrite(in2, LOW);
  digitalWrite(in3, LOW); digitalWrite(in4, HIGH);
}

void stopMotors() {
  digitalWrite(in1, LOW); digitalWrite(in2, LOW);
  digitalWrite(in3, LOW); digitalWrite(in4, LOW);
}

void updateSpeed() {
  analogWrite(enA, speed);
  analogWrite(enB, speed);
}

Pair this with the “Arduino Bluetooth Controller” app on Android. Configure buttons to send F (forward), B (backward), L (left), R (right), and S (stop).

🛒 Recommended: HM-10 BLE Bluetooth 4.0 Module — For iOS compatibility or lower power consumption, the HM-10 BLE module works with both Android and iPhone apps.

Frequently Asked Questions

Can I use HC-05 with iPhone?

No. The HC-05 uses Bluetooth Classic (SPP profile) which iOS does not support for third-party apps. For iPhone compatibility, use a BLE (Bluetooth Low Energy) module like the HM-10 or the ESP32’s built-in BLE.

What is the range of HC-05?

The HC-05 is a Class 2 Bluetooth device with a typical range of 10 metres. In open spaces without obstacles, you may get up to 20 metres. Walls and interference reduce this to 5-8 metres.

Can two HC-05 modules communicate without a phone?

Yes. Configure one HC-05 as Master (AT+ROLE=1) and bind it to the address of the second HC-05 (AT+BIND=address). They will auto-connect on power-up, creating a wireless serial bridge between two Arduinos.

Why does my HC-05 show as “paired” but not “connected”?

Pairing and connecting are different steps. After pairing (entering PIN 1234), you need to explicitly connect from your app. If the app cannot connect, check that the HC-05 is not in AT command mode (LED should blink fast, not slow).

How to change the default PIN from 1234?

Enter AT command mode and send: AT+PSWD="your_new_pin". The PIN must be exactly 4 digits. After changing, use AT+RESET to apply.

Conclusion

The HC-05 Bluetooth module is the simplest way to add wireless control to your Arduino projects. With a ₹200 module and a free Android app, you can build everything from Bluetooth-controlled robots to home automation systems. The master-slave capability of the HC-05 also enables Arduino-to-Arduino wireless communication without any phone involved.

Explore our full range of Bluetooth and wireless modules at Zbotic.in. We stock HC-05, HC-06, HM-10 BLE, and ESP32 boards with built-in Bluetooth for every project need.

Tags: Arduino, Bluetooth, HC-05, Serial, wireless
Share Post
  • Facebook
  • Linkedin
  • Whatsapp
ATtiny85 Projects: Tiny Microc...
blog attiny85 projects tiny microcontroller for space constrained builds 612477
blog voice controlled home automation google assistant esp32 612480
Voice-Controlled Home Automati...

Related posts

Svg%3E
Read more

ESP-NOW: Direct ESP32-to-ESP32 Communication Without WiFi

April 1, 2026 0
ESP-NOW ESP32 communication is a game-changing protocol developed by Espressif that enables direct peer-to-peer wireless communication between ESP32 boards without... Continue reading
Svg%3E
Read more

SDR Getting Started: HackRF and RTL-SDR Projects India

April 1, 2026 0
Software Defined Radio (SDR) lets you explore the electromagnetic spectrum using your computer, replacing expensive hardware radios with affordable USB... Continue reading
Svg%3E
Read more

Zigbee vs WiFi vs BLE: Choosing the Right Wireless Protocol for IoT

April 1, 2026 0
Choosing between Zigbee vs WiFi vs BLE for your IoT project is one of the most important design decisions you... Continue reading
Svg%3E
Read more

RFID Module Guide: RC522, PN532, and Long-Range UHF Options

April 1, 2026 0
The RFID module RC522 Arduino combination is the starting point for thousands of access control, attendance, and inventory tracking projects... Continue reading
Svg%3E
Read more

RS485 Modbus Communication: Industrial Sensors with Arduino

April 1, 2026 0
RS485 Modbus Arduino interfacing opens the door to industrial-grade sensor communication. Unlike hobbyist I2C or SPI sensors, RS485 Modbus sensors... Continue reading

Add comment Cancel reply

Your email address will not be published. Required fields are marked

Facebook Twitter Instagram Pinterest Linkedin Youtube

Get the latest deals and more.

Download on Google Play Download on the App Store

Call us: 020 69134444 / 1800 209 0998

Monday - Saturday 09:30 AM - 06:00 PM
For Technical Supports Email: [email protected]
For Sales / Enquiries Email: [email protected]

  • My Account

    • Cart

    • Wishlist

    • Checkout

    • My Orders

    • Track Order

    • My Account

  • Information

    • FAQs

    • Blogs

    • Career

    • About Us

    • Contact Us

    • Payment Options

  • Policies

    • Privacy Policy

    • Terms & Conditions

    • GST Input Tax Credit

    • Shipping Return Policy

    • E-Waste Collection Points

    • Our Sitemap

© Zbotic.in is registered trademark of Moxie Supply Pvt Ltd – All Rights Reserved
Login
Use Phone Number
Use Email Address
Not a member yet? Register Now
Reset Password
Use Phone Number
Use Email Address
Register
Already a member? Login Now