0
\$\begingroup\$

I have a long single strand aluminum wire. I want to use it with a microcontroller to detect water in the tank. I'll be putting one end of the wire inside water tank. Other end of the wire will be connected to a microcontroller to make decision if the first end of wire has come in contact with water. I know two wires can do this job fairly easily (by using one wire as Ground and the other for signalling) but I want to know how can I use a single wire to do the same job. Is it even theoretically possible? I want to detect just a 'zero' or 'one' corresponding to situations: wire 'is' and 'is not' in contact with water!

Edit: The tank and pipe are made of cement and stand on the ground.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Please edit your question to explain whether or not you have a metal tank and or metal pipework that is grounded. \$\endgroup\$
    – Transistor
    Mar 5, 2020 at 19:16
  • \$\begingroup\$ I guess: You have no possibility to complete a current loop by making the other contact to the water through the ground, metal tank or pipes. and a capacitive coupling is also impossible or useless due too strong interfering fields. Please, confirm or rectify! Specify also can you accept other than electric signal along the wire. \$\endgroup\$
    – user136077
    Mar 5, 2020 at 21:30

3 Answers 3

2
\$\begingroup\$

This logic might work, might not too. Give a try.

Try to read the capacitance of the wire with respect to the MCU ground. The wire will be floating, yes. To read the capacitance you can use the MCU ADC (microchip has a very good application notes on this).

Try using a dedicated proximity detection ICs from ATMEL or cypress. With proper calibration it might be possible to make it happen.

\$\endgroup\$
1
\$\begingroup\$

I don't recommend this (some isolation is a good rule of thumb between a uC's pin and a long wire exposed to the elements), but you could be able to detect.

Also, you won't need anything else but your (unspecified) microcontroller and something to power it. Most microcontrollers can drive their I/O pins high or low, or can activate a pullup resistor. You start by driving the pin connected to the wire (preferably by an optional series resistor) low. Wait a bit, then configure the pin to be an input, activate the pullup resistor, and count the CPU cycles it takes to get a logic high. (use a timer if you have one available)

How this works: there's a capacitance between your wire and the ground (or your device, whatever). When you activate the pullup resistor, you start to charge it slowly through your pullup resistor and the optional series resistor. The larger the capacitance the longer that time will be, which depends on the water. You could also make this a little bit safer by adding additional protection diodes to your pin towards the VCC and ground in opposite direction (so anything higher than VCC or lower than GND gets there instead, and not kill your chip).

Simple capacitive switches work similarly.

\$\endgroup\$
0
\$\begingroup\$

For electronic circuits to work, you always need a current to flow, and current only flows in complete loops. The current can be very tiny, but it must form a loop.

So with the single strand aluminium wire it is only possible to do the proposed measurement if the current flowing to the water tank can flow back to the microcontroller in a loop. It could flow back through water, earth or whatever is in between the water tank and your microcontroller.

Earth has a very high resistance and will only allow a very small amount of current to flow back, so the signal detection might be hard to do. But if you have metal pipes all the way from the tank to the microcontroller, it would be easy to do.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.