Jump to content


Photo

Encoder-based PE Correction on the cheap

  • Please log in to reply
306 replies to this topic

#1 orlyandico

orlyandico

    Fly Me to the Moon

  • *****
  • Posts: 5488
  • Joined: 10 Aug 2009
  • Loc: Singapore

Posted 25 March 2013 - 01:32 PM

Hi all,

If this is more appropriate in the ATM forum, I'd appreciate if it was moved there. But I think it will generate more interest here.

I had been planning to work on an encoder-based periodic error correction box for some months now, but I got sidetracked by buying a Mach1.

However it is an interesting problem that potentially could help a lot of Atlas and CGEM mounts out there. I hope it isn't out of line that I am showing something when the full solution isn't working yet, but so far progress has been gratifying, so I will post some information here.

Parts needed:

1) machined aluminum plug with an M28 x 1mm thread on one end, and a 1" diameter (25.4mm) shaft extension

Posted Image

2) thin aluminum plate (I will dimension this later once everything is working nicely)

Posted Image

3) aluminum plate on the CGEM

Posted Image

completely reversible mod:

Posted Image

4) the most expensive part of this DIY: a 5000-ppr (pulse per revolution) sine-cosine analog encoder; this one is a Baumer-Thalheim ITD 42, the well-known commercial solution uses a Heidenhain ERN480. I got the Baumer quite inexpensively (a bit over $100) but a new one is probably $400 range.

Posted Image

another view:

Posted Image

and another

Posted Image

Now the reader may wonder, how do we implement encoder-based periodic error correction with a 5000-ppr encoder? aren't those Gurley encoders on the SiTech 320,000-tick? and don't the ASA mounts use million-tick encoders?

The solution here is called encoder interpolation. The commercial product uses an ERN480, which costs 270 EURO ($350). The ERN480 is also a 5000-ppr sine-cosine analog encoder.

So where do the millions of ticks come from? you measure the A and B channels (both analog), then calculate the arc-tangent. This is because the A channel is a sine wave, and the B channel is 90 degrees out of phase (a cosine wave). One cycle is produced for every slot on the encoder. So the famous arctan ( A / B ) will give us the encoder's position in between two adjacent slots.

Encoder interpolation is a well-known problem, and Heidenhain makes an interpolator box, the IBV660B, which can do 400-fold interpolation (giving 400 x 5000 = 2 million ticks). Unfortunately, the IBV660B costs over 900 EURO (about $1200).

Obviously any solution cannot lower the cost of the encoder (which is $300 - $400) so any savings must be in the interpolation box.

Now this is where I come in. I figured out that a commercial interpolator is overkill, because our RA axis rotates at a fairly slow rate (the IBV660B can interpolate while the encoder is rotating at over 1000 RPM - which we don't need).

At the very slow speeds of an RA axis that is tracking, we can do the interpolation in software.

Particularly, with a $50 Arduino Uno, a $3 Microchip MCP3304 differential analog-to-digital converter, some wires, and a single bypass capacitor (< $1) which may not even be needed.

This is the current state of my interpolator solution:

Posted Image

Extremely crude, $60 worth of parts. Right now, it does nothing but read the A, B, and N channels of the encoder, and output the readings on the serial port. I am not even using a voltage reference, so the full 13-bit resolution of the AD converter is not being used.

But even with this crippled solution, I can characterize the periodic error of my CGEM with not a star in the sky, simply by reading the encoder:

Posted Image

You can see the horrendous, humongous 8/3 harmonic. With a 200-millisecond sampling rate, I get about 3" granularity. No autoguider can correct 5X per second reliably, so I see good functionality here.

To complete this solution, requires a bit more coding, and a $5 optocoupler so that the Arduino can drive the ST-4 inputs of the mount (just the RA+ and RA- inputs actually). Since I actually have a job :p I will probably finish the autoguider control portion this coming Easter holiday.

If everything works as planned, I am going to publish the schematics and source code so that anyone can build their own encoder-based PE correction system.

Maybe if enough people sign up, I would have some PC boards fabricated, etc. An Arduino chip only costs $7, you actually don't need the entire $50 board. So I could see fabricating a PCB with an Atmega328 chip on it, pre-programmed with the interpolator and ST-4 control software, and with the AD converter. Just add encoder and plug it into your ST-4 port.

I do not expect the cost of the interpolator and guiding hardware to exceed a hundred bucks or so. In other words, the price of a GPUSB.

Further, I see lots of 1250-ppr and 2500-ppr surplus analog encoders on ebay for $60 to $80. I believe these will still work, albeit with lower resolution than the 5000-ppr Heidenhain or Baumer. So the amount of reduction in the PE would be less. I am to reduce PE to sub 2" peak-to-peak with this gadget; with a cheaper encoder probably only 5" peak-to-peak will be possible. But the cost will be much less.
  • darkskysearch likes this

#2 Hilmi

Hilmi

    Soyuz

  • *****
  • Posts: 3618
  • Joined: 07 Mar 2010
  • Loc: Muscat, Sultanate of Oman

Posted 25 March 2013 - 01:52 PM

That is one of the coolest things I have seen in a while!

#3 orlyandico

orlyandico

    Fly Me to the Moon

  • *****
  • Posts: 5488
  • Joined: 10 Aug 2009
  • Loc: Singapore

Posted 25 March 2013 - 01:58 PM

It will be even cooler when my CGEM does < 2" p-p unguided. :D That is the aim, hopefully..

#4 zjc26138

zjc26138

    Loved By All

  • *****
  • Posts: 8202
  • Joined: 24 Feb 2005
  • Loc: Mingo Junction, Ohio

Posted 25 March 2013 - 02:06 PM

This is really neat! I imagine that you could do this mod on an IEQ45 as well? If so I'm on board.

#5 orlyandico

orlyandico

    Fly Me to the Moon

  • *****
  • Posts: 5488
  • Joined: 10 Aug 2009
  • Loc: Singapore

Posted 25 March 2013 - 02:11 PM

Zach, the idea is for the solution to be completely universal, it should work on any mount that has an ST-4 port, even a non-GoTo one. And it's not (really) a mod, more of an add-on.

The challenges I see are

1) getting a reliable source of the encoders (because if we buy new, they are $300 - $400 each)

2) manufacturing the polar scope plug, this will be different for every mount and every encoder (hence, standardizing on a specific encoder model is good)

3) manufacturing the bracket to fasten the encoder to the mount

4) wiring the encoder to the interpolation box / control unit

I am an electrical engineer, so I am confident I can make the control box work. It's the mechanical aspects which are challenging, and I suspect that's where the commercial solution has its value. Their machining is gorgeous, and no integration / DIY hackery is required.

#6 Stew57

Stew57

    Mercury-Atlas

  • *****
  • Posts: 2540
  • Joined: 03 May 2009
  • Loc: Silsbee Texas

Posted 25 March 2013 - 02:16 PM

That may be the solution I am looking for! Good start.

#7 zjc26138

zjc26138

    Loved By All

  • *****
  • Posts: 8202
  • Joined: 24 Feb 2005
  • Loc: Mingo Junction, Ohio

Posted 25 March 2013 - 02:20 PM

Awesome. Yeah it would be nice to be able to get the same/similar encoder for around 100.00

I wouldn't mind going with a cheaper encoder I would be happy to get my mount down to 5" peak-to-peak. Anything is better than the error that it has now.

#8 jrcrilly

jrcrilly

    Refractor wienie no more

  • *****
  • Administrators
  • Posts: 33796
  • Joined: 30 Apr 2003
  • Loc: NE Ohio

Posted 25 March 2013 - 02:25 PM

2) manufacturing the polar scope plug,


This project appears to have tremendous potential! One consideration is final universal hardware design will be that many popular mounts do not have a polar scope mounting in the rear RA housing; for those some other means of picking up RA motion will be necessary.

#9 WadeH237

WadeH237

    Apollo

  • -----
  • Posts: 1342
  • Joined: 24 Feb 2007
  • Loc: Snohomish, WA

Posted 25 March 2013 - 04:00 PM

This is a neat project.

Will your solution be able to support having the encoder and a conventional guider sending inputs at the same time? If not, it would make this solution pretty limited, since there are lots of sources of guide errors beyond mechanical, periodic error.

-Wade

#10 rjsc2000

rjsc2000

    Mariner 2

  • -----
  • Posts: 214
  • Joined: 21 Sep 2006
  • Loc: Portugal

Posted 25 March 2013 - 05:59 PM

A very nice idea! the best i've seen. Just don't loose the thrust you started with

#11 orlyandico

orlyandico

    Fly Me to the Moon

  • *****
  • Posts: 5488
  • Joined: 10 Aug 2009
  • Loc: Singapore

Posted 25 March 2013 - 10:52 PM

Wade, yes it will support passing through corrections to the guider. That's pretty easy to implement. Its only a wiring exercise. :)

And to all, the idea is not novel at all. Encoder based correction has been around a while. The only innovation here is making the interpolator / control box dirt cheap...

#12 wolfman_4_ever

wolfman_4_ever

    Apollo

  • -----
  • Posts: 1245
  • Joined: 15 Jul 2011
  • Loc: El Segundo, Ca, So. Cal

Posted 25 March 2013 - 11:49 PM

Another encoder solution takes the RA guide pulse and takes into account the encoder correction before sending it to the mount.

Dec is just passed.

#13 orlyandico

orlyandico

    Fly Me to the Moon

  • *****
  • Posts: 5488
  • Joined: 10 Aug 2009
  • Loc: Singapore

Posted 25 March 2013 - 11:51 PM

Dave, great idea. I was just thinking of doing an OR... (if the guider input is asserted, do not apply any encoder correction) but your idea is better. Both are software only hacks so can be easily tested.

The OR method would work because am assuming guider corrections will be very rare if the encoder is working properly (would only handle things like drift..)

#14 wolfman_4_ever

wolfman_4_ever

    Apollo

  • -----
  • Posts: 1245
  • Joined: 15 Jul 2011
  • Loc: El Segundo, Ca, So. Cal

Posted 26 March 2013 - 01:48 AM

Well.. that comes back to your question about sidereal and king rate for different parts of the sky.. unless you have a pointing model. FYI... That other encoder solution has a dip switch for sidereal or king rate.. :p

#15 orlyandico

orlyandico

    Fly Me to the Moon

  • *****
  • Posts: 5488
  • Joined: 10 Aug 2009
  • Loc: Singapore

Posted 26 March 2013 - 04:43 AM

Dave, the difference between sidereal and king rate only amounts to about 15" per hour. And the king rate varies by a few percent across the sky. So the variation in the king rate across the sky probably doesn't amount to more than 1" per hour. I can let the autoguider take care of that.

Most folks won't do single hour long unguided exposures with CGEMs anyway.

#16 orlyandico

orlyandico

    Fly Me to the Moon

  • *****
  • Posts: 5488
  • Joined: 10 Aug 2009
  • Loc: Singapore

Posted 26 March 2013 - 05:41 AM

Just got a quotation from Heidenhain Singapore for the ERN480-5000ppr. $544 Singapore dollars, which is $431 USD. Somewhat more than the quotation of 270 EURO / $350 from Heidenhain Spain.

#17 uforias

uforias

    Lift Off

  • -----
  • Posts: 5
  • Joined: 20 Nov 2010

Posted 26 March 2013 - 07:08 AM

Hello,
I have just found this encoder on ebay:
http://www.ebay.co.u...-T-24-40mm-b...

Do you think it will work?

Regards,
Carlos

#18 orlyandico

orlyandico

    Fly Me to the Moon

  • *****
  • Posts: 5488
  • Joined: 10 Aug 2009
  • Loc: Singapore

Posted 26 March 2013 - 07:23 AM

No. Look at the image below where it says (boxed) "T: Totem pole output."

That is a digital encoder.

http://products.auto...E80H manual.pdf

Actually all the Autonics encoders in this range, even the "V: Voltage output" model, are digital, check the waveform output diagram in the above link.

Compare with the doc from Heidenhain (go to Page 62, it has a very good discussion of interpolation) - well worth reading.

http://www.heidenhai...umentation/b...

My solution requires an analog encoder. And frankly the new price of the Autonics are $238. Not too far from Heidenhain. I'd rather have German quality (or Swiss - Baumer) than Korean. There's a reason AP mounts use Swiss Maxon motors. :D

Digital encoders are pretty cheap, and have been used for years in digital setting circles. But they usually only are a few thousand pulses per revolution (PPR). Usually 5000, 10000, or 4096. That's not enough resolution.

You really need at least 500000 ticks. This is why the Gurley encoder used on the SiTech is 320000 ticks.

the only way to get those 320K or 500K or 1 million ticks, is either use a large-diameter ring encoder, or use an analog encoder. In both cases you need to interpolate. And interpolation only works if the encoder outputs are analog.

My breadboard solution above is simply an interpolator.

UPDATE: the Baumer ITD 22 is over 500 GBP list. That's $770. So it's true.. Baumer does cost more than Heidenhain.

#19 jbalsam

jbalsam

    Messenger

  • *****
  • Posts: 492
  • Joined: 06 Jul 2012
  • Loc: Darnestown, MD

Posted 26 March 2013 - 07:50 AM

Very cool. Glad to see my shafts are bring put to a cool use.

#20 Raginar

Raginar

    Fly Me to the Moon

  • *****
  • Posts: 6138
  • Joined: 19 Oct 2010
  • Loc: Rapid CIty, SD

Posted 26 March 2013 - 08:19 AM

Orly,

If you can get <2" PE unguided, most of us wouldn't care if we had to spend 4-500 bucks on a new encoder.

I have no idea how I could mount something like this on a MI250. We don't have a polar alignment plug :). But I'll chip in on some hardware to make this project move forward. Send me a PM.

You on Google Plus? Might be a good place to coordinate that can be private with the results posted here.

Chris

#21 orlyandico

orlyandico

    Fly Me to the Moon

  • *****
  • Posts: 5488
  • Joined: 10 Aug 2009
  • Loc: Singapore

Posted 26 March 2013 - 08:27 AM

Chris, yes am on Google Plus. orly dot andico.

I won't be able to make any more updates to this project till Friday, as I'm on business travel.

Seems that there are no alternatives to Heidenhain. The local Baumer dealer has been deafeningly silent. I have asked Heidenhain if they have a cheaper encoder (maybe 2500 ppr).

But speaking of the MI250... I don't see this solution being that useful for mounts of higher-tier than a G11. Neilson in the other thread reports 3" p-p PE for his CGE. If you're already getting that level of performance, an encoder will not provide much incremental benefit.

In fact, the very reason I lost interest in this whole encoder thing was because when I got the Mach1 I discovered its peak-to-peak PE after PEC was 0.5".

I imagine an MI250 would have very low PE, and whatever it had, could be removed with PEC.

I really see this encoder having the most benefit for EQ6 / Atlas and CGEM. Because lots of people have these mounts, and they generally have terrible PE.

#22 Starhawk

Starhawk

    Space Ranger

  • *****
  • Posts: 5553
  • Joined: 16 Sep 2008
  • Loc: Tucson, Arizona

Posted 26 March 2013 - 08:57 AM

Thinking cheap, one could maybe use a computer mouse reading off a disk, but they seem to have relative movement problems.

All and all, this is very cool- a ready to go solution for going out in the field is a very good thing. And since I have a CGEM, I'd definitely be interested in giving this a try.

-Rich

#23 orlyandico

orlyandico

    Fly Me to the Moon

  • *****
  • Posts: 5488
  • Joined: 10 Aug 2009
  • Loc: Singapore

Posted 26 March 2013 - 09:06 AM

An optical mouse.. is about 3600 dpi for a really high-end one. If you have a 6" diameter ring, that would give you 6" x 3600 x 2pi = 135k dots. Not enough. :tonofbricks:

Another approach is using one of those Renishaw linear encoder read heads. I have one of those too! :p

The problem with these is the tape is darn expensive.. over $250 for an appropriate length (about 20"). And it's more of a hassle because you have to wrap the tape around a large cylindrical portion of the mount.

#24 brave_ulysses

brave_ulysses

    Vostok 1

  • -----
  • Posts: 118
  • Joined: 19 Apr 2009
  • Loc: far outside the wire

Posted 26 March 2013 - 10:44 AM

maybe this with a us digital codewheel could be a start

http://elcodis.com/p...S-9710-150.html

#25 orlyandico

orlyandico

    Fly Me to the Moon

  • *****
  • Posts: 5488
  • Joined: 10 Aug 2009
  • Loc: Singapore

Posted 26 March 2013 - 11:10 AM

As it has an analog output, I assumed we could do as high a level of interpolation as we wanted. But Agilent's own blurb says it is only good for 1440 lpi with external interpolation.

http://www.agilent.c...c_encoders.html

Agilent's HEDS-971X-150 is an analog-output encoder providing 360 LPI resolution, higher resolution than any analog encoder designed for office automation applications. The HEDS-971X-150 delivers on effective resolution of up to 1.440 LPI when used with external interpolation techniques.


The data sheet does show that it has sinusoidal (current) outputs. Not sure how good those sinusoids are going to be.. definitely would be worth looking into, although I don't think it is precise enough, to be honest.






Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics