# Accurately detecting distance from current carrying wire

I am trying to find a way to accurately detect the distance from a stretched wire for alignment purposes (within 10um). I am not concerned with the absolute value of the distance, rather the repeatable indication that the apparatus is centered on the wire.

I came across the following question Arduino robot wire follower + how to position on wire, where @Marko Buršič wrote:

If wire is located in the middle, signals from both coils are in phase. You could measure the phase difference with phase comparator.

The above implies that if the wire is not located exactly between the coils there will be a phase difference which could be used to detect the offset from the wire. The problem is that I do not understand this statement. Shouldn't the flux generated by the current in the wire affect all coils in equally, i.e. the induced current in both coils have the same phase?

I could use just the amplitude of the induced current to center the apparatus but I am not sure I could get the required accuracy.

• Your text says "withing 10 micro meters". How thick is your wire and the size of the coils you think to use? – Oldfart Apr 26 '18 at 9:06
• How far can the wire physically move in absolute terms? Is it supported and straight? – Andy aka Apr 26 '18 at 9:10
• I was looking at using a 10mH inductor such as the 22R106. The the wire would be around 08-1.0mm in diameter. @Andy aka, the wire will be 3m long, supported at both ends (stationary) with enough tension to keep it straight. The sensor will be mobile and moving so as to find the center of the wire on a number of locations on the 3m stretch. – Deemoss Apr 26 '18 at 11:18
• I am not sure that is feasible with off-the-shelf components. I see many, many problems. e.g. your accuracy is ~1% of the wire diameter. I wish you good luck, I think you are going to need it. – Oldfart Apr 26 '18 at 11:32
• You really need to rethink this. A 1 mm dia wire supported at both ends is going to sag. I don't care how much tension you put it under, you're not going to get 10 micron accuracy, and I'd be really surprised if you get 1mm straightness over 3 meters. Furthermore, your coil assembly will need to be level to an astonishing precision. Let's say the plane of measurement is 10 cm from the wire. Then a 10 um error will be produced by a tilt of 0.1 mrad, or about 20 seconds of arc (and that's 1/200 of a degree). – WhatRoughBeast Apr 26 '18 at 12:25

The problem with Marko's previous answer is that there was no diagram.

Try this.

We are looking down the wire, which is the tiny dot in the middle. Let's assume it's carrying an AC current.

I've drawn two lines of magnetic field around the wire, a strong one close in, and a weaker one further out. The arrows are to show the instantaneous direction of the change of field.

There are two coils above the wire, close to centred on the wire, but offset a little to the left.

Assume both coils are connected in series, and are oriented the same way, let's say up.

The right coil has a positive voltage induced in it. The left coil has a negative voltage induced in it, as the field change is the other way round.

As the coils are almost centred, these voltages substantially cancel. If they were centred, then they would see equal fields, and cancel completely. As it's closer to the wire, the righthand coil sees a larger field than the left, and so there is a residual output voltage. If they were offset to the right, the output voltage would be the opposite polarity, as the left coil voltage would now be greater than of the right.

So when perfectly aligned, the output is zero. When misaligned, the phase of the output with respect to the phase of the current in the wire always gives the direction of offset.

The magnitude of the output is near zero for large distances, peaks when one coil is roughly over the wire, and changes from +peak to -peak more or less linearly as it moves from one to the other coil over the wire.

This gives you a method to control the sensitivity and 'capture distance'. A close coil spacing gives you a lot of gain when you are close to the wire, but it's fairly insensitive when more than a few coil spacings from the wire, and you may need to use a different method for initial wire acquisition.