EasyManua.ls Logo

Arduino HM-11 - User Manual

Arduino HM-11
4 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
Loading...
BluetoothV4.0HM-11BLEModule
Contents
1Introduction
2Features
3Specification
4ElectricalCharacteristics
5Pindefinition
6ATcommands&Configuration
7ExampleCode
Introduction
ThisisaSMDBLEmoduleusedinourBLEBeeandXadowBLE.ItisbasedonTIcc2541chip,enablesrobustnetwork
nodestobebuiltwithlowtotalbill-of-materialcostsandhighlysuitedforultralowpowerconsumptionsystems.The
moduleissmallandeasytouse,withthepreprogrammedfirmwareofmanufacturer,youcouldquicklybuildBLE
communicationsviaitsATcommand.SupportingBLEcommunicationswithiphone,ipadandAndroid4.3.
Features
Bluetoothprotocol:BluetoothSpecificationV4.0BLE
Workingfrequency:2.4GHzISMband
Interfaceway:aserialport
Openenvironmentwithin30meterscanrealizecommunicationbetweenmodules
Tosendandreceivenobytelimitbetweenmodules
Modulationmethod:GFSK(GaussianFrequencyShiftKeying)
Transmissionpower:-DBM,23-6DBM,0DBM,6DBM,canbemodifiedbytheATcommand
useTICC2541chip,configurationspaceof256KB,supporttheATcommand,theusercanaccordingtoneedto
changetherole(master,slavemode)andtheserialportbaudrate,nameofequipment,matchingparameters
suchaspasswords,useagile.
powersupply:+3.3VDC50mA
workingtemperature:-5~+65Centigrade
Specification
Specification Value
Microprocessor CC2541
Resources
SupporttheATcommand,theusercanaccordingtoneedtochangetherole
(master,slavemode)andtheserialportbaudrate,nameofequipment,Matching
parameterssuchaspassword,theuseofflexible.
OutlineDimension 13.5mmx18.5mmx2.3mm
Powersupply 3.3V
CommunicationProtocol Uart(3.3VLVTTL)
IOcounts 2
KeyinputIO 1
LEDIndicatorsIO 1
Connectivity SocketcompatiblewithXBee
TOP
User Manual
Question and Answer IconNeed help?

Do you have a question about the Arduino HM-11 and is the answer not in the manual?

Summary

Introduction

Features

Specification

Electrical Characteristics

Pin definition

AT commands & Configuration

Query the native MAC address

Query the native MAC address using AT+ADDR? command.

Query the baud rate

Query the current baud rate with AT+BAUD? and understand parameter mapping.

Set the baud rate

Configure the module's baud rate using AT+BAUD[para1] command.

Connect to a specified Bluetooth address

Connect to a specified Bluetooth address using AT+CON[para1].

Remove equipment matching information

Clear paired device information using the AT+CLEAR command.

Query module working mode

Check the current module operating mode with AT+MODE?.

Set module working mode

Set the module's working mode via AT+MODE[para].

Query device name

Retrieve the device name using the AT+NAME? command.

Set the device name

Change the device name with the AT+NAME[para1] command.

Query matching password

Query the pairing password using AT+PASS?.

Pairing set password

Set the pairing password with the AT+PASS[para1] command.

Restore factory Settings

Reset module settings to factory defaults using AT+RENEW.

Module reset

Perform a module reset using the AT+RESET command.

Example Code

Master Mode Example

Arduino example code for operating the HM-11 module as a master device.

Slave Mode Example

Arduino example code for operating the HM-11 module as a slave device.

Overview

The HM-11 BLE Module is a compact and user-friendly SMD (Surface-Mount Device) Bluetooth Low Energy (BLE) module, designed to facilitate robust and energy-efficient wireless communication. Built around the TI CC2541 chip, this module is a core component in various BLE-enabled devices, including the BLE Bee and Xadow BLE. Its design prioritizes ease of integration and low power consumption, making it an ideal choice for applications where battery life and a small footprint are critical.

Function Description

The primary function of the HM-11 BLE Module is to enable Bluetooth V4.0 BLE communication. It operates within the 2.4 GHz ISM band, a globally recognized frequency range for industrial, scientific, and medical applications. The module communicates primarily through a serial port (UART), which simplifies its integration with microcontrollers and other digital systems. This serial interface supports 3.3V LVTTL (Low-Voltage Transistor-Transistor Logic) for compatibility with a wide range of embedded platforms.

A key feature of the HM-11 is its ability to establish communication between modules in an open environment up to 30 meters, providing a reasonable range for many short-distance wireless applications. It supports bidirectional data transfer without any byte limits, allowing for flexible and extensive data exchange. The module employs GFSK (Gaussian Frequency Shift Keying) for modulation, a technique known for its spectral efficiency and robustness against noise, which contributes to reliable data transmission.

The HM-11 module offers configurable transmission power settings, ranging from -23 DBM to 6 DBM, with options for 0 DBM and 6 DBM. This flexibility allows users to optimize power consumption versus range requirements for specific applications. The module's firmware, preprogrammed by the manufacturer, is designed to be highly configurable via AT commands. This command-line interface enables users to customize various operational parameters, including the module's role (master or slave mode), serial port baud rate, device name, and matching parameters such as passwords. This adaptability makes the HM-11 suitable for a diverse set of BLE communication scenarios.

The module is compatible with a broad range of devices, supporting BLE communications with popular platforms like iPhone, iPad, and Android 4.3 and later versions. This broad compatibility ensures that applications built with the HM-11 can interact seamlessly with a large ecosystem of smart devices.

Usage Features

The HM-11 BLE Module is designed for straightforward integration and operation, particularly through its AT command interface. This allows for dynamic configuration and control, making it adaptable to various application requirements.

Configuration via AT Commands:

The module's behavior can be extensively customized using a set of AT commands. These commands are sent over the serial interface and allow users to query and set parameters such as:

  • MAC Address: Users can query the module's unique 12-character MAC address using AT+ADDR?.
  • Baud Rate: The serial port baud rate can be queried with AT+BAUD? and set with AT+BAUD[para1]. The module supports various baud rates, from 1200 to 115200, with a default of 9600. It's important to note that setting the baud rate to 1200 may limit AT command support, and changes require a power cycle to take effect.
  • Connection to Specific Bluetooth Address: The module can be instructed to connect to a specific Bluetooth address using AT+CON[para1].
  • Clearing Matching Information: To remove previously stored device matching information, the AT+CLEAR command can be used.
  • Working Mode: The module supports different working modes, which can be queried with AT+MODE? and set with AT+MODE[]. These modes include passthrough, PIO acquisition + remote control, and passthrough + remote control. The default mode is passthrough.
  • Device Name: The device name can be queried with AT+NAME? and set with AT+NAME[para1]. Changing the name also requires a power cycle to apply.
  • Matching Password: A password for pairing can be queried with AT+PASS? and set with AT+PASS[para1]. The password is a 6-digit number, defaulting to 000000.
  • Master-Slave Mode: The module's role as a master or slave can be set using AT+ROLE[para1]. This is crucial for defining how the module initiates or accepts connections.

Pin Definition and Connectivity:

The HM-11 module features 16 pins, each with a specific function, facilitating its integration into circuits:

  • UART Pins: UART_RTS, UART_TX, UART_CTS, and UART_RX are dedicated to serial communication. UART_TX transmits data, and UART_RX receives data. UART_RTS (Request To Send) and UART_CTS (Clear To Send) are flow control signals, though their usage might depend on the specific application and whether hardware flow control is implemented.
  • Power Supply: VCC provides the 3.3V power supply, and GND is the ground connection.
  • Reset: RESETB is an active-low reset pin, requiring a low signal for at least 5ms to reset the module.
  • General Purpose I/O (GPIO) Pins:
    • PIO3 is an IO port that can be used to connect to sensors like DHT11 or DS18B20, indicating its versatility for sensor integration.
    • PIO2 is a digital input/output pin, offering general-purpose I/O functionality.
    • PIO1 serves as an LED indicator, providing visual feedback on the module's status.
    • PIO0 is designated as a button pin, allowing for external input control.
  • NC (Not Connected) and NV (Not Used) Pins: Several pins are marked as NC or NV, which should be left unconnected.

The module's outline dimensions are 13.5mm x 18.5mm x 2.3mm, making it very compact. It is also socket compatible with XBee, which can simplify prototyping and integration into existing XBee-compatible systems.

Example Code for Master/Slave Operation:

The manual provides example Arduino code for configuring the HM-11 as either a master or a slave. This code demonstrates how to initialize serial communication, set the module's role using AT commands (AT+ROLE1 for master, AT+ROLE0 for slave), and perform basic data transmission and reception. The examples utilize the SoftwareSerial library, which allows for flexible serial communication on arbitrary digital pins, enhancing compatibility with various Arduino boards. The code includes delays to ensure AT commands are processed correctly and to manage the timing of data exchange.

Maintenance Features

The HM-11 BLE Module is designed for minimal maintenance, primarily focusing on software configuration and occasional resets.

Restoring Factory Settings:

The AT+RENEW command allows users to restore the module to its default factory settings. This is a crucial maintenance feature for troubleshooting or reconfiguring the module from a known state. After executing this command, the module will reset, and the changes will take effect after a 500ms delay. Users are advised to use this command carefully, as it will erase all custom configurations.

Module Reset:

A software reset can be initiated using the AT+RESET command. Similar to AT+RENEW, this command causes the module to restart after a 500ms delay. This can be useful for applying new settings or recovering from an unresponsive state without physically power cycling the module.

Power Supply and Operating Conditions:

The module requires a stable +3.3 VDC power supply, drawing approximately 50 mA. It is designed to operate within a wide temperature range of -5°C to +65°C, making it suitable for various indoor and outdoor applications, provided the environmental conditions are within this range. Adhering to the specified power supply and operating temperature limits is essential for the module's long-term reliability and performance.

In summary, the HM-11 BLE Module offers a robust, flexible, and easy-to-use solution for Bluetooth Low Energy communication. Its comprehensive AT command set, clear pin definitions, and support for various operating modes make it a versatile component for developers and hobbyists alike, enabling the creation of energy-efficient and connected devices.

Arduino HM-11 Specifications

General IconGeneral
Dimensions27mm x 13mm x 2.2mm
Operating Frequency2.4GHz ISM band
ModulationGFSK
Receiver Sensitivity-93dBm
Default Baud Rate9600 bps
Bluetooth VersionBluetooth 4.0 BLE
Operating Voltage3.3V
TX Power-23dBm to +4dBm (configurable)

Related product manuals