Maker Pro
Maker Pro

Linear Position Sensor

J

Jason Thorsness

Jan 1, 1970
0
How well do you think this would work as a linear position sensor?

With a 1200 dpi laser printer, I would print a long pattern like the
following onto overhead projector film (if it works in laser printers?
Otherwise I would use a high-resolution inkjet).

Each column is a line (top view, left-to-right)
(black area)
## ## ## ## ## ## ## ## ## ## ##
(black area of about 1cm between patterns)
# # # # # # # # # # #
(black area)

I would then shine an LED through a slit and the film and onto a
photodiode, like below (side cutaway):

LED
| |
| |
| |
| |
------------- (film with pattern as above)
| |
| |
DIODE

The slit would be 1/1200 of an inch wide, just like a bar on the
pattern. I would probably make the slit out of bolts and plates so it
is adjustable to this distance.

There would be a photodiode for the top part of the pattern and the
bottom. They should have the following current waveforms:

TOP PHOTODIODE (Thicker bars)
i
| . .
| . . . .
| . . . .
|..... .......... .
|--------------------------------------- t

BOTTOM PHOTODIODE (THINNER bars)
i
| ......... ........
| . . .
| . . .
|..... ..
|--------------------------------------- t

The total current from both diodes would add to the the following
waveform:

TOP + BOTTOM PHOTODIODE
i
|
| ... ...
| . . . .
| . . . .
| . . . .
| . . .
| . . .
|..... .
|--------------------------------------- t

If I measure this current by measuring voltage across a resistor with
the ADC on a PIC16F877 at 8bit * 20Khz (values subject to change;
estimated) . I could theoretically get 3/1200 (three bars per pattern
segment) * .0254 (conversion to meters) / 2^8 = about 0.248um
resolution. I understand I will probably get horrendous error, but
for my needs I only need about 100um resolution, so I think this is
feasible.

I have a few questions though:

1) Would photodiodes in this setup output a linear waveform? If not,
I could record the waveform to the PIC and then compare it with each
measurement to still retain accuracy.

2)I use two photodiodes so that the input waveform is asymmetrical so
that I can measure direction as well as displacement...is there a
better way to do this?

Any other input would be appreciated.

-Jason Thorsness
[email protected]
 
S

soundman

Jan 1, 1970
0
Jason Thorsness said:
How well do you think this would work as a linear position sensor?

With a 1200 dpi laser printer, I would print a long pattern like the
following onto overhead projector film (if it works in laser printers?
Otherwise I would use a high-resolution inkjet).

Each column is a line (top view, left-to-right)
(black area)
## ## ## ## ## ## ## ## ## ## ##
(black area of about 1cm between patterns)
# # # # # # # # # # #
(black area)

I would then shine an LED through a slit and the film and onto a
photodiode, like below (side cutaway):

LED
| |
| |
| |
| |
------------- (film with pattern as above)
| |
| |
DIODE

The slit would be 1/1200 of an inch wide, just like a bar on the
pattern. I would probably make the slit out of bolts and plates so it
is adjustable to this distance.

There would be a photodiode for the top part of the pattern and the
bottom. They should have the following current waveforms:

TOP PHOTODIODE (Thicker bars)
i
| . .
| . . . .
| . . . .
|..... .......... .
|--------------------------------------- t

BOTTOM PHOTODIODE (THINNER bars)
i
| ......... ........
| . . .
| . . .
|..... ..
|--------------------------------------- t

The total current from both diodes would add to the the following
waveform:

TOP + BOTTOM PHOTODIODE
i
|
| ... ...
| . . . .
| . . . .
| . . . .
| . . .
| . . .
|..... .
|--------------------------------------- t

If I measure this current by measuring voltage across a resistor with
the ADC on a PIC16F877 at 8bit * 20Khz (values subject to change;
estimated) . I could theoretically get 3/1200 (three bars per pattern
segment) * .0254 (conversion to meters) / 2^8 = about 0.248um
resolution. I understand I will probably get horrendous error, but
for my needs I only need about 100um resolution, so I think this is
feasible.

I have a few questions though:

1) Would photodiodes in this setup output a linear waveform? If not,
I could record the waveform to the PIC and then compare it with each
measurement to still retain accuracy.

2)I use two photodiodes so that the input waveform is asymmetrical so
that I can measure direction as well as displacement...is there a
better way to do this?

Any other input would be appreciated.

-Jason Thorsness
[email protected]

The problem you will encounter is the resolution and density of the film you
are planing on printing. The edges of the stripes will be very ragged
compared to the size of the stripes, so you will not get a consistent
reading I suspect. The print density is also poor on inkjet and laser
printers. While the density is good enough for an OHP tranparency, it isn't
good enough for many other things (photosensitive printing plates is one
example) In order to get the quality and sufficient differential between
light and dark, you will almost certainly need to use a high resolution
pre-press film printer such as a Lynotype. Most printing firms will have
somthing similar and they may print something like this for you if you ask
nicely - of course, they may not, because it might be too complicated for
them to spend time on.

Before you start this, it might be a good idea to knock up a test bed to
make sure you have sufficient sensitivity to measure the light levels
through such as fine mesh and also that diffraction does not cause problems
for you. I imagine that will provide plenty of challenges before you get
anywhere near to needing the film.

To measure direction as well as position, you can use a biphase pattern with
two detectors, A and B. The patterns need to be equal light and dark, one
being shifted by 90 degrees out of pahse with the other. The reading you
will get back will then be:

A:B 1:1 1:0 0:0 0:1 1:1 etc.

Do a search for position encoders and I am sure you will get much more
information.
 
J

Joerg

Jan 1, 1970
0
Hi Jason,

As Soundman said the print quality on overhead film may not suffice. If
you could swing this around to reflective measurement instead of
pass-through there is an option to try out: Create a hi-res print file
with your pattern and have a Kinko's or similar store render that on
photographic film. I think they use Kodak and then you'd get the same
contrast and quality as on a real photo. Last time I did that I only paid
around one Dollar for such a copy.

I don't believe they can do negatives of more than the usual 35mm size.
But it can't hurt to ask.

Regards, Joerg.
 
F

Frank Bemelman

Jan 1, 1970
0
Jason Thorsness said:
How well do you think this would work as a linear position sensor?

With a 1200 dpi laser printer, I would print a long pattern like the
following onto overhead projector film (if it works in laser printers?
Otherwise I would use a high-resolution inkjet).

Each column is a line (top view, left-to-right)
(black area)
## ## ## ## ## ## ## ## ## ## ##
(black area of about 1cm between patterns)
# # # # # # # # # # #
(black area)

I would then shine an LED through a slit and the film and onto a
photodiode, like below (side cutaway):

LED
| |
| |
| |
| |
------------- (film with pattern as above)
| |
| |
DIODE

The slit would be 1/1200 of an inch wide, just like a bar on the
pattern. I would probably make the slit out of bolts and plates so it
is adjustable to this distance.

Don't use just a slit. Put another piece of stationary film on top,
with the 'negative' pattern. Then you can use a much coarser pickup,
because the light will vary between 0% and 50%.

Also, I would use A & B signals with these patterns:

(black area)
## ## ## ## ## ## ##
(black area of about 1cm between patterns)
## ## ## ## ## ## ##
(black area)

And for the second film:
(black area)
## ## ## ## ## ##
(black area of about 1cm between patterns)
# ## ## ## ## ## ##
(black area)

Or something like that ;)

[snip]
 
Top