Telescope Drive Master - The Truth of the Matter
Posted 21 September 2012 - 01:09 PM
Also quadrature is already a form of (digital) interpolation. I do not think 4096X interpolation would give very good results.
Best to find an analog (voltage mode, not current mode) encoder like the Heidenhain, with 5000 tics, and built an analog interpolation module like the TDM folks did. You can find 5000 tic analog encoders on ebay for $200 range.
Posted 21 September 2012 - 01:53 PM
use that in the Arduino ADC to get 1024 samples from 0-5V.
That would cover a half cycle or 2048 samples per cycle.
Each sample could generate a pulse maintaining quadrature
and then with a simple quadrature circuit x4.
At least this is what I was thinking for the moment!
Posted 22 September 2012 - 02:35 AM
I get what you are thinking - use two A/D converter channels to get the 2 sinusoids. Now you have A and B, take the arc-tangent which then gives you the angle between the two encoder ticks.
You probably don't even need to up-sample to 0-5V, 0-1V is probably OK but the resolution is less.
I have calculated with a 5000-ppr encoder, if you do 256X interpolation (8-bit) that will give you 1280000 counts/rev, which is pretty close to 1" per rev.
Since the sidereal rate is 15.04" / second, with 1280000 counts/rev you will get basically one tick per second. Should be enough, since then you can do 1 correction per second.
Posted 27 March 2013 - 04:53 PM
A lookup table is a good way to do trig quickly, if you have the memory. You need tangents for 0 to 45 degrees, then do some jiggery pokery to get this to 360 degrees.
You have given me an idea, thank you! I'm not sure the Arduino has enough processor power for that... but can the Arduino compute arc-tangents quickly?
Posted 27 March 2013 - 07:23 PM
The AVR math library can calculate an arc-tangent in 5700 clock cycles (!!) which is about 0.4 ms. That's what am doing..
Posted 27 March 2013 - 08:38 PM
Posted 28 March 2013 - 12:40 AM
Posted 28 March 2013 - 03:51 AM
Here's my time budget so far...
1) reading the A, B, and N channels 16 times - takes 13-15 milliseconds
2) calculating the arc-tangent - takes <1 millisecond
I only aim to do corrections every 100ms (that's 10X per second) so as can be seen I still have lots of CPU time left over. Futzing around with the flash, SPI ROM, etc. is simply not worth it.
Posted 29 March 2013 - 06:28 AM
Units in deci-arcseconds. So that's between 0.8" and 1.2" p-p and 0.23" RMS PE. On a CGEM. With the following parts count:
1x Arduino Uno
1x MCP3304 AD converter
1x ACPL 847 optocoupler
miscellaneous wires and a breadboard
1x Baumer-Sinus Thalheim ITD 42 encoder
The encoder is by far the most expensive component at over $700, but the equivalent Heidenhain ERN480-5000 is $325. All the other parts are probably less than $50.