ULN2003

I use this IC for detecting water presence in a pit. It's wastewater. There is everything, but not clear water. Wires are some 15m long, so there is some resistance. Now, the problem is not if I put the end of the wires in water, the problem is when I put that end in that filthy water. Not much conductivity in it.

If I connect the output of the IC line back to another input? Should it increase the output?

Filthy water should be a very good conductor amongst types of water, due to the salt content.

That is the least of your concerns, but put a capacitor (not electrolytic, at least 1 µF) in series with at least the "active" sensor electrode to avoid electrolysis.

There is some greasy stuff in it. Like oil or what... That is why I thought the solution would be to make two turns through a ULN2003.

PS. Odd choice of IC... What would be the IC of your choice?

who_took_my_nick: That is why I thought the solution would be to make two turns through a ULN2003.

This is making very little sense. Please post a circuit diagram. A photo of a pencil sketch will do.

You can probably measure the presence of water but you probably need something higher impedance than a ULN2003. There are water/moisture sensors that work with the Arduino (which has a very high impedance CMOS input).

Deionized water ("pure water") has very little conductivity and typically "dirty water" has higher conductivity (lower resistance). But of course, that depends on the nature of the contamination. And, your "clear water" may not be as pure as you think. ;)

A long time ago I saw some kind of "supercomputer" that was cooled by submerging the circuit boards in Di water!

. Now, the problem is not if I put the end of the wires in water

You may need more surface area than "wires" to get more contact area with the water. The more contact area, the lower the resistance.

You could use this. I got some (a bag of 5 for about £3) a couple of years ago to shut down some equipment I was making if a tank overflowed or leaked. Worked very well, but very sensitive - you have to dry the sensor board after it gets wet, to kill the alarm (there is an on-board sensitivity adjusting control). You could substitute different sensors - a couple of 100mm bare wires 3mm apart would probably work for dirty water.

Some sort of Op-amp.

But an Arduino would do it directly, likely using the internal pullup.

Note that for long-term use you really need to isolate the electrodes from DC with a capacitor, and then you need the Arduino to control the sensor bias on and off.