On Saturday, June 02, 2012 12:45:30 PM cogoman did opine:

>    While I can see the need (sometimes) for a durable metal encoder
> disc, and I have cut some out of .016" copper (was on hand, and never
> got tested), I wonder how useful, or how durable laser printed
> transparency film would be for many applications.  Two of them glued
> back to back with the printing on the inside might be reasonably
> durable.  all but the fingers could be clamped between an aluminum
> mounting piece giving some physical stability.  The resolvers on our
> Shizuoka are located in sealed coffee can shaped bins, so reasonably
> protected from swarf.  One could take a .JPG to Staples and have them
> print out a few with whatever resolution you choose (make THEM keep the
> stock of laser transparency film).
> 
>    The original encoder code was borrowed by a guy doing robotic
> encoders for some surplus Pittman gearmotors for robotics, though he
> used reflective sensors with less than 30 segments.  I borrowed the code
> from him and made changes to make it easier to center a large encoder
> wheel. I have printed out samples (though I haven't used any yet) and
> get reasonable looking prints with 512 segments or more.  I haven't
> added the index wedge yet, but I will insert the code that I do have
> here.

This, since the index pulse needs to be pretty narrow, and can be polarity 
adjusted in hal, might best be done as a single black strip whose width 
could possibly be adjusted such that both edges were in the same logic 
condition.
 
 
> %! Postscript utility for printing  an encoder wheel
> %
> /inch {72 mul} def              % #points/inch (don't change me)
> /size 3.9 inch def                % radius of encoder wheel
> /segments 1024 def                % number of segments (black and white)
> /angle 360 segments div def
> /wedge
>   { /radius exch def
>    /angle_s exch def
>    /angle_e exch def
>    newpath 0 0 moveto
>    0 0 radius angle_s angle_e arc
>    closepath
>   } def

How do I adjust the black width?  With these opto devices, a .010 clear 
strip between 1/8" wide black wedges is likely all I'd need.  The aperture 
of the opto's will effectively widen it.
 
> % ADD IN THE ENCODER WHEEL AT THE SPECIFIED DIAMETER
> gsave
>      %THIS LINE SPECIFIES WHERE TO PUT THE CENTER
>   4.0 inch 4.0 inch translate
>   0 1 segments {
>    360 segments div rotate
>    angle 0 size wedge
>    2 mod 0 eq {1} {0} ifelse
>    setgray fill
>   } for
> grestore

This would, I believe, overpower the computers ability to track at maximum 
spindle speed, in my case 2500 revs, although I can count with the 
available fingers & toes the number of times I've put the lever in high 
gear.  In low gear its 1100.  But it certainly looks easy enough to fix if 
I can dust off my postscript knowledge from 15 years ago when I was running 
an amiga.
 
>      %THIS ROUTINE FILLS THE CENTER WITH WHITE, AND SOMEHOW PUTS A SOLID
> CIRCLE
>      %                  INSIDE THE GROUP OF WEDGES
>      %THIS LINE SPECIFIES WHERE TO PUT THE CENTER
> 4.0 inch 4.0 inch 3.0 inch 0 360 arc
> gsave
>    stroke
> grestore
> 9 setgray fill
> 
>      %THIS ROUTINE PUTS A TINY DOT IN THE CENTER TO AID IN MOUNTING THE
> DISC %THIS LINE SPECIFIES WHERE TO PUT THE CENTER
> 4.0 inch 4.0 inch .01 inch 0 360 arc
> gsave
>    stroke
> grestore
> 0 setgray fill
> 
> showpage

I'll play with this and see what I can do.  The area is well protected from 
swarf, but not from small lubricant droplets thrown off the Z drives gears.  
That however could be addressed by a barrier in the end cover when its in 
place.
 
>    I open the .eps file in Gimp.  Most Linuxes come with ghostscript
> installed, and that's what Gimp uses to write it out to a .JPG.  To get
> good resolution, you need to print out a lot of dots, and that requires
> a lot of RAM, or a long time swapping to/from available RAM.  I think I
> remember using 8000 by 8000 for the final file size.  If Staples has a
> printer that handles postscript directly, you should be able to size and
> position the disc in the .eps code, and print it directly from .eps with
> much better resolution.  With some care you should be able to get
> multiple encoders per sheet, depending on how big you want them.
> 
>    Hopefully this will be useful for someone.  It sure is quicker than
> cutting that ultra thin aluminum, and the segments /should/ be equal in
> size (for 50% duty cycle).

This doesn't account for the aperture of the opto's, which it would appear 
are at least 50 thou.
 
>    For test purposes, if you have clear spray paint on hand (Krylon
> works well here) printing on paper will give you the black.  Several
> very light coats of Krylon on the print side will stabilize the print,
> then a heavier coat from the back will soak into the paper and make it
> more transparent.  All the paint should make the disc stiffer, and seal
> it against some moisture.  You could mount the disc in between
> cardboards with a hole cut in the middle to keep it flat while the paint
> dries.
> 
>    Does anyone think that this needs to go in the knowledgebase?  I
> searched for encoder and didn't find any references that appeared to
> have this information.

I am for it, this could be quite a time saver.  Certainly worth 
investigating.

Thanks cogoman.

Cheers, Gene
-- 
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
My web page: <http://coyoteden.dyndns-free.com:85/gene>
Elegance and truth are inversely related.
                -- Becker's Razor

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to