linear position sensing - capacitive

#1
hi all yep me again for another adventure into the land of the bonkers.

I have my milling machine and currently have a pair of cordless drill motors attached,and currently i'm able to move it rapildy across from one limit to the other, my current trouble is linear position sensing,x 500mm, y 200mm ,z 200mm

so far as usaul money is a problem (isn't it always)
so actaully buying any type of linear positioning sensing device is not an option,,.. not at $600 odd for somthing badily made in china and all only do one axis.

i've looked at building myself a "string pot"
pro's : simple easy to construct
cons : datasheets specify up to 2% maximum backlash in 10 turn pot which would mean over 1 mm error.. no good

rotary encoders on the motors,
pros: backlash can be conpensated for in software, cheap
cons: backlash in the gearbox allows encoder wheel to reverse enough to give a false reading and losing position,

LVDT buying or building too expensive to buy to build however
pros: simple design and accurate with no backlash that developes,
cons: not easy to interface to requires a fair amount of processing to elminate noise,aparently,

resistive slider,
pros: dirt cheap, however cannot get one long enough to cover the x axis 500mm long
coms: requires a high res adc (not that it's a con)

so ladies and gentlemen, i'm down to a linear capacitive solution,
a simple parrallel plate design with one plate being a long triangle and the other being a rectangle, hooked into to some kind of capacitor based oscillator based circuit, which in turn can be measured by the cpp module,
i'm aiming for a resolution of 0.1mm over the full 500mm

sounds easy so far,

considering the wealth of knowledge on this forum, anyone got any ideas,comments,flames?
 
#2
No flames.

If I were you I'd do some calcs of area/distance-between-plates simple capacitor calculations before taking that route.
I'm not saying its impossible but I think it may be a trifle tricky.
Capacitance changes will be tiny for that resolution requirement. Any wobble in the travel will mugger it up. And that ignores PSU issues, noise issues and how to measure tiny changes, maybe BFO (or whatever its called) but stability will be a huge 'challenge'.

I also dallied with various low cost methods on an old Bridgeport, but I wanted far greater accuracy.
Pots and strings and anything resistive was considered.

I ended up spending £700 on having an optical slidy thing fitted, made by Mitotoyo.
I couldn't find any other method that was accurate and consistent and reproducible.

Sorry, I can't help. Its an interesting project and I wish you luck.
 

hippy

Technical Support
Staff member
#3
0.1mm in 500mm is 0.02%, 5000 steps of resolution, 14-bit. Could be a tough nut to crack, especially with capacitance.

What about some optical measurement system based upon Moiré effects ? Similar to moving two combs across each other at a slight angle. Could be complicated but the principle - multiplying a small movement up to a much larger one which is easier to see or measure - could perhaps be used in some other way. You could gear up the rotation of the movement screws so you get multiple turns of a slotted disk for a small rotation of the screw which could be monitored by some optical sensor, or maybe just use a quadrature encoder. Backlash should be minimised because you are counting far more steps than the resolution you need but I'm no expert in these things.
 
#4
A plastic tube with an LED at one end and a photoresistor at the other will - as it is bent - create a reflective path for the light - This results in an almost linear response at the phototransistor - try it - you can make the tube as long as you like
 
#6
Rack and pinion works well, attach a rack to the side of the mill table and have a pinion mounted on an encoder shaft, the pinion is lightly spring loaded so to mesh with the rack and have zero backlash, any backlash in the table traverse screws dosn't matter.
 
#11
I think that is how some work hippy.

How about induction?
Almost all 1970/80 hard drives used moire patterns as the basis for positioning. Seemed to work well and gave very precise information about movement AFAIR they used 2 light sensors and were able to use the phase dofference in the pattern to tell which way the head was moving.
 
#12
@dpg,
These are just random thoughts.

Do you need to move your table rapidly, using drill motors?

Accuracy is the most important consideration here, and,
as Dippy and others have shown, it can get seriously expensive.

In one of your previous CNC postings, I think you mentioned
steppers, driving a “conventional” threaded rod system.
AFAIK, counting steps can achieve 0.1mm ,
when used on the cheaper CNC machines.

Also, see post #35 here
http://www.picaxeforum.co.uk/showthread.php?t=11345&highlight=stepper

and posts #3 and 4 of this follow-up,
http://www.picaxeforum.co.uk/showthread.php?t=11665&highlight=stepper

Using an “up-market” screw-thread. (40tpi ?) = < 0.025mm accuracy.

Of course, I may have lost the thread :)

e
 
#15
Wikipedia:
Digital calipers contain a linear encoder. A pattern of bars is etched directly on the Printed circuit board in the slider. Under the scale of the caliper another printed circuit board also contains an etched pattern of lines. The combination of these printed circuit boards forms two variable Capacitors. As the slider moves the capacitance changes in a linear fashion and in a repeating pattern. The two capacitances are out of phase. The circuitry built into the slider counts the bars as the slider moves and does a linear interpolation based on the magnitudes of the capacitors to find the precise position of the slider.
 
Last edited:
#17
You are expecting 500mm, .1% tolerance, AND cheap?? :)

cheap is such a strong word, more like reasonably affordable,
but yes

i have however been recommended another more realistic option
the TSL3301..... it's an linear sensor array (essentially a chip with a row of photo diodes in it for $14 it's worth a try, the question is i'll need a long strip of IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII what could i possibly use for that?
 

premelec

Senior Member
#18
I have disassembled many ink jet printers - which have an optical bar strip held taught with a spring and photo interrupter on back of ink carriage... also Analog divices makes some VERY sensitive capacitive measuring chips you might look into [www.analog.com].
 
#19
Good point about printers - the encoding strip looks grey as the bars are so close together. I think you could get great accuracy by using one of them. You would have to use the readers from the printer.

A
 
#20
I think there could be quite a few issues to overcome though, with the printer optical bar strip idea. For instance - if you are moving the head at a fast speed just think of the frequency of the optical output and the sampling rate of the software that's needed. There might be some very fast processing going on in a printer with clever software too. Also, I wonder if you can get ones 50cm long?
 
#21
Mitutoyo and an American manuf of big-boy linear measurements for mills use the optical Moire (stewart) method. Can't remember name, it was years ago when I was reading up.

I onl mentioned induction as i saw that on the Mitutoyo website.
There didn't seem any enthusiasm here for induction, so maybe Mitutoyo have got it wrong :)

I'm sure you get could something going with a linear array and a special patterned strip.

Anyway, if you are going to use Moire, a) how are you going to detect, b) how will you get absolute, c) How are you going to make your 2 combs?
Its so easy in 'type' isn't it :)

But a very interesting project. If you can crack this at low cost you may have a marketable device. Good luck. Don't give in. (This is easier than a transatlantic canoe;) )
 
#22
Mitutoyo and an American manuf of big-boy linear measurements for mills use the optical Moire (stewart) method. Can't remember name, it was years ago when I was reading up.

I onl mentioned induction as i saw that on the Mitutoyo website.
There didn't seem any enthusiasm here for induction, so maybe Mitutoyo have got it wrong :)

I'm sure you get could something going with a linear array and a special patterned strip.

Anyway, if you are going to use Moire, a) how are you going to detect, b) how will you get absolute, c) How are you going to make your 2 combs?
Its so easy in 'type' isn't it :)

But a very interesting project. If you can crack this at low cost you may have a marketable device. Good luck. Don't give in. (This is easier than a transatlantic canoe;) )
even the linear array has it's degree of problems and thats without the overhead of processing for it,
so on a dedicated pic maybe,... wts

induction as mentioned by Dippy is a little more promising,.. well alot more

i'm thinking a diy lvdt might be a best option,
 

jglenn

Senior Member
#23
LVDT's are cool, I helped work on an interface to one. I would search for surplus ones instead of building it, have a feeling will be very tough. How about a sonar? The higher the clock freq of the circuit measuring the return, the higher the precision. You might need discrete logic instead of a micro, then feed the result to your PICAXE. Measure the x and y at different times to prevent interference. Mount the transducer up a couple inches from the bed, and have a "paddle" reflector target opposite it on the moving carriage. A little wild, but might work. CNC machines and industrial robots use some kind of thin strip sensor for position, they might be glass as I heard they are easy to break.
 
#24
ok had another thought, using a hall effect sensor (linear resistive) and a steel threaded rod, i've never used one before so it's new territory to me,
but why not use a hall effect sensor in the same way it would be used on a gear tooth but instead on a threaded rod, say with a 1mm pitch and then use the 8bit adc to divide each reading down to roughly 0.1mm increments,
the question is what kind of fluctuation am i likely to get off a threaded rod and would it vary by enough to get the resolution i want
 
#25
I have my milling machine and currently have a pair of cordless drill motors attached,and currently i'm able to move it rapildy across from one limit to the other, my current trouble is linear position sensing,x 500mm, y 200mm ,z 200mm

It dosn't matter what setup you go for but how good are cordless drill motors going to be for positioning the mill to within 0.1mm ????.
 

jglenn

Senior Member
#26
Hall effect sensors I have used do not have that kind of precision, they are gross area detectors. You would need some kind of gate. Also, I don't think you can infer position in between the teeth, to increase measurement by 10.

A laser would be better.

On the sonar idea, I know it is possible, but might be a bit of work to implement. One system I used was an ultrasonic bolt stretch measurement unit. In fastening systems, you learn that the bolt actually stretches when you tighten it. By putting a transducer on the head, we could bounce a signal off the end and measure a really really tiny value of change, about .0001".

The machines in auto plants that tighten critical bolts are controlled by computers that record each cars data. The nutrunners are either electric or air powered, the rotary sensors are called RESOLVERS, sort of a rotary LVDT! :D
 
#27
I think a home-made high accuracy linear sensor that can deal with 500mm is going to be tricky.

Why not try another approach alluded to earlier?
I.E. Use a rotary encoder on your threaded drive to count the number of rotations and the position.
You'll know the pitch of the thread and so the only error will be mechanical backlash - assuming your processor can count of course :)
In a way, this is the same as in the old days when your turned the feed wheel by hand and looked at the graduations on the handle/knob.

Obv a linear sensor is better as backlash is 'ignored', but I reckon you'll have a tricky build on your hands.
Personally, I'd avoid any linear resistive method unless it was really heavy duty and sealed.
Any grubbiness or painful coeffs could upset things.
Even little things like thermal expansion could mess you up. To be honest I never even considered that when merrily milling and staring at a Mitty DRO which had a res of 0.005mm.
Anyway, I sold it last year so thats someone elses problem now.

PS. That ultrasonic measuring thing. What frequency was that working at? I bet that had some non-cheap transducers/electronics to get that resolution. And I bet it wasn't 40kHz.
 
#28
I think a home-made high accuracy linear sensor that can deal with 500mm is going to be tricky.

Why not try another approach alluded to earlier?
I.E. Use a rotary encoder on your threaded drive to count the number of rotations and the position.
You'll know the pitch of the thread and so the only error will be mechanical backlash - assuming your processor can count of course :)
In a way, this is the same as in the old days when your turned the feed wheel by hand and looked at the graduations on the handle/knob.

Obv a linear sensor is better as backlash is 'ignored', but I reckon you'll have a tricky build on your hands.
Personally, I'd avoid any linear resistive method unless it was really heavy duty and sealed.
Any grubbiness or painful coeffs could upset things.
Even little things like thermal expansion could mess you up. To be honest I never even considered that when merrily milling and staring at a Mitty DRO which had a res of 0.005mm.
Anyway, I sold it last year so thats someone elses problem now.
quote]

currently there is an infrared optical setup on the rotary encoders which are cut out of aluminium sheet, the problem with them is that during the day there is interference from all the light shining into the garage and they aren't all that reliable,

so i have purchased a pair of hall effect sensors which after some brief playing with a magnet and the 8bit adc in the pic18f4550 they should make for a better and more reliable solution, and probably will allow me to run the x-y table at faster speeds than with the optical pickup system ( which is very slow and unreliable)

as for backlash i'm not too worried as i can compensate for it in the software i have written,

i'll charge the camera batteries tonight and post a photo of this thing, a few might get a laugh out of it,

as for the linear positioning sensor, i think it's just a matter of time before somone somwhere comes up with a dead easy and simple positioning system that anyone could build and still get some decent accuracy,
 
Last edited:
#29
HAve you though that at the loc cost of digital calipers now you might try hacking into one to get the measurement data out - 500 mm versions are available.
 
#30
That may be an idea Rick, they're quite cheap now.

BUT, my only issue with caliper+serial was the speed.
There was a distinct lag between measurement and data output.
This would be too slow for controlling a motor unless your X drive was reeeaaally slow.
And it may be too slow even for hand winding. As in , ooops I've overshot.

I was going to do a similar thing from the Mitutoyo DRO serial output, but update/data rate was too slow to make a practical system. Pity, I thought I'd saved myself thousands :)
 
#31
i did have a look at one and it's output on a scope and the delay was the reason i decided they wern't the right choice, pity though because 1ooth of a mm would have been a nice resolution to have,
 
#32
ok in the end i simple put series of magnets -north -south north- in 10 divisions in my encoder disk along with a ugn3503u as a sensor and so far out of 20 different tests it's proven highly successful (no errors)

however on a side note... using only the 8bit adc the reading range is from 169 to 85

which is 84 possible positions in the space of approx 25mm worth of movement

i know it wouldn't be linear but with a 10bit adc and the magnets arranged like this

it certainly makes me think that a diy hall effect linear positioning device might after be possible

(those magnets are arranged n-s-n-s-n-s-n-s and ar 9.6 to 9.7 mm wide)
 

BCJKiwi

Senior Member
#33
3M make adhesive backed magnet tape which consists of a series of alternating magnetic poles. Can be used in small permanent magnet motors (among other things) - just cut the strip to the exact length and wrap it inside the casing.

The magnetic properties are very consistent and accurately positioned. Not sure of the exact widths of the magnetic bands however as there does not seem to be much info on this. Also used in sheet form for fridge magnet sheets, door seals etc. If you place two together you will get a good idea of the band width.

Now available from many sources even ebay.com.au!
 
#35
3M make adhesive backed magnet tape which consists of a series of alternating magnetic poles. Can be used in small permanent magnet motors (among other things) - just cut the strip to the exact length and wrap it inside the casing.

The magnetic properties are very consistent and accurately positioned. Not sure of the exact widths of the magnetic bands however as there does not seem to be much info on this. Also used in sheet form for fridge magnet sheets, door seals etc. If you place two together you will get a good idea of the band width.

Now available from many sources even ebay.com.au!
i've looked at similar stuff before for an off the shelf dro, the price on the tape was $150 per metre, and the reading head was $500,

i'll give 3m a call on monday see what their price is

the magnets in the photo span a distance of roughly 10cm and they cost $2.50
 

BCJKiwi

Senior Member
#37
@DPG,

Just figured this would be a replacement for the large magnets - give much better resolution over any length you want still using the hall effect just as per your tests with the large magnets - or have I misunderstood?
 
#38
@DPG,

Just figured this would be a replacement for the large magnets - give much better resolution over any length you want still using the hall effect just as per your tests with the large magnets - or have I misunderstood?
that very stripping is actaully what they use in the comercial magnetic positioning systems, and they charge through the nose for it too my last quote $150 per metre

i'll be interested in the 3m quote
 
Top