Instructables

How do I use arduino's analog input?

I'm building a 'time fountain' and i'm planning to make the arduino know how many droplets of water are falling each second. My ideia was to get two wires, get them really close and when there was a drop of water the circuit would close. The problem is, how do i get arduino to get readings right out of this? 




                      o (droplet)
(positive) ---- ---- (analog input)

Pull the ADC input down with a 1Meg resistor. Read the ADC. When a droplet is detected the ADC output will read higher than 0.
Sowee (author)  steveastrouk1 year ago
I understand what you are saying but have no ideia how to build it. I wish i knew electronics more :(
iceng Sowee1 year ago
He, Steve, means ;
  • Buy five 1/4Watt  1megohm resistors.
  • Attach a single resistor to the ADC input pin
  • and to the Arduino's  negative supply = zero = ground
  •  
  • Save the other resistors to build up your immunity to this years flu
Sowee (author)  iceng1 year ago
Thank god i've bought 20! Didn't know they would come in so handy regarding this years flu.
Thanks for explaining!
bwrussell1 year ago
That's digital not analog. The input will read either high or low. Basically you're creating a switch.
Sowee (author)  bwrussell1 year ago
Thats the problem. I thought about this but I realized that as water doesnt conduct energy well, the 'switch' woudnt have the necessary power to be digital. So i went with analog so i could read small changes.
I see, I was under the impression that the force of the drop was causing two wires to make contact.
Plane clear water doesn't conduct very well. I suggest using salt water in the system so you get a more pronounced reading with each hit. Alternatively i'd use an optical end stop. Which is basically an IR LED and receiver in line. Or you can use any LED and a photo resistor. When the drop of water passed through it breaks the beam.

I use to have one of those faucet mounted water filters that would tell you when it was time to replace the filter by how much water has passed through it. It did this using a a small plastic screw in the tube that had a magnet in the middle. Outside the water line was a hall effect sensor that would detect the spinning of the magnet as the water passed through.

This project being a time fountain you can do all sorts of things to make this into a very interesting looking time piece. You could use a small water wheel attached to a rotary encoder.
Sowee (author)  mpilchfamily1 year ago
The optical end stop seems quite a nice ideia. I wouldnt even try using salt as it would corrode terribly the wires and my improvised water pump.
dalucero1 year ago
Question: does your circuit open everytime in between drips? I'm just imagining the two wires "holding on" to a droplet too long and the next droplet hits before the circuit changes state (opens).
Sowee (author)  dalucero1 year ago
Yes. The wires are positioned so that the drips open and close the circuit a hundred percent.