Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
manual [2020/11/30 19:19]
bgfdsuperadmin
manual [2020/12/01 15:53]
bgfdsuperadmin [User Manual version 2.3B]
Line 4: Line 4:
  
 //Edited by Bluegoldfishdesign 20-Nov-20// //Edited by Bluegoldfishdesign 20-Nov-20//
-{{ https://www.allaboutcircuits.com/uploads/articles/Hughes_HC12_HC12.jpg }} +{{ hc12:hc12pcb.png }} 
-{{ wiki:help.png }}+
 === 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 I/O direction Notes ^ 
-Power supply input, DC3.2V-5.5V, with load +Vcc |  | Power supply input, DC3.2V-5.5V, with load capacity not less than 200mA. Note: if the module is working 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, so as to avoid overheating the onboard LDO regulator | 
-capacity not less than 200mA. Note: if the +GND |  | Common ground | 
-module is working in the transmitting state +RxD Input (weak pullup) UART data input, TTL level. 1k resistor connected in series inside the module | 
-for an extended time, it is suggested that a +TxD Output UART data output, TTL level. 1k resistor connected in series inside the module | 
-1N4007 diode be connected in series if the +SET Input (10k pullup) Parameter setting control pin, active low level. 1k resistor connected in series inside the module | 
-supply voltage is greater than 4.5V, so as to +ANT Input/Output 433MHz antenna pin | 
-avoid overheating the onboard LDO regulator +GND Common ground | 
-2 GND Common ground +GND Common ground | 
-3 RxD +NC |   No connection, used in mechanical fixing, compatible with HC-11 module pin position | 
-Input +ANT1 ANT Input/Output IPEX20279-001E-03 antenna socket | 
-(weak pullup) +ANT2 ANT Input/Output 433MHz spring antenna solder eyelet 
-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/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 Input/Output IPEX20279-001E-03 antenna socket +
-ANT2 ANT Input/Output 433MHz spring antenna solder eyelet+
 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:hc12configuration.png }}
 +
 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, the transparent half-duplex link. For successful wireless transmission, the transparent
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 bps  |  2400 bps  |  4800 bps  |  9600 bps  |  19,200 bps  |  38,400 bps  |  57,600 bps  |  115,200 bps  | 
-1200 +|Baud rate over the air |  5000bps  ||  15,000bps  ||  58,000bps  ||  236,000bps  || 
-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,
 the serial port baud rate may be set high, but be aware that the communication the serial port baud rate may be set high, but be aware that the communication
 distance will be reduced accordingly. distance will be reduced accordingly.
 +
 The receiving sensitivity of the module at different baud rates in the air is as The receiving sensitivity of the module at different baud rates in the air is as
 shown in the table below: shown in the table below:
-Baud rate in + 
-the air +|Baud rate in the air |  5000bps  |  15,000bps  |  58,000bps  |  236,000bps  | 
-5000bps 15,000bps 58,000bps 236,000bps +|Wireless receiving sensitivity |  -117dBm   | -112dBm  |  -107dBm  -100dBm  | 
-Wireless + 
-receiving +Generally, every time the receiving sensitivity is reduced by 6dB, the communication distance will be reduced by half. 
-sensitivity + 
--117dBm -112dBm -107dBm -100dBm +When the “SET” pin of the module is pulled low, the serial port transparent transmission mode and other parameters can be set through AT commands (see the introduction in the following chapter for details). 
-Generally, every time the receiving sensitivity is reduced by 6dB, the + 
-communication distance will be reduced by half. +__FU1__ mode is a moderate power saving mode, with an idle working current of about 3.6mA. In this mode, the module can also be set to any of the eight serial port baud rates shown in the above table, but the baud rate in the air is a uniform 250,000bps. 
-When the “SET” pin of the module is pulled low, the serial port transparent + 
-transmission mode and other parameters can be set through AT commands (see the +__FU2__ mode is an extreme power saving mode, with an idle working current of about 80uA. In this mode, the module only supports baud rates of 1200bps, 2400bps, and 4800bps, with the baud rate in the air uniform at 250,000bps. If the module is subsequently set to any other serial port baud rate, the module will not be able to conduct wireless communication normally.  
-introduction in the following chapter for details). + 
-FU1 mode is a moderate power saving mode, with an idle working current of about +When the module is set to FU2 mode, if the currently set baud rate exceeds 4800bps it will be automatically reduced to 4800bps. In FU2 mode, the sending time interval of data packets can not be too short, otherwise data will be lost. It is suggested that the sending time interval between data packets should be no less than 1 second. 
-3.6mA. In this mode, the module can also be set to any of the eight serial port + 
-baud rates shown in the above table, but the baud rate in the air is a uniform +__FU4__ mode is useful for maximum range, up to 1.8km. Only a single baud rate of 1200bps is supported, with the in the air baud rate reduced to 500bps for improved communication distance. This mode can only be used for small amounts of data (each packet should be 60 bytes or less), and the time interval between sending packets must not be too short (preferably no less than 2 seconds) in order to prevent loss of data. 
-250,000bps. +
-FU2 mode is an extreme power saving mode, with an idle working current of about +
-80uA. In this mode, the module only supports baud rates of 1200bps, 2400bps, and +
-4800bps, with the baud rate in the air uniform at 250,000bps. If the module is +
-subsequently set to any other serial port baud rate, the module will not be able +
-to conduct wireless communication normally. +
-When the module is set to FU2 mode, if the currently set baud rate exceeds +
-4800bps it will be automatically reduced to 4800bps. In FU2 mode, the sending +
-time interval of data packets can not be too short, otherwise data will be lost. +
-It is suggested that the sending time interval between data packets should be no +
-less than 1 second. +
-FU4 mode is useful for maximum range, up to 1.8km. Only a single baud rate of +
-1200bps is supported, with the in the air baud rate reduced to 500bps for +
-improved communication distance. This mode can only be used for small amounts of +
-data (each packet should be 60 bytes or less), and the time interval between +
-sending packets must not be too short (preferably no less than 2 seconds) in +
-order to prevent loss of data.+
 The following table gives typical reference values for the various modes: The following table gives typical reference values for the various modes:
-Mode FU1 FU2 FU3 FU4 Remarks + 
-Idle current 3.6mA 80uA 16mA 16mA Average value +|  Mode  |  FU1  |  FU2  |  FU3  |  FU4  |  Remarks  | 
-Transmission +|Idle current  |  3.6mA  |  80uA  |  16mA  |  16mA  |Average value  | 
-time delay +|Transmission time delay  |  15-25mS  |  500mS  |  4-80mS  |  1000mS  |Sending one byte  | 
-15-25mS 500mS 4-80mS 1000mS Sending one byte +|Loopback test time delay 1  |  31mS        |Serial port baud rate 9600, sending one byte  | 
-Loopback test +|Loopback test time delay 2  |  31mS        |Serial port baud rate 9600, sending 10 bytes  | 
-time delay 1 +|Operating range at full power (20dBm)  |  100m  |  100m  600m at 9600bps 1000m at 2400bps  |  1800m at 1200bps  |Clear line of sight between modules under ideal conditions  | 
-31mS + 
-Serial port baud rate +Note: Loopback test time delay means the round trip time taken for data that is sent to the input (RxD pin) of one module, to begin to emerge from the output (TxD pin) of the same module, where a second (remote) module has been configured with the TxD and RxD pins connected together. 
-9600, sending one byte + 
-Loopback test +=== Module Parameter Setting AT Commands === 
-time delay 2 +AT commands are used to set module parameters and switch between module functions when the module is in command mode. After being set, these changes 
-31mS Serial port baud rate +will become valid only after exiting from command mode. Parameters are stored in onboard non-volatile flash memory, so will not be lost when power is removed. 
-9600, sending 10 bytes +
-Operating +
-range at full +
-power (20dBm) +
-100m 100m +
-600m at +
-9600bps +
-1000m at +
-2400bps +
-1800m at +
-1200bps +
-Clear line of sight +
-between modules under +
-ideal conditions +
-Note: Loopback test time delay means the round trip time taken for data that is +
-sent to the input (RxD pin) of one module, to begin to emerge from the output +
-(TxD pin) of the same module, where a second (remote) module has been configured +
-with the TxD and RxD pins connected together. +
-Module Parameter Setting AT Commands +
-AT commands are used to set module parameters and switch between module +
-functions when the module is in command mode. After being set, these changes +
-will become valid only after exiting from command mode. Parameters are stored in +
-onboard non-volatile flash memory, so will not be lost when power is removed.+
 (1) Entering command mode (1) Entering command mode
 There are two ways to enter command mode: There are two ways to enter command mode: