Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
manual [2020/11/30 19:19] bgfdsuperadmin |
manual [2020/11/30 20:40] bgfdsuperadmin |
||
---|---|---|---|
Line 4: | Line 4: | ||
//Edited by Bluegoldfishdesign 20-Nov-20// | //Edited by Bluegoldfishdesign 20-Nov-20// | ||
- | {{ https://www.allaboutcircuits.com/ | + | {{ hc12:hc12pcb.png }} |
- | {{ wiki: | + | |
=== Product Applications === | === Product Applications === | ||
* Wireless sensor | * Wireless sensor | ||
Line 77: | Line 77: | ||
=== Product Dimensions === | === Product Dimensions === | ||
- | {{ wiki:HC-12_dimensions.png }} | + | {{ hc12:hc12dimensions.png }} |
- | Definition of Pins | + | === Definition of Pins === |
The HC-12 module can be patch soldered, or have a 2.54mm-spacing pin header | The HC-12 module can be patch soldered, or have a 2.54mm-spacing pin header | ||
attached and directly inserted onto the user’s PCB. The module has nine pins in | attached and directly inserted onto the user’s PCB. The module has nine pins in | ||
total, and one RF antenna socket (ANT1), with definitions as shown in the table | total, and one RF antenna socket (ANT1), with definitions as shown in the table | ||
below: | below: | ||
- | Pin Definition I/O direction Notes | + | |
- | 1 Vcc | + | ^ Pin ^ Definition |
- | Power supply input, DC3.2V-5.5V, | + | | 1 | Vcc | | Power supply input, DC3.2V-5.5V, |
- | capacity not less than 200mA. Note: if the | + | | 2 | GND | | Common ground |
- | module is working in the transmitting state | + | | 3 | RxD | Input (weak pullup) |
- | for an extended time, it is suggested that a | + | | 4 | TxD | Output |
- | 1N4007 diode be connected in series if the | + | | 5 | SET | Input (10k pullup) |
- | supply voltage is greater than 4.5V, so as to | + | | 6 | ANT | Input/ |
- | avoid overheating the onboard LDO regulator | + | | 7 | GND | Common ground |
- | 2 GND Common ground | + | | 8 | GND | Common ground |
- | 3 RxD | + | | 9 | NC | |
- | Input | + | | ANT1 | ANT | Input/ |
- | (weak pullup) | + | | ANT2 | ANT | Input/ |
- | UART data input, TTL level. 1k resistor | + | |
- | connected in series inside the module | + | |
- | 4 TxD Output UART data output, TTL level. 1k resistor | + | |
- | connected in series inside the module | + | |
- | 5 SET | + | |
- | Input | + | |
- | (10k pullup) | + | |
- | Parameter setting control pin, active low | + | |
- | level. 1k resistor connected in series inside | + | |
- | the module | + | |
- | 6 ANT Input/ | + | |
- | 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 Input/ | + | |
- | ANT2 ANT Input/ | + | |
Pins 1-6 each have two bonding pads, with the outer half-hole bonding pads | Pins 1-6 each have two bonding pads, with the outer half-hole bonding pads | ||
intended for patch soldering. When the inner bonding pad ANT2 of Pin 6 is used | intended for patch soldering. When the inner bonding pad ANT2 of Pin 6 is used | ||
Line 119: | Line 102: | ||
round-hole bonding pads of Pins 1-5 may then be used to solder a 2.54mm-spacing | round-hole bonding pads of Pins 1-5 may then be used to solder a 2.54mm-spacing | ||
pin header that can be plugged into a PCB socket. | pin header that can be plugged into a PCB socket. | ||
- | Wireless Serial Port Transparent Transmission | + | |
+ | === Wireless Serial Port Transparent Transmission | ||
(1) Simple introduction of working principle | (1) Simple introduction of working principle | ||
+ | |||
+ | {{ hc12: | ||
+ | |||
As shown in the above diagram, two HC-12 modules can be used in place of | As shown in the above diagram, two HC-12 modules can be used in place of | ||
physical wiring to replace a wired half-duplex serial communications link | physical wiring to replace a wired half-duplex serial communications link | ||
Line 130: | Line 117: | ||
half-duplex link is available between modules, as they can not receive and send | half-duplex link is available between modules, as they can not receive and send | ||
data over the air at the same time. | data over the air at the same time. | ||
- | (2) Serial port transparent transmission | + | |
+ | === (2) Serial port transparent transmission | ||
The HC-12 module has four serial port transparent transmission modes, expressed | The HC-12 module has four serial port transparent transmission modes, expressed | ||
as FU1, FU2, FU3, and FU4. In operation, these modes hide all the details of | as FU1, FU2, FU3, and FU4. In operation, these modes hide all the details of | ||
Line 139: | Line 127: | ||
baud rate. Different modes can not transmit data to each other, and the user | baud rate. Different modes can not transmit data to each other, and the user | ||
should select the optimal mode according to practical circumstances. | should select the optimal mode according to practical circumstances. | ||
+ | |||
The modules are usually operated in pairs, with data transmitted by means of a | The modules are usually operated in pairs, with data transmitted by means of a | ||
half-duplex link. For successful wireless transmission, | half-duplex link. For successful wireless transmission, | ||
Line 145: | Line 134: | ||
are: FU3, 9,600bps (8N1: 8 data bits, no parity, 1 stop bit), CH001 (433.4MHz), | are: FU3, 9,600bps (8N1: 8 data bits, no parity, 1 stop bit), CH001 (433.4MHz), | ||
20dBm power (100mW). | 20dBm power (100mW). | ||
+ | |||
The number of bytes that can be continuously sent to the serial port of the | The number of bytes that can be continuously sent to the serial port of the | ||
module is unlimited in modes FU1 and FU3. However, considering ambient | module is unlimited in modes FU1 and FU3. However, considering ambient | ||
Line 151: | Line 141: | ||
at each end of the link should have some sort of response and resending | at each end of the link should have some sort of response and resending | ||
mechanism to avoid information loss. | mechanism to avoid information loss. | ||
- | (3) The four serial port transparent transmission modes | + | |
+ | === (3) The four serial port transparent transmission modes === | ||
When the HC-12 module leaves the factory, its default serial port transparent | When the HC-12 module leaves the factory, its default serial port transparent | ||
transmission mode is FU3. In this mode the module remains in full-speed state, | transmission mode is FU3. In this mode the module remains in full-speed state, | ||
Line 157: | Line 148: | ||
rate of wireless transmission in the air according to the serial port baud rate, | rate of wireless transmission in the air according to the serial port baud rate, | ||
with the corresponding relationship as shown in the table below: | with the corresponding relationship as shown in the table below: | ||
- | Serial port | + | |
- | baud rate | + | |Serial port baud rate | |
- | 1200 | + | |Baud rate over the air | |
- | bps | + | |
- | 2400 | + | |
- | bps | + | |
- | 4800 | + | |
- | bps | + | |
- | 9600 | + | |
- | bps | + | |
- | 19,200 | + | |
- | bps | + | |
- | 38,400 | + | |
- | bps | + | |
- | 57,600 | + | |
- | bps | + | |
- | 115,200 | + | |
- | bps | + | |
- | Baud rate in | + | |
- | the air | + | |
- | 5000bps 15,000bps 58,000bps 236,000bps | + | |
To get the maximum communication distance, the serial port baud rate should be | To get the maximum communication distance, the serial port baud rate should be | ||
set to be low (1200bps or 2400bps). For short-time transmission of mass data, | set to be low (1200bps or 2400bps). For short-time transmission of mass data, |