Do you have a question about the Arduino HM-11 and is the answer not in the manual?
Query the native MAC address using AT+ADDR? command.
Query the current baud rate with AT+BAUD? and understand parameter mapping.
Configure the module's baud rate using AT+BAUD[para1] command.
Connect to a specified Bluetooth address using AT+CON[para1].
Clear paired device information using the AT+CLEAR command.
Check the current module operating mode with AT+MODE?.
Set the module's working mode via AT+MODE[para].
Retrieve the device name using the AT+NAME? command.
Change the device name with the AT+NAME[para1] command.
Query the pairing password using AT+PASS?.
Set the pairing password with the AT+PASS[para1] command.
Reset module settings to factory defaults using AT+RENEW.
Perform a module reset using the AT+RESET command.
Arduino example code for operating the HM-11 module as a master device.
Arduino example code for operating the HM-11 module as a slave device.
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.
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.
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.
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:
AT+ADDR?.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.AT+CON[para1].AT+CLEAR command can be used.AT+MODE? and set with AT+MODE[]. These modes include passthrough, PIO acquisition + remote control, and passthrough + remote control. The default mode is passthrough.AT+NAME? and set with AT+NAME[para1]. Changing the name also requires a power cycle to apply.AT+PASS? and set with AT+PASS[para1]. The password is a 6-digit number, defaulting to 000000.AT+ROLE[para1]. This is crucial for defining how the module initiates or accepts connections.The HM-11 module features 16 pins, each with a specific function, facilitating its integration into circuits:
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.VCC provides the 3.3V power supply, and GND is the ground connection.RESETB is an active-low reset pin, requiring a low signal for at least 5ms to reset the module.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 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.
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.
The HM-11 BLE Module is designed for minimal maintenance, primarily focusing on software configuration and occasional resets.
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.
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.
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.
| Dimensions | 27mm x 13mm x 2.2mm |
|---|---|
| Operating Frequency | 2.4GHz ISM band |
| Modulation | GFSK |
| Receiver Sensitivity | -93dBm |
| Default Baud Rate | 9600 bps |
| Bluetooth Version | Bluetooth 4.0 BLE |
| Operating Voltage | 3.3V |
| TX Power | -23dBm to +4dBm (configurable) |
Loading...