Return to the Cloudy Nights Telescope Reviews home pageAstronomics discounts for Cloudy Nights members
· Get a Cloudy Nights T-Shirt · Submit a Review / Article

Click here if you are having trouble logging into the forums

Privacy Policy | Please read our Terms of Service | Signup and Troubleshooting FAQ | Problems? PM a Red or a Green Gu… uh, User

Equipment Discussions >> Mounts

Pages: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | (show all)
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Encoder-based PE Correction on the cheap
      #5756299 - 03/25/13 02: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



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



3) aluminum plate on the CGEM



completely reversible mod:



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.



another view:



and another



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:



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:



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 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.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Hilmi
Post Laureate
*****

Reged: 03/07/10

Loc: Muscat, Sultanate of Oman
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5756334 - 03/25/13 02:52 PM

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

Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Hilmi]
      #5756354 - 03/25/13 02:58 PM

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

Post Extras: Print Post   Remind Me!   Notify Moderator  
zjc26138
Loved By All
*****

Reged: 02/24/05

Loc: Mingo Junction, Ohio
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5756376 - 03/25/13 03: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.

Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: zjc26138]
      #5756383 - 03/25/13 03: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.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Stew57
Carpal Tunnel
*****

Reged: 05/03/09

Loc: Silsbee Texas
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5756396 - 03/25/13 03:16 PM

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

Post Extras: Print Post   Remind Me!   Notify Moderator  
zjc26138
Loved By All
*****

Reged: 02/24/05

Loc: Mingo Junction, Ohio
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5756406 - 03/25/13 03: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.


Post Extras: Print Post   Remind Me!   Notify Moderator  
jrcrillyAdministrator
Refractor wienie no more
*****

Reged: 04/30/03

Loc: NE Ohio
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5756415 - 03/25/13 03:25 PM

Quote:

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.


Post Extras: Print Post   Remind Me!   Notify Moderator  
WadeH237
Pooh-Bah


Reged: 02/24/07

Loc: Snohomish, WA
Re: Encoder-based PE Correction on the cheap new [Re: jrcrilly]
      #5756605 - 03/25/13 05: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


Post Extras: Print Post   Remind Me!   Notify Moderator  
rjsc2000
sage


Reged: 09/21/06

Loc: Portugal
Re: Encoder-based PE Correction on the cheap new [Re: WadeH237]
      #5756830 - 03/25/13 06:59 PM

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

Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: rjsc2000]
      #5757269 - 03/25/13 11: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...


Post Extras: Print Post   Remind Me!   Notify Moderator  
wolfman_4_ever
Pooh-Bah


Reged: 07/15/11

Loc: El Segundo, Ca, So. Cal
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5757319 - 03/26/13 12:49 AM

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.


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: wolfman_4_ever]
      #5757321 - 03/26/13 12:51 AM

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..)


Post Extras: Print Post   Remind Me!   Notify Moderator  
wolfman_4_ever
Pooh-Bah


Reged: 07/15/11

Loc: El Segundo, Ca, So. Cal
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5757431 - 03/26/13 02: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

Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: wolfman_4_ever]
      #5757527 - 03/26/13 05: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.


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5757546 - 03/26/13 06: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.

Post Extras: Print Post   Remind Me!   Notify Moderator  
uforias
journeyman


Reged: 11/20/10

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5757649 - 03/26/13 08:08 AM

Hello,
I have just found this encoder on ebay:
http://www.ebay.co.uk/itm/Incremental-Rotary-Encoder-E40S8-5000-3-T-24-40mm-b...

Do you think it will work?

Regards,
Carlos


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: uforias]
      #5757667 - 03/26/13 08:23 AM

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

That is a digital encoder.

http://products.autonicsonline.com/Asset/E40S,HB,E80H%20manual.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.heidenhain.com/de_EN/php/documentation-information/documentation/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.

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.


Post Extras: Print Post   Remind Me!   Notify Moderator  
jbalsam
sage
*****

Reged: 07/06/12

Loc: Darnestown, MD
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5757715 - 03/26/13 08:50 AM

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

Post Extras: Print Post   Remind Me!   Notify Moderator  
Raginar
Postmaster
*****

Reged: 10/19/10

Loc: Rapid CIty, SD
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5757749 - 03/26/13 09: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


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Raginar]
      #5757757 - 03/26/13 09: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.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5757820 - 03/26/13 09: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


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Starhawk]
      #5757844 - 03/26/13 10: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.

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.


Post Extras: Print Post   Remind Me!   Notify Moderator  
brave_ulysses
super member


Reged: 04/19/09

Loc: far outside the wire
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5758029 - 03/26/13 11:44 AM

maybe this with a us digital codewheel could be a start

http://elcodis.com/parts/2239977/HEDS-9710-150.html


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: brave_ulysses]
      #5758069 - 03/26/13 12:10 PM

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.com/newsroom/German/press_releases/optic_encoders.html
Quote:

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.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Startraffic
professor emeritus
*****

Reged: 02/12/06

Loc: Lat. 39.143345, Long. -77.1748...
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5758276 - 03/26/13 01:36 PM

Orlando,
PM Sent.

Clear Dark Skies
Startraffic
39.138274 -77.168898


Post Extras: Print Post   Remind Me!   Notify Moderator  
Stew57
Carpal Tunnel
*****

Reged: 05/03/09

Loc: Silsbee Texas
Re: Encoder-based PE Correction on the cheap new [Re: Startraffic]
      #5758559 - 03/26/13 04:11 PM

A Telescope Drive Master at less than half the price...Count me in for one!! I am tired of waiting for Celestron, this would be perfect.

Post Extras: Print Post   Remind Me!   Notify Moderator  
cn register 5
scholastic sledgehammer


Reged: 12/26/12

Re: Encoder-based PE Correction on the cheap new [Re: Stew57]
      #5758914 - 03/26/13 07:14 PM

This looks like a really nice idea. Shame the list price of the encoders is so high but precision is expensive.

Would the Arduino cope with counting pulses when the scope is slewing? I'm thinking that the encoder could provide a really accurate absolute position.

Chris


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: cn register 5]
      #5758965 - 03/26/13 07:40 PM

Chris, I am not sure that the Arduino can count pulses while the scope is slewing. I have some ideas for that (increment a "slot count" whenever the arc-tangent crosses zero).

But right now my plan is to just stop correcting if the encoder turns too fast, and start correcting again when it settles.

It would be possible to add comparators to convert the A and B outputs to digital "in parallel" - and use these digital outputs to sent interrupts to the Arduino. That would allow the Arduino to keep up even while the scope is slewing. However it would still not be an absolute position, since the encoders aren't absolute and don't have a home index. It would be like the DSC encoders.

In any case, adding position feedback takes the design out of the realm of generic (you can't meaningfully transfer the position to the GoTo controller via the ST-4 port!). Most GoTo controllers (except say the Gemini 1/2) don't have provision for supporting encoders anyway.

I don't want to compare this to the TDM, and the only way this thing ends up costing "less than half a TDM" is if you put it together yourself.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5759347 - 03/26/13 10:48 PM

Actually, I've been thinking:

The king rate is most significant near the horizon. The sweet spot for imaging is the zenith. So, sidereal is a good solution. If someone is hard over on looking low to the horizon, a little tracking error will be the least of their problems.

So, no position necessary. If you like, ad a 45degree and 0degree king rate switch for those who won't be deterred.

-Rich


Post Extras: Print Post   Remind Me!   Notify Moderator  
wolfman_4_ever
Pooh-Bah


Reged: 07/15/11

Loc: El Segundo, Ca, So. Cal
Re: Encoder-based PE Correction on the cheap new [Re: Starhawk]
      #5759442 - 03/27/13 12:20 AM

Everything I have read, it's about 45degree's... I'm sure it's where you live, conditions, etc..

Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: wolfman_4_ever]
      #5759516 - 03/27/13 02:14 AM

Well looks like the blind-shaft ERN480 is the way to go at $325..

Post Extras: Print Post   Remind Me!   Notify Moderator  
cn register 5
scholastic sledgehammer


Reged: 12/26/12

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5759552 - 03/27/13 03:59 AM

Quote:

I'm wondering if I should blow the $220 for a sample....



Put it towards the CGEM motor/driver replacement fund

I'm not really serious, it wouldn't be nearly as much fun as this is.

Chris


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: cn register 5]
      #5759559 - 03/27/13 04:12 AM

Chris, yeah I don't need the CGEM to work fine. I have a Mach1 for when I need a mount that "just works."

The 2048ppr Heidenhain is $265 US. The 5000ppr is $325 (this is for the version with a 12mm blind shaft hole, it's cheaper than the one with a 12mm hollow bore).

I've decided to refine the design by adding a dual comparator (TLC3702). This increases cost by $1. It will also allow the interpolator box to not lose ticks if the mount is slewing rapidly.


Post Extras: Print Post   Remind Me!   Notify Moderator  
jbalsam
sage
*****

Reged: 07/06/12

Loc: Darnestown, MD
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5760066 - 03/27/13 11:47 AM

One reason for putting encoders on a high end mount is so you can disengage the clutches and push the mount somewhere else fast, re-engage them, and the mount still knows exactly where it is.

Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: jbalsam]
      #5760079 - 03/27/13 11:53 AM

Mounts with built-in encoders on both axes (like the ASA mounts) would work, although I don't think these mounts can be manually pushed.

My old AP600 mount has encoders on both axes, but they are not high-resolution encoders.

I was simply referring to the phenomenon of putting the (single axis) commercial encoder solution on the PME. This would not allow the use of pointing. Besides the PME can't be manually pushed.


Post Extras: Print Post   Remind Me!   Notify Moderator  
galaxy_jason
Vendor


Reged: 05/22/07

Loc: Texas
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5760296 - 03/27/13 01:31 PM

Dumb question but other than a cool science project what is the point of this? If the mount has PEC then simply train it with PEMPro. If it doesn't then it may be time for a new mount. The older mounts without PEC don't track that well anyway and may not be worth the effort.

What am I missing?


Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: galaxy_jason]
      #5760323 - 03/27/13 01:37 PM

8/3 resonance.

-Rich


Post Extras: Print Post   Remind Me!   Notify Moderator  
Stew57
Carpal Tunnel
*****

Reged: 05/03/09

Loc: Silsbee Texas
Re: Encoder-based PE Correction on the cheap new [Re: galaxy_jason]
      #5760336 - 03/27/13 01:39 PM

The PEC on the CGEM can not take out the infamous 8/3 error as it is non integer. Either a 3 worm rotation PEC would have to be instituted (not a 3 rotation average) or new motors. For some mounts the non integer componet is larger than the first harmonic.

Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Stew57]
      #5760363 - 03/27/13 01:45 PM

I agree, this is just a cool science project.

Seriously, mounts with a decent PEC routine (and that includes the Atlas!!) would probably not benefit that much.

That said, even the Atlas has significant fast gear noise, which PEMPro can't remove. I have yet to find out (but I will this weekend) if this scheme can remove fast gear noise.

Of course AP (and others) have solved the problem of fast gear noise. AP at least makes their own gears, and I can testify that it really knocks gear noise way down.

Whether or not encoder-based PE correction is worth doing has been argued about a bazillion times so no need to repeat the arguments here.


Post Extras: Print Post   Remind Me!   Notify Moderator  
galaxy_jason
Vendor


Reged: 05/22/07

Loc: Texas
Re: Encoder-based PE Correction on the cheap new [Re: Stew57]
      #5760678 - 03/27/13 04:00 PM

Quote:

The PEC on the CGEM can not take out the infamous 8/3 error as it is non integer. Either a 3 worm rotation PEC would have to be instituted (not a 3 rotation average) or new motors. For some mounts the non integer componet is larger than the first harmonic.





Skip the encoder. If you can use the existing, or install your own worm position sensor that's all you need. Setup PEMPro to capture however many worm rotations are needed. Save the PEMPro data then write Arduino code to play back the curve .

I did something similar back in 1990 with an LX5 before PEC was available. I used a wiper and a piece of wire attached to the worm. I cut into the clock line and ran one of three different counters into the motor drive circuit depending on the position of the worm measured photographically. Essentially a three "bin" PEC. It cut the PE from 60" down to about 15". With a micro processor you could do the same (through the autoguider port or with ASCOM) with a much finer resolution.

With non-integer ratios you may need to have a second sensor on a reduction gear to tell the Arduino what cycle you are on. Would have to be worked out somehow but since the title of the thread is "on the cheap", software and a couple sensors are cheaper than a high-res encoder.


Post Extras: Print Post   Remind Me!   Notify Moderator  
StarmanDan
Post Laureate
*****

Reged: 08/27/07

Loc: Deep in the heart of Texas
Re: Encoder-based PE Correction on the cheap new [Re: galaxy_jason]
      #5760998 - 03/27/13 06:25 PM

Skywatcher just announced that their API is now open source. I wonder if the Atlas/EQ-G mount has enough memory to incorporate this software into the mount controller? Is it necessary to use the autoguider port or can it use autoguider commands as if it were coming from a computer?

Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: StarmanDan]
      #5761245 - 03/27/13 08:31 PM

1) Jason - I believe the Celestron folks are trying to figure out how to do the 3-cycle PEC with the existing infrastructure. Since the CGEM only has a single-cycle worm indexer, this is a bit.. challenging. Also the CGEM controller only has an 88-cell PEC, so correcting for fast errors is out. Adding a 3-cycle sensor isn't something I can think of doing elegantly.. there's not a lot of space inside the mount.

In any case - if getting "good" PEC was all I was after, I'd just wait for the CGEM AVX (or retrofit motors) which has all-integer ratios and would get rid of the 8/3. My aim is a bit more than just getting the PEC to work.

2) Dan - I believe no. The Atlas motor controller uses some fairly primitive PIC microcontrollers. I'm fairly certain they don't have the smarts to calculate arc-tangents. The Arduino may be cheap and cheesy, but it's a 16MHz CPU.


Post Extras: Print Post   Remind Me!   Notify Moderator  
OzAndrewJ
scholastic sledgehammer
*****

Reged: 11/30/10

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5761319 - 03/27/13 09:07 PM

Quote:

Adding a 3-cycle sensor isn't something I can think of doing elegantly.. there's not a lot of space inside the mount.




Just do what Meade did for the RCX400, and later the LX200s
( assuming it isnt patented )
Very elegant, and the worse the 8/3 error, the better it works

Andrew Johansen Melbourne Australia


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: OzAndrewJ]
      #5761329 - 03/27/13 09:14 PM

Andrew, I'm not familiar with that approach?

Post Extras: Print Post   Remind Me!   Notify Moderator  
OzAndrewJ
scholastic sledgehammer
*****

Reged: 11/30/10

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5761480 - 03/27/13 10:49 PM

It was discussed in great detail when it first came out, but its basically a simple patternmatch, and you use the PE "inside the gearbox" to do it.
You have a sensor on the worm itself and an encoder on the motor.
One rev of the motor output shaft "should" be a set no of encoder ticks.
If the gearbox has the 8/3 error, what you do know is after 3 revs of the worm, everything is back synchronised, but inbetween, it can ( and does ) vary.
Thus you count encoder transitions between each firing of the sensor on the worm, and repeat for at least three full firings of the sensor.
Now because there IS PE in the gearbox, we know the encoder count per sensor trip will vary over those three turns, but the sum of the three should equal the perfectcount * 3.
Ie You will end up with 3 numbers that can be validated for consistency.
We dont really care what they are,
as when you next start the scope, you do the spin again and read the values.
Then find which position gives the best patternmatch to the master stored prior to doing the PEC model.
Its fully self correcting, but it does rely on a relatively repeatable sensor.

Andrew Johansen Melbourne Australia


Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: OzAndrewJ]
      #5761598 - 03/28/13 12:24 AM

The goal here isn't just to overcome the 8/3 resonance- the idea is to true up the output tracking rate with the encoder. This was to get much better performance from the mount- as in an order of magnitude better than the stock mount.

-Rich


Post Extras: Print Post   Remind Me!   Notify Moderator  
OzAndrewJ
scholastic sledgehammer
*****

Reged: 11/30/10

Re: Encoder-based PE Correction on the cheap new [Re: Starhawk]
      #5761629 - 03/28/13 01:08 AM

Gday Rich

Quote:

The goal here isn't just to overcome the 8/3 resonance-




Fully understood.
My comment was merely a reply to the sidethread re why doing an "offmount" PEC model inside the Arduino should or should not be considered.

Andrew Johansen Melbourne Australia


Post Extras: Print Post   Remind Me!   Notify Moderator  
vdb
sage


Reged: 12/08/09

Re: Encoder-based PE Correction on the cheap new [Re: Raginar]
      #5761923 - 03/28/13 08:47 AM

RESPECT!

Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: vdb]
      #5762575 - 03/28/13 03:13 PM

Andrew, thinking about your solution... it cannot be done with a bolt-on, because the internal motor encoder on the Celestron is already used by the Nexstar hand controller. Short of ripping out the Nexstar and implementing mount modeling, GoTo, etc... not worth doing.

Celestron could do this fix, since they have control of the motor board firmware, but the fact they haven't... maybe Meade does have a patent on that approach.

What I want to achieve is a dumb bolt-on solution that will work on any darn mount, even a non-GoTo G11 or Atlas. So long as it has an ST-4 port.


Post Extras: Print Post   Remind Me!   Notify Moderator  
OzAndrewJ
scholastic sledgehammer
*****

Reged: 11/30/10

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5762707 - 03/28/13 04:52 PM

Quote:

it cannot be done with a bolt-on, because the internal motor encoder on the Celestron is already used by the Nexstar hand controller




Understood,
but it could be done easily enough if you have the ability to tap into the encoder lines between the motor and motor card.
You only need to read them whilst doing the synch process.
That said, your current "guide only" process bolts to the output axle, so even the much simpler one turn PEC synchronisation would require a sensor on the worm itself, hence is not a simple "bolt on" for all mounts.

Andrew Johansen Melbourne Australia


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: OzAndrewJ]
      #5762720 - 03/28/13 04:59 PM

Actually the CGEM does have an indexer for the PEC. But again, attempting to tap into the indexer and motor encoder is much more involved than bolting something to the polar scope bore and plugging an RJ-12 into the ST-4 socket.

My feeling is (given Celestron's release of the AVX) they have decided to just replace the gearbox, and not try to fix the existing 8/3-plagued one. There is some talk that Celestron will sell AVX type motors and a motor board for us poor unfortunate souls with CGEMs. I estimate it will cost upward of $300 to do this retrofit. For about the same price I can buy a new Heidenhain encoder and get to have some fun developing something while it's cloudy (which is very often).

The bottom line is, there will always be random or periodic but fast gear noises on every rotation (on non-premium mounts), and PEC can't get rid of that, whereas an external encoder correcting fast enough (say 5-10 times per second) has a better shot.


Post Extras: Print Post   Remind Me!   Notify Moderator  
OzAndrewJ
scholastic sledgehammer
*****

Reged: 11/30/10

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5762887 - 03/28/13 06:23 PM

Quote:

For about the same price I can buy a new Heidenhain encoder and get to have some fun developing something while it's cloudy




Just dont forget the golden rule here.
Unless it takes more than 10 times longer and costs more than 5 times as much as an off the the shelf item, its not worth doing

Andrew Johansen Melbourne Australia

Hmm, if a motor / Gbx could be found that reset itself properly every rev of the output shaft, and could take an encoder, there would also be a retrofit market for the Meade LX200s as well


Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: OzAndrewJ]
      #5763199 - 03/28/13 09:13 PM

Dunno if 10X as long is available in this case. He's already built something...

-Rich


Post Extras: Print Post   Remind Me!   Notify Moderator  
StarmanDan
Post Laureate
*****

Reged: 08/27/07

Loc: Deep in the heart of Texas
Re: Encoder-based PE Correction on the cheap new [Re: Starhawk]
      #5763225 - 03/28/13 09:29 PM

Another question: Why use an Arduino? Couldn't a computer perform the same task? Some of these encoders already incorporate a serial output.

Post Extras: Print Post   Remind Me!   Notify Moderator  
Jim McGee
member


Reged: 04/21/07

Re: Encoder-based PE Correction on the cheap new [Re: StarmanDan]
      #5763270 - 03/28/13 09:59 PM

First, I think this is a great idea. I'm looking forward to seeing the results of testing with actual on-the-fly adjustments sent to the mount.

Second, does anyone know where I can actually purchase an appropriate encoder? I'm in the US and I have a CGE that desperately needs something like this. My web searches have not turned up anything that shows an actual price of less than $1000.

Edited by Jim McGee (03/29/13 12:21 AM)


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Jim McGee]
      #5763528 - 03/29/13 01:43 AM

Dan - you are right, a PC can do it. I'm not aware of encoders with PC-style serial ports, but the Gurley 320K tick interpolating encoder that's used by many SiTech users is over $600. And it's a Russian encoder. I think the extra cost is due to the interpolation electronics.

My whole scheme (scam?) is to make the interpolation electronics as cheap as possible. If the electronics can also do the mount corrections then that's just icing.

Jim, as I've stated above, I contacted the Heidenhain office where I live. You could try these guys..

http://www.heidenhain.us/contact.php

The encoder I'm planning to use going forward is ERN 480 x 5000 ID: 385480-17

Although of course if you want really cheap, go scrounge on eBay. Make sure the encoder has sine-cosine output, and that you can get a data sheet for it (so you know how to wire it up).


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5763707 - 03/29/13 06:13 AM

Tentatively, success has been achieved.

Note: the periodic error displayed here is from the encoder, not from the sky! hence I don't have PEMPro data yet, it's raining hard (and still daylight).

Hopefully within the week I'll be able to get PEMPro data.

I did not quite achieve 1" peak-to-peak. More like 2" peak-to-peak. This is with corrections every 0.5 second. Seems the CGEM is not responsive to guide pulses much shorter than 100ms.



Notice the large error (first graph) that suddenly goes to zero. That's when I plugged the ST-4 cable into the CGEM's autoguider port.

The second graph is the tracking error with ST-4 correction enabled. It is about 4" peak-to-peak (the worst excursions) although majority of the error is within 2" peak-to-peak.

And the RMS error is 0.54" (the numbers on the graph are deci arcseconds (i.e. 10 = 1") because I'm using floating point as little as possible.

The only difference between today's update and last week's, is I have added the code to calculate the tracking error and control the ST-4 output. Needless to say I have also wired an optocoupler to the Arduino to talk to the CGEM.

There is no capability to accept ST-4 input yet (I will need to wire a jack to the Arduino, and I don't have such a jack).

Raw putty data from the Arduino is here - https://dl.dropbox.com/u/63497702/encoderdata-2ch-withST4.log

the columns are:
time (milliseconds)
channel A ADC count
channel B ADC count
calculated theta (interpolated value, from 0.. 2592)
slot number (0.. 5000)
raw encoder angle
measured angle
expected angle
error
required pulse width
RA+ pulse width
RA- pulse width

all angles are in deci-arcseconds.

The Excel spreadsheet above - https://dl.dropbox.com/u/63497702/encoderdata-2ch-withST4.xls

and the source code - https://dl.dropbox.com/u/63497702/read_encoder.7z

Note that at this time, there are a lot of hard-coded stuff

1) it assumes a 5000-tick encoder
2) it assumes you are in the northern hemisphere
3) it assumes your ST-4 is wired correctly (some ST-4 jacks reverse the RA+ and RA-) - in my first attempt, the errors got bigger and bigger as the Arduino tried to correct, so I just swapped the RA+ and RA- wires.

Obviously in a mass-market build, things like these should be automatic, or there should be a switch and a red LED to tell you things are screwing up. Right now there is nothing, only the serial port output to tell you how things are going.


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5763746 - 03/29/13 07:21 AM

By increasing the correction rate to 200ms (5X per second, instead of 2X) and decreasing the tolerable error from 0.6" to 0.3" I have been able to reduce the peak-to-peak PE to about 1.2" and the RMS PE to 0.23"



That's at the encoder.. still have to update with what PEMPro says.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Raginar
Postmaster
*****

Reged: 10/19/10

Loc: Rapid CIty, SD
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5763947 - 03/29/13 09:15 AM

Wow, cool Orly .

Post Extras: Print Post   Remind Me!   Notify Moderator  
petemumbower
Carpal Tunnel


Reged: 07/12/09

Loc: West Michigan
Re: Encoder-based PE Correction on the cheap new [Re: Raginar]
      #5764069 - 03/29/13 09:52 AM

Great work so far Orly! This is perfect timing too: I just got another Arduino UNO board for my birthday, have a CGEM, and been waiting for the Celestron fix. But I think your project here is a much better solution than I seen over on the Celestron Beta forum.

So now I am wondering the best route for acquiring a plate and plug to attached the encoder too. Sure wish I still worked at a machine shop!

Do you have a current list of the "parts"?

Keep up the good work, I will be for sure implementing this ASAP.


Post Extras: Print Post   Remind Me!   Notify Moderator  
galaxy_jason
Vendor


Reged: 05/22/07

Loc: Texas
Re: Encoder-based PE Correction on the cheap new [Re: petemumbower]
      #5764234 - 03/29/13 11:02 AM

Pretty cool!
I love the Arduino.


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: petemumbower]
      #5764249 - 03/29/13 11:07 AM

Yes I do have a list. As-is, the system is not very robust to massive changes in direction (i.e. if there is a GoTo slew).

What it does now is, if it sees a huge change in angle, it gives up and recalibrates. I had this idea to add gross quadrature decoding (using the TLC3702 comparator). But it works fine now without the gross decoding.

One ugly hack that can be done now is, reset the Arduino after each GoTo slew. It will then wait for 5 seconds for everything to settle, before trying to correct.

Parts list..

1) Arduino Uno
2) MCP3304 ADC ($4)
3) LM385 voltage reference ($1) - this isn't really needed, even with the 5V reference the ADC was getting enough counts that interpolation works. But with the 1.24V reference, I get full counts in the +/- 2500 range instead of +/- 500. In theory that would allow finer interpolation

4) ACPL 847 opto-coupler

and of course the big ticket item is the encoder...

I want to make the schematic pretty before posting it here, but the code link is the current working prototype (albeit with 0.5 second correction interval - it's easy to find the #define to change that)

As for the plug... Josh Balsam machined it for me (jbalsam on this forum). The thread of the CGEM polar scope shaft is M28 x 1mm. My existing plug is 60mm long. But you'd need a different one for different encoders. Note that the Heidenhain ERN-480-5000 has a 12mm blind shaft.


Post Extras: Print Post   Remind Me!   Notify Moderator  
petemumbower
Carpal Tunnel


Reged: 07/12/09

Loc: West Michigan
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5764308 - 03/29/13 11:23 AM

Are you currently using the ERN-480-5000? Thought I read you had the Baumer with 1" hole. Maybe I missed something later in the thread. I do notice how little there is out on the net about this encoder and ordering it in general. I will contact the Heidenhain here too to see. But I agree that the more everyone uses the same encoder/hardware, the better the project. Removes many of the variables when other encoders come into play.

Did I read earlier that you were going to work on allowing autoguider inputs into this system? I do image at longer focal lengths and will need to autoguide still.

Correct me if I am wrong, but currently after a slew the Arduino has to be reset. Does that mean powered down/up?

Lastly, how are you getting the data points from the encoder? Is there an external app you are getting a dump from the Arduino? I do not remember if the program to edit and upload code had a terminal console to get this info.


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Raginar]
      #5764415 - 03/29/13 11:46 AM

Current Schematic Diagram:



Component Placement on Breadboard:



Other end of 6P6C RJ12 Cable:



Basically the optocoupler and RJ12 cable "close the loop" and allow the Arduino to do something about the periodic error it is seeing.


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5764434 - 03/29/13 11:50 AM

The Arduino just outputs all its intermediate data to the serial port.

I am using "putty" to capture the serial port output and dump it to a file. But the Arduino works fine without a PC.

To reset the Arduino - press the reset button. I said it may be necessary to reset the Arduino after a slew; but the code right now tries to do the right thing. For example if you whack the mount and there is a large excursion, it will not try to correct that, but will settle down on the new value and try to correct around that.

The thing is, you can't have a correction pulse that's longer than the sampling interval, so if there is a truly huge error, it will take many, many cycles to correct, which will oblongate the stars anyway.

So my philosophy is, try to correct small errors, but if there's a very big one, don't try to correct it. This behavior is easily changed in the code (look for the calibrate variable). The definition of a "big" error is if it takes more than 10,000 ms (10 seconds) to correct. Hard-coded.

Right now it does not handle autoguider input at all. I need a 6P6C RJ-12 port that the external AG (e.g. GPUSB) can plug into. Once I have that it will be trivial to add autoguider support in the code.

And yes, I'm using the Baumer. But I found out those cost $700 new. So not a good idea to follow my example.


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5766073 - 03/30/13 02:30 AM

After some more thought, I realized that the Arduino Uno doesn't have enough pins to implement the remaining functionality.

A few more digital input pins are needed to:

1) read the switch to determine EQ North / EQ South operation

2) read the switch for sidereal vs king rate tracking

3) read the switch to reverse RA guiding (in case of an ST-4 port that is wired in reverse)

4) read the Encoder A and Encoder B digital inputs (via comparator) for fast (hardware) gross movement detection

There are probably more features/requirements that I haven't thought of.

So I should move the design to an ATMega2560.

The problem is both the UNO and Mega use ceramic resonators for their clock, which only has a 100ppm resolution. It is a complete pain to replace the resonator with a real crystal (requires modding the board).

The ceramic resonator @ 100ppm would drift by about 130" in a sidereal day, or about 2" in 20 minutes.

A normal crystal oscillator @ 20ppm would drift by 1" in 60 minutes.

A TCXO @ 2.5ppm would drift by 1" in 7 hours, plenty accurate enough (iOptron makes much of the fact that the iEQ45 with Renishaw encoder has a TCXO).

The ultimate in timing - short of an atomic clock! - is an oven-controlled crystal oscillator (1ppm) but those cost $250 just for the crystal.

PICMX-based Max32 boards have a TCXO. So I will probably move the design to this board, which costs about $80 - $90 (compared to $50 for a MEGA and $30 for an UNO), since the price needs to be paid for the extra pins anyway.

The PICMX also is much more powerful (80MHz, 512K RAM, has real floating-point math) and can run things like a touchscreen, color TFT LCD.....


Post Extras: Print Post   Remind Me!   Notify Moderator  
mattflastro
Vendor - Astrovideo Systems


Reged: 07/31/09

Loc: Brevard County , FL
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5766124 - 03/30/13 03:58 AM

This is a great idea to experiment and you deserve a lot of credit for starting this project.
Just a word of caution , there are some internal error sources that are inherent in such a design.
Some that could be introduced by the encoder itself due to its mechanical mounting .
Also due to electronics . The encoder sine and cosine outputs have some deviations in amplitude, phase and shape froma perfect sin/cos.
No encoder has infinite accuracy and if you want 20 mil cpr the encoder needs to be specified for that. Not just any sine/cosine analog encoder has its outputs accurate enough for this level of accuracy. No matter how much you interpolate, you are limited by the encoder sine/cosine hardware accuracy .
Then you're using a fast SAR A/D , which has its own error sources. Most notably a power supply rejection ratio of only 74dB and offset of up to 6LSB, plus a couple of LSB here and there for smaller errors but they add up . If you take a look at the A/D LSBs, I'm sure the lowest 2-3 bits are bouncing up and down buried in noise . In order to have 12 "good" bits it'd need a signal to noise ratio of 72dB . I doubt the breadboard you have is silent enough to not introduce supply noise .
Then there's the reference voltage noise and drift . All the little offsets, power supply and reference induced noise, drift , etc add up and you need really good pcb design techniques and really good precision components to have true 12 bits , or you need to compensate a lot thru firmware , average a large number of A/D samples, filter, track temperature to compensate for drifts etc.
The problem is not that you want 20 mil cpr but when you calculate the arctan , the error of this calculation has an error that increases in inverse proportion with the cosine value. The cosine value is affected by the A/D error, especially for low cosine values so you get a deviation from the real angle just due to division by small numbers . Then your feedback loop just happily tracks these errors as much as it does track the mount errors.
So all being said , it's great that the device works as it does right now but you need to test real tracking to make sure you're not seeing and tracking your encoder and electronics errors .


Post Extras: Print Post   Remind Me!   Notify Moderator  
freestar8n
Post Laureate
*****

Reged: 10/12/07

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5766157 - 03/30/13 04:44 AM

Hi orlyandico-

This is an interesting project and I see you are making good progress on it. I am curious to see what kind of results you ultimately get in unguided images - but if you are aiming for better *guided* images then I'm not sure there will be a big difference.

In this thread people talked about what is needed to remove a frequency that is not commensurate with the fundamental period - and that can be done easily with software if you are guiding. The ability to lock in to a specified frequency and correct for it preemptively is something I implemented in MetaGuide many years ago, and I'm somewhat surprised no one else has done it.

The reason I don't promote or recommend such an approach is that I find such terms can be removed just by tight guiding and low latency corrections with an accurate centroid - particularly with OAG.

So although you may be reducing the measured PE with this device - if you are aiming for smaller fwhm, then the real goal is to get very small fwhm stars in the end.

Anyway - I'll be interested in results you get - particularly with regard to the final fwhm you achieve in guided or unguided shots.

Frank


Post Extras: Print Post   Remind Me!   Notify Moderator  
cn register 5
scholastic sledgehammer


Reged: 12/26/12

Re: Encoder-based PE Correction on the cheap new [Re: mattflastro]
      #5766164 - 03/30/13 05:03 AM

The EQ North or EQ South question can be resolved by looking at the direction the Ra axis is rotating rather than relying on the user to set it correctly. You should be in a good position to try this!

I'd be tempted to put most of the other setup data that requires switches into a setup program on a PC that sends commands to the Arduino through the USB connector. That will remove the need for a lot of configuration switches. The Arduino can remember the setup for next time.

I'd also avoid lots of additional features, that can easily cause this project to be never ending.

Chris


Post Extras: Print Post   Remind Me!   Notify Moderator  
Armando
member


Reged: 12/26/05

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5766179 - 03/30/13 05:38 AM

Hi Orlando,

Quote:

1) read the switch to determine EQ North / EQ South operation


At start-up a quick "training" could be performed just to determine N/S hemisphere location.

Quote:

3) read the switch to reverse RA guiding (in case of an ST-4 port that is wired in reverse)


You can add an hardware manual switch to revert RA outputs.
Anyway you can still revert the outputs by software according to start-up training results (when required)...

Quote:

The ceramic resonator @ 100ppm would drift by about 130" in a sidereal day, or about 2" in 20 minutes.

A normal crystal oscillator @ 20ppm would drift by 1" in 60 minutes.


I think guiding is still essential.
Even if adding ST4 inputs will involve firmware complications, I think it's the cheapest mode to ignore these oscillator issues: guiding software will take care of them and "reset" the consequent drift.

CS
Armando Beneduce


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Armando]
      #5766331 - 03/30/13 09:10 AM

Hi all,
Thanks for the updates. Particularly around the limits of interpolation.

The ERN480 is only rated to 1/20 grating period so high interpolation is going to be more wishful thinking than reality.

And yes thanks for pointing out that at low cosine terms the error will increase. I am currently doing 16 fold averaging.

But one way to sidestep the cosine term issue is to NOT believe the encoder when the cosine term is small. That would mean at worst 5 seconds when we are blind. The encoder has a slot period of 17 seconds.

I agree that tight guiding will address all these issues. I want something dead simple for unguided imaging. And frankly it sounds like a cool thing to do.


Post Extras: Print Post   Remind Me!   Notify Moderator  
ccs_hello
Postmaster
*****

Reged: 07/03/04

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5766360 - 03/30/13 09:29 AM

Found a set of pictures: http://www.mda-telescoop.com/index.php?option=com_content&task=view&i...
I don't think it uses interpolation.

Clear Skies!

ccs_hello


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: ccs_hello]
      #5766365 - 03/30/13 09:33 AM

It uses an ERN480.

So I don't see how they can get the required accuracy without interpolation.


Post Extras: Print Post   Remind Me!   Notify Moderator  
ccs_hello
Postmaster
*****

Reged: 07/03/04

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5766372 - 03/30/13 09:39 AM

Yeah. I think the use case is quite different (most likely "push to" DSC system.)

I somehow feel using worm-shaft side encoder with "zero" position index (to count number of worm shaft rotations) is an easier task to tackle from positioning accuracy point of view.

Clear Skies!

ccs_hello


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: ccs_hello]
      #5766395 - 03/30/13 09:59 AM

The link to the MDA Teleskoop site is for a TDM. Which does periodic error correction using an encoder.

As for having an encoder on the worm... The Temma uses a worm side encoder. So the only issue is worm periodic error.

But most mounts put the encoder on the motor, where it can't compensate for errors in the gearbox.


Post Extras: Print Post   Remind Me!   Notify Moderator  
ccs_hello
Postmaster
*****

Reged: 07/03/04

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5766401 - 03/30/13 10:03 AM

(DC perm mag) motor shaft encoder is only used to form the servo loop, with so high the gearbox reduction, will not be useful for any form of PEC.

Clear Skies!

ccs_hello


Post Extras: Print Post   Remind Me!   Notify Moderator  
cn register 5
scholastic sledgehammer


Reged: 12/26/12

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5766456 - 03/30/13 10:33 AM

Quote:

But one way to sidestep the cosine term issue is to NOT believe the encoder when the cosine term is small. That would mean at worst 5 seconds when we are blind. The encoder has a slot period of 17 seconds.



What I did for dome azimuth determination using a magnetic sensor was use Atan(Sin/Cos) when Cos was greater than Sin and 90 - Atan(Cos/Sin) when Sin was greater.

Chris


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: cn register 5]
      #5766505 - 03/30/13 10:56 AM

Chris, great idea!!! Thanks!!!

Will do that.


Post Extras: Print Post   Remind Me!   Notify Moderator  
mattflastro
Vendor - Astrovideo Systems


Reged: 07/31/09

Loc: Brevard County , FL
Re: Encoder-based PE Correction on the cheap new [Re: cn register 5]
      #5766654 - 03/30/13 11:51 AM

Quote:

Quote:

But one way to sidestep the cosine term issue is to NOT believe the encoder when the cosine term is small. That would mean at worst 5 seconds when we are blind. The encoder has a slot period of 17 seconds.



What I did for dome azimuth determination using a magnetic sensor was use Atan(Sin/Cos) when Cos was greater than Sin and 90 - Atan(Cos/Sin) when Sin was greater.

Chris



That's a good method and is used with success, but keep in mind there will be a jump in the calculated value at the crossover point between sin being greater and cos being greater when you flip the division from arctan to arccot . I've seen much more sophisticated methods being employed such as Kalman filtering .
Also another thought, if you consider the switch from Atmega to PIC, take a look at the Raspberry Pi, cheaper than the PIC thingy and much more powerful .


Post Extras: Print Post   Remind Me!   Notify Moderator  
brave_ulysses
super member


Reged: 04/19/09

Loc: far outside the wire
Re: Encoder-based PE Correction on the cheap new [Re: mattflastro]
      #5766692 - 03/30/13 12:00 PM

stm32f4 discovery boards are ~$15.00 us.

might take a look


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: mattflastro]
      #5766926 - 03/30/13 02:04 PM

Hi Matt,

I just did a simulation of the jump from arctan to arccot (using real A/D data), and the values are the same. So the benefit of switching to arccot would be getting rid of some of the uncertainty around the low bits of the ADC which are prone to jitter.

On the other hand... the test on the sky is not as good as the encoder would say It looks like there is some long-cycle interpolation artifacts, so the PE over short periods (say 2-3 minutes) is incredibly smooth, but over long periods drifts consistently first in one direction, then slowly to another direction.

PEMPro reports a PEC in the +/- 4" range right now, but the results are not worth reporting yet. I will add the arctan/arccot routine and throw away the last two bits of the AD and see...


Post Extras: Print Post   Remind Me!   Notify Moderator  
Armando
member


Reged: 12/26/05

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5767016 - 03/30/13 02:56 PM

Hi Orlando,

the value of 1/20 grating period indicated about system accuracy is about 12''.
It could be referred to overall accuracy (not referred to the accuracy achievable on each period) and could justify drift on longer periods (3 minutes correspond to more than 10 encoder periods).
I really hope the issue is related to something else.


Post Extras: Print Post   Remind Me!   Notify Moderator  
vdb
sage


Reged: 12/08/09

Re: Encoder-based PE Correction on the cheap new [Re: Armando]
      #5767040 - 03/30/13 03:10 PM

I'm no specialist but what I've read so far is that there are 2 possible causes that I can think of causing the drift in PE over longer periods.
- accuracy of the encoder, gurley encoder is notorious for this that is why there is TIC management in the scitech controller to get rid of it, they can use the motor encoders to do this, you can't
- physical connection and orthogonally of the encoder, if that is not 100% you can introduce what you see ...

Again thinking out loud ... by no means expert advise ...


Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: vdb]
      #5767054 - 03/30/13 03:24 PM

Both of those suggestions are quite good.

And the least significant bit could be a source as well.

I'm wondering if it isn't possible to get the equivalent of a perfect track by treating this as a PID controller problem. I mean watching the position error reports and doing a proportional correction backed up by integral and derivatives of the cumulative error to moderate the correction. Specifically, a steady state oscillation is the hallmark of integral instability. This can be damped with derivative control.

-Rich


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Starhawk]
      #5767081 - 03/30/13 03:48 PM

I flunked linear systems design the first time i took it

so nobody talk to me about PID control!

that said, what I am seeing is that on short time scales the system is stable, but occasionally there are "jumps" in the PEMPro graph but no corresponding jump in the Arduino log.

what I think is happening is, there is a major jump in the movement of the encoder but the Arduino doesn't see it. A hardware solution I can use is to put comparators on the encoderA and encoderB inputs. Then I interrupt the Arduino whenever these change state, and reset the angles to zero.

That way there is a sanity check every 17 seconds, and the system won't have a chance to drift too far away. Right now I am keeping track of the slot count in software, which I think has a tendency to go off sooner or later.

And to all, thanks for the very useful input. I never thought I could use my EE training for something this interesting


Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5767098 - 03/30/13 04:05 PM

Can you have the Arduino report the encoder values it sees and what its output response is? If you could plot these against the pempro graph, I expect it would reveal all.

-Rich

Edited by Starhawk (03/30/13 04:06 PM)


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Starhawk]
      #5767212 - 03/30/13 05:28 PM

I found some jumps in the plot. Looks like very rarely the ADC (or encoder) glitches and produces a wildly divergent set of voltages (whose radius is way outside the described ellipse).

I also plotted the A and B voltages against each other and got a nice round plot. But it's not a perfect circle. I just read in someone's EE Masters thesis that part of the pre-conditioning is to transform this ellipse to a circle. Definitely not doable on an Arduino Uno...


Post Extras: Print Post   Remind Me!   Notify Moderator  
Armando
member


Reged: 12/26/05

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5767389 - 03/30/13 06:56 PM

Maybe a cap on Vref and a selection of the samples on which compute the mean values can help.

Post Extras: Print Post   Remind Me!   Notify Moderator  
cn register 5
scholastic sledgehammer


Reged: 12/26/12

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5767404 - 03/30/13 07:09 PM

This is all so similar to what I did for dome azimuth calibration.

I rotated the dome through 360 degrees and determined the maximum and minimum X and Y values and used that to get offset and scale values that I used to get X and Y to the same range.

It isn't perfect because it assumes that the ellipse is aligned with one of the axes but it seems to get pretty close.

Even if a transform is required it should end up being nothing more than multiplying by a 3x3 transform matrix.

There is a real risk that the 8/3 PEC error will be replaced by another non-integer error at the encoder resolution, but this might be compensated for by a PEC table in the Arduino.

Chris


Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: cn register 5]
      #5767660 - 03/30/13 09:30 PM

Ok, so what is your logic trying to do with the error input? This would seem to me to be an opportunity to correct this- is it trying to drive every error back instantly, or is it trying to drive cumulative error down?

Also, are you thinking there is a real jump in the axis the Arduino isn't picking up, or there is an electrical artifact?

-Rich


Post Extras: Print Post   Remind Me!   Notify Moderator  
brave_ulysses
super member


Reged: 04/19/09

Loc: far outside the wire
Re: Encoder-based PE Correction on the cheap new [Re: Starhawk]
      #5767691 - 03/30/13 09:46 PM

this was a new one on me... < $100 us for the encoder + code wheel

17 bit digital output + analog quadrature output

http://www.avagotech.com/pages/en/motion_control_encoder_products/absolute_en...

http://www.avagotech.com/pages/en/motion_control_encoder_products/code_wheels...


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: brave_ulysses]
      #5768022 - 03/31/13 02:17 AM

Rich, I don't know if it was an electrical artifact or not. But the voltage is 1Vpp so the diameter of the Lissajous plot circle should be 1V - but there were a handful (less than 0.2%) of samples that were outside the 0.5V radius circle - which is physically impossible.

So by maintaining a cumulative average of the radius, I can throw away readings outside this range. Very few readings are there (<10 out of 7000) but those were enough to cause a jump in the guiding of about 15".

Also from looking at the Lissajous plot, the A channel had an offset of 6 ADC counts, the B channel had no offset (both channels should be centered at zero, e.g. average value zero). And on a full-range of 1300 counts (decimating the last 2 bits as suggested by Matt) the A channel had a radius of about 668, and the B channel had a radius of about 660. So it is obviously a very slight ellipsoid.

Now for my brain-damaged "solution" - by decimating 3 more bits (total of 5 bits) the Lissajous plot magically becomes centered at zero (the offset gets thrown away) and the Lissajous plot becomes a perfect circle.

Interestingly enough, even with so much decimation (essentially only 8 bits left per encoder channel) the arctangent computation is still accurate to within 0.2".

I guess that's all the signal conditioning I can do without resorting to math that is beyond my comprehension... but I also read some IEEE articles (had to pay - because am not a member) that state that 0.26% interpolation accuracy (~ 400X) is as good as you can get with good signal conditioning.

Since my signal conditioning is not good, I should really aim for just 100X interpolation - which is 2.6" per tick.

Seems like 2" p-p is not achievable..


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap *DELETED* new [Re: orlyandico]
      #5768023 - 03/31/13 02:18 AM

Post deleted by orlyandico

Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5768030 - 03/31/13 02:31 AM

BTW. One cycle of the raw periodic error:



Note the approximately ~3 cycle waveform. That's the massive 8/3.

One cycle with the encoder active:



Notice that the absolute magnitude of the PE hasn't changed (the downward trend is due to polar misalignment) but on short time scales the PE is much smoother with the encoder active. And I don't see any 17-second artifacts (which would occur if there was some interpolation funny business going on).

This convinces me that there's good data coming out of that encoder.. it's just a matter of writing the right software.

And Ulysses, that sounds like an interesting encoder. Absolute, on-board interpolation. But it's only 128K ticks full count (about 10" per tick). And you can't interpolate that further..


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5768054 - 03/31/13 03:49 AM

Looking at that "corrected" waveform - doesn't it look suspiciously like the fundamental?

On my CGEM the fundamental is 16" p-p, or 0.033 arc-sec / second.

And my 8/3 is 22" p-p (!!!) or 0.12 arc-sec / second.

On the above graph I was using 0.25-second correction intervals. And the 8/3 got knocked out but the fundamental did not.

Over 0.25 second, the fundamental would be 0.008" and the 8/3 would be 0.03" - and looks like the encoder can discriminate the 8/3 but not the fundamental.

On a "good" CGEM the 8/3 is 6" to 7" and it would take a 1-second exposure to produce a 0.03" displacement. So it looks like a 1-second sampling interval should make both a 16" fundamental and 7" 8/3 visible..

The huge downside.. looks like based on the math, if the mount has 8" p-p PE, it would take 2-second sampling intervals to make that visible (and 4 seconds if the PE is 4" p-p). There are definite diminishing returns due to the stone-age analog section and signal conditioning.

Well.. I will try 1-second intervals if the weather permits and see.. but looks like 2" p-p is a pipe dream now..


Post Extras: Print Post   Remind Me!   Notify Moderator  
Armando
member


Reged: 12/26/05

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5768094 - 03/31/13 05:19 AM

Hi Orlando,

are you sure a (120 Ohm) terminating resistor is not required on each differential input?
Maybe some noise is related to the missing resistors...


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Armando]
      #5768104 - 03/31/13 05:39 AM

Not sure Armando. My understanding of the data sheet is that the encoder has a source impedance of 120 ohms...

Post Extras: Print Post   Remind Me!   Notify Moderator  
Armando
member


Reged: 12/26/05

Re: Encoder-based PE Correction on the cheap new [Re: Armando]
      #5768105 - 03/31/13 05:39 AM

There could be also the need for an RC filter for each ADC input.

Post Extras: Print Post   Remind Me!   Notify Moderator  
Armando
member


Reged: 12/26/05

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5768109 - 03/31/13 05:47 AM

I think that subsequent electronics should include terminating resistor.
The use of RC filters (one for each ADC input) should be of help to reduce noise and also because of the need of constant voltage on the - input during the ADC sampling.


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Armando]
      #5768111 - 03/31/13 05:48 AM

Am already doing 16x oversampling for each channel (take 16 readings and average). If my sampling interval decreases due to the necessity of needing more time to accumulate errors, I can increase the oversampling some more.

I always prefer doing things in software than hardware

Besides even with the transient noise I'm getting some improvement. So I think the approach is valid and just needs some more iteration.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Armando
member


Reged: 12/26/05

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5768126 - 03/31/13 06:07 AM

Hi Orlando,

I already gave a look at your code and suggested to discard some samples when required.
But I think it's worth adding 4 resistors and 4 caps.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Raginar
Postmaster
*****

Reged: 10/19/10

Loc: Rapid CIty, SD
Re: Encoder-based PE Correction on the cheap new [Re: mattflastro]
      #5768380 - 03/31/13 09:51 AM

Matt,

I love hearing someone talk about Kalman filters . It's what keeps our INSs running!

Chris


Post Extras: Print Post   Remind Me!   Notify Moderator  
mattflastro
Vendor - Astrovideo Systems


Reged: 07/31/09

Loc: Brevard County , FL
Re: Encoder-based PE Correction on the cheap new [Re: Armando]
      #5768959 - 03/31/13 02:49 PM

Quote:

I think that subsequent electronics should include terminating resistor.
The use of RC filters (one for each ADC input) should be of help to reduce noise and also because of the need of constant voltage on the - input during the ADC sampling.



Signal conditioning IS a requirement for such a high level of accuracy as this project is trying to achieve.
I would have thought a low pass anti aliasing together with noise filter were already in place.
Proper bypassing of supply, no ground loops, no mixing analog sensor and AD ground with the digital ground, bypassing of voltage reference.
Also some software things:
- oversampling x16 gives a 4 fold signal to noise improvement which cleans up 2 bits of the AD conversion . If you had 4 bit buried in noise, after using x16 oversampling, you will have only 2 bits under the noise floor.I am a little puzzled by the small oversampling ratio. You need to sample the motion with let's say 0.1 arcsec period. That's 150 samples per (time) second . Your AD has a sampling rate of 100ksps max. You are oversampling x16, that means you're running at a 2.5ksps , which is very low . You could get a higher sampling rate and further improve the accuracy by 2 more bits.

- the offset error can be easily calibrated without complex software.
- for each channel you'd have to keep track of the maximum and minimum values read from the AD, over a period of time that's longer than the sin and cos period . This would give the peak to peak value .
- max-min=pk to pk. Do this for the sin and the cos.
- calculate pk to pk for sin and divide by pk to pk for cos .
Multiply the cos channel with this value in order to bring it to the same scale as the sin channel. This takes care of the ellipse and turns it back into a circle.

- (max +min)/2=center value for each channel.
- calculate center sin -center cos =offset. Calculate this value to take care of the offsets.
Then every time you need to calculate the arctan or arccot , first normalize the cos by adding the offset (brings cos to the same level as the sin) and multiplying the result with the value you calculated and stored above (brings the cos to the same "gain" as the sin).
This calibration should be ongoing, because it's not hard to calculate and store these max and mix variables for sin and cos.

You may also consider placing an origin sensor on the shaft together with your main sin/cos encoder . Your system actually has 2 sources of periodic error, one is in the drive mechanism, and the other is in your feedback loop being the error of your gazzilion ticks interpolated encoder. You need to treat the encoder error the same way you would treat any periodic error, by doing PEC , so you need an origin sensor on the encoder. But once you calibrated the PEC of your encoder, the beauty of it is that it's much smoother and more stable than the worm drive periodic error. So in essence, if you do the filtering, offset removal, value normalization and encoder PEC, you'll be able to achieve the goal.


Post Extras: Print Post   Remind Me!   Notify Moderator  
mattflastro
Vendor - Astrovideo Systems


Reged: 07/31/09

Loc: Brevard County , FL
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5768973 - 03/31/13 02:52 PM

Quote:

Not sure Armando. My understanding of the data sheet is that the encoder has a source impedance of 120 ohms...



Given that the signals are slow changing there's no need for impedance matching . But there's a need for low pass filtering because you don't want wideband noise to be picked up, aliased and downconverted by the AD sampling .


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: mattflastro]
      #5769041 - 03/31/13 03:19 PM

Matt, taking 32 readings (16x A and B) is already taking about 9-10ms. So that's only 3.2 ksps. The reason being.. I am bit-banging the SPI protocol instead of using the built-in SPI hardware.

I did some more measuring and it seems the ceramic resonator on the Arduino Uno is off (86482 seconds/day effective, when it should be 86400). That's a tolerance of 1000ppm, and over one worm period (479 seconds) it causes a deviation of 7". This is significant.

Also I don't think I'm reading the encoder properly. Or there are aliasing artifacts. I can't verify my readings because I don't have a super-precise rotational source, and the polar bore on the Mach1 doesn't rotate (I could have used it as a reference).


Post Extras: Print Post   Remind Me!   Notify Moderator  
mattflastro
Vendor - Astrovideo Systems


Reged: 07/31/09

Loc: Brevard County , FL
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5769371 - 03/31/13 05:56 PM

Quote:

Matt, taking 32 readings (16x A and B) is already taking about 9-10ms. So that's only 3.2 ksps. The reason being.. I am bit-banging the SPI protocol instead of using the built-in SPI hardware.

I did some more measuring and it seems the ceramic resonator on the Arduino Uno is off (86482 seconds/day effective, when it should be 86400). That's a tolerance of 1000ppm, and over one worm period (479 seconds) it causes a deviation of 7". This is significant.

Also I don't think I'm reading the encoder properly. Or there are aliasing artifacts. I can't verify my readings because I don't have a super-precise rotational source, and the polar bore on the Mach1 doesn't rotate (I could have used it as a reference).



So now's the time to write the real software and develop the real hardware, where you have real signal conditioning and real hardware SPI , higher sample rate, a $5 TCXO , and all sorts of other goodies that will actually make all the difference. What you did up to this point was great because it shows the potential. From now on it depends if you want to turn this into a finished product or it was done just to satisfy the desire to tinker.


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: mattflastro]
      #5770479 - 04/01/13 10:52 AM

Progress has come almost to a standstill.

I did manage to convert the ADC routine to use hardware SPI, which means I can now get 32ksps @ 2MHz SPI clock. This lets me do 256X oversampling. I think it's overkill though.

However.. with regards to the signal conditioning, etc. Check this out:



Top graph is a screenshot from PEMPro (I could not import the PEMPro text data easily) and bottom is an Excel graph of the data from the encoder. This is with my super-decimation algorithm (which does 16X oversampling and throws away the rightmost 5 bits).

The interpolation algorithm is measuring the PE accurately, it wasn't just my imagination

So even with the complete lack of signal conditioning and the 32X decimation and 16X oversampling, the encoder is still returning accurate (ish) data.

Of course the absolute terms aren't exactly the same, as the encoder isn't aware of RA drift due to imprecise polar alignment, but PEMPro is.

I also tried capturing encoder data while PHD was actively guiding the mount. This resulted in a peak-to-peak error (according to the encoder) of 1.5" and an RMS of 0.8". The RMS figure is about 1/2 of what PHD was reporting though..


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5770496 - 04/01/13 10:59 AM

Also, Matt - I understand about the encoder having an induced PE due to the interpolation - and the Gurley has this, so SiTech uses the motor encoder to correct for it.

But I am not sure how i can measure the PE of the encoder itself, given that I don't have an air table and super-precision master encoder to provide the reference.

I would assume though that the periodic error in the encoder is sub-17 second in period (it would only happen when interpolating between grating slits). This encoder actually has an index channel that I'm currently not using - because the voltage on it doesn't look good (slowly varying).

I will put a couple of comparators on A and B though, so I can get square-wave quadrature signals for 0, pi/2, pi, and 3pi/2. These can (probably) serve as indexing marks for the periodic error correction.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Mert
Post Laureate
*****

Reged: 08/31/05

Loc: Spain, Pamplona
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5770530 - 04/01/13 11:20 AM

IMHO Orlando, the PE of the encoder would be insignificant
over 1 worm period.
With this I try to express that for normal imaging purposes
that drift would not affect soo much.
Myself I'm using an EQ6 with EQMOD and sometimes I get drift
when using PEC, other times that drift isn't there!!

Inside the Microcode of the Arduino, do you compare the
ticks read out with the theoretical number of ticks that
should be read out when the mount would be perfect?
( I didn't have time to dig into it and see what's going
on and I'm no Arduino programmer!).

All in all I believe you are very close to your goal now!

Regards and


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Mert]
      #5771646 - 04/01/13 08:26 PM

Hi Mert, yes I do keep track of theoretical ticks vs measured. And the difference is the error (this is what is graphed above).

Measuring PE and correcting it are different. I used to believe "if you can measure it, you can correct it." The problem is, measuring PE is much, much easier - because PE is large.

But.. if we are correcting the PE actively, at any given time the error is small. So it's harder to measure. And if there are cyclical effects in the interpolator, they will be insignificant compared to the raw PE, but will be very significant if the PE is being corrected.

I suppose this explains the +/- 4" cycle I was seeing when actively correcting... I don't have a secondary source of ticks (like the SiTech motor encoder) but I'll try to use the 4 quadrature signals as sanity checks at 0* 90* 180* and 270* - a long way from the 64-slot SiTech solution..


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5771715 - 04/01/13 09:19 PM

This Avago white paper has a very good discussion of interpolation, the Lissajous circle, etc.

http://www.avagotech.com/docs/AV02-0865EN

and this article talks about jump and interpolation errors - http://www.nanowave.com/jumperror.pdf

Quote:

The popular Sin/Cos interpolation method commonly resolves the scale pitch into as many as 2^11 parts, while the SPPE method has been shown to resolve the scale pitch accurately into 2^19 parts.




and...

Quote:

Interpolation Error is cyclic, with the period being the grating pitch or a harmonic.





On the other hand this article says that SDE (sub-divisional error) cannot be mapped, but averaging works in some applications - http://resources.renishaw.com/en/download/white-paper-the-accuracy-of-angle-e...

Quote:

Using a Renishaw readhead for illustrative purposes, the scale and readhead index grating produce optical fringes which move laterally across the readhead photo-detector with movement of the scale. These fringes are sinusoidal in intensity and are decoded by the readhead into 2 sinusoidal voltages 90° out of phase to each other. If these two voltages are plotted against each other on an oscilloscope, a circular Lissajous is generated which rotates once per scale pitch of movement. If this Lissajous is perfectly circular and centred on the origin, rotates at a velocity truly uniform to scale motion and the means of interpolation has truly uniform angular discrimination, then the readhead interpolation will be perfect; if not, SDE will occur...

Because of its high frequency, mapping does little to eliminate the effects of SDE, but averaging over small distances can be effective for certain applications.




Post Extras: Print Post   Remind Me!   Notify Moderator  
KietTran
member


Reged: 05/14/12

Re: Encoder-based PE Correction on the cheap new [Re: freestar8n]
      #5771930 - 04/01/13 11:05 PM

Quote:

Hi orlyandico-

This is an interesting project and I see you are making good progress on it. I am curious to see what kind of results you ultimately get in unguided images - but if you are aiming for better *guided* images then I'm not sure there will be a big difference.

In this thread people talked about what is needed to remove a frequency that is not commensurate with the fundamental period - and that can be done easily with software if you are guiding. The ability to lock in to a specified frequency and correct for it preemptively is something I implemented in MetaGuide many years ago, and I'm somewhat surprised no one else has done it.

The reason I don't promote or recommend such an approach is that I find such terms can be removed just by tight guiding and low latency corrections with an accurate centroid - particularly with OAG.

So although you may be reducing the measured PE with this device - if you are aiming for smaller fwhm, then the real goal is to get very small fwhm stars in the end.

Anyway - I'll be interested in results you get - particularly with regard to the final fwhm you achieve in guided or unguided shots.

Frank



Frank, I'm just a beginner but once you slew to a new location wouldn't software have to gather enough samples to figure out the phase and frequency before corrections could be made? It seems Orly's hardware approach would provide instant corrections.

However in Orly's approach I wonder if there may be some unexpected issues. For instance I learned from a couple forums that telescopes don't always track the stars perfectly. So, I wonder if the autoguider, which is trying to center a guide star, is going to fight his encoder setup, which is trying to create perfect tracking?


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: KietTran]
      #5772021 - 04/02/13 12:23 AM

Kiet, most imagers would only slew to 1 target per session, so the limitation you point out in Frank's approach is not really an issue.

Also you are correct in that the encoder box can't compensate for varying sidereal rate in different parts of the sky, so getting the AG and encoder not to fight each other is another challenge.

Finally - unlike a guide system - the encoder can "instantly" measure periodic error and is immune to seeing. But.. It cannot correct instantly due to the imperfect drive mechanism that doesn't respond either instantly or linearly to control input.


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5772127 - 04/02/13 03:23 AM

This looks like a very interesting approach:

"Probabilistic Learning Technique for Improved Accuracy of Sinusoidal Encoders," Kavanagh, R. C. IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS, VOL. 48, NO. 3, JUNE 2001

Again, had to pay to get access

But it looks pretty easy to do and automagically compensates for non-linearities in the computed output (e.g. differing Sin and Cos amplitude, offsets, phase angle errors, rounding errors in the Arduino AVR arctangent library, ADC jitter, etc. etc.)


Post Extras: Print Post   Remind Me!   Notify Moderator  
freestar8n
Post Laureate
*****

Reged: 10/12/07

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5772137 - 04/02/13 03:42 AM

My points are irrelevant once Orly made it clear he is aiming for optimal unguided performance. As long as the goal is unguided then there is a clear benefit in reducing the amplitude of the overall PE curve by any means, and hardware encoders have advantages. I'm interested to see how well it can do while keeping the cost down - so I find this work interesting. Even if the PE can only be kept below 5" or so, it has application for things like planetary video where PE can cause the planet to move out of the field. Anything that beats what can be achieved with PEC is interesting in that regard.

But for autoguiding, Orly's math on how big the error is in each guide exposure is telling - because the long period terms produce little error, and need little correction, after each guide exposure. This points to the faster gearbox terms as most problematic for autoguiding - and those are the ones that can't be reduced by PEC.

But the fact that they tend to be fast is a bonus for methods such as MetaGuide's that lock onto the phase and amplitude - since a 2 minute term can have 3 cycles appear in 6 minutes and get a good estimate of the phase and amplitude quickly. Over time the measurement accuracy improves and the preemptive corrections become more accurate. There is no Fourier Transform involved - so there is no need for a ton of cycles for analysis, but in MG's implementation you do need to enter the frequency you seek - which for things like the 8/3 term are usually known.

Meade used an approach of looking at 3 full periods as a single period and correcting for that - and that would involve a very long overall period to correct. But in the MG implementation, the fundamental correction can be handled by PEC (or not) and the dominant non-integer term can be corrected by MetaGuiding. But as I say - in my own work I just guide tightly with low latency video and an accurate centroid, with corrections every second or so. I originally intended to add handling for other frequency terms and even discover them during guiding - but my goal was always small, round stars - and I found I could achieve that just by tight guiding.

Frank


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: freestar8n]
      #5772158 - 04/02/13 04:41 AM

Hi Frank,

What I've seen from the CGEM is that there are small, very fast terms. And by very fast I mean with <5 second period. That must be some lousy gearbox... I think even the encoder can't correct them fast enough (but it can detect them...)


Post Extras: Print Post   Remind Me!   Notify Moderator  
freestar8n
Post Laureate
*****

Reged: 10/12/07

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5772171 - 04/02/13 05:09 AM

Hi-

Yes, I can believe there are very fast terms in there - and even if the amplitude of the terms is small, the short period would produce a high rate of change - and that would dominate the guide corrections. Furthermore, if you use a long guide exposure, you would never see it even though it would be happening in the stars in the image.

On the other hand - unless your guided images in fairly short 30s exposures show clear oblong appearance in RA, I doubt that it is the limiting problem to good exposures. If you use a small guidescope it may be blind to errors on this scale and the stars end up equally blurred in RA and dec. So fixing this term might have little benefit.

I always want to see the actual stars in the image to determine what is limiting how small they are - and where effort should be directed. In your case, for unguided imaging it sounds like you have a ways to go before the 5s term becomes a limiting factor.

For Metaguiding on a 5s term it is still within reach, if you use 0.5s exposures and corrections - you would get 10 samples in a period. I was mainly focused on gearbox terms faster than about 20 seconds - which people tend to ignore completely because they are "small."

Frank


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: freestar8n]
      #5772196 - 04/02/13 06:18 AM

Frank, I knew those small terms were there due to the spiky guiding graph of the CGEM. But I never actually saw them till I started out on this encoder exercise..

Regardless, seeing the error and correcting it are two very different things. I noticed on my encoder logs that the encoder box would command a correction, and it would not be obeyed. So it would command another correction on the next sampling interval, etc. etc. I thought this was a bug on my encoder algorithm until I noticed PHD doing the same thing.

So at the end of the day mechanical hysteresis is going to limit the value of any high-speed correction mechanism.


Post Extras: Print Post   Remind Me!   Notify Moderator  
freestar8n
Post Laureate
*****

Reged: 10/12/07

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5772212 - 04/02/13 06:40 AM

Well - I recommend taking guide logs with MetaGuide, using a well-focused, bright star at long focal length just above the equator. It will record an accurate centroid at 0.5s intervals, each with a good timestamp - and things like a 5s term should show well, though it helps to have good seeing. If you take such a log I would be happy to help analyze it. Please contact me by PM if you want to follow up - so you use a recent beta version of MG. Most any video camera will work ok with a bright star at long focal length, but best is a good digital planetary monochrome camera.

It's fine if you don't want to do this - but my main point is that MG is specifically targeted at such fast terms - and you should be able to see them in a log if they are there. You may also see them visually just with an eyepiece and a reticle.

Small corrections may not get acted upon, but if you do have a term that has a high rate on the 5-20 second time scale, then there should be corrections in there that are not small. And if a correction is "missed" in one guide period, the error will still be there - and will add to the next one if it is in the same direction. That's with autoguiding on a star anyway - not sure how that works with your system.

I have found cge and cge-pro to be very responsive in RA. Dec is a different matter and has its own challenges - but I find that although dec. errors are harder to chase, they tend to be slower - so I just chase after them constantly in both directions.

Frank


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: freestar8n]
      #5772236 - 04/02/13 07:10 AM

Am not sure if a CGEM is comparable to a CGE or CGE Pro though.... Those mounts are in a higher class. And when you go higher e.g. AP, these don't need tight guiding anymore...

Post Extras: Print Post   Remind Me!   Notify Moderator  
Raginar
Postmaster
*****

Reged: 10/19/10

Loc: Rapid CIty, SD
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5772399 - 04/02/13 09:15 AM

Orly,

Have you tried taking a picture with what you have? Perhaps you've got it 'good enough' for AP just not the perfection your were looking for?


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Raginar]
      #5772518 - 04/02/13 10:22 AM

hi Chris,

No I haven't tried taking a picture.... but I kind of determined that I want perfection. Besides this would cost $500. I don't think people would pay $500 to take a CGEM to +/- 4" PE. But they might if it was +/- 2" or better.


Post Extras: Print Post   Remind Me!   Notify Moderator  
RogerRZ
Whatta you lookin' at?
*****

Reged: 01/09/06

Loc: West Collette, NB, Canada
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5772556 - 04/02/13 10:40 AM

Quote:

hi Chris,

No I haven't tried taking a picture.... but I kind of determined that I want perfection. Besides this would cost $500. I don't think people would pay $500 to take a CGEM to +/- 4" PE. But they might if it was +/- 2" or better.




Yes, he would...


Post Extras: Print Post   Remind Me!   Notify Moderator  
EFT
Vendor - Deep Space Products
*****

Reged: 05/07/07

Loc: Phoenix, AZ
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5772571 - 04/02/13 10:49 AM

Quote:

hi Chris,

No I haven't tried taking a picture.... but I kind of determined that I want perfection. Besides this would cost $500. I don't think people would pay $500 to take a CGEM to +/- 4" PE. But they might if it was +/- 2" or better.




Oh yes they would and I suspect that the well tuned mount might do better in the first place since it would be starting with lower and smoother PE and random error. If it can be done for $500, that would be great.


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: EFT]
      #5772603 - 04/02/13 11:04 AM

I think $500 is optimistic. It can be done for $500 if you assemble everything yourself (as the encoder is $325).

If it's a partial kit or something, someone would have to do the integration and that drives up cost because labor ain't free.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Alph
Carpal Tunnel


Reged: 11/23/06

Loc: Melmac
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5772933 - 04/02/13 01:17 PM

Quote:

I don't think people would pay $500 to take a CGEM to +/- 4" PE. But they might if it was +/- 2" or better.




I don’t view this project as limited to the CGEM only. I personally would be interested in a simple device that could be used to accurately measure PE of a mount in-house. To limit the cost and the hassle of building electronics board, the device should be operated/controlled from PC. What would it take to make the output from an encoder readable by PC? The data feed from an encoder could be consumed e.g by Pempro. That would be a very nice product.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: Alph]
      #5773006 - 04/02/13 01:56 PM

It would take an electronics box if you want to be inexpensive.

Otherwise, there are evaluation board setups which use software like Labview to use a PC. So, besides losing portability, that approach would also be quite expensive and entail a new software suite.

The good news is that stuff is all off the shelf, now- just go buy it.

-Rich


Post Extras: Print Post   Remind Me!   Notify Moderator  
Mert
Post Laureate
*****

Reged: 08/31/05

Loc: Spain, Pamplona
Re: Encoder-based PE Correction on the cheap new [Re: Starhawk]
      #5773067 - 04/02/13 02:26 PM

I have another question for you Orlando:

On the drift item you have demonstrated, did you check
if the sum of all the corrections done over 1 worm cycle
adds up to 0 aprox???


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Mert]
      #5774517 - 04/03/13 12:21 AM

Alph, the box as it is today can measure PE when attached to a PC via USB.

Now as we've seen, there is a good but not perfect correspondence between the PE measured by the box, and by PEMPro. I would not consider PEMPro to be the "reference" because it is affected by seeing, while the box is not.

I moved the whole box over to the PICMX32, since I will need more I/O pins going forward and the PICMX costs about the same as an Arduino Mega2560. Discovered that MPIDE and the Arduino IDE aren't 100% identical, and had to re-write some code.

Hopefully this will solve the timing issue (the Max32 has a TCXO) and the 128K of RAM will allow me to do the statistical correction in Kavanagh's article. The only challenge is I have introduced a bug in the code... the ADC reads out properly during calibration but in the main loop outputs -1.....

Mert, yes I did check and the average error over 1 cycle was close to zero (it was 0.05").


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pinbout
Postmaster
*****

Reged: 02/22/10

Loc: nj
Re: Encoder-based PE Correction on the cheap new [Re: EFT]
      #5774543 - 04/03/13 12:36 AM

Quote:

Quote:

hi Chris,

No I haven't tried taking a picture.... but I kind of determined that I want perfection. Besides this would cost $500. I don't think people would pay $500 to take a CGEM to +/- 4" PE. But they might if it was +/- 2" or better.




Oh yes they would and I suspect that the well tuned mount might do better in the first place since it would be starting with lower and smoother PE and random error. If it can be done for $500, that would be great.




that's cheaper than Explorer Scientific's high end encoder TDM $1799.

iOptron suppose to have a IEQ45 gt version that's a lot cheaper than their first version which with a 3rd encoder that made the mount cost $5k

Edited by Pinbout (04/03/13 12:55 AM)


Post Extras: Print Post   Remind Me!   Notify Moderator  
Alph
Carpal Tunnel


Reged: 11/23/06

Loc: Melmac
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5774570 - 04/03/13 12:57 AM

Quote:

Alph, the box as it is today can measure PE when attached to a PC via USB.



Yes, I am aware of it. Let me rephrase my question. What are the bare minimum hardware requirements to get the output from the encoder to the PC? I see a lot of potential in having just that.

Quote:

Now as we've seen, there is a good but not perfect correspondence between the PE measured by the box, and by PEMPro. I would not consider PEMPro to be the "reference" because it is affected by seeing, while the box is not.




Sure. However, you still need to sync up with the worm index and upload PEC to the mount and that’s where PEMPro comes in.


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Alph]
      #5774625 - 04/03/13 02:09 AM

The bare minimum is what I have right now:

1) an Arduino of some sort (an Uno will work fine if reading the PEC is all that's required) - this is about $30, and connects to the PC via USB

2) an Arduino daughterboard with an AD converter on it (total cost $10)

3) the encoder itself, that needs to be wired up to the Arduino

The vast majority of the cost would be fabricating the mount-specific adapter, and the encoder itself.

As for sync'ing the worm index and uploading PEC... that's a job best left to PEMPro or something. It might be possible to produce a PE file from the encoder that PEMPro can understand.

As for the TDM.. it's $1800 but you need to budget another $400 for the mount-specific adapter.

I have a whole lot more respect for the Germans who built that thing now (you know the old saying.. the ignorant sometimes attempt really difficult problems because they don't know how hard the problem is.. well that was me). I still think the price can be less.

The last iEQ45 I checked that had a Renishaw encoder was $4800. Which is idiotic. Nobody will buy a $4800 China mount with 1/2 the capacity of a Mach1 when you can get a Mach1 used for a few hundred bucks more.

If there was a $2K encoder-equipped mount with the capacity of an iEQ45 or Atlas/CGEM, then that would fly off the shelves.

Avago has a cheap 20-bit (1 million tick) digital encoder (this one - http://www.avagotech.com/docs/AV02-0865EN), that if combined with something like the SiTech tick management (possible if the RA encoder is integrated with the mount drive electronics) would enable this price point.


Post Extras: Print Post   Remind Me!   Notify Moderator  
vdb
sage


Reged: 12/08/09

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5774706 - 04/03/13 04:44 AM

Problem is that Renishaw encoder is already around 1K so cheapest I can see for such a mount is around 3k ...

Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: vdb]
      #5774709 - 04/03/13 04:46 AM

The iEQ45 in pinbout's link is a Renishaw RGH22 (or similar) linear read head. These have built-in interpolation and output a digital signal. They are cheaper than rotary encoders and you don't need as high a resolution because you would put an encoder tape around the circumference of the RA housing, which is a much larger radius, so the grating pitch on the tape can be less. I believe the tape is $12/inch or something.

the Gurley 320K tick encoders used on SiTech are about $600 and have built-in interpolation. The resolution is not high enough by itself, but in conjunction with tic management using the motor encoders, SiTech does a very good job. I cannot see how the iOptron guys could not use a similar approach..

(and.. adding a $2200 TDM to a base iEQ45 results in $3700 - which is still well over $1000 less than the Renishaw-equipped iEQ45)


Post Extras: Print Post   Remind Me!   Notify Moderator  
freestar8n
Post Laureate
*****

Reged: 10/12/07

Re: Encoder-based PE Correction on the cheap new [Re: Alph]
      #5774716 - 04/03/13 05:16 AM

Quote:

What are the bare minimum hardware requirements to get the output from the encoder to the PC? I see a lot of potential in having just that.




Years ago in my P.E. days, I was involved in other ways to measure PE. Why do you think it's so valuable or desirable to measure PE without a star? Are there others that share your interest?

I suppose for people making mechanical adjustments to their mounts it would be helpful to have prompt feedback, or when iterating to find an optimal PEC curve to apply.

Frank


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: freestar8n]
      #5774771 - 04/03/13 07:04 AM

Frank, there was a long discussion of this before.

Basically, having a mechanical method of measuring PE would allow a mount manufacturer to do QA cheaply. They would be able to ensure that no stinker mounts got out the door, and perhaps charge a premium for a "certified" mount. Surely a certification would be worth another $100 to $200?

But if you have to use a star to measure the PE, the labor alone of the guy doing the measuring will wipe out your profit.


Post Extras: Print Post   Remind Me!   Notify Moderator  
freestar8n
Post Laureate
*****

Reged: 10/12/07

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5774777 - 04/03/13 07:10 AM

That makes sense - but would only apply to a mount manufacturer... And presumably they can afford an expensive and high-res encoder in the first place since they would use it in production.

My own work involved other methods for measuring PE - but I lost interest. If there is a general need or desire for such things then I can take a look.

Frank


Post Extras: Print Post   Remind Me!   Notify Moderator  
vdb
sage


Reged: 12/08/09

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5774782 - 04/03/13 07:17 AM

Quote:


(and.. adding a $2200 TDM to a base iEQ45 results in $3700 - which is still well over $1000 less than the Renishaw-equipped iEQ45)




But you loose the polarscope ... which for a portable setup is nice, especially the iOptron as it's very accurate, I could do 30 min subs without field rotation.


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: freestar8n]
      #5774785 - 04/03/13 07:19 AM

One method I thought that a manufacturer could use to measure PE.. (not useful for astronomers)

Rigidly affix a laser pointer to the mount, so that the dot shines on a curved surface (like the inside of a dome, or a curved piece of white-painted board) some distance away.

Run the mount while taking a movie of the laser dot. Then post-process each frame of the movie to quantify the laser dot's movement. A perfect mount would show the dot moving at a fixed rate, any variation in the dot speed is PE.

QED. No need for a fancy encoder.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pinbout
Postmaster
*****

Reged: 02/22/10

Loc: nj
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5774797 - 04/03/13 07:45 AM

Quote:

(and.. adding a $2200 TDM to a base iEQ45 results in $3700 - which is still well over $1000 less than the Renishaw-equipped iEQ45)





last year when I was speaking to the same guy at NEAF [i think he's the president], he said they're suppose to come out with a gt this year thats a lot cheaper. They're gonna make their own encoder, what kind I don't know but I'm sure gonna bug him about it this year at NEAF so do you have any specific question I should ask him that's not too over my head?


Post Extras: Print Post   Remind Me!   Notify Moderator  
cn register 5
scholastic sledgehammer


Reged: 12/26/12

Re: Encoder-based PE Correction on the cheap new [Re: Pinbout]
      #5774855 - 04/03/13 08:28 AM

There's a program called Star Guiding Emulator that puts a dot on a PC screen and moves it at the correct rate. You can use it to train PEC and practice imaging indoors.

http://sweiller.free.fr/SGE/SGE-star-guiding-emulator.htm

Chris


Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: cn register 5]
      #5775075 - 04/03/13 09:48 AM

One of the biggest benefits of Orly's encoder system is it fixes a pec problem peculiar to the CGEM- the 8/3 resonance in the drive motors whic makes it impossible to get a true pec loop in one worm rotation.

The other is it's a bolt on and forget setup- no looking for a guide star and training. Just turn it on.

So, for those of us who have to flee city lights, this makes a lot of sense.

-Rich


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Starhawk]
      #5775109 - 04/03/13 10:01 AM

Well I'm kinda stuck right now, so...

Post Extras: Print Post   Remind Me!   Notify Moderator  
Alph
Carpal Tunnel


Reged: 11/23/06

Loc: Melmac
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5775387 - 04/03/13 11:49 AM

Quote:

I have a whole lot more respect for the Germans who built that thing now (you know the old saying.. the ignorant sometimes attempt really difficult problems because they don't know how hard the problem is.. well that was me).




The Telescope Drive Master, or TDM, is the product of Hungarian amateur astronomers, Istvan Papp & Attila Madai of MDA Telescoop and it is marketed and sold by Meade Europe.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Alph
Carpal Tunnel


Reged: 11/23/06

Loc: Melmac
Re: Encoder-based PE Correction on the cheap new [Re: freestar8n]
      #5775483 - 04/03/13 12:44 PM

Quote:

but would only apply to a mount manufacturer...




Many mount owners would like to know if their mounts perform to specifications. I have noticed that many folks struggle with periodic error measurements and analysis, and the results are quite often inconclusive. Flexure, seeing, and other unknown factors obscure the real PE graph. Other mounts like Paramount ME/MX have over 1000 PEC table entries. The PMX control board issues PEC corrections every 0.25s. You can't measure PE with such a precision just by tracking a star.


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Alph]
      #5775641 - 04/03/13 01:53 PM

I have also wondered why the AP GTO CP3 has over 1000 PEC table entries.

When you look at the way PEMPro programs the PEC on a GTO CP3, there is a "minimum move" command of 10ms. Because the error is so low to begin with, and the minimum move causes a 10ms correction, probably only one in 20 PEC entries has something in it.

Oh, and I stand corrected about the TDM. I always thought they were Germans...

On a related note, I finally figured out what was causing the weird ADC readings on my box. It wasn't bad code or running out of memory - so maybe moving to the PIC32 was not such a great move - but noise with my rat's nest wiring. This never popped up when I was bit-banging the SPI because the speed was low, but now that I'm clocking the ADC at 2MHz it is an issue.

I rewired (and soldered) everything onto an Arduino shield and the ADC has settled down; it still (very rarely) glitches but I can work around that in code. The PIC32 is very fast - and actually has an onboard 1 Msps 8- or is it 16-channel ADC. So in theory one could implement the PEC reader with a PIC32 alone. But the ADC inputs aren't differential, and I don't feel like mucking around with op amps..

I also found that the Lissajous pattern of the encoder is almost perfectly circular (0.9995), that there is zero offset on both A and B channels, and 99.7% of the radius readings (3 sigma) fall within a +/- 5% range.

So on startup I take several thousand readings (two slots worth @ 17 seconds/slot) and calculate the average radius. From this I can set a low (0.95X) and high (1.05X) bound for acceptable radius, which makes it trivial to throw out bad data.

I haven't implemented the algorithm described by Kavanagh yet, but now that the ADC issues have been sorted out that's next on my list.


Post Extras: Print Post   Remind Me!   Notify Moderator  
tjugo
scholastic sledgehammer


Reged: 11/06/07

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5775794 - 04/03/13 03:16 PM

Hi Orly,

Keep it going! This is a nice project, I hope you get to your goals 2 arcsec p-p under US$500. This will be a very nice addition to EQMOD.

Cheers,

Jose


Post Extras: Print Post   Remind Me!   Notify Moderator  
vdb
sage


Reged: 12/08/09

Re: Encoder-based PE Correction on the cheap new [Re: Pinbout]
      #5775848 - 04/03/13 03:44 PM

Quote:


last year when I was speaking to the same guy at NEAF [i think he's the president], he said they're suppose to come out with a gt this year thats a lot cheaper. They're gonna make their own encoder, what kind I don't know but I'm sure gonna bug him about it this year at NEAF so do you have any specific question I should ask him that's not too over my head?




Just ask how much it costs and when it ships


Post Extras: Print Post   Remind Me!   Notify Moderator  
OzAndrewJ
scholastic sledgehammer
*****

Reged: 11/30/10

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5775873 - 04/03/13 03:58 PM

Gday Orlando

Quote:

Rigidly affix a laser pointer to the mount, so that the dot shines on a curved surface (like the inside of a dome, or a curved piece of white-painted board) some distance away.

Run the mount while taking a movie of the laser dot.




I tried this once, but i used a tape measure on a fence over the road
and took webcam snaps every second.
Didnt work well, so i did some numbers.
One arcsec error at 100metres is approx 0.5mm,
and my fence was only 30m away.
Considering tracking is at 15 arcsec/sec and you also have
camera timing issues etc, you have no hope of getting
any real accuracy with this mechanism.
( with a laser, you also have the problem of getting a correct centroid )

Andrew Johansen Melbourne Australia


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: OzAndrewJ]
      #5776798 - 04/03/13 11:46 PM

Thanks Andrew. So not such a great idea after all..

Post Extras: Print Post   Remind Me!   Notify Moderator  
freestar8n
Post Laureate
*****

Reged: 10/12/07

Re: Encoder-based PE Correction on the cheap new [Re: Alph]
      #5777016 - 04/04/13 05:20 AM

Quote:

Many mount owners would like to know if their mounts perform to specifications. I have noticed that many folks struggle with periodic error measurements and analysis, and the results are quite often inconclusive. Flexure, seeing, and other unknown factors obscure the real PE graph. Other mounts like Paramount ME/MX have over 1000 PEC table entries. The PMX control board issues PEC corrections every 0.25s. You can't measure PE with such a precision just by tracking a star.




As a first step I would use MetaGuide with a bright star above the equator at long focal length to record the centroid every 0.5 seconds with a good timestamp. MG calculates the centroid differently and it should have benefit in this application - but it does help to have good seeing. It also helps to make sure the system time is kept accurate. If anyone is interested in studying the logs I'd be happy to look at them.

I'm still not sure what the application is other than unguided imaging - where the amplitude of PE must be kept to a minimum. But if something like flexure is involved, and it isn't very repeatable, then guiding would be needed anyway.

So in a thread like this one I think it's important to distinguish the possible applications that make sense and those that may not.

a) Orly's goal is unguided imaging at low cost with a CGEM. I think this could work pretty well, especially for widish refractor imaging - and it would be relatively painless once the mount is well polar aligned.

b) Reducing the inherent PE to about 4" so it then acts like a high end mount and will guide better. I'm not optimistic this will be much different from just autoguiding well using OAG without encoders. I haven't worked with a cgem, but I have seen decent images with them that show they are capable of guiding pretty well - and the central issues of gearbox terms and non-integer PE are common to a lot of mounts, including the cge, g11, rcx400 - etc.

c) As a tool for users or manufacturers to measure PE without a star. This also doesn't make a lot of sense to me because manufacturers can afford a high res encoder test stand, and users can use MetaGuide to record accurate logs with a real star. How often would they need to do it, anyway?

So I'm very interested in seeing how far Orly gets with improving the unguided imaging at low cost. That part makes sense to me, and it's an interesting project - especially when working within cost constraints.

Frank


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: freestar8n]
      #5777368 - 04/04/13 10:53 AM

Sadly, after all the added effort I've done over the past few days, this is the best I can get:



That's +5/-7 arc-seconds.

I notice that there is a slow drift in the encoder values (it has its own periodic error!) both in the interpolator, and in-between slots, i.e. the distance between slots is not constant. The easiest way to characterize the periodic error of the encoder + interpolator would be a precision rotational reference. Since I don't have that, I'll probably read out the encoder while guiding. But the science project ceases to be fun when it's like a job.

Need to take a break from this...


Post Extras: Print Post   Remind Me!   Notify Moderator  
Raginar
Postmaster
*****

Reged: 10/19/10

Loc: Rapid CIty, SD
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5777556 - 04/04/13 12:23 PM

Well, hopefully something will come of your expenditures (both time and treasure). It's a cool idea .

Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: Raginar]
      #5778798 - 04/04/13 11:31 PM

What is your control loop doing?

-Rich


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Starhawk]
      #5778812 - 04/04/13 11:42 PM

I don't think the problem is the control loop (which I've dialed back a great deal).

The problem is that the encoder + interpolator has its own periodic error. So the box thinks it is tracking perfectly but in reality the drive is slowly wandering up and down.

What I have seen is that PHD very rarely (attempts) to issue guide commands while the box is active; the track is stable for 2-3 minutes at a time ( < 2" ) and during those periods PHD does nothing.

I really need to characterize the error on the encoder + interpolator, but my last attempt (ganging the CGEM and Mach1 together with a huge dovetail) didn't work too well...

Now how do we reconcile this with the periodic error being measured accurately?

Simple. If not correcting, the PE of the mount swamps the PE of the encoder. The encoder's PE is only about 8" p-p or less. But if we are correcting, what happens is the mount PE disappears and the mount gets slaved to the encoder's PE.

BTW here is the tracking log for the above graph -
https://dl.dropbox.com/u/63497702/EncoderData/data-20130404221247.csv

The columns are

Time elapsed (milliseconds)
A encoder raw count
B encoder raw count
Interpolated Theta (range 0.. 2591)
Grating Slot # (gross angle)
Total Angle (gross angle + Theta)
Expected Angle
Error
Correction (millisecond pulse length)

All of the angles are in deci-arcseconds, so an error of 10 is actually 1"


Post Extras: Print Post   Remind Me!   Notify Moderator  
Mert
Post Laureate
*****

Reged: 08/31/05

Loc: Spain, Pamplona
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5778824 - 04/04/13 11:52 PM

Is the encoder adjustably mounted onto the aluminum
plate?
You might think putting an O-ring under each mount point
so as to put a bit more preasure on 1 side, adjust the
tilt a bit????
Then log and see how the output behaves over 1 turn
of the RA-axis adjusting and see how that influences??


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Mert]
      #5778827 - 04/04/13 11:59 PM

Mert, I don't believe that encoder swash is an issue (read the Renishaw article "The accuracy of angle encoders"). Decentering of the encoder shaft would show up as swash.

That sort of periodic error would only manifest over a significant fraction of the encoder's rotation, not a few degrees.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Mert
Post Laureate
*****

Reged: 08/31/05

Loc: Spain, Pamplona
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5779378 - 04/05/13 10:55 AM

Yes, that's exactly what I was wandering about!!!
Then, how come that your significant drive signals leak
through where before it was a very nice flat curve??
Really interesting!!!


Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: Mert]
      #5779742 - 04/05/13 02:26 PM

You'd need to see the encoder wobble for the error to amount to much over this time scale.

I am struck by three things:

(1) the high frequency movement is still there and is also expressed in the pempro plot. You aren't apparently responding to that.

(2) the larger scale oscillation seems to be at similar frequency to the pempro plot. It really looks like the correction isn't very effective.

(3). Three rotations of the worm should be observed before concluding you are ahead or behind. Remember you need the whole 8/3 resonance. It is plausible to be as big as you're seeing- otherwise no one would care.

Try this: record input to the Arduino and just record it's control outputs without sending them to the drive. Then plot them against the encoder plot to see what the controller is doing or not, and if it has a bias.

And don't give up. You are very close.

-Rich

Edited by Starhawk (04/05/13 02:34 PM)


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Starhawk]
      #5779818 - 04/05/13 02:57 PM

I think the problem is in the interpolation somewhere.

I bought some more IEEE articles but they are beyond my understanding. That's what comes of not being practicing EE for 15 years.

I thought of a way to "sanity check" the interpolation. By wiring comparators to the A and B analog inputs, I can now get A and B digital signals. With quadrature decoding this is a ~ 65" accuracy every time one of these inputs change.

So whenever there is a rising or falling edge on the A and B, I know that the interpolated angle must be 0, 90, 180, or 270 degrees (for sure! to within the limit of the encoder) and I can use that information to check the interpolation algorithm.

Later this weekend.. I have to finish my SAO exam..


Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5781774 - 04/06/13 12:33 PM

Perfect data doesn't help if the controller doesn't work. I expect it is struggling with backlash, reversals, and slope rates. Your encoder agrees pretty well with a completely independent measurement, so I am thinking your encoder works well enough already.

-Rich


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Starhawk]
      #5782065 - 04/06/13 03:36 PM

I wired up the comparators and triggered a couple interrupts whenever there is a zero crossing. And I found that the interpolated values were in agreement to within 0.8" of the zero crossing.

So the interpolation algorithm is only capable of about between 162X and 324X. This should still be enough - if we assume 162X as the worst case, this means we get 810K ticks, or 1.6" per tick.

That does mean that I should not correct any error < 1.6" because it might be interpolation error. Which in turn would limit the performance of the device. But I'm not getting anywhere near 3.2" p-p so I need to look at the control algorithm...


Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5784258 - 04/07/13 04:33 PM

Here's where the fun starts!

-Rich


Post Extras: Print Post   Remind Me!   Notify Moderator  
Mert
Post Laureate
*****

Reged: 08/31/05

Loc: Spain, Pamplona
Re: Encoder-based PE Correction on the cheap new [Re: Starhawk]
      #5786403 - 04/08/13 04:57 PM

Hi Orlando!

I've read that you are using the MCP3304 ADC is that true?
In the specs I see that the reference voltage should be
controlled very closely in order to get 13 bit resolution.
The encoder output sin/cos-wave is -1 to +1 V?
Then also from the datasheet, "Conversion speed (FSAMPLE) is
100 ksps with FCLK = 21*FSAMPLE"!
Are you using the clock signal from the Arduino? ( can't see
any external clock driver on the breadboard )

Just a couple of questions running through my head trying to
uderstand what's going (wr)on(g).

Keep up the great work


Post Extras: Print Post   Remind Me!   Notify Moderator  
vdb
sage


Reged: 12/08/09

Re: Encoder-based PE Correction on the cheap new [Re: Raginar]
      #5794517 - 04/12/13 01:52 PM

Are you sure the physical mounting of the encoder is not introducing some error as well?
As with many of these kind of projects, after initial progress a blockage of some kind is encountered, time will solve this, I'm sure ...


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: vdb]
      #5795734 - 04/13/13 12:51 AM

Hi Mert, my LM385 reference is supposed to be 1.24V but my multimeter says 1.2V or so.

Doesn't matter, when I try to get the full 13-bit resolution the last 4 bits or so are jittering. There's no point trying to get the full span given that there are no input analog buffers. Also the encoder output is not 1Vpp, it's more like 0.85Vpp (according to my ADC) but that is still within spec for the encoder.

More importantly, the encoder's Lissajous pattern is almost perfectly circular, and has zero offset. I've added some algorithm to throw out any encoder readings whose radius is not within 3 sigmas of the average encoder radius reading (as 99.7% of encoder readings are within 3 sigmas).

I also noted that, from back-calculating the angle when the sinusoid input reverses direction (used a comparator to detect the zero crossing) that there is about 0.8" of jitter in the interpolated angle, even after all the pre-processing.

What this means is with the current interpolation electronics and code, 0.8" is the best resolution possible (324X interpolation) which means about 1.6" is the best tracking accuracy that can be obtained. I am not surprised by this, as the much more expensive and complex Heidenhain IBV660B does 400X. If I can get even 162X (1.6") I would be extremely happy.

Have been traveling a lot so no updates here. Will try to get another measurement run in over the next few days.


Post Extras: Print Post   Remind Me!   Notify Moderator  
fetoma
Carpal Tunnel
*****

Reged: 09/26/06

Loc: Southern New Jersey
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5796768 - 04/13/13 03:03 PM

Would this help:

http://www.ebay.com/itm/Heidenhain-IBV-660B-Interpolator-Converter-Box-/12108...


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: fetoma]
      #5796982 - 04/13/13 04:19 PM

I have one of those, Frank.

I am consciously not using them because they cost 1000 Euro ($1300) new. So any solution using that box would be useless to the rest of the world.

I want to get my cheap interpolator box working so that other people can duplicate the results cheaply. I don't want a solution that depends on getting expensive equipment by scrounging. This isn't Storage Wars.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Raginar
Postmaster
*****

Reged: 10/19/10

Loc: Rapid CIty, SD
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5797413 - 04/13/13 07:59 PM

Hey Orly,

I noticed that the Gemini-2 can support an external encoder. You ever seen anyone figure that out?

Chris


Post Extras: Print Post   Remind Me!   Notify Moderator  
jrcrillyAdministrator
Refractor wienie no more
*****

Reged: 04/30/03

Loc: NE Ohio
Re: Encoder-based PE Correction on the cheap new [Re: Raginar]
      #5797613 - 04/13/13 10:43 PM

Quote:

I noticed that the Gemini-2 can support an external encoder. You ever seen anyone figure that out?

Chris




It is probably the same as the original Gemini in that respect. It can read typical push-to style encoders to recover goto alignment after a slipped clutch. They would have insufficient resolution for any tracking feedback.


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: jrcrilly]
      #5797801 - 04/14/13 02:19 AM

John is correct, the Gemini supports external encoders but only for pointing. These are 2500 CPR (10000 tick) encoders, which cost $50 a pop.

The Littlefoot Elegance Photo is the only GoTo controller I know of that can use an external encoder for both pointing and PE correction. But it requires a very high tick digital encoder.


Post Extras: Print Post   Remind Me!   Notify Moderator  
jrcrillyAdministrator
Refractor wienie no more
*****

Reged: 04/30/03

Loc: NE Ohio
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5797862 - 04/14/13 05:06 AM

Quote:

The Littlefoot Elegance Photo is the only GoTo controller I know of that can use an external encoder for both pointing and PE correction.




The SiTech can, too, using separate encoders for the two functions.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Raginar
Postmaster
*****

Reged: 10/19/10

Loc: Rapid CIty, SD
Re: Encoder-based PE Correction on the cheap new [Re: jrcrilly]
      #5798054 - 04/14/13 10:21 AM

I saw the thread on an individual with a sitech/mi250 who put a nice encode and was doing 20 min unguided exposures.

Pretty cool.


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Raginar]
      #5798106 - 04/14/13 11:12 AM

Chris, they are using a 320K tick (digital) Gurley encoder which costs about $600 - $700. I could certainly use the same encoder and forget about interpolation. But it's not that interesting an approach..

Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5798158 - 04/14/13 11:45 AM

Any chance to try new control algorithms? Is there any way you could build the software to have several available to try out in an evening?

-Rich


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Starhawk]
      #5798298 - 04/14/13 01:19 PM

I've hooked up the encoder to my AP600, which has a much more tractable periodic error. Still no resolution in sight.

If I could hook the encoder to the Mach1 and run the Mach1 with PEM enabled, I could characterize the encoder error very quickly. But alas the Mach1 polar scope bore does not rotate.

I tried measuring the PE with the CGEM while it was guiding, but the CGEM's PE is so bad that even when guiding I could only get 2" RMS

If it clears up during the week, I'll try guiding the AP600 (which from experience I know guides much, much better) and measure the residual PE. That should give me an idea of what sort of error the encoder and algorithm has.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Mert
Post Laureate
*****

Reged: 08/31/05

Loc: Spain, Pamplona
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5798591 - 04/14/13 03:23 PM

Hi Orlando,

Just for curiousity on how good your interpolator works,
would it be an idea to hookup the IBV660 just for a
comparison and see how the data looks?
I know your idea behind all this is an economical
solution for everybody


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Mert]
      #5799653 - 04/14/13 11:35 PM

I have given thought to that Mert... maybe I'll do that when I've completely run out of ideas.

On the other hand... I'm beginning to suspect that the periodic error in the encoder is larger than 1 slot (i.e. 259.2 arc-seconds). In other words, the spacing between each of the 5000 slots is not perfectly consistent, because I'm seeing a very slow periodic error with a cycle of about 900 seconds. The IBV660B would not help with that since it solves the problem of interpolation between slots.

This actually makes sense because in its current state, the box smooths out small fast errors really well (much better than guiding) but does not correct long-term drift.

Things should be more clear when I measure the PE while guiding the AP600.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Mert
Post Laureate
*****

Reged: 08/31/05

Loc: Spain, Pamplona
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5800394 - 04/15/13 12:14 PM

I see Orlando, of course the precision of the encoder
is important, but what I was worried about is your post
on page 8 of this thread ( #5777368 ) where we see the
raw PE of the GEM leaking through!!!
I can't understand how can this happen, since these are
so to say "high" frequency errors, far out of the scope
of the "PE" of the encoder IMHO

Just my thoughts, hope to read more


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Mert]
      #5800411 - 04/15/13 12:21 PM

Those were due to dialing off the correction.

I have gotten a few thousand samples of data with active guiding on the AP600.

The RMS guiding was about 1" with a peak-to-peak of about 2 pixels or 6" (note guiding is on).

I found a consistent drift in the encoder data equivalent to about 1000ppm, which is completely attributable to the $%^%$#$!!#$#@ crystal resonator on the Arduino Mega 2560 I'm using now.

So I have two issues now:

1) try to replace the ceramic resonator on the Mega 2560 with a 50ppm or 25ppm crystal

2) I need to characterize the periodic error of the algorithm and encoder, trying to figure out the FFTs in Excel


Post Extras: Print Post   Remind Me!   Notify Moderator  
vdb
sage


Reged: 12/08/09

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5800427 - 04/15/13 12:27 PM

So maybe the TDM encoders have a PE table definition per unit, maybe they run a calibration against an encoder ... but that seems very unlikely ... how could they sync to that table.

Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: vdb]
      #5800480 - 04/15/13 12:54 PM

Ok so I imported the guided encoder data from the AP600 into PECPrep, which was quite easy.. too bad I had already done the FFT analysis in Excel. But PECPrep makes things much easier.

The average PE (guided) according to both PECPrep and PHD was about 1" and the peak-to-peak (according to PECPrep) was about 7". This corresponds well with what I saw on the PHD graph (peaks about 2 pixels p-p at 3.05"/pixel).



PECPrep identified harmonics are

11.3 = gear harmonic (40X)
22.5 = gear harmonic (20X)
222.1 = gear harmonic (2X)
74.4 = gear harmonic (6X)
44.6 = gear harmonic (10X)
114.7 = gear harmonic (4X)
446.7 = worm fundamental

8.6 = encoder harmonic (2X)
17.2 = encoder fundamental
167.2 = probable encoder sub-harmonic (1/10)

Most of the noise is from the Nippon Pulse 150:1 gearbox in the AP600. The fundamental is also quite strongly detected by the encoder, in spite of the guiding being active.



When I remove all the known terms leaving only the encoder terms the total PE is about 2.7" p-p. This is solely due to the encoder interpolation algorithm. The 17.2 second (encoder slot harmonic) is the strongest overall though.



Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: Mert]
      #5800928 - 04/15/13 04:20 PM

I was thinking- you could put the encoder on top of the Mach 1 hub and use a shaft going through the axis to mount through. It's a sort of inverse setup, but it could give the data you are looking for.

-Rich


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Starhawk]
      #5800945 - 04/15/13 04:26 PM

I'm beginning to suspect that guiding etc. is not needed at all.

The encoder is obviously picking up good data, subject to its own 2.7" periodic error. Even with the huge fundamental present (when not guiding) PECPrep would be able to filter that out.

I'll collect more data with no guiding (just running the mount blind) to validate.

And as for the errors in the ceramic resonator.. I have a solution but it will take some time. An older (and cheaper) board - the Arduino Mega 1280 - uses a crystal. These are $26 a pop. Have to wait for them to ship from China.

I can't use the smaller Arduino (Duemilanove) which is $15 because it doesn't have enough pins to support the ST-4 input and output.

Now that I've quantified the errors, I think I am close to the end. Once this works, the next hurdle will be productizing it, or at least making it as easy to build as possible.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Mert
Post Laureate
*****

Reged: 08/31/05

Loc: Spain, Pamplona
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5801005 - 04/15/13 04:55 PM

Just a minor question on the crystal Orlando:
why don't you use a seperate little board with it's
own crystal to clock the ADC-chip and sync to clock the
data into the Arduino? Wouldn't that be possible to do?
Just use a counter to count for the ADC cycle and then
trigger a signal that makes the Arduino read out the data?

Or if not, why not use a paralel data out chip with external
crystal, like the Maxim-flashADC-1114 chip ( 150Msps ),
or TI-16bit-ADC-ads1209.
I don't know how stable the clock of the Arduino is but
very likely as you stated, this is a big cause of in-
stability.
Just a couple of thoughts FWIW :-)


Post Extras: Print Post   Remind Me!   Notify Moderator  
Mert
Post Laureate
*****

Reged: 08/31/05

Loc: Spain, Pamplona
Re: Encoder-based PE Correction on the cheap new [Re: Mert]
      #5801028 - 04/15/13 05:10 PM Attachment (15 downloads)

Likely you already saw this from schematic.pdf on
the internet?
Seems to be easy to cut the clock existent on the pcb
and add your own.

Edited by Mert (04/15/13 05:11 PM)


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Mert]
      #5801331 - 04/15/13 07:22 PM

Hi Mert,

Yup am familiar with the circuit. Easy to do the mod on an Arduino Uno R3, but not so easy on an Mega 2560 due to the surface-mount CPU and crystal.

Anyway I have already bought a couple of Mega 1280 clones. These have real crystals, and I also have some high-grade 16 MHz crystals on hand if the ones on the boards aren't good enough.

I also thought about using a separate clock reference, daughter board that produces a precise clock and interrupts the Arduino. There is a $35 GPS board that produces a 10Hz signal. That is extremely accurate (GPS disciplined). But at the end of the day all these solutions add complexity. It's better to just use a Mega 1280 and be done with it.

Did some more processing of the encoder data. With the worm period set to 17.25 seconds:



Note that 1978 samples were used, which covers about 56 encoder slots. There is a slight precession of the curve, but it can't be helped (no indexing here!)

And the periodic error correction curve. There is a residual PE of about 1.6" which cannot be removed by this PEC curve... is this coincidence? (the TDM reports similar range of corrected performance)



PECPrep produced a 17-slot (1 entry/second) PEC curve covering the 17.25-second encoder period, which I can just plug into my program. Probably don't even need interpolation or anything.

Will report when I've added this code.


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5802210 - 04/16/13 09:46 AM

Here's the data from the encoder and AP600 with no guiding or corrections:



The periodic error due to the encoder 17.2s and 8.6s harmonics is about 3.7" here



With correction turned on (the Arduino pushing ST-4 pulses to the AP 9000 QMD drive) - total PE with all components is about 2" p-p and RMS PE is 0.37"



Periodic error due to the 17.2s and 8.6s components (note it's smaller due to the 17-slot PEC I've applied to the interpolator)



Compared to before the PEC:



So it does look like "interpolation PEC" does work to a certain extent and reduces the periodic error of the interpolation algorithm from about 2.7" to about 1.5" - not a lot but the encoder PE limits the resolution of the whole system. Without the PEC the encoder cannot discriminate anything below 2.7" because of its own error, if that error is reduced to 1.5" then a bit more accuracy can be extracted.

Now all I need is a decent crystal-clocked Arduino board to solve the long-term drift problem... (and some clear skies to verify performance).


Post Extras: Print Post   Remind Me!   Notify Moderator  
Mert
Post Laureate
*****

Reged: 08/31/05

Loc: Spain, Pamplona
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5804799 - 04/17/13 03:51 PM

Hi Orlando,

I don't quit understand the "phase shifting" in the signal
in the PECPrep window.
What signal is analized is this? ( from the encoder, or
from a star through a webcam, so the mounts signal? )

Just saw a new Arduino board: Arduino Due 84 MHz and 12 bit ADC

Seems to be able to do 50K samples per second!


Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: Mert]
      #5805176 - 04/17/13 06:23 PM

OK, if you can get to operating at 1.6" PE, then the following performance would be practical for half-pixel error:

Pixel size Focal Length Max
10 micron 1289.16 mm
9 micron 1160.24 mm
8 micron 1031.32 mm
7 micron 902.41 mm
6 micron 773.49 mm
5 micron 644.58 mm
4 micron 515.66 mm

Note this is for indefinite exposure. Not bad performance, already.

-Rich


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Starhawk]
      #5805404 - 04/17/13 08:28 PM

Bad news... I just discovered after extensive testing that the Arduino's sense of time is wrong. The internal timer routines actually lose ticks (when compared to timestamping from my laptop) over time. I thought this was due to the inaccurate ceramic resonator, but I get the same behavior with my 80MHz Max32 which I've verifed has a pretty good crystal.

I believe the loss of time is due to either the SPI routine that talks to the ADC, the arctangent calculation, or the serial routine talking to the PC itself.

Anyway the drift induced by the lost time is much greater than any interpolation errors, so I have to fix this first. This completely explains why as it is the box can smooth out small sharp errors, but induces a long-term drift even over one worm cycle. Need to add an external time reference, am thinking of a Chronodot or DS1390.

Mert, I have looked at the Due. It won't work for this project because its ADC inputs are not differential, and the input span is only 3.3V because the Due is a 3.3V part.


Post Extras: Print Post   Remind Me!   Notify Moderator  
AndreyYa
member


Reged: 12/05/06

Loc: Sunnyvale, CA
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5805448 - 04/17/13 08:50 PM

Hi Orlando,

first thank you for interesting topic. I had some similar ideas, and I happy to see them implemented.

Regarding loosing timer tics: maybe arranging timer counting in timer interrupt manner could help. Usually it helps to make more or less safe processing of such kind of tasks. Does Arduino allow to make timer interrupt unmasked, or increase timer interrupt priority?


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: AndreyYa]
      #5805593 - 04/17/13 09:47 PM

Andrey, the Arduino implements the timer using an interrupt.

I am using the built-in millis() function.

I also tried to set up my own timekeeping routine by installing my own ISR. It still loses ticks.

Anyway I have already ordered the PCF8583 RTC. 1/100 second resolution, through-hole DIP8 package so easy to use (unlike the Dallas DS1390 which is an SMD part).


Post Extras: Print Post   Remind Me!   Notify Moderator  
AndreyYa
member


Reged: 12/05/06

Loc: Sunnyvale, CA
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5805826 - 04/17/13 11:10 PM

I see, thank you Orlando.

It looks a bit strange... maybe some more high priority interrupts prevent it, like serial port handling.

Quote:

Andrey, the Arduino implements the timer using an interrupt.

I am using the built-in millis() function.

I also tried to set up my own timekeeping routine by installing my own ISR. It still loses ticks.

Anyway I have already ordered the PCF8583 RTC. 1/100 second resolution, through-hole DIP8 package so easy to use (unlike the Dallas DS1390 which is an SMD part).




Post Extras: Print Post   Remind Me!   Notify Moderator  
rpineau
member


Reged: 05/30/12

Loc: CA, USA
Re: Encoder-based PE Correction on the cheap new [Re: AndreyYa]
      #5805935 - 04/18/13 12:09 AM

It depends on the timer. I personally use an ATMega32U4 for some stuff and only timer 0 and 1 have a higher priority than the USART1 (and in my case a lower priority than any external interrupt as well as the usb interrupt).
For me it goes (from highest to lowest priority) :
External interrupts, USB, WDT, Timer 1, Timer 0, SPI, USUART, ...
So I assume Orly already checked this and is using the timer with the highest priority for the AVR he's using.
In the case of the ATMega 1280/2560 the highest priority timer is Timer 2 and it has a higher priority than the SPI and USART0 .
Regards, Rodolphe


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: rpineau]
      #5805960 - 04/18/13 12:41 AM

Thanks Rodolphe.

I may look at Timer 2. But what you are saying is that external interrupts and USB have the highest priority of all? so it should be possible for me to use an external clock generator for timing.. I thought an external interrupt and an internal timer interrupt were more or less the same thing..


Post Extras: Print Post   Remind Me!   Notify Moderator  
rpineau
member


Reged: 05/30/12

Loc: CA, USA
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5806025 - 04/18/13 02:24 AM

Each interrupt source has a priority. External interrupt INT0 for example has the highest priority IF 2 interrupt are triggered at the same time. Also when an interrupt is triggered, all other interrupt are disabled.
You can see the priority on page 105 of the manual : http://www.atmel.com/Images/doc2549.pdf

Also found on page 18 :
"The lowest addresses in the program memory space are by default defined as the Reset and Interrupt Vectors. The complete list of vectors is shown in “Interrupts” on page 105. The list also determines the priority levels of the different interrupts. The lower the address the higher is the priority level. "
There is more explanation about how interrupt are handled on that same page of the manual (page 18 that is).

As to the use of external interrupt, if you use the PCF8583 RTC INT* output and wire it to INT0 you should get something very stable in term of time tracking. You might need to take the interrupt response time in account (5 clock cycle minimum, see page 20 of the manual).

Regards, Rodolphe


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: rpineau]
      #5806038 - 04/18/13 03:01 AM

Hi Rodolphe,

I have a long thread on this timekeeping topic here - http://arduino.cc/forum/index.php/topic,160899.0.html

Since INT0 is on pin 2, I should be able to use it without issue right? I once put an interrupt on pin 1 or 0... Serial.print sure screwed up my DSC!


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5806077 - 04/18/13 04:30 AM

Unrelated: Just received my $25 Womarts.com 320x240 color TFT LCD resistive touch screen shield

In one fell swoop I solve the problem of how to provide input to the controller. I can make a very nice UI for it, have real-time graphing of periodic error, etc. etc. etc.

Now if only I could get the core functionality working reliably...


Post Extras: Print Post   Remind Me!   Notify Moderator  
Raginar
Postmaster
*****

Reged: 10/19/10

Loc: Rapid CIty, SD
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5806271 - 04/18/13 08:52 AM

Keep at it orly

Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5806395 - 04/18/13 10:39 AM

Another business trip.. So next weekend I'll have another go using the RTC chip. Fingers crossed this will eliminate the clock drift.

Post Extras: Print Post   Remind Me!   Notify Moderator  
rpineau
member


Reged: 05/30/12

Loc: CA, USA
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5806498 - 04/18/13 12:07 PM

Yes you just need to enable the internal pull-up on the INT0 pin and wire the INT* output of the PCF8583 RTC to whatever pin is INT0 on the AVR you're using (and of course define the ISR in you code for INT0).
Regards, Rodolphe


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: rpineau]
      #5835199 - 05/01/13 08:49 PM

I was able to fix the timing problem without any added hardware (just got rid of delay() function call).

However I have found another source of long-term drift: the periodic error of the encoder itself over a full rotation.

Initially I thought of running the mount for 24 hours and capturing data, but then I realized that I could run the mount at a higher speed so it could complete one entire rotation in < 24 hours.

And the result:



this is not a full 360 degrees rotation, it's about 200 - 220 degrees. But the sinusoidal waveform is obvious. That's probably encoder swash.

Since the encoder doesn't have an indexer or absolute positioning, it's impossible to correct this long, very slow, but very large magnitude (about 500" p-p) periodic error.

One solution is not to keep track of the absolute position, but keep resetting the origin every 1 - 2 minutes. That way the long-term error doesn't accumulate.

Another solution is to keep track of speed, rather than position. I can't get this one working right though - but keeping track of position works (except for the long-term drift due to the encoder's gross PE).


Post Extras: Print Post   Remind Me!   Notify Moderator  
Mert
Post Laureate
*****

Reged: 08/31/05

Loc: Spain, Pamplona
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5835833 - 05/02/13 09:02 AM

Hi Orlando,

Ever since I use EQMOD, the PE-curve sometimes get "un-
synchronized" with the worm due to power failure or whatever.
Then, in order to maintain the PEC data and resync, it's
just using the flat surface on the worm-axis oriented to
a reference point and bingo.
IMHO using a little optocoupler, we could use that flat
surface or whatever other reference point, to "trigger"
the absolute start for the encoder, that might enable
PE for the encoder-swash I believe.
Just my 2
Very interesting data, looks more like it now!!!!


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Mert]
      #5836050 - 05/02/13 11:13 AM

from Adaptive Correction of Periodic Errors Improves Telescope Performance (Toomas Erm, Stefan Sandrock)

Quote:

Likewise if the speed is low enough to make the frequency to be within the bandwidth of the control system the servo can follow the error and no position error can be seen, but the telescope will be moving with the error.




Doh!!!

Using an indexer is not an option.. because the Arduino can't command the mount to move to the index via the ST-4 interface (at least, not in our lifetime :P )

I did some exploring with Freemat (darn! where was this thing all my life, and me futzing around with Excel) and... it's not possible to recover the encoder gross PE from the corrected data.

So I'm stuck. How to get rid of the slow drift... actually the slow drift is not a problem because... it can be autoguided out!

but... my design goal was 20 minutes unguided. Currently that's not possible with the 1" / minute slow drift. Definitely though the encoder tames the fast periodic errors, so long guide exposures can be done (e.g. 5 - 10 second guide exposures).

but.... I know the TDM has solved this problem. Cannot... rest..


Post Extras: Print Post   Remind Me!   Notify Moderator  
tjugo
scholastic sledgehammer


Reged: 11/06/07

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5836068 - 05/02/13 11:22 AM

Hi,

If slow drift is the problem what is preventing you to add a digital low pass filter in your code? You already know the frequency of the drift, so it is trivial to implement the low pass filter in software with the specified cut off frequency. Am I missing something?

Cheers,

Jose


Post Extras: Print Post   Remind Me!   Notify Moderator  
tjugo
scholastic sledgehammer


Reged: 11/06/07

Re: Encoder-based PE Correction on the cheap new [Re: tjugo]
      #5836074 - 05/02/13 11:23 AM

Sorry, I meant high pass filter!

Cheers,

Jose


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: tjugo]
      #5836106 - 05/02/13 11:38 AM

Jose,

Might work. Not sure how to do an LPF (to extract the error term for correction) except with an FFT.

I have seen that with a 512-point FFT covering 256 seconds (1/2 of the worm period) the encoder PE can't be extracted. I suspect at least 1-2 worm periods (so, 900+ seconds) would be needed to extract the encoder PE.

It's not enough to know the encoder PE frequency - you also need to know the phase, so you can subtract it.

I'm thinking I'll just cop out. The TDM is only rated for 5-10 minutes unguided. I think I can do that level by resetting the encoder origin every 5 minutes. This ensures that the encoder PE drift doesn't get too large.


Post Extras: Print Post   Remind Me!   Notify Moderator  
tjugo
scholastic sledgehammer


Reged: 11/06/07

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5836125 - 05/02/13 11:54 AM

Orly,

You don't need to wait to record a whole cycle to apply the filtering. Depending on the frequency you want to filter out you have to wait a short number of samples to start filtering out the low frequencies.

Digital filters easy to implement in software, and you don't need FFT or complex math to do it.

Let me try to find some samples for you.

Cheers,

Jose


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: tjugo]
      #5837844 - 05/03/13 08:58 AM

OK so I did the "reset the origin every 120 seconds" and..... It sorta works. The AP600 can now maintain about 0.43px RMS (about 1.2" RMS) over a 20-minute period. This same mount can do 0.9" RMS when actively guided.

So the encoder solution is (almost) as good as auto-guiding. It would not be terribly useful on a midrange or high end mount. On the AP600 it's not that amazing but there's a definite improvement.

I thought of regulating the axis speed instead of its position (this avoids long-term drift effects). Used the Arduino PID control library and it seems to be working... but it clouded out and I can't verify that it works.


Post Extras: Print Post   Remind Me!   Notify Moderator  
pfile
Post Laureate


Reged: 06/14/09

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5838908 - 05/03/13 06:55 PM

nice work! it's been a very long road but it seems it was worth it.

Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: pfile]
      #5839540 - 05/04/13 04:24 AM



The plot is the position error (while correcting). When correcting based on encoder position the error doesn't increase - a false measurement because the mount is getting slaved to the encoder's errors.

Here there's drift because I'm regulating the RA rotation speed and not its position - this reflects the encoder's 24-hour period error, but the graph is straight, I think this shows that PID-controlling the speed successfully controls short-period errors while being insensitive to the long-period error of the encoder itself.

Hopefully a test against PHD on a star will prove the validity of this approach. I'm growing tired of this particular project. still.. considering it's cloudy all the time, the time I've sunk into this has prevented me from buying stuff on astromart, so overall I'm out ahead.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5839931 - 05/04/13 11:28 AM

Hold on- it looks like this is likey mechanical mismatch between the encoder and the mount. Move the RA axis by hand and see if it wobbles.

Also, this is a 3" over 6 hour effect- I suggest this isn't the spot to sink a lot of time at the moment.

-Rich


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap *DELETED* new [Re: Starhawk]
      #5839969 - 05/04/13 11:50 AM

Post deleted by orlyandico

Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5840263 - 05/04/13 03:02 PM

Rich, it is a mechanical mismatch. Either encoder swash or non concentricity. And its not that small - it's 500" over 24 hours.

The SiTech guys have a spreadsheet for calculating PE based on non concentricity. Even a 0.005" non orthogonality would result in over 1000" of PE with a 24 hour cycle.

Here are the results from doing PID control of the RA axis speed (rather than tracking the axis position):

This is the best case, the Arduino + encoder can beat autoguiding (normally I only manage 0.3px RMS with autoguiding). The worst case is less pretty, but I'm not sure if it's due to seeing effects or the encoder issue itself.



PECPrep output (including the bad spikes). Fundamental has been knocked down to about 4" p-p (from about 15").



Unfortunately the 2nd strongest harmonic is the 17.2-second one. Which is from the encoder! (it's the grating period, 86164 sec / 5000 slots)



The encoder PE adds about 1" to 2" of additional periodic error. The overall PE including all the ugliness is about 5" to 6". But the numbers from PECPrep are what they are - PECPrep reports my Mach1 has 3" p-p after PEM, but PEMPro reports 0.5" p-p. So the encoder might be performing better than these graphs lead me to believe.

I guess the real test will be trying to take long (e.g. 10 minute) unguided exposures, and see how that works out.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Raginar
Postmaster
*****

Reged: 10/19/10

Loc: Rapid CIty, SD
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5840809 - 05/04/13 09:55 PM

The truth is in the pudding sometimes. Can't wait to see a picture.

Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: Raginar]
      #5841116 - 05/05/13 03:21 AM

Egad,

What pain in the neck. The orthogonality itself seems to argue for special tapered fittings. I'm trying to think of ways to cause it to find its own center accurately. Come to think of it, it's a special procedure to get things centered on a milling machine.

OK, at the risk of annoying someone who is already frustrated, I'm going to back up a little bit and ask how one either (A) gets the encoder to magically give up what is needed or (B) get the data needed some other way? Note, I'm only going to post this if I feel like I made progress on the issue by the time I'm done thinking on what you're seeing.

So, I have an observation about Celestron drives: The system commands a set of drive movements which will result in perfect tracking on 1 rotation intervals, or 8 minutes in this case, if the drive repeats on one worm rotation. Now, thanks to the 8/3 weirdness, that means the real interval for seeing a "Perfect" reference come back from the drive itself is every 24 minutes. Or, in other words, if you look in on a CGEM drive every 24 minutes as your sampling point, you would conclude it was perfect. However, if the drive didn't have the 8/3 business, it would appear to meet perfection every 8 minutes (and those wacky NexStarSE mounts with the triangle wave tracking actually do this). So, the drive will come close to accurate every 8 minutes with the 8/3 error overlaid, and will be correct every 3 rotations no matter what, at which point any cumulative corrections must total out to zero, even if there is encoder eccentricity.

So, the corrections have:

(1) a set which will repeat every revolution of the worm.

(2) a set which has repeated 8 times for every worm 3 revolutions.

So, is it possible to ONLY look for frequencies matching those behaviors? One frequency is repeating 8 times in 24 minutes, or every 180 seconds, with an overlay of the worm repeating every 8 minutes.

So, if the system can filter based on these being the longest allowable periods, then that might be a way to cause it to run based on the possible drive errors, since the error in the timing for the 8/3 error is actually correct every 3 minutes, any 3 minute interval is long enough to see the entire performance of the upper drive reduction.

Now, on Milby's point about looking for a reference on the shaft, there is nothing to say the system couldn't look for the shaft reference with multiple detectors, so it would have to be visible during alignment.

Anyway, that's what I've got for now. I'm kind of swimming thinking about the overlaid functions. I feel like there should be some sort of maximum slope theorem of something to allow the system to be restricted to these inputs. Ah- I think I have it- periodically reset the definition of "Zero" on the encoder. Actually, that would be every 3 minutes. Could it be that simple?

-Rich

Edited by Starhawk (05/05/13 03:25 AM)


Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: Starhawk]
      #5841120 - 05/05/13 03:29 AM

One more thought, actually, the re-zeroing of the encoder should be much faster. This isn't PEC- all you need to know is if you are fast or slow at a single moment. Pick the drive update frequency and a nyquist criterion for measuring it, then just keep a running score.

-Rich


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Starhawk]
      #5841131 - 05/05/13 04:06 AM

Rich,

Ah- I think I have it- periodically reset the definition of "Zero" on the encoder. Actually, that would be every 3 minutes. Could it be that simple?

I have done that - see my post 5837844 above.

Reason there's no supporting data is because the performance wasn't great. I was actually resetting the zero every 120 seconds.

If you check, 500" over 24 hours is 0.35" per minute. So resetting every 2-3 minutes should be enough. But you will still get drift (trust me, it's very obvious on the PHD graph).

Controlling the speed is actually just another way of doing the reset - because

speed = (new_tick - old_tick) / (new_time - old_time)

So long as "old_tick" and "old_time" aren't too far behind new_tick and new_time, you won't see any encoder drift.

I tried using old_time and new_time being exactly 17.233 seconds apart (so that you are reading ticks from adjacent encoder slots, and thus interpolation errors between slots would cancel out) but the problem with such a long (17.233 second) measuring interval is, the system responds very slowly to input.

Just think.. applying a 500ms guide pulse will not do very much to change the average speed taken over a 17.233-second period.

The result was my PID control algorithm slowly built up a bigger and bigger oscillation.

The current algorithm uses the instantaneous velocity (i.e. old_tick and new_tick are only 1 sampling interval apart which is 0.5 seconds). I think this is too low, because encoder jitter would screw up the instantaneous velocity.

But the algorithm seems to maintain an average velocity of 15.04" / second quite well! the graph above is for this.

Maybe I will use a 4-second running average or something to smooth out the encoder jitter.

Frankly... I think this is an optimization exercise at this point. I'm sure even with the existing algorithm one can do 5-minute unguided with a CGEM at modest pixel scales (e.g. 2"/pixel). An unassisted CGEM cannot hope to do that.

One other use case - some people need 10-second guide exposures because they're using OAG or narrowband filters. A stock CGEM cannot be used with 10-second guide exposures due to the PE. As it is, this box can turn a CGEM into something usable for these use cases.

I'd call this a qualified success.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5841598 - 05/05/13 12:41 PM

I agree. The running average appears to be the way to go in my mind.

I'm wondering if a purpose made attachment mounting and a carefully installed shaft adapter might not do the trick. While quickness is met by a thin aluminum plate and some circuit board standoffs, I would not be surprised if they were the main error source.

-Rich


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Starhawk]
      #5842680 - 05/05/13 11:35 PM

They probably are...

The choice of encoder shaft mount (Heidenhain claims their blind shaft is self centering) also might have something to do with it.


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5845356 - 05/07/13 11:26 AM

I wrote some nice Processing sketches to graph the measured periodic error in real time (pulling data off the serial port).

Without correction (this is the AP600, west-heavy, so about 15" p-p):


and with correction (misleading, because the mount is actually following the curve of the encoder's error):


much nicer than capturing the data with Putty and graphing it after the fact in Excel!

I did some more simulation and analysis, and realized that I cannot get rid of the 24-hour periodic error with low-pass filters (learned a lot about IIR filters though! - the smooth curve in the Processing sketches are actually 3rd order Butterworth lowpass filtered)

So I need to have some better shafts made. I goofed in my previous measurements (didn't have a digital caliper then) - measured the encoder shaft ID at 0.992" when it actually is (exactly) 1.000". So my shafts are undersize by 0.008" and the encoder wobbles on it.

I mean I had noticed this wobble before, but I didn't realize it contributed so much error.

Now hoping the person who made my original shafts would be willing to make more..


Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5845495 - 05/07/13 12:53 PM

Interesting- if all else fails, 1.000" should be an off-the-shelf size. You could probably just buy some drill rod and use it.

-Rich


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Starhawk]
      #5845538 - 05/07/13 01:08 PM

A simple rod / shaft won't do.. my existing shafts are like that, and I realized that there must be some mechanism to ensure that they are trued up to the polar shaft.

This is because the threads aren't that tight, so the shafts wobble a little bit. My revised shaft design (for the 1.000" ID, if ever I get this working I'll need a revised design with a 12mm shaft for the Heidenhain encoder) has a collar to ensure it's tight:



(the shaft I want made is the lower one)


Post Extras: Print Post   Remind Me!   Notify Moderator  
vdb
sage


Reged: 12/08/09

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5845795 - 05/07/13 02:36 PM

Ah, so my advise was correct then, it was my suspicion from the beginning, the physical mounting of the encoder is also very important (not the only source of error but an important one)

Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: vdb]
      #5845858 - 05/07/13 03:02 PM

Suggestion: If you can get a machinist to help, the answer might be to hand him the mount and just say, "This is what I am trying to do" and see what he says.

There are ways of causing this to true up using an expanding shaft. Imagine if you used the far end of the RA pass-through to cause the shaft to line up. Something like a tapered interference at the far end would cause the shaft to true up if the bottom end was tapered. So, what you would have, in essence, would be two tapers pulled into either end of the cylinder section with a long bolt holding them together.

Alternatively, you could just shim the shaft with something like aluminum air conditioning tape. You would want to have it at three equally spaced points around the shaft. That might get your current shaft working so you can make progress without having to wait for a major refit.

-Rich


Post Extras: Print Post   Remind Me!   Notify Moderator  
neilson
professor emeritus


Reged: 08/22/10

Re: Encoder-based PE Correction on the cheap new [Re: Starhawk]
      #5846303 - 05/07/13 06:32 PM

Or some plumbers white teflon tape for pipe threads

neilson


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: neilson]
      #5846844 - 05/07/13 10:59 PM

I've tried shimming with masking tape. Too thick. I would imagine the aluminum AC tape is even thicker.

I have some ultra-thin teflon sheet from my dead-end AP600 declination bushing experiment. I could try that..


Post Extras: Print Post   Remind Me!   Notify Moderator  
Mert
Post Laureate
*****

Reged: 08/31/05

Loc: Spain, Pamplona
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5857394 - 05/13/13 12:30 PM

Hi Orlando, have you already tried shimming the
encoder???

Great results so far, very impressive!


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Mert]
      #5857556 - 05/13/13 01:35 PM

Traveling, so no shimming. Have ordered some new shafts. Hopefully will receive them in a couple weeks.

Post Extras: Print Post   Remind Me!   Notify Moderator  
Mert
Post Laureate
*****

Reged: 08/31/05

Loc: Spain, Pamplona
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5857978 - 05/13/13 05:13 PM

I see, one more question though!

On the sketches you posted a while ago on the shaft you
would like to make, did you check if the end of your
RA-axis where the polar scope is screwed into, is trued
up???
If not, screwing your new axis flat against that RA-axis
end which wouldn't be trued up wouldn't make much of an
improvement I am afraid!
Maybe just rotating the RA-axis with a little feeler gauge
against the flat end will show??

I hope to read more on your project, this is very
interesting all together!!!

Edited by Mert (05/13/13 05:17 PM)


Post Extras: Print Post   Remind Me!   Notify Moderator  
mattflastro
Vendor - Astrovideo Systems


Reged: 07/31/09

Loc: Brevard County , FL
Re: Encoder-based PE Correction on the cheap new [Re: Mert]
      #5868545 - 05/18/13 12:24 AM

Quote:

I see, one more question though!

On the sketches you posted a while ago on the shaft you
would like to make, did you check if the end of your
RA-axis where the polar scope is screwed into, is trued
up???
If not, screwing your new axis flat against that RA-axis
end which wouldn't be trued up wouldn't make much of an
improvement I am afraid!
Maybe just rotating the RA-axis with a little feeler gauge
against the flat end will show??

I hope to read more on your project, this is very
interesting all together!!!



you need an encoder mount similar to a push pull lens or mirror cell . No amount of shimming would make this mess true with the sub 1ppm accuracy you need . Scope makers know they couldn't build the telescope concentric and collimated and that's why there are collimation adjustments. Imagine you didn't have secondary mirror collimation adjustments and had to machine or shim the mirror holder until it was perfect. Adding collimation screws to your encoder isn't that big of a deal compared to all the IIRF , Bessel, etc FFTs you went thru . For a few pesos you could get some nice differential action submicron accuracy actuator screws like ther ones used in optical kinematic mounts:
Differential screws

The one from the link has a precision of 25microns PER REVOLUTION. That's 1 micron per 18degrees of rotation . Try that with shims or machining .

Edited by mattflastro (05/18/13 08:07 PM)


Post Extras: Print Post   Remind Me!   Notify Moderator  
Mert
Post Laureate
*****

Reged: 08/31/05

Loc: Spain, Pamplona
Re: Encoder-based PE Correction on the cheap new [Re: mattflastro]
      #5889034 - 05/28/13 01:59 PM

Hi Orlando,

By any chance have you had any chance to test something
more, since I'm very ( read VERY ) interested in your
project!
I hope to read more on your progress, keep up
the good work Orlando!


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Mert]
      #5890100 - 05/29/13 01:04 AM

Still waiting for my new shafts Mert.

I have been traveling for the past 2 weeks.

The new shafts are slowly making their way to me in Singapore from the US. I hopefully should have them by Saturday.

Matt: am not too interested in the collimation-style adjustment. More opportunity for user error and quite laborious to adjust. And the TDM manages to do it without adjustments, so it should be possible.

My new shafts are 0.998" (instead of 0.992") for the 1" ID encoder shaft. Hopefully much less wobbling so no more gross periodic error.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Edmond S.
member


Reged: 07/05/10

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5890518 - 05/29/13 10:58 AM

Hi Orlando,

I have been following this post for a while. This is indeed a very interesting project.

Lately I start to investigate my CGEM performance and getting more intrigued by your solution. Keep us posted how it turns out.

another thing: is it possible to use PECPrep to figure out the fundamental PE and the 8/3 PE, create/generate the combined correction on the fly and send it to the mount ? Sort of like a PE from the computer, but takes 24min to generate profile.

Edmond S.


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Edmond S.]
      #5890584 - 05/29/13 11:45 AM

Hi Edmond, no it is not possible.

You see the non-integer 8/3 cycle only repeats every 24 minutes. Since the PEC indexer on the CGEM repeats every worm turn, you don't know where you are in the 24-minute cycle.

Some of the Meade mounts have a 3-cycle indexer so they can figure out where they are.

Also the CGEM only has an 88-cell PEC. So even if it were possible to do 24 minutes, you would only have 88 cells, so that's only (88 / 24 minutes) = 3.67 corrections per minute (or 1 PEC correction every 16 seconds).


Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5891232 - 05/29/13 07:56 PM

I'm still thinking about this as well.

-Rich


Post Extras: Print Post   Remind Me!   Notify Moderator  
Mert
Post Laureate
*****

Reged: 08/31/05

Loc: Spain, Pamplona
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5891992 - 05/30/13 09:00 AM

Hope to see an image of the new shafts Orlando, CNC-ing
is fun!!!


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Mert]
      #5910748 - 06/09/13 01:29 AM

small update. Installed the new shafts. Much more sturdy. Very tight fit, had to sand down the shafts a bit.

bad news: huge error still there.

I will be attaching an indexer to the shaft (a 128ppr $10 absolute encoder) and will try to apply PEC to the huge error. Inelegant solution, but I need to get this working (for academic reasons - I want to use it as a project for my astronomy postgraduate course).

Seems that an absolute encoder is a better choice, am still checking if the (5000ppr, 25-bit resolution) Heidenhain ECN425 is cost-effective. But it's instructive to note that this encoder only has a +/- 10" accuracy. I expect this to be true of any 5000ppr sine/cosine encoder. Makes me wonder (further) how the TDM does it, since they use the same darn encoder technology (ERN180/480).


Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5910765 - 06/09/13 01:48 AM

Is the plate attached to the back of the mount still the thin sheet with CCA standoffs? That should be beefed up as well.

What does it do if you unlock the axis and swing through 360° with no OTA attached?

-Rich


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Starhawk]
      #5910781 - 06/09/13 02:13 AM

Yes there still is that thin sheet... but it's only there to prevent the encoder from rotating. All the physical support is provided by the extremely beefy shaft. I have rotated the mount 360* a couple times (to calculate the huge error). Have not seen how that sheet reacts...

Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5914358 - 06/11/13 12:19 AM

Update: the large periodic error is still there. I believe I've tracked it down to the torque mount on the encoder.

A torque mount of this type will invariably induce a tilt in the encoder. So a flange-mount encoder would be ideal.

The challenge is, there is a 3-month lead time if I order the Heidenhain flange mount encoder, and I'd have to re-fabricate the shaft coupling because Heidenhain doesn't make a 1" bore encoder. Having no lathe really bites at times like these..


Post Extras: Print Post   Remind Me!   Notify Moderator  
vdb
sage


Reged: 12/08/09

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5914399 - 06/11/13 01:03 AM

I did look at your first post with pictures, is this still the way the encoder is fixed? If you look at the TDM you see the adaption is really solid, so I don't think you need a new encoder but better adaption of the current encoder ...
Wild guess, would the CGEM TDM adaptor not be adaptable to your encoder?


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: vdb]
      #5914421 - 06/11/13 01:39 AM

Unlikely, the TDM uses a specific Heidenhain encoder (the one with a 3-month wait list if I order - and pay - now).

Also the CGEM adapter for the TDM costs $400. I'm not willing to pay that.


Post Extras: Print Post   Remind Me!   Notify Moderator  
SWR
member


Reged: 07/23/10

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5914494 - 06/11/13 03:45 AM

Here's a crazy idea for a low cost 2M PPR DIY digital encoder.

Use a Blu-ray disk as the encoder wheel and a PCB with three blu-ray pickups. Two pickups will generate the quadrature signal, and the last encoder will generate a coded index signal to give an absolute position after a few hundred counts in either direction.

The encoder disk will be generated by programming the three tracks on a Blu-ray disk. There's a description on Wikipedia under "Optical disk" where you can see the resolution of the Blu-ray disk. The shortest pulse is 130nm which will give a quadrature resolution of 65nm.

The inside tracks are 46mm diameter, which will give a resolution of 2.22M counts per revolution corresponding to a 0,58" resolution.

If it can be aligned with sufficient accuracy, the trimmed down Blu-ray disk could be mounted under the orange ring instead of your thin aluminum plate. The PCB can be mounted on the RA axis using a hollow adapter that will allow the feed through of a wire to the guide port routed internally in the CGEM.

The pin on the guide port that is not connected, should be wired to 5V inside the CGEM. This way you have power supply and guide signals in the same wire.

The small microcontroller on the encoder PCB should implement the guide pulses as open-collector so that a guide camera can be connected in parallel.

If the alignment issues can be worked out, I think this will be a very low cost solution.


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: SWR]
      #5914495 - 06/11/13 03:51 AM

That's the thing. The alignment issue is the biggest issue, I'm starting to realize...

I've tried to allow the torque mount to have a degree of freedom parallel to the encoder shaft (so it just slides along rather than tilt the encoder).

This doesn't work. I've noticed that the TDM uses the through-hole version of the Heidenhain encoder, but the difference between the Heidenhain and the Baumer I'm using, is that the H. has compression collars on both ends of the bore, whereas the Baumer only has a compression collar on one end.

I imagine the two compression collars help align the shaft more accurately.


Post Extras: Print Post   Remind Me!   Notify Moderator  
SWR
member


Reged: 07/23/10

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5914535 - 06/11/13 05:16 AM

The advantage of using the mount as alignment is that you have no bearings that have to align. The bearings on the RA axis are already aligned. The only fiddely thing would be to push the small piece of Blu-ray disk under the orange ring around, until it is perfectly aligned with the RA axis. The PCB with the Blu-Ray pickups is automatically aligned with the RA-axis because it is mounted on this axis. Alignment of the PCB adapter is not important. It will just change the diameter of the pickup circle.

I suppose that this can be aligned by having several similar tracks side by side on the Blu-ray disk. Which one it catches is not important. This way the only alignment is the centering of the Blu-ray disk. I admit that this can be difficult, but at least it's only one thing that must be adjusted.

Perhabs an accurate hole with the right diameter can be made in the disk using a lathe? Otherwise it must be aligned manually.


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: SWR]
      #5914762 - 06/11/13 10:15 AM

I think you underestimate how accurate the centering should be..

In my case, the encoder has a 1.000" bore. My original shafts were 0.992" (a difference of 0.008") and the resulting encoder swash and errors were huge. The replacement shafts are 0.998" (a difference of 0.002") and there still is significant error.

Also if the disk is not exactly parallel to the pickups (i.e. it is not perfectly perpendicular to the RA shaft) this will also result in encoder swash and errors.

There is a very good treatment of the numerous errors that afflict encoders here -

http://resources.renishaw.com/en/download/white-paper-the-accuracy-of-angle-e...

in particular check out the error induced by bearing wander, encoder swash, and eccentricity (all these errors are of the same magnitude):

Angular measurement error (arc seconds)
= bearing wander (µm) x 412.5/D
where D is the diameter of the encoder scale in mm

So if you have a 100mm disk, a bearing wander of 10 micrometers would result in 41 arc-seconds of error. So the 2 million ticks (~ 0.6 arc-second) is empty resolution, and is completely swamped by bearing wander/eccentricity/encoder swash.

And 10 micrometers is 0.0003937 inches (0.01mm). I don't think a blue ray disk could even be dimensionally stable enough to meet that spec..


Post Extras: Print Post   Remind Me!   Notify Moderator  
SWR
member


Reged: 07/23/10

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5914888 - 06/11/13 11:30 AM

Thank you for the link. I will study this in detail.

Does it matter that the accuracy is 41" as long as the resolution is 0.6"? If the error is a slow changing error once per revolution, it can be removed in software by PEC training the encoder. If higher frequency cyclic errors from the gearbox and non repeatable errors from wind etc. can be removed, it should be possible to calibrate the slow moving cyclic encoder errors with a guide camera.

One idea that springs to my mind is this: One way to completely remove all alignment issues, would be to mount a blank disk and burn the pattern on the mount using the pickups when both disk and PCB has been mounted securely. The only requirement would be that the RA axis is spun at an accurate speed. Maybe a small/weak motor and a flywheel on an unloaded RA axis that is allowed to stabilize over several minutes could be used? The software could start by burning a single index pulse, and monitor the frequency of this pulse with great accuracy. This could then be used as an accurate timing reference.

Just some loose thoughts.


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: SWR]
      #5915044 - 06/11/13 01:06 PM

Yes that's what I'm planning to do.. PEC-train the encoder, because I can't get the eccentricity out of the system.

This however requires that you have an additional, absolute indexer - a normal PEC indexer is a single slot, but a worm rotates once every 4-10 minutes. Since the RA shaft only rotates once in 24 hours, you can't determine the PEC index with a single slot: you need an absolute encoder.

You can't calibrate the disk by spinning the RA shaft at a fixed speed. Because how can you ensure a fixed speed when any motor or geartrain you'll use to spin the axis would also have its own periodic errors.

Many commercial encoder manufacturers calibrate their higher-end encoders using the concept you've suggested.. but they use a laser interferometer with sub-arcsecond resolution, or a high-resolution master encoder, to provide the "known good" readings. By mapping the "known good" angular readings with the (distorted) output of the encoder under test, they can construct an error map specific to that encoder.

The problem is... the error map only takes into account the eccentricity of the encoder "stand alone." Once that encoder is installed, bearing wander, axle swash, etc. will induce its own periodic error which the "canned" map in the encoder can't compensate for. So for the really high-end positioning systems like IC etching machines, they do calibration with an interferometer on the completed system.

Here are some more encoder references I've coughed up in the course of this project.. (most are available online, but some require IEEE membership and payment)


Selection of a tape encoding system for the main axis of the Gemini telescopes, John D. Wilkes & Martin Fisher, Proc. SPIE 3112, Telescope Control Systems II, 30 (September 18, 1997); doi:10.1117/12.278836, From Conference Volume 3112, in Telescope Control Systems II, ed. Hilton Lewis, July 27, 1997


Yang, Y., Rees, N. P., & Chuter, T., Application of a Kalman Filter at UKIRT, Astronomical Data Analysis Software and Systems IX, ASP Conference Proceedings, Vol. 216, edited by Nadine Manset, Christian Veillet, and Dennis Crabtree. Astronomical Society of the Pacific, ISBN 1-58381-047-1, 2000., p.279

Watanabe, T., Fujimoto, H., & Masuda, T. Self-Calibratable Rotary Encoder, Journal of Physics: Conference Series 13 (2005) 240-245

Erm, T. & Sandrock, S. Adaptive Correction of Periodic Errors Improves Telescope Performance, 2005 American Control Conference, 8-10 June 2005

Erm, T. & Sandrock, S. Adaptive periodic error correction for the VLT telescopes, Proc. SPIE Large Ground-Based Telescopes, Vol. 4837-106, 2002

Ulich, B., Montgomery, J., Poyner, A. & Janes, C. Correcting Periodic Error in Telescope Absolute Encoders, MMTO Tech Memo 84-17, 11 June 1984.

Encoder Tests, Gemini Mount Control System Report, MCSJDW11 (Issue 1), 10 July 1996

“Determination and correction of quadrature fringe measurement errors in interferometers” Peter L. M.
Heydemann, APPLIED OPTICS Vol. 20 No. 19, 1 October 1981.

“William Herschel Telescope Inductosyn Tape Encoder Project” C. S. Amos, J. E. Churchill, M. Fisher, R. A. Laing. September 1992. RGO Report - RGO-N-008.

“A High Resolution Incremental Tape Encoder On The William Herschel Telescope” Martin Fisher, ADVANCED TECHNOLOGY OPTICAL TELESCOPES V, SPIE Vol. 2199, March 1994.

“Comments on Report RGO-N-008 - William Herschel Telescope Project” Frank Ruhle, Inductosyn International. EN7032. January 1996.

“Encoder Considerations” Martin Fisher and John Wilkes, GEMINI MOUNT CONTROL SYSTEM REPORT, November 1995.


Tan, K.K., Zhou, H.X., & Lee, T.H. New Interpolation Method for Quadrature Encoder Signals, IEEE Transactions on Instrumentation and Measurement, Vol. 51, No. 5, October 2002

Kavanagh, R.C. Probabilistic Learning Technique for Improved Accuracy of Sinusoidal Encoders, IEEE Transactions on Industrial Electronics, Vol. 48, No. 3, June 2001


Cheung, N.C. An Innovative Method to Increase the Resolution of Optical Encoders in Motion Servo Systems, IEEE 1999 International Conference on Power Electronics and Drive Systems, PEDS '99, July 1999, Hong Kong

Nanowave, Inc. Using Jump Error to Assess the True Performance of Position Encoders, White Paper #4, 2012


Lee, W.Y. Implementation of a DSP-based 20-bit High Resolution Quasi-Absolute Encoder for Low-Speed Feedback Control Applications, Avago Technologies White Paper.


Texas Instruments, TMS320F240 DSP-Solution for High-Resolution Position with Sin/Cos Encoders, Application Report SPRA496

EXTRACTION OF HIGH RESOLUTION POSITION INFORMATION FROM SINUSOIDAL ENCODERS, J. Burke, J. F. Moynihan, K. Unterkofler

Ultra Precise Position Estimation of Servomotor using Analog Quadrature Encoder, Ju-Chan Kim*, Seon-Hwan Hwang*, Jang-Mok Kim†, Cheul-U Kim* and Cheol Choi**, JPE 6-2-6


Post Extras: Print Post   Remind Me!   Notify Moderator  
Mert
Post Laureate
*****

Reged: 08/31/05

Loc: Spain, Pamplona
Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5915253 - 06/11/13 03:18 PM

Really interesting Orlando, I'd be more then curious
to know the runout you can measure with a feeler gauge
when rotating the RA axis and measuring on the new axis
where the encoder will be mounted.

If you could mount the encoder on your aluminum end-plate
with three screws, maybe you could align it better??
Just an idea...


Post Extras: Print Post   Remind Me!   Notify Moderator  
SWR
member


Reged: 07/23/10

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5915563 - 06/11/13 05:58 PM

Quote:

This however requires that you have an additional, absolute indexer - a normal PEC indexer is a single slot, but a worm rotates once every 4-10 minutes. Since the RA shaft only rotates once in 24 hours, you can't determine the PEC index with a single slot: you need an absolute encoder.


It is easy to make an absolute encoder with an extra track besides the quadrature signal. Instead of just a single pulse in one position, you can make a coded signal that doesn't repeat anywhere on the circle. This way you can determine the absolute position after a small fraction of a revolution.
Quote:

You can't calibrate the disk by spinning the RA shaft at a fixed speed. Because how can you ensure a fixed speed when any motor or geartrain you'll use to spin the axis would also have its own periodic errors.


How about using a weak motor and a large flywheel on the axis? This way the rotational speed will be stabilised because the errors of the motor doesn't have enough force to move the large inertia within a single revolution. The downside is that the motor will need some time to stabilize the speed, because the rotating mass will be very slow to bring up to speed, but it should be quite accurate.
Quote:

Many commercial encoder manufacturers calibrate their higher-end encoders using the concept you've suggested.. but they use a laser interferometer with sub-arcsecond resolution, or a high-resolution master encoder, to provide the "known good" readings. By mapping the "known good" angular readings with the (distorted) output of the encoder under test, they can construct an error map specific to that encoder.


Yes, that is a very good solution. The weak motor/flywheel mass was just to suggest a low cost alternative.
Quote:

The problem is... the error map only takes into account the eccentricity of the encoder "stand alone." Once that encoder is installed, bearing wander, axle swash, etc. will induce its own periodic error which the "canned" map in the encoder can't compensate for. So for the really high-end positioning systems like IC etching machines, they do calibration with an interferometer on the completed system.


Yes, that will be a limitation of this approach, so these errors must be kept to a minimum, but as I see it no system can remove bearing wander and axle swash. Those errors will have to be adjusted to a minimum in the mount assembly.
Quote:

Here are some more encoder references I've coughed up in the course of this project.. (most are available online, but some require IEEE membership and payment)



Thank you for the comprehensive reference list.

Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: SWR]
      #5915841 - 06/11/13 09:09 PM

actually there is a solution - the Renishaw ring encoders.

There is a lot of prior art (patents even) and some of the articles I've listed also discuss this. The use of two read-heads on opposite sides of the encoder disk or ring basically eliminates encoder eccentricity, bearing wander, and swash related errors - this is because the periodic error seen by each read head is the complement of the other, and averaging the readings from the two read heads will cancel these slow one-cycle errors. 4 heads are better than 2, but >4 gives no benefit (this is also discussed in the Renishaw article linked above).

Unfortunately multiple read heads are not available on the sanely-priced encoders. You'd have to buy a Renishaw ring and two read heads, and mount them yourself. I strongly suspect this is what AP is doing, which explains the large and bulky axes on the 1100 and 1600 (for accommodating the ring).


Post Extras: Print Post   Remind Me!   Notify Moderator  
SWR
member


Reged: 07/23/10

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5916260 - 06/12/13 02:11 AM

That is indeed a very good solution, but also a very costly one. The idea with an optical disk with high resolution plus PEC was an attempt at suggesting a low cost alternative. One of the few low cost technologies working with sub micron resolutions are the optical drives. The lasers and disks are cheap, because they are mass produced.

Another low cost alternative to an accurate encoder as source for PEC calibration is low frequency guiding. The prerequisite is that there are no high frequency encoder errors, to allow for longer guide exposures that will eliminate atmospheric disturbances.

I agree that the easiest solution is to buy an accurate encoder, but it is an expensive solution.


Post Extras: Print Post   Remind Me!   Notify Moderator  
Starhawk
Space Ranger
*****

Reged: 09/16/08

Loc: Tucson, Arizona
Re: Encoder-based PE Correction on the cheap new [Re: SWR]
      #5917675 - 06/12/13 08:35 PM

The optical disk would have to be accurately mounted. Otherwise, what happens if you jump tracks? So, it isn't quite so easy since the encoder has to be internally consistent. Now, if you could trick a disk burner into printing a perfectly radial set of alignment data, then you could have one which would be able to survive jumping tracks, and then you could conceivably make one out of blu-ray player parts.

On the issue of indexing the PEC of the encoder, I had an idea: Provide multiple unique indexing points. So, for example, you could have one every 45°, and the mount would be assured to run over various ones periodically just in the alignment routine. Notionally, there could be a pinhole in a disk, and then have 8 detectors, so at the moment it runs over any of the detectors, the alignment of the disk is known.

-Rich


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore
Re: Encoder-based PE Correction on the cheap new [Re: Starhawk]
      #5918128 - 06/13/13 02:03 AM

Rich, my idea was to put a 128-tic ABSOLUTE encoder on the mount, in parallel with the 5000-ppr incremental.

The 128 absolute counts gives 128 separate PEC index marks. In fact I wonder why this isn't done on regular mounts instead of a homing switch. The 128-ppr absolute encoder is $10. And it's rated for 50,000 rotations. Better than a switch that you must rotate to seek the home position.

But.... I measured the encoder error with the encoder disk at a fixed position (used a digital level) and the error varies. So it's not eccentricity. The SiTechServo folks are helping me with this and I have some ideas...

On the other hand the new Renishaw LM10 encoder can be had cheaply, and the magnetic tape (Bogen brand) is cheap as well. You can get started for only about $150 (tape and encoder, both from ebay). The problem is, the accuracy is low (about 300K digital tics over an entire revolution).


Post Extras: Print Post   Remind Me!   Notify Moderator  
vdb
sage


Reged: 12/08/09

Re: Encoder-based PE Correction on the cheap new [Re: orlyandico]
      #5918170 - 06/13/13 03:01 AM

The problem is, the accuracy is low (about 300K digital tics over an entire revolution).
But if you use the sitech, one can use the geared motor tics to do interpolation ... hmmmm


Post Extras: Print Post   Remind Me!   Notify Moderator  
orlyandico
Postmaster
*****

Reged: 08/10/09

Loc: Singapore