Printing a protractor?

In my experiments using a stepper motor to drive a dividing head, I'd like to re-assure myself by knowing exactly the position of the stepper
motor.
What I'd like to be able to do is to print a protractor on A4 paper, but with 200 divisions instead of the 360 that you'd get with degrees.
Has anybody any pointers to a program (or Excel macro) to do this?
Also, I'd like to paste a strip numbered 1 to 80 around the periphery of the faceplate so that I know its position as well.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Mon, 3 Nov 2008 17:41:55 -0000, "Amateur Machinist"

This is easy enough to do in most CAD packages - you can draw a line for the first mark and the package will allow you to create a circular "array" of copies of that line, rotated by X degrees (1.8 in your case). I use AutoSketch which you pay good mone for, but there are free CAD packages around that should do this.

Simpler to do this using basically the same technique - print a "protractor" with 80 divisions, and number each one, then stick it on the face of the plate rather than the periphery.
Regards, Tony
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

OK, thanks.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I usually do this in postscript. Here's a little program to do what you want (create a file in notepad, copy and paste the program text and save as e.g. divisions.ps). If you have a postscript printer you can print directlyi otherwise you need to use a program like ghostview (http://pages.cs.wisc.edu/~ghost /). Modifying to make the 80 divisions version is an easy exercise.
So that you can see what the output is like quickly, I've put a version converted to pdf using ps2pdf on the web at
http://www.chiark.greenend.org.uk/~alanb/division.pdf (or the postscript is http://www.chiark.greenend.org.uk/~alanb/division.ps )
Alan
%! 300 300 translate
/Times-Roman findfont 10 scalefont setfont
/linelength bind def /divisions bind def /multi bind def /str 3 string def
/rotateanddraw {     360 divisions div rotate     linelength 20 sub 0 moveto linelength 0 lineto stroke     % Is this a multiple of multi     dup dup multi div floor multi mul eq     {linelength 10 add 0 moveto str cvs show }     ifelse } bind def
0 1 divisions 1 sub { rotateanddraw } for
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

A very helpful and thought-provoking reply, thank-you very much.
(Your website, however, refuses access to the division.ps version.)
I couldn't get ps2pdf to run and so used the conversion facility in ghostview.
I'll now devote some time to understanding the postscript language so that I can adapt your program for circle size and longer strokes on the numbered lines to make it easier to read. It is nearly a quarter of a century since I dabbled in Forth and there appear to be definite similarities and I'm guessing that your "bind" translate to the "allot" of Forth.
Thought-provoking? I wonder what the potential is for postscript to be used as a source of CNC designs, terminating in G-code?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Tue, 4 Nov 2008 09:07:42 -0000, "Amateur Machinist"

I'm sure that you could do it...but what would be the advantage over (a) writing G-code direct, or (b) generating DXF from a CAD drawing?
Regards, Tony
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Alan Bain wrote:

I'd have been inclined to use a gsave/grestore pair in the subroutine, and rotate to where I need to be, rather use a cumulative rotate.
BugBear
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Thanks again. A few minutes hacking produced the two versions, reproduced below.
I haven't fathomed the code necessary to draw the enclosing circles, nor how to pinpoint the centre of the circle but those are just niceties.
All I need now is a plastic laminator and a new cartridge for the laser printer (last changed 29-Jul-2006 and getting streaky having been shaken many times!) and I'm in business.
Thank-you, Alan, for a full response.
----- 200 version -----
%! 300 600 translate
/Times-Roman findfont 15 scalefont setfont
/linelength bind def /divisions bind def /multi bind def /str 3 string def
/rotateanddraw { 360 divisions div rotate linelength 20 sub 0 moveto linelength 0 lineto stroke % Is this a multiple of multi dup dup multi div floor multi mul eq { linelength 30 sub 0 moveto linelength 30 add 0 lineto stroke linelength 10 add 0 moveto str cvs show } ifelse } bind def
0 1 divisions 1 sub { rotateanddraw } for
----- 80 version -----
%! 300 600 translate
/Times-Roman findfont 15 scalefont setfont
/linelength bind def /divisions bind def /multi bind def /str 3 string def
/rotateanddraw { 360 divisions div rotate linelength 20 sub 0 moveto linelength 0 lineto stroke % Is this a multiple of multi dup dup multi div floor multi mul eq { linelength 30 sub 0 moveto linelength 30 add 0 lineto stroke linelength 10 add 0 moveto str cvs show } ifelse } bind def
0 1 divisions 1 sub { rotateanddraw } for
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

With no pretensions for elegance; merely cloning Alan Bain's code and trying a few hacks, now has the centrepop ...
%! 300 600 translate
/Times-Roman findfont 15 scalefont setfont
/linelength bind def /divisions bind def /multi bind def /str 3 string def /centrepop def
/rotateanddraw { 360 divisions div rotate linelength 20 sub 0 moveto linelength 0 lineto stroke % Is this a multiple of multi dup dup multi div floor multi mul eq { linelength 30 sub 0 moveto linelength 30 add 0 lineto stroke linelength 10 add 0 moveto str cvs show } ifelse } bind def
0 0 moveto centrepop 0 lineto stroke 0 0 moveto 360 4 div rotate centrepop 0 lineto stroke 0 0 moveto 360 4 div rotate centrepop 0 lineto stroke 0 0 moveto 360 4 div rotate centrepop 0 lineto stroke 0 0 moveto 360 4 div rotate
0 1 divisions 1 sub { rotateanddraw } for
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Labouring the point somewhat, and apologies thereto, following on from Alan Bain's excellent stimulus, I've now found everything I need in the following tutorial ...
http://ozviz.wasp.uwa.edu.au/~pbourke/dataformats/postscript /
A couple of weeks ago I was given a box of junk which included some steppers, stepper controllers and rotary encoders. I intend to use a rotary encoder as an electronic form of division plate together with the protractor scales that I've been "didacted" this morning by Alan Bain.
Musing on how much extra electronics I'd need to convert the pair of quadrature pulses from the rotary encoder into "step" and "direction" signals for the stepper controller, the answer turned out to be none whatsoever! The phase relationship between the pair of pulse streams is such that they can be connected directly, with just a couple of pull-up resistors (open collector outputs)
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Tue, 4 Nov 2008 11:36:04 -0000, "Amateur Machinist"

Hmm...not clear to me how you derive a sensible "direction" pulse that way though....
Regards, Tony
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

There's a quadrature to S&D decoder circuit in the CAD/CAM/EDM/DRO Yaho group files here:
http://f1.grp.yahoofs.com/v1/QDkQSY2xdRDNT560Alv3Lw8KpWJK430bfRkHsM_D_M_CjSyMQr0BzACo0yakqGW9w4s9rz9M2us_rOp8-Kb19xNZwWeali0Y/CIRCUITS/Pulse%20Gen%20%20and%20Timing%20Circuits/Quad2StepDir.pdf
You have to join the group to get at it though so I can email you a copy if you don't want to do that - just email me offline.
Regards, Tony
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

http://f1.grp.yahoofs.com/v1/QDkQSY2xdRDNT560Alv3Lw8KpWJK430bfRkHsM_D_M_CjSyMQr0BzACo0yakqGW9w4s9rz9M2us_rOp8-Kb19xNZwWeali0Y/CIRCUITS/Pulse%20Gen%20%20and%20Timing%20Circuits/Quad2StepDir.pdf
It comes up OK from the above URL. Not sure that I go along with a mixed analogue and digital circuit to achieve a digital function, though!
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Tue, 4 Nov 2008 12:41:12 -0000, "Amateur Machinist"

Yes, that R-C delay looks a bit crude I guess...but if it works?
Regards, Tony
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

I don't yet know the purpose of the analogue bits which may be as simple as an anti-bounce circuit to resolve hesitancy on the part of the person operating a rotary encoder.
But the problem there would be as to how you'd differentiate between bounce on a rising edge, and the falling edge resulting from a sharp change of ditection.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

It's certainly bad practice to use analogue circuitry with digital logic which doesn't have Schmitt inputs - I woudn't be happy with it. A much better solution would be to use an LS7184 made by LS Computer Systems (http://www.lsicsi.com/encoders.htm ) which has step and direction outputs and digital filtering of the inputs. The 8 pin DIP version can be bought, on line, from 2001 Electronic Components (http://www.2k1.co.uk/default.asp ) for 1.18 + VAT but they have a minimum postage charge of 5.
Bob
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

Taking the two quadrature pulse streams as A and B ...
Clockwise, A transits low to high when B is high
Counterclockwise, A transits low to high when B is low.
Even though B is waggling up and down, it is in a stable state when A transits. (Similar to a stroboscopic effect)
Therefore use A as the Step and B as the Direction.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

Yes ... from the purists point of view, you're stepping on the other edge when counterclockwise and are therefore 1/2 pulse displaced, but for a thumbwheel which I can spin back and forth. the no-extra-electronics solution is the engineer's solution!
(An engineer being someone who can do for 2p what any fool can do for 2)
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
On Tue, 4 Nov 2008 12:30:35 -0000, "Amateur Machinist"
Neat.
Regards, Tony
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
wrote:

Further thoughts as to the loss of half a step when changing direction ... you have no info on how the control board does this logic, and yout may go half a turn backwards before the controller knows that you have changed direction anyway.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.