How to Make an Arduino Water Detection Alarm
This lesson will explain how to make a simple water detection alarm using an Arduino.
Breadboard Layout:
Arduino Code for Simple Water Detection Circuit:
/*Make a tone on your Arduino using an external 8-Ohm speaker YOU WILL NEED: 8-ohm speaker 100-Ohm Resistor 2 jumper wires / 2 alligator clips CIRCUIT: 100 Ohm resistor connected Arduino Pin 8 Other side of resistor connected to the positive terminal of the speaker Negative terminal of the speaker connected to Ground This code is in the public domain */ void setup() { pinMode(8, OUTPUT); //The Speaker is attached at this pin }//close setup void loop() { //Tone takes three arguments tone(pin, frequency, duration) tone(8, 2000, 1000); //The loop does not wait for the tone to finish, so lets delay to here 2 seconds to hear //one second of noise and one second of silence - essentially a beep delay(2000); }//Close Loop
If it tells you when there is water, it should also let you know when there is no water by reversing the button code. Is this statment correct?
That would be correct!
This is really bad. This circuit can’t overcome the resistance of water. I suspect you didn’t try this.
It depends..
Condensed water (from an AC unit for example) will not conduct immediately.. however it’s also a solvent and will partially break down any metals it comes in contact with and eventually conduct. One “solution” (pardon the pun) would be to put some salt between your leads. This would make the puddle conductive.. and after drying out would stop conducting.. and the next water puddle (if not fully washed away) would conduct again. You might need to occasionally replenish this consumable.
For me.. I’m measuring well water and ground water leaking in from the ground.. so mine would be hard already, and so conductive.
Why is the 10k ohm resistor used?
On the YouTube video, this question was asked, and the answer was “Because the current would be so high and will probably burn the speaker but when a resistor is added the current decrease”
My dad used to have a water detector that was kind of expensive, but one time use, making me think there was some material that dissolved, triggering a loss of material alarm. Or a conductive material that melts or dissolves in water.
You’ll also want to define pin2 as in INPUT.
Whenever I try to conduct the water, it doesn’t detect it. But, it detects when I touch metal. How can I make it so that it will detect water properly?
same situation here