decoding quadrature encoders


Closed Thread
Results 1 to 40 of 94

Hybrid View

  1. #1
    Join Date
    Mar 2003
    Location
    Commerce Michigan USA
    Posts
    1,166


    Did you find this post helpful? Yes | No

    Default Re: decoding quadrature encoders

    Henrik and Richard, I understand what it is you are trying to accomplish. The problem becomes noise and the ability of the micro to intercept the interrupts. When you are trying to capture each and every edge in a mechanically noisy environment you will undoubtedly miss an edge or two. The key to properly designing an encoder into a mechanical design is the encoder resolution. Trying to get 4x the resolution from an encoder is indeed one way to fail if the encoder is of a higher resolution than is required. I have been designing encoders into mechanical fixtures for almost 40 years. I would rather have the processor executing code rather than constantly servicing interrupts in a mechanically noisy environment. It's just my way of thinking. Good luck...
    Dave Purola,
    N8NTA
    EN82fn

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default Re: decoding quadrature encoders

    If you need a certain resolution and a certain speed then it's going to result in a certain number of "counts" per second (ie a certain number of interrupts per second) no matter if you're doing x1 or x4 decoding, won't it?

    The difference is that with the former you need an encoder with 4 times the number of cycles compared to the latter. As far as the number of interrupts that micro needs to service there's no difference.

    In this particular case we don't know what the speed is but we know that Chris needs (or wants) a resolution of the 0.25 degrees, which his 360CPR encoder will provide with x4 decoding. He could exchange his encoder for one with 1440CPR and do x1 decoding but given that the speed at which the enocder is being moved is the same there will be an equal number of "counts" per second. Doing the x4 decode in software is however a bit more complicated than x1, I'll give you that :-)

    As far as noise goes I don't see the difference in running a 360CPR encoder doing x4 decoding and running a 1440CPR encoder doing x1 decoding.

    And if using an external decoder circuit, like the one you linked to, there's no need for any interrupts at all, just have two counters count the up/down pulses and differentiate periodically.

    /Henrik.

Similar Threads

  1. Quick thoughts: DT Ints with encoders
    By kevlar129bp in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 7th January 2010, 01:01
  2. PMDC SERVO MOTOR WITH quadrature encoder DRIVE ?
    By phoenix_1 in forum Schematics
    Replies: 37
    Last Post: - 22nd November 2009, 19:45
  3. 32-bit Quadrature Counter With Serial Interface
    By precision in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 10th June 2008, 02:49
  4. quad encoders
    By cpayne in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 13th March 2007, 17:49
  5. "momentary" IR decoding
    By sporker in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 20th June 2005, 01:53

Members who have read this thread : 4

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts