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.

TMS570LC4357-EP: QUADRATURE SPEED SENSOR

Part Number: TMS570LC4357-EP

Dear  sir ,

to find  the speed of  wheel using  quadrature pulse  generator  i am using sir,  using  driver  code  of embedded system , enhanced quadrature  pulse generator eqepA   and  eqepB  this driver pin  i am using for calculation , In this  microcontroller iam write some code for  calculate  timer period  to find frequency later RPM , Register  i am using  is  "QCPRD"  But  value  present  in this register is not constant value getting , like example iam getting RPM as 100  should should  frequency as  50 hz at relation of  RPM = frequency *60/PPR  , where PPR  is  30.Some time its giving  correct value ,later wrong value , to much of variation is happening , how  to  over come .I will attach my code also ,what will be reason , In this file  HL_Sysmain .C

thank you

thank youspeed_sensor.zip

  • Sir  i need one confirmation , in code if its problem means the correct output   will not   get  , but correct value is getting some time , next getting  high variation value , for time period , the value stored in register should be 5000, but some time 5200, 5800, 6000 , 4500  like this value is getting from  "QCPRD" ,  its hard ware problem or some other problem , just tell me sir enough 

  • what sir  no reply

  • Dear  sir  any update

  • Hi Jeev,

    How are you providing input? Is your input have constant frequency?

    Did you verify your input frequency with any oscillator or analyzer?

    --

    Thanks & regards,
    Jagadish.

  • Dear sir ,

    yes sir after verify  through oscilloscope then  only  i given  to controller . In oscilloscope  providing  constant frequency value  at  respective RPM  after  dumping code , in respective register  value are varying  through debug i come to know , one doubt sir if any mistake in code means correct output will not get  all , but its getting excite value , later  three wrong value , again correct value  like cycle is going , where will be mistake sir , in hardware   

  • In  input is providing through  quadrature pulse generator  laxven system . by setting  RPM  through "clear path" application 

  • Hi Jeev,

    I don't see any other issues in your code. The only thing i should need do here is that, need to test it practically by generating quadrature signals from end and should need to supply to this application and should need to verify the values practically.

    So, if possible, send me the screenshot of your input quadrature signals. So that i can generate the same signals from my end and will test your application.

    --
    Thanks & regards,
    Jagadish.

  • duty cycle 50% , phase shift 90 degree , PPR  is 30 ,  two channel with phase shift  of  90 degree . if RPM  is 100 then , frequency will be  50Hz , iam using  formula RPM = (Frequency*60)/PPR

  • Hi Jeev,

    Thanks for the details, i will try to provide my test result update by tomorrow.

    --
    Thanks & regards,
    Jagadish.

  • Hi Jeev,

    In your project itself i created quadrature signals and applied them to eQEP and verified the result. And i don't see any issues with your code:

    I continuously tested for 10min and i never see any variation in measurement:

    As you can see there won't be any huge variation in RPM/Frequency. Very small variation of 5RPM was observed.

    What i did was i just created quadrature signals in your project using GIO and RTI. The quadrature signals were generated on GIOA_0 (A5) and GIOA_1 (C2). And i connected these signals to the eQEP pins and verified the results.

    If you are using launchpad then connect:
    J4-10 (GIOA_0) to J10-21 (EQEP2A)
    J4-9 (GIOA_1) to J10-22 (EQEP2B)

    Here is the modified and tested project:

    3480.speed_sensor.zip

    So, the conclusion is that, in your case the issue should be due to the input waveform only, it might have fluctuations. So please capture your complete input waveforms and analyze them first.

    --

    Thanks & Regards,
    Jagadish.

  • Thank you sir  , for  your  response even  I  tried  in  constant  pulse wave  form  using  GIO and  RTI  , if  we  give  this input  output getting  perfect  value  , but  through quadrature  pulse generator  if we  give  input , then  problem is  start larger  difference, i think as you said the problem will in  hardware set setup, even i  have changed different  pulse generator same  problem  a raised . ok  sir thank you  for  your  support 

  • but  through quadrature  pulse generator  if we  give  input , then  problem is  start larger  difference, i think as you said the problem will in  hardware set setup, even i  have changed different  pulse generator same  problem  a raised . ok  sir thank you  for  your  support

    Then it should be the issue with quadrature pulse generator. If your input have large difference in the frequency then only you will get the difference in your measurement also.