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)
brave_ulysses
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
Post Laureate
*****

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
Post Laureate
*****

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
Post Laureate
*****

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
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
Post Laureate
*****

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
Post Laureate
*****

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
Post Laureate
*****

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
Post Laureate
*****

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
Post Laureate
*****

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  
Pages: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | (show all)


Extra information
10 registered and 40 anonymous users are browsing this forum.

Moderator:  Dave M, richard7, bilgebay, iceblaze 

Print Thread

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled


Thread views: 13852

Jump to

CN Forums Home


Cloudy Nights LLC
Cloudy Nights Sponsor: Astronomics