I've been working on a prototype for a while now but I can't seem to get the results I want. Want I want to do is the following. I have two bendable stems (like in a plant). I want to know how close they are together or how much they are strangled. The latest unsuccessful thing I tried was to connect one long wire to an output of one arduino and another wire to another arduino's input. The output of arduino is constantly set to high. The idea was to check whether the input of the second arduino picked something up if the wires we closer. It didn't... It simply showed a value of 1023 most of the time and every now and then value of 0. Maybe I could try something with sensor but it has to work omnidirectional. Also, later we have more then two stems and we also want to know which stems are closer to each other. I'm very curious about your ideas on this.
Here's a picture of an older prototype but it should make it a bit more clear what I'm trying to accomplish:
This is tricky. One way might be to wind a coil round each of the elements. Then excite one coil with a frequency of around 100KHz and use the other coil to receive the signal. Put the signal through a diode and a capacitor to ground with a resistor across it and feed that into one of the analogue input ports.
I would advise that you get hold of some test equipment such as an oscilloscope before you try and get it working.
Find the capacitive sensing library on the playground. There is also an explanation of capacitive sensing. Now, couldn't you just replace a human hand with a piece of metal? ( those bendable things are metal, right?)
It works through inductive coupling. One coil is energised and so sends out magnetic waves. The other coil is a pickup and converts the magnetic waves back into electricity. The coil is wound as a spiral over then length of the bendy thing. The received signal amplitude is a function of the distance between the coils.
It is rather like the way an RFID system works only you have access to the receiving coil with the arduion and you only need measure the received signals amplitude to give you a measure of how close they are to each other.
No it wasn't you had no AC going on at all and relied on a static field. that was never going to work.
My question was more about the setup.
Not sure what you mean about setup.
Coil 1 - driven by the arduino or free running oscillator at a fixed rate.
Coil 2 - one end ground the other end diode (anode) to the analogue input (cathode). Then resistor and capacitor in parallel from analogue input to ground. Just to make it safe from overload diode (anode) from analogue input to +5V (cathode).
The setup is simple. Getting it to work will require skill and an oscilloscope.