Arduino Sleeps till it detects water?

I am working on a project with my arduino pro mini that will be put in and out of the water and I am trying to find the best way to have my arduino sleep until it detects that it has been put into water then wake up and begin running the sketch.

Any suggestions?

Would a simple captive touch circuit work?


off course it will be in a sealed container!!!! but i want the sensors to only come on when it detects it has been placed in water....

Look up "rain detectors" or "moisture detectors".

You mean a sensor that is connected to the promini, yes?

If the water has some impurities in it, it might conduct enough to pull a pin with internal pullup low to start an interrupt and wake the processor. Give it a try.

Can you make a simple float switch that closes when the bottom part pushes up against the top when it hits the water? Or a magnet that pulls on a reed switch? Keep everything dry, no worries about electrolysis/corrosion.

Ok, let me give a little more detail of my project...

I am building a small robotic fish based on the ATMEGA 328. I want the fish to come on and swim automatically when it detects that it is in the water. Once it is out of the water it auto shuts off. I dont want to use a switch to turn it on and off but the presence of water to turn it on.

The water detection is the last circuit i need to incorporate into my design so i am trying to find the most efficient way to do this.

Thanks again for any help with this!

How about a tube with optical transmitter/receiver on opposing sides? When the fish hits the water, the tube fills and changes the optical properties, you sense that and react accordingly.

might work but sounds complicated!

There is a cheap fish called the AquaBot by HEXBUG that inspired this build. It has some sort of sensor with two probes, one on each side of the fish that does exactly what i want to do with my project.

you can touch both sensors with your finger and the fish swims or toss the fish into water and it comes alive and swims but once its out of the water it shuts off without switching a switch.

This is the type of water detection im looking to build into my project but was hoping for a little guidance on the best type of sensor that would detect water but also some guidance on putting the arduino in sleep mode but still monitor the water detection so it can kick on when it is in the water.

Thanks again for any help you can offer!

I’d try jremington’s suggestions then. Sealing the holes where the sense wires/probes stick thru will be important.
Going to sleep is easy. Waking up is easy if you can get the sensor to pull the hardware interrupt low.

I've had good luck with a project that just checks conductivity between two bare wires. Once water touches the wires, current flows. You can either have the arduino monitoring the two wires, as I did, or write a latching circuit that powers the arduino on when current flows.

I'll throw out one idea that may be beyond the scope of what you are trying to accomplish: If the project is battery powered and if the arduino is always on and monitoring the moisture sensor, you will have limited battery life. Kevin Darrah has a great tutorial on putting the Arduino in a deep sleep state for low power consumption and then waking it up here:

It should be possible to use the digital output of a standard moisture/rain sensor to wake up the Mini.