Can PBP read optical encoder damn fast? :)


Closed Thread
Results 1 to 40 of 47

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,161


    Did you find this post helpful? Yes | No

    Default Re: Can PBP read optical encoder damn fast? :)

    Well a very fast chip at 64MHz may help.

    But using another approach I guess it is possible with slower PIC also. You may use the CCP module to capture the rising and falling edge of the pulses in regard with the Timer so the PIC will capture the timer readings. Either just waiting or doing other stuff while the ISR will just transfer the timer value to your variable.

    With 1200 readings you will have to count double that. Rising and falling edge so is 2400 reading and I guess double that also, for the quadrature readings. Finally your pulse to pulse time may be about 200usec. Not too demanding but fast.

    Ioannis

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


    Did you find this post helpful? Yes | No

    Default Re: Can PBP read optical encoder damn fast? :)

    Yeah, 1200 counts per second really isn't THAT much. How to go about it depends - as always - on what else the PIC is supposed to do while keeping count (ie should it output to the AD9833 and if so, how, while counting pulses or how it's supposed to work) and on what peripherals and interrups sources are available.

    If counting is one state and outputting is another then a tight loop polling the inputs will most likely do just fine for 1200 transistions per second.

    It's important to determine if the 60 counts are with 4x decoding or not and if that is needed or not. Not doing 4x decoding is a lot easier than doing it.

    The 18F2431 family contains a QEI module that will happily keep track of an encoder producing counts up in the MHz

  3. #3
    Join Date
    Feb 2013
    Posts
    1,149


    Did you find this post helpful? Yes | No

    Default Re: Can PBP read optical encoder damn fast? :)

    Well the task is as follows. On power up, ribbon is stopped, AD9833 is set to output certain frequency. Depending on ribbon movement direction afterwards, frequency is increased or decreased. Movement can be fast or slow or even non-linear speed.

Similar Threads

  1. HEDS5540 optical encoder
    By louislouis in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 11th October 2016, 23:23
  2. how to read ky40 mechanical encoder ?
    By iw2fvo in forum mel PIC BASIC Pro
    Replies: 20
    Last Post: - 25th October 2015, 16:22
  3. Probe to read quadrature encoder with DT_INT need help
    By phoenix_1 in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 31st August 2009, 20:43
  4. USB Optical mouse as motor encoder
    By RodSTAR in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 24th August 2008, 15:09
  5. Damn these low power PIC and other Microcontrollers
    By keithdoxey in forum Off Topic
    Replies: 8
    Last Post: - 12th November 2006, 21:52

Members who have read this thread : 2

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