Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use HC-12: Examples, Pinouts, and Specs

Image of HC-12
Cirkit Designer LogoDesign with HC-12 in Cirkit Designer

Introduction

The HC-12 is a wireless serial communication module that operates in the 433 MHz frequency range, enabling long-range data transmission of up to 1,000 meters in open space. It is designed for ease of use with a simple UART (Universal Asynchronous Receiver-Transmitter) interface, making it an excellent choice for applications requiring reliable wireless communication.

Explore Projects Built with HC-12

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Raspberry Pi and H743-SLIM V3 Controlled Servo System with GPS and Telemetry
Image of Avionics Wiring Diagram: A project utilizing HC-12 in a practical application
This circuit is designed for a UAV control system, featuring an H743-SLIM V3 flight controller connected to multiple servos for control surfaces, a GPS module for navigation, a telemetry radio for communication, and a digital airspeed sensor for flight data. The system is powered by a LiPo battery and includes a Raspberry Pi for additional processing and control tasks.
Cirkit Designer LogoOpen Project in Cirkit Designer
GPS-Enabled Telemetry Drone with Speedybee F405 WING and Brushless Motor
Image of Pharmadrone Wiring: A project utilizing HC-12 in a practical application
This circuit is designed for a remote-controlled vehicle or drone, featuring a flight controller that manages a brushless motor, servomotors for actuation, telemetry for data communication, and a GPS module for positioning. It is powered by a lipo battery and includes a receiver for remote control inputs.
Cirkit Designer LogoOpen Project in Cirkit Designer
Battery-Powered Emergency Alert System with NUCLEO-F072RB, SIM800L, and GPS NEO 6M
Image of women safety: A project utilizing HC-12 in a practical application
This circuit is an emergency alert system that uses a NUCLEO-F072RB microcontroller to send SMS alerts and make calls via a SIM800L GSM module, while obtaining location data from a GPS NEO 6M module. The system is powered by a Li-ion battery and includes a TP4056 module for battery charging and protection, with a rocker switch to control power to the microcontroller.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP32-Based Automatic Passenger Counter and Temperature Sensor with Wi-Fi Connectivity
Image of Embedded Circuit: A project utilizing HC-12 in a practical application
This circuit is an automatic passenger counter and temperature sensor system powered by a solar charger. It uses an ESP32 microcontroller to interface with two capacitive proximity sensors for counting passengers and a DHT22 sensor for monitoring temperature and humidity, with data being sent to a Blynk mobile app and Google Sheets for real-time tracking and logging.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with HC-12

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Avionics Wiring Diagram: A project utilizing HC-12 in a practical application
Raspberry Pi and H743-SLIM V3 Controlled Servo System with GPS and Telemetry
This circuit is designed for a UAV control system, featuring an H743-SLIM V3 flight controller connected to multiple servos for control surfaces, a GPS module for navigation, a telemetry radio for communication, and a digital airspeed sensor for flight data. The system is powered by a LiPo battery and includes a Raspberry Pi for additional processing and control tasks.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Pharmadrone Wiring: A project utilizing HC-12 in a practical application
GPS-Enabled Telemetry Drone with Speedybee F405 WING and Brushless Motor
This circuit is designed for a remote-controlled vehicle or drone, featuring a flight controller that manages a brushless motor, servomotors for actuation, telemetry for data communication, and a GPS module for positioning. It is powered by a lipo battery and includes a receiver for remote control inputs.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of women safety: A project utilizing HC-12 in a practical application
Battery-Powered Emergency Alert System with NUCLEO-F072RB, SIM800L, and GPS NEO 6M
This circuit is an emergency alert system that uses a NUCLEO-F072RB microcontroller to send SMS alerts and make calls via a SIM800L GSM module, while obtaining location data from a GPS NEO 6M module. The system is powered by a Li-ion battery and includes a TP4056 module for battery charging and protection, with a rocker switch to control power to the microcontroller.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Embedded Circuit: A project utilizing HC-12 in a practical application
ESP32-Based Automatic Passenger Counter and Temperature Sensor with Wi-Fi Connectivity
This circuit is an automatic passenger counter and temperature sensor system powered by a solar charger. It uses an ESP32 microcontroller to interface with two capacitive proximity sensors for counting passengers and a DHT22 sensor for monitoring temperature and humidity, with data being sent to a Blynk mobile app and Google Sheets for real-time tracking and logging.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Remote control systems (e.g., drones, robots)
  • Wireless sensor networks
  • Internet of Things (IoT) devices
  • Home automation systems
  • Industrial monitoring and control

Technical Specifications

The HC-12 module is highly versatile, with adjustable transmission power and multiple communication modes. Below are its key technical details:

Key Technical Details

Parameter Specification
Frequency Range 433.4 MHz to 473.0 MHz
Modulation Type GFSK (Gaussian Frequency Shift Keying)
Communication Range Up to 1,000 meters (open space)
Supply Voltage 3.2V to 5.5V
Operating Current 16 mA (transmitting at 20 dBm)
Sleep Current < 22 µA
Baud Rate 1,200 to 115,200 bps (default: 9,600)
Transmission Power Adjustable (1 mW to 100 mW)
Operating Temperature -40°C to +85°C
Dimensions 27.8 mm x 14.4 mm x 4 mm

Pin Configuration and Descriptions

The HC-12 module has 4 main pins for operation. Below is the pinout and description:

Pin Name Pin Number Description
VCC 1 Power supply input (3.2V to 5.5V)
GND 2 Ground
TXD 3 UART Transmit pin (connect to RX of MCU)
RXD 4 UART Receive pin (connect to TX of MCU)

Usage Instructions

The HC-12 module is straightforward to use and can be integrated into a variety of circuits. Below are the steps and best practices for using the module:

How to Use the HC-12 in a Circuit

  1. Power the Module: Connect the VCC pin to a 3.3V or 5V power source and the GND pin to ground.
  2. Connect UART Pins:
    • Connect the TXD pin of the HC-12 to the RX pin of your microcontroller (e.g., Arduino UNO).
    • Connect the RXD pin of the HC-12 to the TX pin of your microcontroller.
  3. Set the Baud Rate: Ensure the baud rate of your microcontroller matches the HC-12's default baud rate (9,600 bps) or configure it as needed.
  4. Configure the Module (Optional): Use AT commands to adjust settings such as transmission power, channel, and baud rate. For example:
    • To set the baud rate to 19,200 bps: AT+B19200
    • To set the transmission power to maximum: AT+P8
  5. Send and Receive Data: Use the UART interface to send and receive data wirelessly.

Important Considerations and Best Practices

  • Antenna: Always attach an appropriate 433 MHz antenna to the module for optimal performance.
  • Power Supply: Use a stable power supply to avoid communication issues.
  • Distance and Obstacles: The communication range may decrease in environments with obstacles or interference.
  • Mode Selection: The HC-12 supports four modes (FU1, FU2, FU3, FU4). FU3 is the default mode and is suitable for most applications.

Example: Connecting HC-12 to Arduino UNO

Below is an example of how to use the HC-12 with an Arduino UNO to send and receive data:

Circuit Diagram

  • HC-12 VCC → Arduino 5V
  • HC-12 GND → Arduino GND
  • HC-12 TXD → Arduino Pin 10 (SoftwareSerial RX)
  • HC-12 RXD → Arduino Pin 11 (SoftwareSerial TX)

Arduino Code

#include <SoftwareSerial.h>

// Define SoftwareSerial pins for HC-12
SoftwareSerial HC12(10, 11); // RX = Pin 10, TX = Pin 11

void setup() {
  Serial.begin(9600);       // Start Serial Monitor at 9600 bps
  HC12.begin(9600);         // Start HC-12 communication at 9600 bps
  Serial.println("HC-12 Test");
}

void loop() {
  // Check if data is available from HC-12
  if (HC12.available()) {
    String received = HC12.readString(); // Read data from HC-12
    Serial.print("Received: ");
    Serial.println(received);           // Print received data to Serial Monitor
  }

  // Check if data is available from Serial Monitor
  if (Serial.available()) {
    String toSend = Serial.readString(); // Read data from Serial Monitor
    HC12.print(toSend);                  // Send data to HC-12
  }
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Communication Between Modules

    • Solution: Ensure both modules are set to the same channel and baud rate using AT commands.
    • Tip: Use the AT+RX command to verify the current settings.
  2. Reduced Communication Range

    • Solution: Check the antenna connection and ensure there are minimal obstacles between modules.
    • Tip: Increase the transmission power using the AT+P command.
  3. Module Not Responding to AT Commands

    • Solution: Ensure the module is in command mode by sending AT and checking for an OK response.
    • Tip: Use a USB-to-TTL adapter to directly communicate with the module for debugging.
  4. Interference with Other Devices

    • Solution: Change the communication channel using the AT+C command to avoid conflicts.

FAQs

Q1: Can the HC-12 communicate with other 433 MHz devices?
A1: No, the HC-12 is designed to communicate only with other HC-12 modules due to its proprietary protocol.

Q2: How do I reset the HC-12 to factory settings?
A2: Send the AT+DEFAULT command to reset the module to its default configuration.

Q3: What is the maximum data rate of the HC-12?
A3: The HC-12 supports a maximum baud rate of 115,200 bps.

Q4: Can I use the HC-12 with a 3.3V microcontroller?
A4: Yes, the HC-12 is compatible with both 3.3V and 5V logic levels.

By following this documentation, you can effectively integrate the HC-12 module into your projects for reliable wireless communication.