The HC-12 Wireless Serial Module, manufactured by Evelta, is a versatile wireless communication module designed for serial data transmission. Operating in the 433 MHz frequency range, it supports communication over distances of up to 1,000 meters in open space. The module is highly configurable, offering multiple communication modes to suit various applications. Its compact size and ease of use make it a popular choice for remote control, telemetry, and wireless data transfer projects.
The HC-12 module is designed to provide reliable and efficient wireless communication. Below are its key technical details:
Parameter | Specification |
---|---|
Operating Frequency | 433.4 MHz to 473.0 MHz |
Communication Distance | Up to 1,000 meters (open space) |
Modulation Method | GFSK (Gaussian Frequency Shift Keying) |
Operating Voltage | 3.2V to 5.5V |
Operating Current | 16 mA (transmitting), 3.5 mA (receiving) |
Baud Rate | 1,200 bps to 115,200 bps |
Communication Modes | FU1, FU2, FU3, FU4 |
Dimensions | 27.8 mm x 14.4 mm x 4 mm |
Operating Temperature | -40°C to +85°C |
The HC-12 module has a total of 4 pins. Below is the pinout and description:
Pin | Name | Description |
---|---|---|
1 | VCC | Power supply input (3.2V to 5.5V). Connect to the 5V or 3.3V pin of your microcontroller. |
2 | GND | Ground. Connect to the ground of your circuit. |
3 | TXD | Transmit data pin. Connect to the RX pin of your microcontroller. |
4 | RXD | Receive data pin. Connect to the TX pin of your microcontroller. |
The HC-12 module is straightforward to use and can be easily integrated into a circuit for wireless communication. Below are the steps and best practices for using the module:
The HC-12 module can be configured using AT commands sent via a serial interface. To enter AT command mode:
Example AT commands:
AT
: Test the module's response.AT+BAUDx
: Set the baud rate (replace x
with the desired value, e.g., AT+BAUD4
for 9600 bps).AT+RFx
: Set the communication channel (replace x
with a value from 1 to 100).Below is an example of how to use the HC-12 module with an Arduino UNO for basic wireless communication:
#include <SoftwareSerial.h>
// Define RX and TX pins for HC-12
SoftwareSerial HC12(10, 11); // RX = Pin 10, TX = Pin 11
void setup() {
Serial.begin(9600); // Start serial communication with PC
HC12.begin(9600); // Start serial communication with HC-12
Serial.println("HC-12 Ready");
}
void loop() {
// Check if data is received from the HC-12 module
if (HC12.available()) {
String receivedData = HC12.readString();
Serial.print("Received: ");
Serial.println(receivedData); // Print received data to Serial Monitor
}
// Check if data is sent from the Serial Monitor
if (Serial.available()) {
String sendData = Serial.readString();
HC12.print(sendData); // Send data to HC-12 module
}
}
No Communication Between Modules
Short Communication Range
Module Not Responding to AT Commands
Data Loss or Corruption
Q: Can the HC-12 module communicate with other 433 MHz devices?
A: The HC-12 is designed to communicate with other HC-12 modules. It may not be compatible with other 433 MHz devices unless they use the same protocol and settings.
Q: How do I reset the HC-12 to factory settings?
A: Send the AT+DEFAULT
command in AT mode to reset the module to its default configuration.
Q: What is the default baud rate of the HC-12?
A: The default baud rate is 9600 bps.
Q: Can I use the HC-12 with a 3.3V microcontroller?
A: Yes, the HC-12 supports an operating voltage range of 3.2V to 5.5V, making it compatible with both 3.3V and 5V systems.