HC Radio Modules: Difference between revisions
NickPGSmith (talk | contribs) m (1 revision imported) |
NickPGSmith (talk | contribs) (→HC-12) |
||
(10 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
[[File:HC-12.jpg|thumb]] | [[File:HC-12.jpg|thumb]] | ||
* [https://www.elecrow.com/download/HC-12.pdf?srsltid=AfmBOopdWWGrtoRoLb8zyAgqlGb-eQ7veh3K9DtMOk7THwUjOaHWPP09 Manual] | |||
* Serial port to 433 MHz Tx/Rx | * Serial port to 433 MHz Tx/Rx | ||
* Range up to 1 km in free space at 5 kbps | * Range up to 1 km in free space at 5 kbps | ||
Line 11: | Line 12: | ||
** Max frequency (Ch 100): 473.0 MHz (λ/4: 0.159 m) | ** Max frequency (Ch 100): 473.0 MHz (λ/4: 0.159 m) | ||
** Channel Step: 0.4 MHz | ** Channel Step: 0.4 MHz | ||
* Firmware v2.6 | |||
Note: [https:// | Note: [https://rsgb.org/main/operating/band-plans/vhf-uhf/432mhz-band/ 70 cm band]: 430 - 440 MHz | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 25: | Line 27: | ||
|3.2 - 5.5 V. 4.5 V recommended for continuous operation. | |3.2 - 5.5 V. 4.5 V recommended for continuous operation. | ||
|- | |- | ||
|2 | |2 || Gnd || Ground | ||
|Gnd | |||
|Ground | |||
|- | |- | ||
|3 | |3 || Rx || UART input with internal pull-up | ||
|Rx | |||
|UART input with internal pull-up | |||
|- | |- | ||
|4 | |4 || Tx || UART output with internal pull-up | ||
|Tx | |||
|UART output with internal pull-up | |||
|- | |- | ||
|5 | |5 || Set || Pull low to enter setup mode: send AT commands to Rx | ||
|Set | |||
|Pull low to enter setup mode: send AT commands to Rx | |||
|} | |} | ||
Line 51: | Line 45: | ||
FU4 mode: useful for maximum range, up to 1.8km. Only a single baud rate of | 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 | 1200bps is supported, with the in the air baud rate reduced to 5000bps. | ||
{| class="wikitable" | {| class="wikitable" | ||
|- | |- | ||
|+Transmission Rates (bps) | |+Transmission Rates (bps) | ||
|UART | |UART || 1200 || 2400 || 4800 || 9600 || 19200 || 38400 || 57600 || 115200 | ||
|1200 | |||
|2400 | |||
|4800 | |||
|9600 | |||
|19200 | |||
|38400 | |||
|57600 | |||
|115200 | |||
|- | |- | ||
|In-air | |In-air || 5000 || 5000 || 15000 || 15000 || 58000 || 58000 || 236000 || 236000 | ||
|5000 | |||
|5000 | |||
|15000 | |||
|15000 | |||
|58000 | |||
|58000 | |||
|236000 | |||
|236000 | |||
|} | |} | ||
Line 85: | Line 63: | ||
* Any changes are activated within 80 ms | * Any changes are activated within 80 ms | ||
* NOTE: if Set is pulled low before power on, 9600 8N1 is always used for AT commands | * NOTE: if Set is pulled low before power on, 9600 8N1 is always used for AT commands | ||
* See Windows configurtion tool: [https://github.com/robert-rozee/HC-12-config HC-12-config] | |||
Test, should return "OK": | Test, should return "OK": | ||
Line 92: | Line 71: | ||
AT+B57600 | AT+B57600 | ||
To change wireless command channel to | To change wireless command channel to 20 / 441.00 MHz (001 to 127 available, but range not guaranteed for channels > 100): | ||
AT+C010 | AT+C010 | ||
Line 108: | Line 87: | ||
|+ 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 mW) | | -1 dBm<br/>(0.8 mW) || 2 dBm<br/>(1.6 mW) || 5 dBm<br/>(3.2 mW) || 8 dBm<br/>(6.3 mW) || 11 dBm<br/>(12 mW) || 14 dBm<br/>(25 mW) || 17 dBm<br/>(50 mW) || 20 dBm<br/>(100 mW) | ||
|2 dBm<br/>(1.6 mW) | |||
|5 dBm<br/>(3.2 mW) | |||
|8 dBm<br/>(6.3 mW) | |||
|11 dBm<br/>(12 mW) | |||
|14 dBm<br/>(25 mW) | |||
|17 dBm<br/>(50 mW) | |||
|20 dBm<br/>(100 mW) | |||
|} | |} | ||
Latest revision as of 10:55, 24 August 2024
HC-12
- Manual
- 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
- Firmware v2.6
Note: 70 cm band: 430 - 440 MHz
Pin | Function | Description |
---|---|---|
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.
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
- See Windows configurtion tool: HC-12-config
Test, should return "OK":
AT
To set serial rate (eg 57600):
AT+B57600
To change wireless command channel to 20 / 441.00 MHz (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
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