This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AMIC120: Incremental Encoder Protocol

Genius 5840 points

Part Number: AMIC120

Hello,

I would like to acquire position data from an incremental encoder with the following protocol, but it seems that eQEP can not cope with it.
Are there any good solutions?

Regards,

U-SK

  • Hi,

    As you mentioned, this is not the ideal input into the eQEP peripheral. From the TRM section 20.4.2.1 there are two modes that the eQEP can support:

    • Quadrature-clock mode: two square wave signals (A and B) that are 90 electrical degrees out of phase. Using these two inputs the eQEP peripheral can determine the direction by finding the leading edge between the two signals.
    • Direction-count Mode: direction and clock signals are provided directly by the encoder itself (instead of needing to be derived from A and B signals). In this mode the eQEP peripheral just increments or decrements the count based on the direction pin.

    Unfortunately, it doesn't appear that a single eQEP can support the protocol that you have pictured.

    However, looking at the functional block diagram of the decoder unit (Figure 20-134 in section 20.4.2.3 of the TRM) it appears that you can tie the internal QDIR signal to either a 1 or 0 (forward or reverse) using the QDECCTRL:QSRC mux selection register. So, one solution might be to use two eQEP peripherals with one QDIR tied to 0 and one QDIR tied to 1 and provide your two signals to the EQEPxAIN signal of the two separate eQEPs. Then it may be possible to use the Direction-count Mode mentioned above to keep a count of each of the signals separately in the two eQEPs and use software to determine the position or count by summing or comparing the two values.

    A second solution could be to use an AND gate to tie the two signals together into one combined signals that represents both forward and reverse. This could again be provided to the eQEP in Direction-count Mode as the clock signal. A PRU core could be used monitor the two signals (before the AND gate) and either provide a 0 or 1 signal into the direction pin of the eQEP based on which signal (A or B) was logic low most recently. Depending on the speed of the pulses the PRU core may not be able to keep up and a hardware solution would need to be used to determine the most recent logic low between the two signals.

    Jason Reeder

  • Hi Jason,

    Thank you for your reply.

    For the second solution, the number of PRU cores may be shortage.
    For example, is it possible to implement the control of the Biss-C encoder
    and the direction control of the incremental encoder you taught on single PRU core?

    Regards,
    U-SK
  • Hi,

    If the PRU is being used for BiSS-C then it will NOT be able to also perform the direction control.

    BiSS-C and Quadrature encoder inputs are providing the same type of input correct? Is there a use case where both BiSS-C and eQEP would be needed simultaneously?

    Jason Reeder
  • Hi Jason,

    Thank you for your reply.
    Biss-C gets position information of the rotating shaft of the motor.
    eQEP directly counts the speed pulse output from AMIC120 for motor control.

    Regards,
    U-SK