Table of Contents

How to Change the HM-10 Bluetooth Module Baud Rate Using Arduino

Arduino HM10 Baudrate Change
Example Description
Learn how to change the communication baud rate of an HM-10 Bluetooth module using Arduino Uno and PictoBlox! In this project, Arduino sends an AT command to the HM-10 module to configure its baud rate. This project introduces AT commands, serial communication, Bluetooth module configuration, and wireless communication fundamentals.

Introduction

The HM-10 is a Bluetooth Low Energy (BLE) module widely used in IoT, wireless communication, and automation projects. Before using the module in different applications, it is often necessary to change its baud rate so that it matches the communication speed of the connected device.

In this project, Arduino Uno communicates with the HM-10 module through serial communication and sends an AT command to change its baud rate.

This project helps students understand:

  1. Bluetooth Low Energy (BLE)
  2. AT Commands
  3. Serial Communication
  4. HM-10 Module Configuration
  5. Arduino Communication Protocols

Setting Up the Stage / Sprite

Before creating the program, we need to add the Arduino extension and connect the HM-10 module. 

Adding the Arduino Extension 

  1. Open PictoBlox.
    open pictoblox
  2. Add Arduino Uno.
    Arduino Connect

  3. Add Dabble.

  4. Connect the Arduino board using a USB cable.
  5. Select the correct COM Port.
    Serial port Connection for Quarky Intellio
  6. Switch to Upload Mode.
    Switch to Upload Mode

Circuit Connections

Components Required

  1. Arduino Uno
  2. HM-10 Bluetooth Module
  3. Breadboard
  4. Jumper Wires
  5. USB Cable

HM-10 Connections 

  1. HM-10 VCC → Arduino 5V
  2. HM-10 GND → Arduino GND
  3. HM-10 TXD → Arduino Digital Pin 10
  4. HM-10 RXD → Arduino Digital Pin 11

Important Note

  1. Connect the HM-10 RXD pin through a voltage divider or logic level converter if required, since the HM-10 operates at 3.3V logic.
  2. Ensure all GND connections are common.

Arduino GND → HM-10 GND

Step-by-Step Block Coding Guide

Let’s create a program that changes the baud rate of the HM-10 Bluetooth module.

Start the Program

  1. Drag when Arduino Uno starts up block.
  2. Initialize all required variables.
  3. Configure Digital Pin 13 as LOW.
  4. Set Serial 0 baud rate to 115200.
  5. These settings prepare Arduino for communication with the HM10 module.

arduino with serial baud rate

Initialize Software Serial Communication 

  1. Add a Forever block.
  2. Inside this loop, call all custom My Blocks one after another.
  3. The sequence is:
    1. sendAT
    2. displayAddress
    3. changeName
    4. changeBaud
    5. Turn LED ON
    6. Wait 10 seconds
  4. This sequence continuously configures the HM10 module.

arudino code for HM10 baurate change

Send the AT Command 

  1. Create a My Block named sendAT. This block sends the command:
  2. To verify that the HM10 module is responding.
  3. The program repeatedly sends the command until a response is received.
  4. Add the block to send serial data through Software Serial.
  5. Type the AT command:
    1. AT+BAUD4
    2. This changes the HM-10 baud rate to 115200 bps (or use the appropriate AT command for your desired baud rate according to your HM-10 firmware).

set and define sendAT

Create the displayAddress My Block 

  1. Create another My Block called
  2. displayAddress
  3. It sends the command
  4. AT+LADDR
  5. to obtain the Bluetooth MAC Address.
  6. The response is read through Serial communication.

define dispplay address using arduino in HM10

Create the changeName My Block 

  1. Create a My Block called changeName
  2. Set the command AT+NAMEhello. This changes the Bluetooth module name to hello
  3. The program waits until it receives a successful response.

define changename with evivename using arduino in HM10Create the changeBaud My Block

  1. Create another My Block named
  2. changeBaud
  3. This block converts the baud rate into the HM10 baud index.
  4. For example:
    1. 1200 → 1
    2. 2400 → 2
    3. 4800 → 3
    4. 9600 → 4
    5. 19200 → 5
    6. 38400 → 6
    7. 57600 → 7
    8. 115200 → 8
    9. 230400 → 9
    10. After selecting the correct value, the command becomes
    11. AT+BAUD4
    12. (for 9600 baud)
  5. The command is transmitted through serial communication until a response is received.

define changebaud in arduino using HM10

Complete Program Flow:

Arduino Starts

        ↓

Initialize Variables

        ↓

Set Serial Baud Rate

        ↓

Send AT Command

        ↓

Receive OK Response

        ↓

Display Bluetooth Address

        ↓

Change Device Name

        ↓

Change Baud Rate

        ↓

Turn ON LED

        ↓

Wait 10 Seconds

        ↓

Repeat

Output

After uploading the program, the HM10 module performs the following operations automatically:

  1. Sends AT command to check communication.
  2. Reads and displays the Bluetooth MAC address.
  3. Changes the Bluetooth device name to hello.
  4. Changes the baud rate to 9600.
  5. Turns ON the LED connected to Digital Pin 13.
  6. Waits for 10 seconds before repeating the sequence.

Conclusion

This project demonstrates how Arduino Uno can configure an HM-10 Bluetooth module using AT commands. Students learn about serial communication, Bluetooth module configuration, and baud rate settings. Understanding AT commands and communication protocols is essential for developing reliable wireless communication and IoT applications using Arduino and PictoBlox.