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.

eQEP-Problem: Transmission between Motor and Encoder

Other Parts Discussed in Thread: DRV8301, MOTORWARE

I have a motor with 10 pole pairs and encoder with 500 lines (resolution 2000). Ther is a transmission between encoder and motor - when the motor has one revolution, the encoder has three. I tried to define USER_MOTOR_ENCODER_LINES 1500 (3 x 500) but no success. I think the problem is, that the software sees 3 pulses from index by 1 revolution.
Is it possible to mask 2 of the 3 pulses from index?

I use the motorware v1.01.00.07 - Lab 12 / F28069MISO controlCard + DRV8301 Drive

Uwe

  • Uwe,

    The eQEP module is configured to reset the position count when seeing an index pulse.  I believe that this is causing your issue.  Since your application will have multiple index pulses per revolution you need to modify the eQEP driver to reset the position count when it reaches the position maximum.  

    In qep.h you would need to modify the initial value for QEPCTL_INIT_STATE to be the following:

    #define QEPCTL_INIT_STATE ( QEP_EMULATION_FREE + \
                                                              PCRM_POSMAX + \
                                                              IEL_RISING + \
                                                             QPEN_ENABLE + \
                                                             QCLM_TIME_OUT + \
                                                              UTE_ENABLE )

    It is also important to correct the QPOSMAX register, there is a small bug in the released MotorWare.  In qep.c modify the QEP_setup function to initialize the QPOSMAX register according to the following line.

    qepRegH->QPOSMAX = (4*numEncoderLines)-1;

    Hope this helps!

  • Hi Adam,

    sorry for late reply - I was on vacation.

    Your code works! Thanks for your support!

     

    Uwe