Water Level Sensor - Switching LED indicators

Discussion in 'The Projects Forum' started by boguwei, Mar 30, 2012.

  1. boguwei

    Thread Starter New Member

    Mar 29, 2012
    4
    0
    I'm trying to build an LED water sensor for a school project, and I want to do something like this:

    [​IMG]

    However (as I understand it, please correct me if I'm wrong) the above design poses a limitation in that once the light is on, all the lights before it are on as well. So if the water level is just above level C, LEDs for A, B, and C would be lit.
    Is there a way to add logic/wiring that would only have the highest level up LED on? So if the water level is just above level C, only the light LED for C lights up.

    Any suggestions will be greatly appreciated!
    Thank
     
  2. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    Use your sensors to enable constant current sources. pour all the currents into one resistor and have the 3914 chip sense the voltage across that resistor. The chip can be set to "dot" mode which only lights one LED at a time.
     
  3. boguwei

    Thread Starter New Member

    Mar 29, 2012
    4
    0
    I'm sorry, but I'm a newbie when it comes to circuits (first circuit class in college). And I'm a little confused.

    I get that the chip can be put to dot mode and selectively turn on an individual LED depending on voltage across a resistor, but what do you mean by pouring all the current into one resistor? I didn't really understand the attached block diagram.

    And also, what do you mean by "enabling constant current sources."
     
    Last edited: Mar 30, 2012
  4. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    That drawing is one of your 5 sensors enabling a pnp transistor set up as a constant current source. When any sensor transistor comes on, a fixed amount of current is allowed from the pnp transistor. Connect the 5 pnp collectors to one resistor so the voltage across that resistor goes up a "notch" for each consecutive sensor. Set up the 3914 chip so one notch of voltage turns on the next LED.
     
  5. boguwei

    Thread Starter New Member

    Mar 29, 2012
    4
    0
    Thank you!

    On a separate (but related note) for the same project:

    Suppose that I don't use the above sensor set up to measure tank water level (distilled water doesn't conduct well), but instead use a strain gauge measurement instead - i.e. a weight sensor of the tank.

    A strain gauge hooked up to something like a wheatstone bridge - instrumentation amplifier chain (described in attachment pg 2 & 4) will also give me a single voltage out that can be fed into the chip correct?
     
  6. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    Yes.


    ......
     
  7. wayneh

    Expert

    Sep 9, 2010
    12,123
    3,047
    Just to offer another idea: I think you could do this with a couple of comparators such as LM339 (4 comparators in one package, eight total). Each successive pair of sensor wires would provide input to a comparator. The only comparator that would light up is the one with water on one input (the "lower") and air on the "upper" input.

    As you've noted, it might be tricky to adjust the comparators to differentiate water from air, if the water composition is not fixed.
     
  8. boguwei

    Thread Starter New Member

    Mar 29, 2012
    4
    0
    That's why I thought of the alternate method of using a strain gauge weight measurement instead.
    My only question is how sensitive is the measurement of the sensor? Will the increasing "notches" in corresponding voltage be too small to be picked up by the chip?

    And I like the idea of using a comparator, but how would that be applicable in the strain gauge scenario? Would I need a calibrated voltage to compare against?
     
  9. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    You're off to another subject now.

    The measurement of the sensor must be "enough" because strain gauges are in use all over the world. Most of the "enough" is in the instrumentation amplifier. With a possible gain of a few hundred million volts per volt, you just dial it in with resistors.

    I don't like the comparator idea because it takes more parts. The LM3914 is chock full of comparators, has the resistance ladder built in, and has its own voltage reference, too!

    Distilled water is nearly impossible to measure as a resistance. One dirty fingerprint or a drop of sweat in a gallon can change its resistance by 100 to one.
     
  10. wayneh

    Expert

    Sep 9, 2010
    12,123
    3,047
    Very true, but as long as the water isn't extremely pure, we only need to differentiate it from air. Should work fine with most tap waters or other natural sources.

    I'm not so sure about the strategy of accumulating current and then measuring voltage as a surrogate for water level. Won't the current on each leg depend on the base current to the pnp transistor, which in turn depends on water conductivity, probe corrosion and surface area, and so on? In other words, 4 wet probes in salty water might conduct more than 5 sensors in tap water. The comparator approach relies only on seeing whether a sensor is wet or not.

    Never built either one, so just speculating.
     
    #12 likes this.
  11. KMoffett

    AAC Fanatic!

    Dec 19, 2007
    2,574
    230
    Be aware that circuits using "DC" current through the water will corrode the electrodes that are continuously submerged.

    Ken
     
    #12 likes this.
  12. #12

    Expert

    Nov 30, 2010
    16,284
    6,797
    @wayneh

    You're entirely right. In fact, one probe in salty water can pass more current than 5 probes in distilled water.

    and kmoffett is right too. That's why conductivity is measured with AC in high quality instruments.

    I had already done most of what was asked before "distilled water" was revealed in post #5 at which point OP immediately switched to the weighing method. No point in arguing with a correct choice like that, so I didn't.

    Still, it's good that you outlined the difficulties that OP was going to meet if he persisted with the submerged probe method. For that, a click on the "Thanks" button.
     
  13. wayneh

    Expert

    Sep 9, 2010
    12,123
    3,047
    Yeah, it's interesting how many water-level projects start with the idea of direct, conductive contact and end up somewhere else. I can't think of a single example I've seen in the "real world" of a conduction-based level indicator. I've personally used a long stick, sight-glasses, weight on a rope, and many other techniques in industrial scenarios. The more important the measurement, the simpler and less tech you get. Otherwise you're chasing calibration issues, programming details, and so on.
     
Loading...