Water Leak detector/circuit


With some uncertainties regarding the sealing on the electronics enclose, i think it could be a smart thing to implement an water leak detector. I've checked the Cape schematics, and we have 2 ADC inputs we can use for this.

ADC4 and ADC5 on the Arduino mcu is not in use at the moment(as we dont use i2c atm.)

heres is a thread from the arduino forum that discuss a similar matter: http://arduino.cc/forum/index.php/topic,5961.0.html

Mechanicly i've thought of three posibilities for making the copper strip for the detector.

1. Use copper tape on each side at the very bottom of the vertical plate of the electronics structure.

Con: will not work when the structure is tilted..

the gap would then default be 3mm because of the acrylic thickness. the tape could also overlap slightly to give a smaller gap(higher sensitivity)

2: copper tape on each side of the right horizontal plate(opposite side of the servo).

Con: for best performance the notch at the bottom should be filled with a bit of acryl (maybe remove this notch in next revision?)

3. Two small vertical bits of tape on the "cable"endlid at the bottom of the tube.

Con: 1,cables connected to copper tape can conflict with moving electronics structure. 2. cables should be routed trough the 18-pin connector.

So.. any opinions? other thoughts?


You can soak a little sponge in slightly salty water and let it dry. Then stitch two wires through it to your Arduino. Press the sponge against the bottom of the housing and any water will soak into the sponge and with the salt it will trigger the alarm. The sponge also absorbs the water to reduce splashing when you recover the ROV.


These are some good ideas! I've also seen some ROVs use humidity sensors (you can find a large variety of these available available at places like Sparkfun that can talk to the OpenROV Cape). The advantage of humidity sensors is that they can detect even a small increase in moisture level which means you can catch the leak before it becomes a catastrophe! The values could be displayed with other telemetry data, and there could be an "Alarm Set" point that lets you know if the humidity goes beyond a specified value.



I liked the idea with the sponge! I think you could also combine both the copper tape on some locations and sponge on others, and paralell connect them.

for our purpose it not big need to know where the leak is, but catch it early.

The humidity sensor is also a great sensor for this. On some equipment on work we use the SHT11 thats similar to the SHT15 that sparkfun sells.

We had some problems that gave us false-positive readings because the container was closed in a bit to moisture enviroment, and when going outside the air inside condensated and we assumed it was a leak.

a fix for us was to flush the inside with dry nitrogen air.

this is very common in permanent subsea mounted equipment.


My Nauticam Camera UV housing use two pins close to each other for leak detection:

A detected leak triggers a beeping sound and red flashing led.

I can trigger/test it by touching the pins with a wet finger.


Moisture sensors are great! However you have to make sure they are sensitive enough to detect the most minute moisture increases; I've used humidity sensors in cold cold water which just makes the water vapor condense to the walls of the hull vs stay in the air (thus keeping the air mostly dry).


As Bjørn mentioned already in his answer, we could look at different solutions professional photo/video camera housing detect leakage.

Anyone else owning a housing for their DSLR? (Sadly, I don't)


I have used the same solution that Bjørn describes, regarding two pins close to each other on my home build ROV. For the OPENROV I have looked into the following setup:

5V will go through the resistor and keep D37 (or any other digital pin on the ROV PCB) HIGH. When water enters, GND will be in contact with the water detector cable and change the status of D37 to LOW. If the resistor is 10K the water detector will only work on saltwater. When using a 10M resistor it will react on clean water.

The simplest thing to do is to program the Arduino in the ROV PCB to flash/power a led inside housing when D37 is LOW position. Not sure if we will be able to see the light inside housing if is bright light outside housing. Its maybe possible to see some reflections of it.

Or it should be possible to get a warning in cockpit. I only know how to program Arduino (The old version 22 and lower, I'm unfamiliar the newer version that OPENROV is programmed in).

Do any see any challenges to build this into my 2.6 version?


Hi Kjetil:

Give it a try and see how it works!

As for software, it's relatively straightforward to get your sensor to register itself in the telemetry page on the right hand side of cockpit. You can look at the existing arduino software modules, and I believe that somewhere in GitHub Brian posted some notes as to how to convert an Arduino program to work in the OpenROV software environment.

If you want to make an explicit warning light in the cockpit, that's going to take a bit more work, since you will have to modify the cockpit JavaScript. You might want to file an issue in the OROV Github software page, and perhaps you can get people to help you with that. It might be nice to have a generic water leak warning light, that can get triggered by any of a number of sources, your sensor included.

Note that the 2.5 and 2.6 Controller boards have a slot for a Honeywell HH-5031 humidity sensor built on to the board. We've been so busy around the lab that we haven't even gotten to testing whether it works properly for leak detection- perhaps someone in the community can test it?



Thanks for the positive reply. I will look further into the details.

I know the the electronic part of it works with Arduino. Its just need to get the code working with the PCB. I will keep you posted.


Hi All:

I've added an issue in Github / OROV Software (#202) to add a flood indicator to the Cockpit UI software. Implementation of the actual detection hardware will still be up to the user.



Have made the modification on my battericap. Added one addition cable. Extended the milled slot by 2 mm to accommodate an additional cable.

Original batteri front acryl:

After modification with a 2mm drill bit

Drilled 2 X 1,5 mm holes only throug the back acrylic plate (same as the battery spring is glued to) Important to keep a good distance to the batteri connector.

Stripped 20 mm of a 100 cm cable

Installed the unisolated cable to the acrylic plate.

Pulled cable through the rest of the battery assy.

I will do the same on the other batteri assy and connect to the free pins on the D-25 connector.

Only thing missing is how to program the arduino on the ROV PCB.


Well done!

For programming, I would start by writing code on an Arduino Uno or Mega and testing the concept there, with a dummy battery tube. If you use a Mega, then the OROV controller will be software compatible. If you use an Uno, then you will have to change some addresses when you port the code over.

Once you have things working on an Arduino, it's pretty straightforward to load it onto the OROV controller, and have it push data to the telemetry stack.



Have tested the water detector with fresh water. The sensor is very sensitiv. It switches from high to low only by touching the water detector cable due to the 10Mohm resistor that is keeping the digital port HIGH. I need to dry off the water detector cable to get the signal off again.

I have tested with several resistor. The lower resistor that will still give signal on fresh water (at least my fresh water, this may be different from place to place) is 82Kohm. To be on the safe side, the resistor should be higher just to be sure that the water detector will function on fresh water. If you are only planning to use the OpenRov in seawater the resistor can be lowered to maybe 10 Kohm.

Video of test with the 82 Kohm resistor


Code that I have been using on the Arduino Mega board:

const int sensorpin = 42; // Water detector connected to pin 42
const int ledPin = 50; // Led connected to pin 50
int buttonState = 0;

void setup()
pinMode(ledPin, OUTPUT);
pinMode(sensorpin, INPUT);


void loop()
buttonState = digitalRead(sensorpin);
if (buttonState == LOW) // check if water detector pin i LOW. When water is detected pin will be LOW.
//10 M OHM resistor will keep pin HIGH when water is not present.
digitalWrite(ledPin, HIGH); // turn LED on:
digitalWrite(ledPin, LOW); // turn LED OFF:

Now I just need to figure out how to get my code into the OpenRov arduino, any suggestions?


If you can work in a bit of blotting paper or sponge as I mentioned above it server two purposes:

1) A sponge will stabilize any water that enters the housing so that it won't splash around as you (frantically) haul the ROV out of the water and open the housing. A piece of blotter at each end of a tube may tell you which end leaked if only one paper is wet.

2) If you put a tiny amount of salt on the paper by moistening it with salt water and letting it dry, then even very fresh water will easily trigger the alarm once it gets salty.