Article View: comp.robotics
Article #1644Re: What is the cheapest shaft encoder you know of?
From: Diego C. Ruspini
Date: Wed, 19 Jun 1991 22:34
Date: Wed, 19 Jun 1991 22:34
73 lines
3292 bytes
3292 bytes
In article <6185@ptsfa.PacBell.COM> dmturne@PacBell.COM (Dave Turner) writes:
>The photo disk was available for $1.00 from the author. The 50 mark disk
>was about 2.5 inches in diameter; the 100 mark disk was 3.5 inches diameter.
Here is a Postscipt program I wrote a while back to make encoder disks of any
size and with as many slots as you want. It probably a bit clunky but its
pretty easy to change any options that you wish to make different. Edit
the example calls to the subroutine "drawdisk" to fit your personal needs and
print it out on transparency film ( make sure your laser printer can handle
transparency film). If your printer can't handle transparency, xerox it onto
a transparency, this is what I did, the quality is not great but appears to
work. I then glued this to a piece clear plastic which you can find in almost
any hobby store. If your realy cheap you can use the plastic from a cover of
a cassette tape or CD. With this a couple of optical encoders a 7414 & a 74121
you can make yourself a good shaft encoder, dirt cheap.
I also had a Postscript program that would produce disks for absolute shaft
encoders in gray code, but I can't seem to locate it now. If enough people are
interested I can look at some dusty old tapes I have and see if I can scrounge
it up.
PROGRAM FOLLOWS
----------CUT HERE-----------
%!
%%Creator: Diego C. Ruspini
%%Title: Encoder Disk Maker
%%CreationDate: 4/10/88
% Invoke drawdisk as follows
% <x-loc> <y-loc> <radius> <#-slots> drawdisk
% see examples below
/inch { 72 mul } def
/cm { 28.3465 mul } def
/mm { 2.83465 mul } def
/outerratio 0.95 % Outer slot radius as percent of outside diameter
/gap 0.2 inch def % Size of slot
/center 0.01 inch def % Radius of center hole
/drawdisk {
/segments exch def
/outerradius exch def
/yorigin exch def
/xorigin exch def
/osegment 0.95 outerradius mul def
/isegment osegment gap sub def
0 setgray
xorigin yorigin outerradius 0 360 arc fill
1 setgray
xorigin yorigin osegment 0 360 arc fill
0 setgray
/slice 360 segments div def
0 1 segments 1 sub {
/segment exch def
newpath
xorigin yorigin moveto
xorigin yorigin outerradius
segment slice mul
segment slice mul slice 2 div add arc
xorigin yorigin lineto fill
} for
xorigin yorigin isegment 0 360 arc fill
1 setgray
xorigin yorigin center 0 360 arc fill
} def
% Example disks
2 inch 2 inch 0.5 inch 16 drawdisk
4 inch 2 inch 0.5 inch 8 drawdisk
6 inch 2 inch 0.5 inch 32 drawdisk
2.5 inch 4 inch 3 cm 32 drawdisk
5 inch 4 inch 25 mm 64 drawdisk
% Replace with disks of your own choosing
showpage % dont delete this line
Technical Details
Message-ID:
<1991Jun19.223405.20079@nas.nasa.gov>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!caen!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!eagle!data.nas.nasa.gov!nirvana.nas.nasa.gov!ruspiniShow Full Headers
Complete Article Headers
Newsgroups: comp.robotics Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!batcomputer!caen!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!eagle!data.nas.nasa.gov!nirvana.nas.nasa.gov!ruspini From: ruspini@nas.nasa.gov (Diego C. Ruspini) Subject: Re: What is the cheapest shaft encoder you know of? Date: Wed, 19 Jun 91 22:34:05 GMT Distribution: usa Reply-To: ruspini@nirvana.nas.nasa.gov (Diego C. Ruspini) Organization: NASA Ames Research Keywords: encoders postscript homebrew Sender: news@nas.nasa.gov Message-ID: <1991Jun19.223405.20079@nas.nasa.gov> Lines: 73