Introduction
This is a small-angle ultrasonic ranging sensor that uses intelligent signal processing circuits, built-in high-precision algorithms, and a measurement range of 25-800cm. It has the characteristics of small blind spots, high precision, fast response, and low power consumption.
The sensor has an IP67 protection level and an onboard temperature compensation function, which can automatically correct temperature deviations and can stably measure distances from -15°C to 60°C. Ultrasonic ranging is not affected by the color, transparency, and material (metal, non-metal) of the detected object, and is suitable for various humid and harsh measurement environments.
The sensor has a maximum measurement angle of about 15°, a small beam angle, and is not affected by the environment. It can still measure obstacles in a narrow environment and can be used in scenarios such as smart manhole cover water level detection, reservoir water tank liquid level detection, river water level detection, and small-angle horizontal detection.
Features
- 25cm small blind area
- 15° FOV small angle
- High precision, low power consumption, fast response
- IP67 protection level, with temperature compensation, strong anti-interference
Specifications:
- Working voltage: DC3.3~5V
- Quiescent current: <10uA
- Working current: <15mA
- Measurement distance: 25~800cm
- Measurement accuracy: ±2cm
- Measurement resolution: 1cm
- Probe frequency: 40khz
- Output mode: UART controlled output
- Angle: 15°
- Response time: 0.9~2.5S
- Working temperature: -15~60°C (with temperature compensation)
- Storage temperature: -25~70°C
- Protection level: IP67
Board Overview
Num | Label | Description |
---|---|---|
Red line | VCC | power supply input positive pole |
Black line | GND | power ground wire |
Blue line | RX | UART receiving data line |
Green line | TX | UART transmitting data line |
Dimensional Drawing
![Dimensional Drawing](https://img.dfrobot.com.cn/wiki/5ea64bf6cf1d8c7738ad2881/0fc37eb267040d078b723695ed5ca03a.png)
Output Format
1、communication instructions
Interface | Baud rate | Data bit | Stop bit | Check bit |
---|---|---|---|---|
UART | 9600bps | 8 | 1 | None |
2、Timing diagram
Note: T1>2.5s, T2=0.9~2.5s; RX falling edge trigger pulse width is recommended to be between 10us-2ms
3、UART output format
Frame data | Output data | Description | Bytes |
---|---|---|---|
Frame header | 0XFF | Frame header, fixed as 0XFF | 1 byte |
H_DATA | 0X01 | Higher 8 bits of distance data | 1 byte |
L_DATA | 0XA1 | Lower 8 bits of distance data | 1 byte |
SUM | 0XA1 | data checksum | 1 byte |
SUM= (header+Data_H+ Data_L)&0x00FF
=(0XFF + 0X01 + 0XA1)&0x00FF
=0XA1;
Distance value = DATA_ H * 256+DATA_L = 0x01A1;
Decimal conversion is equal to 417,Indicates that the currently measured distance value is 417cm.
Tutorial
Requirements
- Hardware
- DFRduino UNO R3 (or similar) x 1
- Small Angle Ultrasonic Ranging Sensor-8m x1
- Software
Connection Diagram
![Arduino Wiring diagram](https://img.dfrobot.com.cn/wiki/5ea64bf6cf1d8c7738ad2881/ceb40c5e56a9e42a1c6ae885eb8f147b.png)
Sample Code
#include <SoftwareSerial.h>
unsigned char buffer_RTT[4] = {0};
uint8_t CS;
#define COM 0x55
int Distance = 0;
SoftwareSerial mySerial(7, 8);
void setup() {
Serial.begin(9600);
mySerial.begin(9600);
}
void loop() {
mySerial.write(COM);
delay(10);
if(mySerial.available() > 0){
delay(4);
if(mySerial.read() == 0xff){
buffer_RTT[0] = 0xff;
for (int i=1; i<4; i++){
buffer_RTT[i] = mySerial.read();
}
CS = buffer_RTT[0] + buffer_RTT[1]+ buffer_RTT[2];
if(buffer_RTT[3] == CS) {
Distance = (buffer_RTT[1] << 8) + buffer_RTT[2];
Serial.print("Distance:");
Serial.print(Distance);
Serial.println("cm");
}
}
}
}
Expected Results
If there is an obstacle or liquid in front of the sensor, the serial port prints out the distance value between the sensor and the obstacle or liquid.
![Arduino串口打印数据图](https://img.dfrobot.com.cn/wiki/5ea64bf6cf1d8c7738ad2881/f33465b63989cacbe713f51da4f9642b.png)
FAQ
For any questions, advice or cool ideas to share, please visit the DFRobot Forum.