We use some essential cookies to make our website work.

We use optional cookies, as detailed in our cookie policy, to remember your settings and understand how you use our website.

Sensea underwater camera — Raspberry Pi Official Magazine #170

The latest issue of Raspberry Pi Official Magazine — out now — features this Raspberry Pi 3–based underwater camera that investigates water quality and organisms.

Unboxed STEM Club consists of three friends aged 10 to 13 who meet up each weekend, along with two enthusiastic dads. The boys’ defining approach is to ask lots of questions, “look at problems as connected puzzles with many possible answers”, and keep trying hands-on solutions even if things go wrong at first.

The airtight tube houses a Raspberry Pi 3 Model B+ and a Raspberry Pi Camera Module 3 on a custom 3D-printed base, plus a temperature sensor

Pinak, Vihaan, and Yuvan, along with their mentors Kshitij Varma and Dr Amol Patil, were excited by the idea of tackling a hands-on science, engineering, and coding project. They were inspired by the fact that we often talk about protecting oceans and rivers, but rarely have the tools to measure what’s happening below the surface and in the depths.

Raspberry Pi had huge appeal as a compact computer that they could write code for themselves, connect to a wide variety of sensors, and use to directly control a Camera Module. Although they hadn’t used Raspberry Pi for STEM Club projects before, they realised it was an obvious choice for their citizen science aims, particularly as it came with an impressive online resource: thousands of willing and helpful fellow Raspberry Pi users. The fact that the whole build would come in at around £130 and could largely be built by the boys, with minimal adult supervision, set it apart from most underwater explorers in terms of both complexity and cost. 

What lies beneath?

Sensea was conceived as “a low-cost DIY underwater explorer that would reveal what’s going on below the surface of our local ponds and rivers”, proving that you don’t need expensive equipment to investigate the depths. For context, the boys’ agitated pleas for a GoPro fell on deaf ears, so they built a custom camera rig instead, based around Raspberry Pi 3 Model B+. Not only was this solution more affordable, but it also had the advantage of low power consumption, running off a standard 5V USB power pack for longer. The team hoped the project might catch the imagination of other hobbyist makers, so these were important practical considerations. 

The most important aspect of all was how to keep the electronics dry. The container needed to be completely waterproof at all times while still allowing the sensors to measure the surrounding water and the camera to see clearly. It also needed to be opened and resealed to insert delicate sensors and rechargeable batteries, which made for quite the engineering challenge.

The team designed a sealed acrylic tube that acts as a transparent pressure chamber, keeping the electronics dry while allowing the camera to see through its end cap. One end is permanently sealed with a 10.5cm acrylic disc bonded using marine epoxy. A waterproof cable gland is drilled through this end, allowing the DS18B20 temperature probe cable to pass through while maintaining a watertight seal. At the other end is an expanding drain plug of the sort used by plumbers to check for leaks. 

Rather than using propellers, Sensea sinks to the river or lake bed using a 2kg dumbbell as ballast

The setup proved reliable and, crucially, dependably waterproof. Nonetheless, Sensea’s makers implemented a leak test regime that sees the fully sealed Sensea tube and cable submerged in a bucket of water for five minutes, to check for rising bubbles. Once this critical test is complete, the tube is lowered into the water in its protective cage. 

Getting the buoyancy and descent right was another challenge. A 2kg bone-shaped dumbbell, selected after many experiments with size and weight, ensures the Sensea sinks beneath the river surface, ready to start recording what its Raspberry Pi Camera Module 3 can see.

Exploring the murky depths

The Camera Module captures 10-second underwater video clips and logs time-stamped water temperature readings from a waterproof DS18B20 sensor. The team settled on a manual fixed focus, since autofocus was likely to struggle when encountering suspended particles in the river. “Fixing the focus gives much sharper and more stable footage,” they explain.

Unboxed STEM Club: The club comprises three young makers, and their adult mentors, who enjoy coding, science, and engineering

The setup also includes a PCF8523 real-time clock that records accurate time stamps even without an internet connection. Video capture is triggered via a Python script called sensea_logger.py, which also measures the water temperature and ensures everything is written to Raspberry Pi’s microSD card for post-submersion retrieval. 

For their initial deployments, the team compared temperature measurements from the River Cam and a nearby lake called Todd’s Pit, clearly revealing differences between the two environments. Future additions may include a pH sensor for pollution monitoring, a depth or pressure sensor, and even AI-powered species identification. A similar setup could be used to monitor air quality, greenhouse conditions, or surface water from a floating buoy. Since we met the boys, the project has gone on to win Instructables’ Sensors Contest. Congratulations on a richly deserved win.

Issue 170 of Raspberry Pi Official Magazine is out NOW!

This article appeared in issue 170 of Raspberry Pi Official Magazine, which you can access online. You can also subscribe to the print version of our magazine. Not only do we deliver worldwide, but those who sign up to the six- or twelve-month print subscription will receive a FREE Raspberry Pi Pico 2 W!

You can find Raspberry Pi Official Magazine on Facebook, X, Threads, LinkedIn, and Mastodon. You can also contact the team via email: [email protected]

No comments
Jump to the comment form

Leave a Comment