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.

Encoder not working

Other Parts Discussed in Thread: DRV8312, CONTROLSUITE

I am trying to run the PMSM Sensorless example code for the high voltage kit.  I am using the EZ DSP for 28335 and the DRV8312 EVM eval module.  I have a good 3.3V quadrature encoder signal to the EZ DSP on GPIO20, 21, 23 (A,B,I respectively).  I am on incremental buil Level 3.  When spinning the motor, I get a value of speed1.Speed=0.  When I view the rg1.out I get a sawtooth.  When I view qep1.ElecTheta, I get square pulses between 0 and 1.  They are amuch higher frequency than the sawtooth of rg1.Out.

How should I go about troubleshooting this?

 

Thanks,

Brad Mularcik

 

  • Brad, I would suggest doing the following, First Verify the signal is being received by the DSP correctly i.e. 20,21 and 23 are connected to A,B and I pulse from the QEP. For this you can put the QEP registers in the watch window. Verify that the QPOSCNT gets incremented correctly... Once you have verified the QEP registers, next step is to see the QEP macro generates the right speed and angle. For this i would recommend going through the QEP Macro documentation which can be found at controlSUITE\libs\app_libs\motor_control\drivers\f2833x_v1.1 also you may find the following forum post useful http://e2e.ti.com/support/microcontrollers/tms320c2000_32-bit_real-time_mcus/f/171/p/21694/260312.aspx#260312

  • QPOSCNT is not counting.  It is toggling between 0 and 4096.  Sometimes it is 4094 or 4095 instead of 4096.  I checked the signals again with an o scope at P4 of the EZDSP.  I am looking at P4-7,8,5 for the A,B,I signals.  I see good 3.3V signals.

    What next?

    Also, I will be out of the office for a week, so I will not get to work on this again until I get back.  Please let me know what I should look at next, and I will do that when I return.

    Thanks.

    Brad

  • FYI.  I determined this problem with the encoder not counting properly was a noise issue.  Noise on the index signal was causing the counter to reset constantly.  Once I replaced the cable with a good shielded cable and proper grounding, the encoder began working correctly.

    Thanks,

    Brad

  • Hi Brad

    I have TMS320F28335 Experimenter Kit (TMDSDOCK28335). I have PMSM 400 W, 160 V, 1.85 A , 3000 Rpm parameter values and encoder parameters (8P-2500 P/R). 8 refers to pole number. i can not read speed and position with sensorless PMSM program in controlsuit. I connect A,B,I and +5V, GND. I think i need to change ancoder program. How can i make.

    Thanks a lot.