title: Methods for detecting liquid drops with phototransistor
body: <p>ECE people: I have a simple circuit with an LED pointing at a phototransistor. There is a tube in between them that drops of liquid will drip through at random times. I am reading the voltage with an Arduino at the emitter as it drops when the LED is occluded.</p>
  
  <p>Non-ECE people: I am reading in near constant values every time through the Arduino loop. Every once in a while this value may change for some unknown number of loops. I want to increment a counter every time this happens and avoid multiple counts.</p>
  
  <p>I have tried a few methods of my own (e.g. averages last some number of values and checking for different averages) but they seem to be pretty unstable. I'm not an expert at signal processing or anything, but I was wondering what some good methods/algorithms would be for this kind of thing. Any help would be appreciated. Thanks!</p>