1
\$\begingroup\$

I am building a water leak detection sensor using some probes I found on the internet. I want to use a comparator to indicate when a leak has been detected (probes are shorted due to water contact). If the voltage goes below 2.5V, then an indicator LED will turn on and a signal will be sent to a micro-controller for some additional functionality. I want to know if in my design, I can combine the voltage dividers for the comparators since they are being used over and over, and add additional components + board space. Is there anything wrong with doing this? Any advice on my design will be great.

Schematic for leak sensor

\$\endgroup\$
1
  • \$\begingroup\$ You can do what you want with just a single voltage divider and comparator per probe. For example just take the U1A and label its output as OUT1. In case you need OUT1 as 3.3V signal, just connect 3.3V to top of R3. \$\endgroup\$ Commented Oct 29 at 4:58

1 Answer 1

2
\$\begingroup\$

No problem combining the reference voltages, actually preferred since resistor tolerances mean that four separate dividers will have four different output voltages (not a big deal in your case). Might be a good idea to make it a potentiometer so you can adjust the trip point.

You can sink the LEDs directly into the outputs of the comparators, no transistor necessary (you still need a resistor). You should also be able to use the output to signal the microprocessor, I.e. you don't need a comparator for the LED indication and one for the signal to the microprocessor.

Hysteresis might be a good idea to prevent rapid output transitions around the trip point. I don't know what your sensor's output is but, in general, slowly-changing analog values benefit from a touch of hysteresis. Get a comparator with some built in, put a resistor network on your existing comparators, or do it in firmware.

It might just be better to run the LEDs from spare I/O on your micro if you have the pins.

\$\endgroup\$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.