Copper/Wire Sensor. Advice?

I have to make a sensor that tells if a wire has come within a hair-width of a wire, which will be 22 gauge. It has to kick in at that point, or at least come to a noticeable threshold.

At first I thought a light/visual sensor would be best, but then it occurred to me there might be a better way. Metal detector? Mechanical Touch?

I'd like to avoid a mechanical / button solution, so any advice would be appreciated.

Have you considered something like this...
http://www.arduino.cc/playground/Main/CapSense

Thats actually pretty cool! I could probably tweak that to the sensitivity of a wire.

I've played with it just a little and have one helpful tip. In the diagram, there is an optional connection through a capacitor (CSENSED) to ground. That connection really helps. And, it does not have to be ground. Any large metal object seems to work well (I ended up using a metal filing cabinet).

Then it appears that might be the way. BTW- your name says "Tesla Member". What is that? I'm a big fan of Tesla's work :D.

Coding Badly:
In the diagram, there is an optional connection through a capacitor (CSENSED) to ground. That connection really helps. And, it does not have to be ground. Any large metal object seems to work well (I ended up using a metal filing cabinet).

How do you make the CSENSED capacitor connection? Is it a 100pF capacitor from the foil to GND? You can also put a 100pF capacitor from receive pin to ground. If the Arduino is connected to the Earth (e.g. desktop, USB wall adaptor) you can use the GND pin as a ground. http://arduino.cc/forum/index.php/topic,107133.0.html. Can Arduino CapSense be used as a proximity sensor for humans, if I use 5.4M ohms?

However...

Grumpy_Mike:
No you can get capacitance between any two connections.
The arduino capacitance sensor method is not very good, it is only a sort of demo.
To do it properly you need a controlled layout and an oscillator that changes with capacitance then you measure the frequency.

orangeman555:
BTW- your name says "Tesla Member". What is that?

A Tesla member is a 3 gold star member with 6250 - 9999 posts: Not a God member any more - #7 by DojoDave - Website and Forum - Arduino Forum

I can see how that would help, but that is not what the dotted-line capacitor is there for; it represents the sensed capacitance between the foil and the hand (or sufficiently grounded wire) that comes near it.

dkl65:
How do you make the CSENSED capacitor connection?

Sensor plate --> capacitor --> big metal object (essentially ground for this circuit).

Is it a 100pF capacitor from the foil to GND?

Excellent place to start. The capacitor value could probably be calculated but trying different values doesn't take take too long.

You can also put a 100pF capacitor from receive pin to ground. If the Arduino is connected to the Earth (e.g. desktop, USB wall adaptor) you can use the GND pin as a ground.

I believe USB is isolated from Earth. It definitely is if you're using a laptop with a two-connector adapter. If the subject (you) is not touching anything metal, the whole thing (Arduino, USB hub, computer) can become one big sensor (which can make getting it to work difficult).

Can Arduino CapSense be used as a proximity sensor for humans, if I use 5.4M ohms?

Absolutely.

Grumpy_Mike:
No you can get capacitance between any two connections.
The arduino capacitance sensor method is not very good, it is only a sort of demo.
To do it properly you need a controlled layout and an oscillator that changes with capacitance then you measure the frequency.

I absolutely agree. Arduino CapSense is fiddly; requires experimentation to get it working well.

dkl65:
A Tesla member is a 3 gold star member with 6250 - 9999 posts: Not a God member any more - #7 by DojoDave - Website and Forum - Arduino Forum

This is off-topic, but I had noticed I graduated from newbie to junior member, and I was wondering what the cutoff was. It looks like I'm over 1/2 to senior member (of course it gets harder the higher up you go).

Coding Badly:
I believe USB is isolated from Earth. It definitely is if you're using a laptop with a two-connector adapter. If the subject (you) is not touching anything metal, the whole thing (Arduino, USB hub, computer) can become one big sensor (which can make getting it to work difficult).

I meant an AC to DC adaptor 5V 1A that you plug into the wall outlet. It has a USB port. I use it to charge my RC helicopter. That should let the Arduino use the Earth as a ground (mains electicity is wired to Earth). Also, when I plug the Arduino into the desktop, there is 54 ohms between the Earth socket of a nearby wall outlet, and the GND pin.

If you use the metal filing cabinet as a ground, do you need to connect it to the GND pin?

I've been playing around with this. That particular solution (I haven't given up on it yet) senses a change of proximity when it occurs fast, but this application will have to sense a wire as it very gradually approaches and then make a gradual compensation (via stepper motor) to move the apparatus.
I was thinking of just relying on a mechanical solution after all, but it would have to be very very carefully created. I thought perhaps a light sensor to sense the "red" of the magnet-wire against a white background, but am unsure of that as well.

Thanks for the help though! I am enjoying the capsense package nonetheless.

Could you replace the wire with a plate and use an ultrasonic rangefinder?

Wire is too thin. But good idea in other instances. Going to just go a different route altogether.

Tactile sensing is also an option; it's a wire, so if it physically touches another wire then the other wire will be brought to the same voltage, which can be sensed. Of course I don't know what application you're going for so I can't give you much.