Sonar - Weber-State-Submarine-Project/Submarine GitHub Wiki
Introduction
This section documents the hardware implementation of the sonar sensors used in the autonomous boat project.
IP68 Sonars
The DFRobotics IP68 Waterproof Sonars were selected as the down and left-facing sonars due to budget constraints. These sonars measure up to 6 meters underwater and communicate via UART. However, some limitations were observed during usage. The sonar relies on receiving a sufficiently strong signal to determine valid distance readings, which caused it to only detect surfaces it was parallel to. This behavior led to difficulties in detecting deeper depths of the pool. On the ascent to shallower water, the sonar performed better due to stronger signal reflections.
DFRobotics IP68 Sonar Specifications
Parameter | Value |
---|---|
Measurement Range | 5–600 cm |
Measurement Accuracy | ±(0.5 + S * 0.5%) cm @ <2 m ±(1 + S * 1%) cm @ >2 m |
Electrical | |
Operating Voltage | 5–24 V |
Standby Current | ≤1 mA |
Operating Current | ≤10 mA |
Communication | |
Output Mode | UART controlled |
Performance | |
Power-on Startup Time | ≤500 ms |
Output Response Time | 14 ms |
Angle | 8–16° |
Environmental | |
Operating Temperature | -15~50°C |
Storage Temperature | -25~80°C |
Storage Humidity | 65%–90% RH (non-condensing) |
IP68 Wiring Information
The DFRobotics documentation contains an error in the RX and TX pin labels in the board overview. The corrected wiring is as follows:
Wire Color | Pin | Description |
---|---|---|
Red line | VCC | Power supply input positive pole |
Black line | GND | Power ground wire |
White line | RX | UART receiving data line |
Yellow line | TX | UART transmitting data line |
For additional implementation details, refer to the UART Communication and Distance Calculation code.
UART Communication Parameters
Parameter | Value |
---|---|
Baud Rate | 115,000 |
Sampling Rate | 11,500 |
Blue Robotics Ping2 Sonar
The Blue Robotics Ping2 Sonar was chosen as the front-facing sonar. While using only Ping2 sonars was preferred, budget limitations restricted the purchase to a single unit. The Ping2 Sonar is well-suited for underwater robotics and exploration applications. It was observed that the Ping2 could reliably provide readings while facing downward during depth transitions from shallow to deep water. However, it was designated for front-facing usage to support robot localization, making it unsuitable for depth sensing in this configuration.
Ping2 Sonar Specifications
Parameter | Value |
---|---|
Electrical | |
Supply Voltage | 4.5–5.5 V |
Logic Level Voltage | 3.3 V (5 V tolerant) |
Current Draw | 100 mA (typical) 900 mA (peak) |
Communication | |
Signal Protocol | TTL Serial (UART) |
Available Firmware Baud Rates | 115200 bps (default) 9600 bps |
Message Protocol | Ping Protocol |
Message Subsets | common, ping1d |
Software Development Libraries | Arduino ArduPilot (limited) C++ Python Rust |
Cable | |
Cable Used | BR-100452 |
Cable Length | 875 mm / 34.5 in |
Maximum Cable Length | 8 m / 26 ft |
Conductor Gauge | 24 AWG |
Wires | Black (Ground) Red (Vin) White (TX out) Green (RX in) |
Installed Penetrators | |
Device Side | M06-4.5mm-LC |
Cable End | M10-4.5mm-LC |
Acoustics | |
Frequency | 115 kHz |
Source Level | 198 dB re 1 uPa @ 1 m |
Beamwidth (-3 dB from peak) | 25 degrees |
Typical Minimum Range | 0.3 m / 1 ft |
Typical Usable Range¹ | 100 m / 328 ft |
Range Resolution | 0.5% of range |
Range Resolution at 100 m | 50 cm / 19.7 in |
Range Resolution at 2 m | 1 cm / 0.4 in |
Physical | |
Depth Rating | 300 m / 984 ft |
Temperature Range | 0–30°C / 32–86°F |
Weight in Air (w/ cable) | 187 g / 0.41 lb |
Weight in Water (w/ cable) | 100 g / 0.22 lb |
Mounting Bracket Screw Size | M5x16 mm |
Internals | |
Air Chamber O-Ring | AS568-030, Buna-N, 70A |
¹ Notes:
- "Waterfall range" refers to the maximum detection range for object reflections in water, not directly measured values.
Pinout Diagram
Description: This diagram provides a detailed pinout for the sonar and other connected hardware components. It specifies the connections between the Raspberry Pi GPIO pins, power sources, and sensors, ensuring accurate wiring for optimal functionality. Use this diagram as a reference during setup and troubleshooting.
Sonar Mount
Description: The sonar mount, designed by the HAFB LaunchPad team, securely attaches the sonar sensors to the boat, ensuring accurate positioning and stability.