On Thu, 22 Jul 2021, Chris Albertson wrote:

Date: Thu, 22 Jul 2021 10:19:02 -0700
From: Chris Albertson <albertson.ch...@gmail.com>
Reply-To: "Enhanced Machine Controller (EMC)"
    <emc-users@lists.sourceforge.net>
To: "Enhanced Machine Controller (EMC)" <emc-users@lists.sourceforge.net>
Subject: Re: [Emc-users] A new lathe encoder option.

Yes, time-stamping the pulses works, if you have an accurate counter that
can be snap shotted by the pulse.  A modern microcontroller or FPGA can do
that. But as the pulses get faster you have to transition back to counting
pulses not "ticks" or you have the same quantization noise problem.    I
think you have to run both algorithms and
then decide which number is most reliable in real-time.   I've tried to do
this a few times

You only need to count the edges and the total time between edges to get a
accurate velocity estimate, there is no need to change modes. The trick is that the velocity estimate is counts/time-between-counts rather than counts/sample-interval. With a velocity estimate you can also get an interpolated position estimate at the sample interval. Fancier quadrature encoder velocity estimation systems catagorize edges into A and B rising and falling, and make velocity estimates from like edges. This eliminates
periodic errors from quadrature distortion (phase deviation from 90 degrees
and assymetry)






On Wed, Jul 21, 2021 at 10:05 PM dave engvall <dengv...@charter.net> wrote:



"The solution is to either add more counts per revolution or use a ten
timesmore complex control algorithm."

IIUC then the real problem here is statistical. That is the sample size is
too small to be significant. Maybe an over-simplification of the issue but:

I think there are a couple of ways to approach this. (1) time stamp the
index pulse.
              (2) use a high count encoder and scale as necessary. This
is clearly limited by the response of the  optics      for the disc.
100 - 200 KHz for the inexpensive stuff.
I don't think there is a one size fits all solution. In electronic terms
lathe spindles are pretty slow and have a lot of angular momentum. Most
lathe spindle
rpm range is not a lot over 5-6 binary bits.
I've actually considered putting a disc brake on the spindle. Not
exactly joking.

Just late evening rattling the cage.

Dave

>
>
>
>
>>>> Could you solve the noise issue with a phase-locked loop?
>>> Yes, this would be a far better solution. But I didn't want to
>>> re-write the encoder counter from scratch.
>>>
>>> Ideally you would use two PLLs, one for the pulses and one for the
>>> index, to predict the pulse gap and extrapolate through it.
>>>
>>> --
>>> atp
>>> "A motorcycle is a bicycle with a pandemonium attachment and is
>>> designed for the especial use of mechanical geniuses, daredevils and
>>> lunatics."
>>> ?? George Fitch, Atlanta Constitution Newspaper, 1912
>>>
>>> _______________________________________________Emc-users mailing list
>>> Emc-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/emc-users
>>
>>
>> _______________________________________________
>> Emc-users mailing list
>> Emc-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-users
>>
>



_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users



--

Chris Albertson
Redondo Beach, California

_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Peter Wallace
Mesa Electronics

(\__/)
(='.'=) This is Bunny. Copy and paste bunny into your
(")_(") signature to help him gain world domination.
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to