Loading

Encoder Wheel Generator

by NickAmes, published

Encoder Wheel Generator by NickAmes Jan 4, 2010

Description

This is a PostScript program to generate optical encoder wheels (suitable for printing out on a transparency). Unlike similar programs, it is highly flexible and has many features, such as:
-Correct inside and outside diameters, regardless of line width.
-Quadrature capabilities, with adjustable phase difference.
-Automatic scaling of text size.
-Optional index track, with adjustable size or automatic fitting to segment size.
-Automatic page filling with cutting allowances.
-Most features can be turned on or off.

Recent Comments

view all

If someone wants to try an alternative tool for making optical encoder discs, check out my post: http://www.dgkelectronics.com/...

Its an Inkscape extension for making rotary encoder discs, bit simpler to use than this PostScript thingie if I may say.

After doing some research, I've come to the conclusion that the page size of a postscript program is mostly determined by the software rendering the page.

Why not use the crop tool in GIMP to trim the image to your desired size?

Dear Nick.

I'm thinking og using CD or DVD plate as encoder.

That is .. we "burn" something to the plate.

I found lightscribe .. and also qlscribe.

I tried to make configuration to your ps script :

1. Outer diameter 80 mm

2. page size : 80 mm x 80 mm

3. Margins : 0 mm

For #1 and #2 I set it as the sime in try to make it single object in a single page and position it at the center f the page.

But when I open it with software .. such as GIMP, it show the circle positioned at bootom-left of the page. and the page size is not like what i defined.

Kindly please te
ll me How to generate a CodeWheel at the dimmenssion of CD label graphic, so I can "Insert" it to qlscribe

Sincerely
-bino-

Liked By

view all

License

GNU - GPL
Encoder Wheel Generator by NickAmes is licensed under the GNU - GPL license.

Give a Shout Out

If you print this Thing and display it in public proudly give attribution by printing and displaying this tag. Print Thing Tag

Instructions

To use, open up the file in a text editor and edit the settings. Then, open the file in a PostScript viewer (Acrobat?, KGhostView) or interpreter (GhostScript, ps2pdf) and print it out (or, if you have a laser printer you could try sending it to the printer directly).

If you find any bugs, please email me. My address is in the file.

For best results, use the latest version.
Changelog:
v1.3 (latest) Corrected bug caused by me being idiot about how quadrature actually works. I was calculating the phase difference based on one segment, but two segments actually make up a full wave, so the quadrature came out as half of the PhaseDifference. Many thanks to Rafael Pinto for finding this.
v1.2 Corrected bug causing a 1 degree gap in the segment track at extremely high segment counts (>700).
v1.1 Corrected bug causing letter descenders (such as on g,j,p,q, and y) to be drawn on and below the underLine. Letter descenders are now placed above it.
v1.01: Corrected typos in code comments.

Comments

You must be logged in to post a comment.

Anonymous on Jul 10, 2012 said:

If someone wants to try an alternative tool for making optical encoder discs, check out my post: http://www.dgkelectronics.com/...

Its an Inkscape extension for making rotary encoder discs, bit simpler to use than this PostScript thingie if I may say.

Anonymous on Dec 12, 2011 said:

Dear Nick.

I'm thinking og using CD or DVD plate as encoder.

That is .. we "burn" something to the plate.

I found lightscribe .. and also qlscribe.

I tried to make configuration to your ps script :

1. Outer diameter 80 mm

2. page size : 80 mm x 80 mm

3. Margins : 0 mm

For #1 and #2 I set it as the sime in try to make it single object in a single page and position it at the center f the page.

But when I open it with software .. such as GIMP, it show the circle positioned at bootom-left of the page. and the page size is not like what i defined.

Kindly please te
ll me How to generate a CodeWheel at the dimmenssion of CD label graphic, so I can "Insert" it to qlscribe

Sincerely
-bino-

NickAmes on Dec 13, 2011 said:

After doing some research, I've come to the conclusion that the page size of a postscript program is mostly determined by the software rendering the page.

Why not use the crop tool in GIMP to trim the image to your desired size?

hafrse on Nov 2, 2011 said:

Hi,

Thanks for this great work!
Any tips on which sheet print transperant material should be used ? my old one (faulty)is 0.2mm thick 50mm diam. and is made of somehow hard transparant plastic material that will not bend easily when rotated.
Many thanks in advance!

NickAmes on Nov 3, 2011 said:

I recommend laser printed transparencies (used for overhead projectors). They can be printed at any copy shop.

Anonymous on Nov 24, 2010 said:

Thanks!!

Anonymous on Feb 15, 2010 said:

is a good contribution, very well men ........... really good 8-)

Anonymous on Jan 6, 2010 said:

Great job!!

Just one note:

Although you are right when you specify .25 as default phase for quadrature encoders in the PS program parameters, the plotted phase seems to be half of the expected, and quadrature is achieved with .5.

I believe that is because you are computing the phase based on one segment, but a full wave is actually two segments long.

Erik on Jan 5, 2010 said:

Nice work! Very fully featured. You've definitely obsoleted my earlier design... which is great :)

P.s. I almost forgot how awesome postscript was!

hafrse on Nov 2, 2011 said:

Hi,

Any tips on which sheet print transperant material should be used ? my old one (faulty)is 0.2mm thick 50mm diam. and is made of somehow hard transparant plastic material that will not bend easily when rotated.
Many thanks in advance!

gianteye on Jan 4, 2010 said:

This is a brilliant idea. Thank you.

NickAmes on Jan 4, 2010 said:

Actually, it wasn't my idea; there have been other PostScript encoder generators before mine. I wrote the program because the other one weren't quite what I wanted. My program is just a bit more flexible and slightly more automated.
Some other encoder generators:
http://www.sxlist.com/techref/...
http://mitros.org/p/projects/e... - This link has a lot of information on optical encoders as well
http://fennetic.net/machines/i...
http://research.meei.harvard.e...

Top