Labs / Electronic modules

GraftSense - HC-08 Based Master-Slave Integrated BLE Bluetooth Module (Open Version)

Author: Li Zisheng · Source: FreakStudio open documentation, v1.3 · License: CC BY 4.0 · Driver code (communication/hc08_driver): MIT License

Contents
HC-08
HC-08 LED1 R8 3V C1 C2 C3 C4 C5 C6
HC-08 HC-08-based V1.1

I. Module Introduction

Master-slave integrated BLE Bluetooth module based on HC-08 adopts HC-08 Bluetooth 4.0 BLE serial port module to implement Bluetooth communication function. The module is equipped with a level conversion circuit, which is compatible with + 3.3V and + 5V level communication. It also comes with two side buttons for module reset and host memory clearing functions. The Bluetooth communication of this module is based on the BLE 4.0 protocol and supports master-slave integrated mode. The recommended operating voltage of VIN is + 5V, which is suitable for scenarios such as the Internet of Things and embedded interaction that require BLE Bluetooth communication.

II. Introduction to Main Chips

This module does not use an independent chip, and instead adopts HC-08 Bluetooth serial communication module design.

2.1 Chip Overview

HC-08 Bluetooth module is a low-power Bluetooth serial port module supporting the BLE 4.0 protocol. It features a compact package design and integrates a Bluetooth radio transceiver circuit and a protocol processing unit; its operating voltage ranges from 2.0V to 3.6V, the communication baud rate can be configured between 1200-115200bps with a default value of 9600bps, the receiving sensitivity reaches -93dBm@1Mbps, the maximum transmit power supports 4dBm, it can communicate effectively with iPhone 4s up to 80 meters in open areas, and the operating temperature ranges from -25°C to + 75°C;It supports master-slave integrated mode switching, and enables data interaction with external devices via UART serial port, making it suitable for scenarios requiring low-power wireless communication such as IoT terminals, smart homes, and portable devices.

GraftSense - HC-08 Based Master-Slave Integrated BLE Bluetooth Module (Open Version)
HC-08 V4.0 2.4GHz 4dBm 93dBm iphone4s 80 26.9mm 13mm 2.2mm
HC-08 7 3.2 6V 5V 80

2.2 Pin Definition

HC-08 1 2 3 4 5 6 7 8 P2.0
HC-08 3.3V 100mA

2.3 Functional Block Diagram

Since the HC-08 Bluetooth serial communication module does not have a detailed functional block diagram provided by the official, no functional block diagram is presented in this subsection.

2.4 Performance Parameters

The following table lists the main performance parameters of the HC-08 module:

HC-08
HC-08 DC2.0V 3.6V 21mA/9mA MODE0 MODE1 MODE2 MODE3 8.5mA/9mA 340

2.5 Reference Circuit

MAX3232 U2 RS232 C5 C6 C7 C8 R8 L298N NCP1202

2.5.1 Level Shifting and Serial Communication Section

2.5.2 5V and 3.3V Level Conversion Section

2.5.3 DC-DC Power Conversion Section

2.5.4 HC-08 Bluetooth Module Section (M1)

2.5.5 Key and Indicator Section

2.5.6 External Interface Section (J1)

2.6 Chip Configuration

This module is of Plug and Play type, requiring no hardware configuration or software register setup. The HC-08 module and the microcontroller rely entirely on data interaction via the serial port Communication Protocol for their communication.

2.7.1 Brief Introduction to Serial Port Transparent Transmission Principle

HC08 HC-08

With the HC-08 Bluetooth module inside the unit serving as the core, the data stream sent by external devices (such as MCU and PC) via the serial port is directly encapsulated into UART BLE 4.0 protocol data frames for wireless transmission; meanwhile, the received BLE wireless data frames are parsed and restored into a UART serial data stream to be output to external devices.During the entire process, the module does not need to perform any protocol parsing or modification on the serial port data, and only completes the bidirectional transparent conversion of serial port electrical signals → Bluetooth wireless signals → serial port electrical signals, which realizes wireless communication between serial port devices, allowing traditional serial port devices to quickly access the Bluetooth wireless network without modifying their original communication logic.

150ms 200ms
1 15 11 14 4
2.7.2
2.7.2
200ms 2.7.2
HC-08V2.0 2014-08-22
HC-08 12 UTF8
12 0 16 1234567890AB 000000000000
0dBm 6dBm 23dBm
2 6dBm 30mA 4dBm 23dBm
19200 OK19200 19200bps V2.0
1200 2400 4800 9600 19200 38400 57600 115200 500 300
0 1 HC-08
1 2 HC-08

2.8 PCB Routing Notes

The PCB under the antenna section needs to be hollowed out!!!!!

1 2 3

3. Instructions for Circuit Engineering and Module Usage

3.1 Circuit Source Engineering

To obtain the circuit source project, please follow the official account [Freak Embedded]

3.2 Module Usage Instructions

The schematic diagram of this module is shown below:

SCH_Schematic1_Master-Slave Integrated BLE Bluetooth Module Based on HC-08-V1.1.0_2025-10-24.pdf 3.6 MB

HC-08 3V3 R8 R4 R5 U2 C1 C2 U1 Q1
HC-08 V1.1

In this module, MRX (corresponding to the UART RXD pin of the MCU) is physically connected to the HC-08 ’s R1OUT pin, and MTX (corresponding to the UART TXD pin of the MCU) is physically connected to the HC-08 ’s T1IN pin. This is because UART serial communication follows the "cross transmit-receive" rule — the transmit terminal (TX) of each communication party must be connected to the receive terminal (RX) of the counterpart; this design ensures correct bidirectional transmission of UART serial data between the MCU and HC-08 via the UART interface.

It is particularly important to note that when using this module, MRX should be directly connected to the RXD pin of the MCU's UART, and MTX should be directly connected to the TXD pin of the MCU's UART; do NOT cross-connect them under any circumstances.

Q1 D1 AO3400A 1N5819W R1 220 R3 3.3k 3.3V R2
HC-08 R1OUT T1IN R2OUT T2IN

HC-08 Bluetooth module is compatible with TTL communication levels of + 5V and + 3.3V.

SW1 SW2 220 3.3V
HC-08 SW1 SW2

As shown in the figure, the module reserves two tact switches, of which SW1 is used for module reset, and SW2 is used for the host to clear the slave memory.

3.3 Application Experiment

Here, we use the GraftPort-RP2040 development board for testing, and connect the HC-08 based master-slave integrated BLE Bluetooth module to communicate with the main controller via the UART interface.

Here, we first use the HY2.0-4P cable to connect the module to the GraftPort-RP2040 development board's UART0 interface:

The module connections are shown in the following table:

Development Board Pins

Module Pins

Description

Pin 16

MTX

UART data transmission line, corresponding to the transmit pin of the development board

Pin 17

MRX

UART data transmission line, corresponding to the receive pin of the development board

Here, we need to search for the relevant driver packages on uPyPI: https://upypi.net/zh/

106

Enter hc08_driver to search, and the following will be displayed:

hc08_driver 1.0.0 HC08 2026 2 12

Click to copy the local installation command:

hc08_driver HC-08

Here, we can use the mip tool to import module driver library code. Below are the usage commands for the mpremote tool:

mpremote mip install github:FreakStudioCN/GraftSense-Drivers-MicroPython/communication/hc08_driver

Import the HC-08 Bluetooth Serial Communication - MicroPython Driver Code, then copy the following main.py code into our project:

# Python env   : MicroPython v1.23.0
# -*- coding: utf-8 -*-
# @Time    : 2025/9/5 10:11 PM
# @Author  : ben0i0d
# @File    : main.py
# @Description : hc08 test file

# ======================================== Import Modules =========================================

import time
from machine import UART,Pin
from hc08 import HC08

# ======================================== Global Variables ============================================

# ======================================== Functions ============================================

# ======================================== Custom Classes =============================================

# ======================================== Initialization configuration ===========================================

# Power-on delay of 3 s
time.sleep(3)
print("FreakStudio:HC08 test")

# Initialize UART communication (adjust TX/RX according to the actual hardware wiring)
uart0 = UART(0, baudrate=9600, tx=Pin(16), rx=Pin(17))
# Create an HC14_Lora instance
hc0 = HC08(uart0)

# ========================================  Main Program  ===========================================

ok, resp = hc0.get_name()
print(f'hc0 Name   :{resp}')
ok, resp = hc0.get_version()
print(f'hc0 Version:{resp}')
ok, resp = hc0.get_role()
print(f'hc0 Role   :{resp}')

while True:
    # Block and receive transparent transmission data
    ok, data = hc0.recv_data(timeout_ms=200)
    # When data is received successfully, print data and send it back
    if ok:
        print(data)
        hc0.send_data("get data:")
        hc0.send_data(data)
    time.sleep(0.05)

Burn the code, open the terminal, and use the mpremote tool to connect to the main controller, then use the encapsulated function to perform module AT settings in the REPL interface

>>> import time
>>> from machine import UART,Pin
>>> from hc08 import HC08
>>> #  UART  TX/RX
>>> uart0 = UART(0, baudrate=9600, tx=Pin(16), rx=Pin(17))
>>> #  HC14_Lora 
>>> hc0 = HC08(uart0)
>>> hc0.check()
(True, 'OK')
>>> hc0.factory_default()
(True, 'OK')
>>> hc0.get_rx()
(True, {'Addr': '48,70,1E,9C,C1,E3', 'Role': 'Slave', 'PIN': '000000', 'Name': ''HC-08', 'Baud': '9600,NONE'})

We need to install the mobile phone Bluetooth Debugger APP, and the following will give a brief demonstration of its basic functions.

Bluetooth_Debugger.apk 2.3 MB

  1. Enable the Bluetooth and location services on your mobile phone, open the APP, tap the scan button, and you will see the list of currently connectable Bluetooth devices.
  2. Based on the previously output module information from the terminal (the Bluetooth name is HC-08, corresponding to the MAC address), find HC-08 in the device list, click the + sign on the right to select this device, and the connection will be completed.
  3. After the connection is successful, switch to the "Dialogue Mode", then you can enter content in the input box and send it to realize communication and interaction with the Bluetooth module.
HC-08

It can be seen that our Bluetooth module sends the information received from the mobile phone Bluetooth APP to the main control through the serial port, and at the same time, the terminal prints and outputs the content:

HC-08 HC-8 HC-08V10.8 2021 12 16 01 23 55 hc08-test

IV. Drivers

hc08_driver.zip 12 KB

None.

VI. Revision History

Document Version

Date of Revision

Modifier

Modify Content

v1.0

2025-10-24

Zero Kōkō

Initialize the document

v1.1

2025-12-29

Li Zisheng

Added application experiments and production files

v1.2

2025-12-31

Xin Ruili

Create an open version of the document based on the internal document version v1.1.

v1.3

2026-03-29

Xin Ruili

Modified the application experiment section.

VII. Relevant Materials

HC-08 One-Minute Tutorial and Software.rar 4.4 MB

7.1 Chip Datasheet

HC-08 User Manual.pdf 444 KB

7.2 Unique Icons for PCB Silk Screen

HC-08