Technology

DIY Sub Uses Color Vision to Avoid Objects

DIY autonomous – A DIY submarine built by Ayman is going underwater with an unexpectedly simple superpower: color-based object avoidance. Powered by a Raspberry Pi 4 and an Arducam IMX708 camera, it steers and controls ballast with a mix of ESP32 and motor hardware while track

For a machine to make sense of the ocean, it has to do more than just move. It has to notice what’s out there. decide what it should steer away from. and do it without the luxury of a clear view—or reliable communication. In Ayman’s DIY build. that challenge is met with a transparent-looking acrylic body. a camera watching the water ahead. and a navigation routine that turns color into a steering rule.

The submarine’s main structure is built around a clear acrylic tube, sized for a DIY craft. It’s carefully sealed to prevent water ingress, including a magnetic coupling used for the propeller. That design choice matters underwater: once the sub is sealed. the hardware inside has to handle the rest of the work without room for mistakes.

Inside the craft, the brains start with a Raspberry Pi 4 paired with an Arducam IMX708 wide-angle camera. To keep the submarine aware of how it’s moving. the system also includes a BNO085 inertial measurement unit and two BMP280 pressure sensors—used to track motion and the sub’s vital signs. A DRV8833 motor controller handles the main drive motor.

Movement and steering don’t rest on the Pi alone. An ESP32 takes on motor and servo control for steering. along with ballast control—powering the mechanisms that let the sub sink and rise. The buoyancy system uses two ballast tanks built from 5 mL syringes, driven in and out with high-torque output gear motors.

Communication is handled in a practical way: the craft uses an antenna buoy so communication can be maintained when it’s within a certain range of the surface. That means the underwater vehicle can operate while submerged, but still return to a usable link when it comes up near enough to the buoy.

The most distinctive part of the build is the autonomous navigation code. Ayman wrote simple object avoidance routines that rely on the Raspberry Pi’s camera. Instead of treating every pixel the same way. the code tracks objects by HSV values—using hue. saturation. and value—to identify colored targets to avoid. The choice is deliberate: HSV tracking is described as more reliable than RGB because it can track color in a largely brightness-independent manner.

It’s a small set of software tricks. but it’s exactly the kind of approach that makes autonomy feel possible in a place where humans can’t easily reach in and take over. And seeing a transparent submarine glide through water naturally draws comparisons to earlier DIY ambition. including the Open Source Underwater Glider that won the 2017 Hackaday Prize.

A video of the build shows the concept in motion as the sub navigates by its own color-based rules—camera, sensors, steering, and ballast all working together as it moves through the water with minimal help.

autonomous submarine DIY sub Raspberry Pi 4 Arducam IMX708 HSV color detection object avoidance BNO085 IMU BMP280 pressure sensors ESP32 ballast control DRV8833 motor controller

Leave a Reply

Your email address will not be published. Required fields are marked *

Are you human? Please solve:Captcha


Secret Link