HC-12 433MHz Wireless Transceiver Module

Created:  
Updated:   12Aug2024   05:23:30   UTC 2024-08-12T05:23:30Z
Rating:   (0 reviewsThis article has not been rated yet)

The HC-12 module is a half-duplex RFRadio Frequency transceiver designed to work in the 433MHz ISMIndustrial, Scientific, and Medical radio bands band with up to 100 communication channels that have 400kHz separation, a range up to 1.8km in open air, and a UARTUniversal Asynchronous Receiver-Transmitter interface.

The HC-12 module is based on the Silicon Labs Si4463 RF chip and a STMicroelectronics STM8S003F3 8-bit microcontroller. The board usually comes with a 433MHz spring antenna to solder onto the ANT pin through hole or you can attach an external 433MHz antenna (not included) to the uFL/IPEX socket on the board.

HC-12 Module (Top View)
HC-12 Module (Bottom View)

This article covers the HC-12 module usage, specs, board layout, and modes of operation.

Usage

The HC-12 module supports 4 different modes of operation for power savings (FU1/FU2), general purpose usage (FU3), and for long range (FU4).

  • FU1: moderate power savings mode
  • FU2: extreme power savings mode
  • FU3: general purpose mode (default)
  • FU4: long-range mode (available in version 2.3 or newer)

More details on each of these modes and how to set them are in the Modes section.

Two HC-12 modules can be used in place of physical wiring, replacing a wired half-duplex serial communication link carrying TTLTransistor-Transistor Logic level signals, as shown in the figure below.

HC-12 Usage

The left device (MCUMicrocontroller Unit, PCPersonal Computer, or other device) sends serial port data from its TXDTransmit Data port to the RXDReceive Data port on the HC-12 module, which automatically sends data over the air by radio waves. The right HC-12 module receives the radio signal data and restores the serial port data out the TXDTransmit Data port to the RXDReceive Data port on device to the right (MCUMicrocontroller Unit, PCPersonal Computer, or other device). Only a half-duplex link is available between the HC-12 modules, since they cannot receive and send data over the air at the same time.

Specs

HC-12 RF Module Specs
Parameter Description
Module Info HC-12 433MHz RF Transceiver Module
(Datasheet PDF)
Transceiver IC Silicon Labs Si4463/Si4438
MCUMicrocontroller Unit STMicroelectronics STM8S003F3 8-bit MCUMicrocontroller Unit
Memory Configuration setting parameters are stored in onboard non-volatile flash memory, so it will not be lost when power is removed.
Range
  • 1.0km (in FU3 mode at 4800bps serial speed in open space)
  • 1.8km (in FU4 mode at reduced baud rate and volume data)
Frequency 433.4MHz to 473.0MHz
Modulation GFSKGaussian Frequency-Shift Keying modulation
Air Data Rate (bpsbits per second) 5kbps to 236kbps
Receiving Sensitivity (dBmDecibel-milliwatts (dBm) is a power level that expresses decibels in terms of milliwatts on a logarithmic scale.) -100dBm to -117dBm (at baud rate of 5kbps in open air)
Transmitting Power (dBmDecibel-milliwatts (dBm) is a power level that expresses decibels in terms of milliwatts on a logarithmic scale.) Configurable: -1dBm (0.8mW) to 20dBm (100mW)
Default: 20dBm (100 mW)
Antenna
  • 433MHz spring antenna pin
  • Optional IPEX20279-001E-03 socket
I/O Data Interface Pin Through Holes with 2.54mm (0.1in) spacing
  • (RXReceive, TXTransmit) UARTUniversal Asynchronous Receiver-Transmitter TTLTransistor-Transistor Logic Half-Duplex, 8 data bits, no parity, 1 stop bit
  • SET pin for configuration
Operating Supply Voltage 3.2V to 5.5V DC (minimum 200mA)
Transmitting Current 200mA (peak max), 100mA (continuous max)
Idle Current Idle current depends on mode:
  • 3.6mA in FU1 mode
  • 80μA in FU2 mode
  • 16mA in FU3 mode
  • 16mA in FU4 mode
Operating Temperature -40°C to +85°C
Pin Spacing 2.54mm (0.1in)
Board Size (LxWxH) 27.8mm x 14.4mm x 4mm (1.1in x 0.57in x 0.16in)
(including antenna cap, excluding spring antenna)

Board Layout

The HC-12 module board layout, shown in the figure below, consists of power supply pins (VCCVoltage Collector Collector (VCC) is the supply voltage at the collector of a transistor. The double subscript notation of repeating letters "CC" is used to denote a power supply voltage that is relative to ground. and GNDCommon Ground), the Silicon Labs Si4463 RFRadio Frequency ICIntegrated Circuit, a STMicroelectronics STM8S003F3 8-bit microcontroller, an RFRadio Frequency SPDTSingle Pole Double Throw Switch chip, and external antenna (ANT) pins.

HC-12 Board Layout

A schematic of the HC-12 board is given in the figure below. This design consists of a single antenna and two small low-pass filter sections with an RFRadio Frequency switch embedded between them to select between TXTransmit and RXReceive paths. The capacitor and inductor component values are chosen based on the frequency band.

HC-12 Schematic

Silicon Labs Si4463 RF Transceiver IC

The Si4463 transceiver ICIntegrated Circuit from Silicon Labs provides wireless communication in the circuit. The product page, datasheet, and application notes for this ICIntegrated Circuit can be found at the Silicon Labs website. There are many features that are not implemented in the HC-12 design, but it does offer a maximum transmit power of 20dBmDecibel-milliwatts (dBm) is a power level that expresses decibels in terms of milliwatts on a logarithmic scale. (100mW), a receiving sensitivity of -129dBmDecibel-milliwatts (dBm) is a power level that expresses decibels in terms of milliwatts on a logarithmic scale. (0.126pW), and two 64-byte RxReceive and TxTransmit FIFOFirst In First Out memories are built into the chip. The Si4463 product page has a functional block diagram shown in the figure below.

Si4463 Functional Block Diagram

In the HC-12, the Si4463 switches between RxReceive and TxTransmit modes for the antenna and communicates any received data to the STM8S003FS MCUMicrocontroller Unit over SPISerial Peripheral Interface.

STM8S003FS Microcontroller

The STM8S003FS is an 8-bit MCUMicrocontroller Unit with the following features:

  • 8kB of flash memory
  • 128 bytes of EEPROMElectrically Erasable Programmable Read-Only Memory
  • 10-bit ADCAnalog-to-Digital Converter (ADC, A/D, or A-to-D)
  • UARTUniversal Asynchronous Receiver-Transmitter, I2CInter-Integrated Circuit. Also referred to as IIC or I2C., and SPISerial Peripheral Interface
  • Multiple I/OInput/Output pins

This MCUMicrocontroller Unit is programmed to control the Si4463 transceiver and handle the UARTUniversal Asynchronous Receiver-Transmitter communication between the HC-12 and the device it is connected to.

HC-12 Pinout

The HC-12 provides a 4-pin TTLTransistor-Transistor Logic-level UARTUniversal Asynchronous Receiver-Transmitter interface (VCCVoltage Collector Collector (VCC) is the supply voltage at the collector of a transistor. The double subscript notation of repeating letters "CC" is used to denote a power supply voltage that is relative to ground. , GNDCommon Ground, TXDTransmit Data, GNDCommon Ground), with a 5th pin SET that is used to enter "command" mode for changing the module's configuration. A pin diagram is given in the figure below. The pin definitions, given in the table that follows, can be found in the HC-12 Datasheet.

HC-12 Pinout
HC-12 Pins
Pin Definition I/O Direction Notes
1 Vcc Power supply input, 3.2V to 5.5V DC, with load capacity not less 200mA.

Note: if the module is in the transmitting state for an extended time, it is suggested that a 1N4007 diode be connected in series if the supply voltage is greater than 4.5V, to avoid overheating the onboard LDOLow Dropout Regulator regulator.
2 GND Common ground
3 RXD Input (weak pullup) UARTUniversal Asynchronous Receiver-Transmitter data input, TTLTransistor-Transistor Logic level. There is a 1kΩ resistor connected in series inside the module.
4 TXD Output UARTUniversal Asynchronous Receiver-Transmitter data output, TTLTransistor-Transistor Logic level. There is a 1kΩ resistor connected in series inside the module.
5 SET Input (10kΩ pullup) Parameter setting control pin, active low level. There is a 1kΩ resistor connected in series inside the module.
6 ANT Input/Output 433MHz antenna pin
7 GND Common ground
8 GND Common ground
9 NC No connection, used in mechanical fixing, compatible with HC-11 module pin position
ANT1 ANT IPEX20279-001E-03 antenna socket
ANT2 ANT 433MHz spring antenna solder eyelet

Modes

The different operation modes of the HC-12 given in the table below can be found in the HC-12 Datasheet.

HC-12 Modes
Mode Idle Current Baud Rates (bpsbits per second) Notes
FU1 3.6mA 1200bps, 2400bps, 4800bps, 9600bps, 19,200bps, 38,400bps, 57,600bps, or 115,200bps Moderate power saving mode. In air baud rate is 250,000 bps.
FU2 80μA 1200bps, 2400bps, 4800bps Power saving mode. In air baud rate is 250,000bps. It is recommended that the sending time interval between data packets is no less than 1 second.
FU3 16mA 9600bps Default. General purpose mode.
FU4 16mA 1200bps Useful for maximum range, up to 1.8km. In air baud rate is reduced to 500bps for improved communication distance. Each packet should be 60 bytes or less. It is recommended that the sending time interval between data packets is no less than 2 seconds to prevent data loss.

The HC-12 module makes use of ATShort text string commands where the AT stands for ATtention and every command line starts with "AT" or "at". commands, like those used on old modems, on the SET pin in order to change the mode from the factory default FU3 mode to a new mode.

To enter the command mode, power on the board and then pull pin 5 (SET) low and wait 40ms for the command mode to engage. Pin 5 has a 10kΩ pullup resistor connected internally, allowing the pin to be driven by an open-collector output from an attached device like a MCUMicrocontroller Unit or USB Serial Adapter device.

To exit the command mode, you can either release pin 5 or set it high and wait 80ms. Once the mode is set, the changes will be applied after exiting from the command mode with the new parameters stored in onboard non-volatile flash memory in the MCUMicrocontroller Unit, so it will not be lost when power is removed.

The following table gives ATShort text string commands where the AT stands for ATtention and every command line starts with "AT" or "at". commands found in the HC-12 Datasheet.

HC-12 AT Commands
Commands Notes
AT After sending command "AT" to the module, the module returns "OK".
AT+Bxxxx Sets the serial port baud rate.
AT+Cxxx Sets the wireless communication channel.
AT+FUx Sets the model of the module.
AT+Px Sets the transmitting power of the module.
AT+Udps Set data bits (d), parity (p), and stop bits (s) for serial port communication.
AT+SLEEP Sets module in sleep mode operating at 22μA. This mode does not allow serial port transmission. When entering the command mode again, the module will exit from sleep mode automatically.
AT+DEFAULT Sets configuration to default factory values.
AT+Ry Receive single parameter from module. y can be B, C, F, and P.
"AT+RB": baud rate
"AT+RC": communication channels
"AT+RF": mode FU1 to FU4
"AT+RP": transmitting power
AT+RX Receive all parameters from module.
AT+V Receive firmware version info from module.
AT+UPDATE Puts module state waiting for software update.

References

A summary of the references used in this article are listed in the table below.

References
Reference Link
HC-12 Module Datasheet Elecrow.com
Si4463 RF Transceiver IC Product Page Silabs.com
Si4463 RF Transceiver IC Datasheet Silabs.com
Si4463 RF Transceiver IC Application Notes Silabs.com
Comparison between the Si4463 and Si4438 RF Transceiver ICs IoT-RF.com
STM8S003F3 MCU Product Page ST.com
STM8S003F3 MCU Datasheet ST.com
uPG2214TB IC SPDT RF Switch Datasheet Mouser.com

Related Content


HC-12 RF Transceiver and Arduino Nano

Created:   30Jun2023   06:48:25   UTC 2023-06-30T06:48:25Z
Updated:   12Aug2024   21:18:26   UTC 2024-08-12T21:18:26Z
Rating:  (0 reviewsThis article has not been rated yet)

Tutorial on how to send wireless messages between two Arduino Nano and HC-12 module pairs.

  • Hardware and Software Setup
  • Arduino Code
  • Computer Python Code with PySerial
  • Computer Console Output

HC-12 RF Transceiver and RPi Pico with MicroPython

Created:   28Jun2022   02:03:47   UTC 2022-06-28T02:03:47Z
Updated:   13Aug2024   01:11:20   UTC 2024-08-13T01:11:20Z
Rating:  (0 reviewsThis article has not been rated yet)

Tutorial on how to send wireless messages between two RPi Pico and HC-12 module pairs.

  • Hardware and Software Setup
  • RPi Pico MicroPython Code
  • Computer Python Code with PySerial
  • Computer Console Output

Resources

A summary of resources to explore this topic further are listed in the table below.

Resources
Figure Title Description Links
Which radio module? NRF24, LoRa, CC1101, HC12, 433MHz, HC05 YouTube video by Electronoobs. Shows examples and usage for the following RF modules: NRF24, LoRa, CC1101, HC12, 433MHz, HC05 YouTube.com
HC-12 FIX for bad clones YouTube video by DIY Tech Bros. Shows how you can fix bad HC-12 clones that have no range. Turns out, it is usually only an error on the PCB that you can fix with some solder. YouTube.com
2 KM SUCCESS STORY with HC-12 - going beyond 1800 meters! YouTube video by DIY Tech Bros. Achieved a range of over 2 km with the HC-12 module. YouTube.com

Products

The HC-12 433MHz RF Transceiver module products and accessories such as pin headers and antennas are provided in the link below.


HC-12 RF Module Products

Created:   18Jan2023   08:19:54   UTC 2023-01-18T08:19:54Z
Updated:   09May2024   03:12:24   UTC 2024-05-09T03:12:24Z

  • HC-12 433MHz RF Module
  • Pin Headers
  • 433MHz Antennas

Article Rating

Sign in to rate this article

Sign In


(0) Comments

Sign in to leave a comment

Sign In