描述
RCWL-1603 超聲波測距感測器模組 支援多種輸出 串口 PWM GPIO 輸出 帶溫補
The RCWL-1603 is an open ultrasonic ranging module with 3V-5.5V power supply. It contains a variety of working modes including UART, GPIO, PWM and UART AUTO OUT. Its temperature supplement adopts MCP9700 professional temperature measuring chip.
Features:
1>. 3V-5.5V wide voltage power supply.
2>. Ultra-wide measurement range of 2cm-500cm (measurement of flat wall).
3>. UART, GPIO, PWM and UART AUTO OUT.
4>. Provide temperature output (UART mode only).
5>. Standby mode (UART mode only).
6>. Temperature compensation.
7>. The SWIM interface of STM8S003 is set aside for module up grade.
8>. Lead-free process.
9>. Adopt the general environmental protection probe, can customize the use of high – quality reinforced environmental probe.
10>. Working temperature: -20 Celsius to 90 Celsius
Parameters:
No. | Parameter | Remark | Min. value | typical value | Max. value | Unit |
1 | Working voltage | 3 | 5.5 | V | ||
2 | 3.3V working current | 11 | 12 | mA | ||
3 | 5V working current | 10 | 11 | mA | ||
4 | Maximum detection range | Flat wall | 400 | 500 | 800 | CM |
5 | Working frequency | 40 | KHz | |||
6 | Blind area | 2 | 3 | CM | ||
7 | Detection accuracy | 士 2 | % | |||
8 | Resolution | 1 | mm | |||
9 | Detection Angle | Maximum directional Angle | ±15 | Degree | ||
10 | Output interface mode | UART/GPIO/PWM/UART AUTO OUT. | ||||
11 | Working temperature | Plastic shell probe (to be customized) | -20 | 60 | ℃ | |
12 | Working temperature | Aluminum shell probe | -20 | 90 | ℃ |
Pin Definition:
No. | Pin | Description |
1 | Vcc | 3.3V-5V power supply |
2 | Trig RX |
The GPIO mode is Trig, trigger signal. The UART/UART AUTO OUT mode is serial port RX. |
3 | Echo RX |
The GPI0 mode is Echo, feedback signal. The UART/UART AUTO OUT mode is serial port RX. |
4 | Gnd | Ground |
5 | Swim | Swim pin of the STM8S003 |
6 | MD/PWM | MD: Mode selection Before power on, the module is connected to ground, and then enter into setting mode after power on; Before power on, the module suspends, and then enter into working mode after power on. |
7 | Gnd | Ground |
8 | Rst | STM8S003 reset pin |
Mode Setting Operation:
Mode setting command:
No. | Command value | Return value | Description |
1 | 0X01 | 0XA1 | Serial Port Mode |
2 | 0X02 | 0XA2 | GPI0 mode, the same as HC-SR04 |
3 | 0X03 | 0XA3 | PWM output mode |
4 | 0X04 | 0XA4 | Automatic serial port output |
5 | 0X0F | Version | Output version |
Setting pin: MD/PWM
Baud rate: 9600 N 1
Operation:
— set the serial port mode
1>. MD/PD is connected to ground, can be connected with the ground foot.
2>. Power on.
3>. The baud rate of the PC terminal serial port is set to: 9600 uncheckbit 1 bit stop bit.
4>. Enter command value 0X01.
5>. The serial software will receive the set successful data 0XA1.
6>. Module setting is completed.
Model Definition:
1>. Serial port mode:
The serial port is connected with the module and input different commands to measure distance and temperature parameters.
Serial port mode command:
No. | Command value | Return value | Description |
1 | 0XC1 | Distance value BYTE1+BYTE2 | Hexadecimal distance value, BYTE is high pin |
2 | 0XC2 | Temperature BYTE1 | Decimal temperature value |
3 | 0XC3 | 0XC3 | Ranging part, power off |
4 | 0XC4 | 0XC4 | Ranging part, power on |
Operation:
–Test distance
A>. MD/PD pin suspends
B>. Module is powered on
C>. The baud rate is set to: 9600, no check digit, and 1 stop bit.
D>. Enter the command value and enter 0XC1.
E>. Serial software will receive data, such as 06,0C; the test distance is 1548mm.
–Test Temperature
A>. MD/PD pin suspends
B>. Module is powered on
C>. The baud rate is set to: 9600, no check digit, and 1 stop bit.
D>. Enter the command value and enter 0XC2.
E>. Serial software will receive data, such as 12; the test temperature is 12 Celsius.
2>. GPIO mode:
Consistent with HC-SR04 operation.Fully compatible with HC-SR04 command.
3>. PWM mode:
MD/PWM pin output with distance equal to the space ratio signal.
4>. AUTO GPIO mode:
The serial port always outputs the measured distance value, which is generally used for test modules.
5>. Version:
Serial port output version signal.