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.

speed measurement of dc motor with eCAP

Other Parts Discussed in Thread: TMS320F28335

Hello!

I wanna to measure the speed of the dc motor with eCAP which has Hall Effect encoder. Encoder gives 1 pulse per revolution. I am setting 2 capture events in the eCAP module setting and Enabling Reset Counter After Capture Event 1 time-stamp(and Capture event 2 also).

Do you know what kind of output signal eCAP module gives when TS(time stamp) is the output? is it period expressed in seconds?

And is it Period=CEVT2-CEVT1 (like delta time)?

  • Hi Sumir,

    From the above query i understand that, the ECAP module is configured to Delta mode. In this mode, period is determined in seconds by dividing contents of CAP2 register  with the module frequency of  ECAP.

    Period =  CAP2  / module frequency of ECAP.

    Above fromula assumes prescalar is by passed.

    Regards

    Savinay

  • Hi,

    thank you very much for your reply.

    i am using TMS320F28335 ezdsp. which has eCAP  module with 32 bit and frequency odf the DSP is 150 Mhz.

    what i understood from your response i should divide CAP2(uint 32 data type) with 150Mhz (which is 6.6nsec).

    from this period i find number of revolutions per minute and and compared it with 2000 rpm.

    but when i use this motor start to spin at first then is stops rotating after 2-5 sec.