Introduction
This is an underwater ultrasonic obstacle avoidance sensor specifically designed for underwater applications. It operates on a wide voltage range of 5-24V and features compact size, minimal blind spots, high precision, and high protection. Its underwater measurement range is from 5-600cm.
With an IP68 protection rating, this sensor can replace a camera for obstacle avoidance and meet the requirements of normal underwater navigation speeds. By using this obstacle avoidance sensor, underwater vehicles can achieve true "unmanned driving" without the need for human observation. Even at a depth of 10m, obstacle avoidance can still be easily accomplished.
Thanks to its small size and minimal blind spots, this sensor takes up minimal space and can be easily integrated into various projects.
Application Scenarios
- Underwater robot obstacle avoidance and self-control detection
- Measurement of water depth by underwater robots
Features
- Compact in size, with a small blind zone
- Lightweight and fast response time
- Waterproof level of IP68
Specifications:
- Measurement Range: 5-600cm
- Measurement Accuracy: ±(0.5+S* 0.5%)cm@<2m, ±(1+S* 1%)cm@>2m
- Operating Voltage: 5-24V
- Standby Current: ≤1mA
- Operating Current: ≤10mA
- Output Mode: UART controlled
- Power-on Startup Time: ≤500ms
- Output Response Time: 14ms
- Angle: 8-16°
- Operating Temperature: -15~50°C
- Storage Temperature: -25~80°C
- Storage Humidity: 65%~90% RH (non-condensing)
Board Overview
Num | Label | Description |
---|---|---|
Red line | VCC | power supply input positive pole |
Black line | GND | power ground wire |
Yellow line | RX | UART receiving data line |
white line | TX | UART transmitting data line |
Dimensional Drawing
Output Format
1、communication instructions
Interface | Baud rate | Data bit | Stop bit | Check bit |
---|---|---|---|---|
UART | 115200bps | 8 | 1 | None |
2、Timing diagram
Note: T1 ≥ 19ms; T2 ≈ 13ms
3、UART output format
Frame data | Output data | Description | Bytes |
---|---|---|---|
Frame header | 0XFF | Frame header, fixed as 0XFF | 1 byte |
H_DATA | 0X07 | Higher 8 bits of distance data | 1 byte |
L_DATA | 0XA1 | Lower 8 bits of distance data | 1 byte |
SUM | 0XA7 | data checksum | 1 byte |
SUM= (header+Data_H+ Data_L)&0x00FF
=(0XFF + 0X07 + 0XA1)&0x00FF
=0XA7;
Distance value = DATA_ H * 256+DATA_L = 0x07A1;
Decimal conversion is equal to 1953;
Tutorial
Requirements
- Hardware
- DFRduino UNO R3 (or similar) x 1
- Ultrasonic Ranging Sensor(3m) x1
- Software
Connection Diagram
Note: the sensor needs to be put into water to get data, otherwise the output distance value is 0
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(115200);
mySerial.begin(115200);
}
void loop() {
mySerial.write(COM);
delay(100);
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("mm");
}
}
}
}
Expected Results
Put the sensor into the water, and if there is an obstacle in front, the distance between the sensor and the obstacle will be printed by serial port.
FAQ
For any questions, advice or cool ideas to share, please visit the DFRobot Forum.