HC Radio Modules: Difference between revisions

From Smithnet Wiki
Jump to navigation Jump to search
Line 84: Line 84:
|+ Power Settings
|+ Power Settings
|-
|-
|Setting Tx
|Setting Tx || 1 || 2 || 3 || 4 || 5 || 6 || 7 || 8
|1
|2
|3
|4
|5
|6
|7
|8
|-
|-
|Power
|Power
| -1 dBm<br/>(0.8&nbsp;mW)
| -1 dBm<br/>(0.8&nbsp;mW) || 2 dBm<br/>(1.6&nbsp;mW) || 5 dBm<br/>(3.2&nbsp;mW) || 8 dBm<br/>(6.3&nbsp;mW) || 11 dBm<br/>(12&nbsp;mW) || 14 dBm<br/>(25&nbsp;mW) || 17 dBm<br/>(50&nbsp;mW) || 20 dBm<br/>(100&nbsp;mW)
|2 dBm<br/>(1.6&nbsp;mW)
|5 dBm<br/>(3.2&nbsp;mW)
|8 dBm<br/>(6.3&nbsp;mW)
|11 dBm<br/>(12&nbsp;mW)
|14 dBm<br/>(25&nbsp;mW)
|17 dBm<br/>(50&nbsp;mW)
|20 dBm<br/>(100&nbsp;mW)
|}
|}



Revision as of 08:08, 15 May 2024

HC-12

  • Serial port to 433 MHz Tx/Rx
  • Range up to 1 km in free space at 5 kbps
  • Max working current (Tx): 100 mA
  • Default: FU3, 9600 bps (8 bit, NP, 1 SB), Ch 001 (433.4MHz)
  • Frequency rage extends beyond LPD433 and PMR446
    • Min frequency (Ch 001): 433.4 MHz (λ/4: 0.173 m)
    • Max frequency (Ch 100): 473.0 MHz (λ/4: 0.159 m)
    • Channel Step: 0.4 MHz

Note: 70 cm band: 430 - 440 MHz

Pin Function Description
Pinouts
1 Vcc 3.2 - 5.5 V. 4.5 V recommended for continuous operation.
2 Gnd Ground
3 Rx UART input with internal pull-up
4 Tx UART output with internal pull-up
5 Set Pull low to enter setup mode: send AT commands to Rx

Modes

FU1 mode is relatively power saving mode, and the idle working current of this mode is about 3.6 mA. In this mode, the module can also set eight types of serial port baud rate.

FU2 mode is power saving mode, and the idle working current of this mode is about 80 μA. In this mode, the module only supports baud rates of 1200 bps, 2400 bps and 4800 bps, and the baud rate in the air is uniform, 250000 bps.

FU3 mode: the baud rate in this air can be automatically adjusted according to baud rate of serial port, and the communication distance will be the farthest at the low baud rate:

FU4 mode: 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 5000bps.

Transmission Rates (bps)
UART 1200 2400 4800 9600 19200 38400 57600 115200
In-air 5000 5000 15000 15000 58000 58000 236000 236000

AT Commands

  • Puldown Set line
  • Wait 40 ms
  • Enter AT commands below
  • Release pulldown
  • Any changes are activated within 80 ms
  • NOTE: if Set is pulled low before power on, 9600 8N1 is always used for AT commands

Test, should return "OK":

AT

To set serial rate (eg 57600):

AT+B57600

To change wireless command channel to 10 (001 to 127 available, but range not guaranteed for channels > 100):

AT+C010

That is, for channel C, the frequency (MHz) is given by:

To change mode (eg FU2):

AT+FU2

To change Tx power (1-8, 8 is default, maximum 20 dBm):

AT+P5
Power Settings
Setting Tx 1 2 3 4 5 6 7 8
Power -1 dBm
(0.8 mW)
2 dBm
(1.6 mW)
5 dBm
(3.2 mW)
8 dBm
(6.3 mW)
11 dBm
(12 mW)
14 dBm
(25 mW)
17 dBm
(50 mW)
20 dBm
(100 mW)

To read value (B, C, F or P)

AT+RB

To read all parameters

AT+RX

Set data bits, check bit and stop bit of serial port communication. For check bit, N means no check, O means odd check, and E means even check. For stop bit, 1 means one stop bit, 2 means two stop bits, and 3 means 1.5 stop bits. To send serial port format to be eight data bits, odd check, and one stop bit, send:

AT+U8O1

Report Firmware version:

AT+V

Enter sleep mmode:

AT+SLEEP

Put into default settings:

AT+DEFAULT

Put into mode to receive firmware update:

AT+UPDATE