HC-12 is wireless transceiver communication module. You can use it in your projects to send data wirelessly.
It works on low frequency between 433MHz and 473MHz. This makes it very useful for long range data transmission. Its datasheet claims that it can send data upto 1km, and it might be true as i have seen people doing this using proper setup.
Configuring this module is also very easy as it uses Serial communication , more on that later……
Its working is very reliable as compared to other available wireless modules like nrf24l01.
It can’t be used for sending large amount of data as this module has relative slower bandwidth and would take a long time for transmission.
I have seen some module which i bought for cheap, are actually the copy of original product and then don’t work as expected so keep that in mind.
Configuring this module is also very easy . It modules works on serial communication. i.e. It requires Tx and Rx to send and receives data respectively. This module can be configured using AT commands. Here is step be step procedure for doing that.
Connect Rx of Hc-12 to Tx of any Serial to TTL converter and Tx of HC-12 to Rx of Serial to TTL converter.
I am using this FTDI board…
Connect Set pin Hc-12 to ground, this will make the board enter into command mode and it can now receive AT commands from your computer.
On your computer you have to install some software that could send and receive serial data like teraterm, i will be using serial monitor of arduino IDE.
After that power the module using 5v. Connect 5v to VCC pin and ground GNd pin. The module will power up and enter into command mode.
Now you can use serial monitor to send and receive serial data. You can make it sure by sending AT. It should return OK.
Now I will set the baud-rate and channel of module. Baud-rate is the speed at which this module will communicate with micro-controller. you have to make sure that both module and mcu are communicated at the same baud-rate. There are 100 channel in which Hc-12 can send data wirelessly. You also have to make sure that the module you are sending or receiving data to and form should be on same channel, otherwise they will not be able to communicate .
I will set bad-rate to 9600bps and channel to 1.
Send “At+B9600” and if it returns “OK+B9600” then you have done it correctly.
Now similarly send “AT+C001” and if it returns “COK+C001”
Now you just have to this same procedure with other module and you are all set up.