Searching \ for 'quadrature encoders for telescope automation' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/io/sensors.htm?key=quadrature
Search entire site for: 'quadrature encoders for telescope automation'.

Truncated match.
PICList Thread
'quadrature encoders for telescope automation'
1998\01\27@124314 by Keith Howell

flavicon
face
Philip Cowley wrote:

> the availability of many cheap mice that work decently proves
> that even junky 2 bit encoders can be made to work reliably.

I don't dispute that for optical ones.
The mouse industry quickly ditched mechanical ones.

> I am building a computer control system
> for a 1-tonne astronomical optical telescope.

Cool. Whereabouts? I'm in cycling distance of the RGO.

Someone else suggested using the Hewlett-Packard HCTL2016.

They do look neat, and for a one-off design this could be
the most labour-effective solution.

Depends on how frequent the pulses are.
A modest rate would be fine when tracking, but you probably
want to slew at many times sidereal rate, and the pulse
rate should rise in proportion. In which case, the HCTL2016
comes in handy.

A friend (ex-radio astronomer) and I were discussing
automating scopes. He said there was a neat chip
called a Universal Pulse Processor (UPP) that looked
ideal for jobs like that. The only snag was it was
single-sourced. From Hitachi, I think.

1998\01\27@132624 by Walter Banks

picon face
----------
> From: Keith Howell <spam_OUTkeithhTakeThisOuTspamARCAM.CO.UK>
> To: .....PICLISTKILLspamspam@spam@MITVMA.MIT.EDU
> Subject: Re: quadrature encoders for telescope automation
> Date: Tuesday, January 27, 1998 11:22 AM
>

Quarature decoding is not very hard to do in software. It can be
implemented as a small state machine tracking the progress of
the quadature from position to position up and down.

00
01
11
10
00
01
11
10

There are a number of ways the transition can be detected. You can
asyncronously sample the port with the bits  and develop four possible
actions based on the current position and the last position sampled.

The four actions are
1) increment position,
2) decrement position,
3) no action
4) error

For example assume you are at the 00 position and
syncronously read the port again.

old   new
00    00       - noaction
00    01       - increment position
00    10       - decrement position
00    11       - error not a valid next position

The same table needs to be completed for each
of the 4 starting positions 00 01 11 10 or a
total of 16  combinations of old and new readings.

Errors can be ignored in mice (They are generally
caused by dust covered sensors) On the telescope mount
they need to be formally dealt with.

It is almost as easy to process two axis with asyncronous
sampling. There are 9 possile actions plus errors.

If you are implementing mice a useful number is the
maximum hand speed is 40 inches / second.

Walter Banks

1998\01\27@141515 by Montaigne, Mike

flavicon
face
Thank you for a very informative discussion on software processing of
quarature encoding.
I would really appreciate some expansion of your comments on error
processing.
Most errors (I think) are caused by noise spikes and can be eliminated
(this is really a question) by a width gate, ie anything
below a certain width gets discarded.  I am getting very occasional
errors now with my optical encoders, ('standard' hardware oneshot off
each 'A' & 'B' transition feeding and gates to detect cw/ccw rotation.
and I am using a input c/r network (.01uf/1K pull-up) which helps.
Mike Montaigne
Atomic Energy of Canada Ltd.
{Quote hidden}

       <SNIP>

> Errors can be ignored in mice (They are generally
> caused by dust covered sensors) On the telescope mount
> they need to be formally dealt with.
>
> Walter Banks
>

1998\01\27@160753 by Bob Blick

face
flavicon
face
> Most errors (I think) are caused by noise spikes and can be eliminated
> (this is really a question) by a width gate, ie anything
> below a certain width gets discarded.  I am getting very occasional
> errors now with my optical encoders, ('standard' hardware oneshot off
> each 'A' & 'B' transition feeding and gates to detect cw/ccw rotation.
> and I am using a input c/r network (.01uf/1K pull-up) which helps.

If you decoded in software rather than hardware, you could do away with
the one-shots, and your errors would disappear, too.

Run this in a timer-based interrupt and see how it works for you:

;16 bit encoder count kept in enc_lo and enc_hi.
;Overspeed error sets bit 0 of variable "errflags"

Gray_code       movf    PORTB, w        ;assuming encoder is on port B
               andlw   b'00000011'     ;pins 0 and 1. mask off others
               movwf   gray_new
               xorwf   gray_old,w      ;compare with old value
               btfsc   STATUS,Z        ;keep going if there's a change
               goto    Gray_out        ;no change, get out

               comf    gray_new,w      ;test for both bits changing
               andlw   b'00000011'     ;that would be an overspeed
problem
               xorwf   gray_old,w      ;and need to be noted
               btfsc   STATUS,Z        ;
               bsf     errflags,0      ;set first bit if error

               bcf     STATUS,C        ;clear carry flag
               rlf     gray_old        ;shift left
               movf    gray_new,w
               xorwf   gray_old,f      ;compare new with shifted old
               btfsc   gray_old,1      ;if second bit is set
               goto    Gray_inc        ;increment counter
Gray_dec        movlw   1
               subwf   enc_lo,f
               btfss   STATUS,C        ;clear flag means borrow
               decf    enc_hi          ;we borrow
               goto    Gray_out
Gray_inc        movlw   1
               addwf   enc_lo,f        ;increment lo byte
               btfsc   STATUS,C        ;test carry flag
               incf    enc_hi          ;carry to hi byte
Gray_out        movf    gray_new,w
               movwf   gray_old        ;prepare for next time

1998\01\28@052432 by Philip Cowley

flavicon
face
>> I am building a computer control system
>> for a 1-tonne astronomical optical telescope.
>
>Cool. Whereabouts? I'm in cycling distance of the RGO.


The scope is sited at the Seething Observatory, about 8 miles south of
Norwich. If you are in the area one friday night... please feel free to
visit us. Let me know and I'll send you the address and instructions on how
to get there!

>Someone else suggested using the Hewlett-Packard HCTL2016.
>
>They do look neat, and for a one-off design this could be
>the most labour-effective solution.

What does the 2016 do. Does it just pre-process the quad pulses or does it
count them as well?

>A friend (ex-radio astronomer) and I were discussing
>automating scopes. He said there was a neat chip
>called a Universal Pulse Processor (UPP) that looked
>ideal for jobs like that. The only snag was it was
>single-sourced. From Hitachi, I think.

Could you get the part number for me?

Thanks

Phil

1998\01\28@082921 by Walter Banks

picon face
There are two problems on one shots on the
signal edges is that they give in effect a hysterisis
on the signal edge position. The second problem
is the one shot needs to fire on both positive and
negative transitions. The real beauty of quadrature
encoding is the 4 counts per wheel slot. (ie 200
slot wheel gives 800 counts per revolution) This is
well worth preserving.

Once we stopped trying to condition the signals
other than using as low a value of sensor pull-up as
was reasonable our errors essentially went to zero.
The asynchronous algorithm is self correcting on
miss-read edges.

The only error case left is the double transition
(00 -> 11, 01 -> 10, 10 -> 01, 11 -> 00) if
you just ignore that case and it is indeed noise then
the asyncronous algorithm will act like a you have
a low pass filter that corrects in two cycles and as
long as the quadrature is not moving fast enough
to cross a full count in two cycles there will be no
accumulated error in position measurements.

Walter Banks

----------
{Quote hidden}

1998\01\28@085402 by Keith Howell

flavicon
face
Walter Banks wrote:

> The only error case left is the double transition
> (00 -> 11, 01 -> 10, 10 -> 01, 11 -> 00)

I've thought about this.
What I've done is to have analyse steps into
sign (direction) and magnitude.

If I do see a double step, I assume the direction
is the same as before. Inertia (considerable on
a 1-tonne 'scope) suggests this is reasonable.

Double-steps tend to appear when moving fast,
so the inertial assumption becomes even more valid.

1998\01\29@065233 by n Midgley

flavicon
face
Phil

I'd like to e-mail you direct, but my terribly clever MS Exchange system doesn't
show your address. Could you e-mail me directly?

Apologies to everyone else for wasting their bandwidth!

RemoveMEjohn.midgleyTakeThisOuTspamenorfolk-ha.anglox.nhs.uk

{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 1998 , 1999 only
- Today
- New search...