I am driving dc motor with drv8848. I send pwm pulse to the drv8848 and then ı read encoder value. My pwm frequency is 500 Hz. So here is my problem, pulse count is same but encoder value is different. I don't expect to be same. But difference is very big. For example one time I send same pulse count, encoder value is 4 um but in other same pulse count encoder value is 15 um. So can you help me about this problem ?

  • 1
    \$\begingroup\$ Welcome to EE.SE, Sukru, but we need schematic diagram (use the schematic button on the editor toolbar) and links to data sheets for the motor and driver. Please use capital letters - e.g., DC, PWM, DRV8848 - to improve readability. \$\endgroup\$
    – Transistor
    Jan 27 '16 at 15:23
  • \$\begingroup\$ just a hint , encoder pulses can be decoded by 1x 2x or 4x mode , that means on rising edge of 1 channel , rising or falling of 2 channels , raising and falling of both channels . You should also check if you are missing pulses if interrupts or decoding is slow \$\endgroup\$
    – ElectronS
    Jan 27 '16 at 16:47
  • \$\begingroup\$ Check hysteresis and backlash if you change directions. You may have slippage anywhere in your drive train. \$\endgroup\$
    – ChrisR
    Jan 27 '16 at 17:22
  • 1
    \$\begingroup\$ 4uM and 15uM are small, it is difficult to get to these sorts of accuracy without servo loops. preload all bearings, anti-backlash drivers etc. you probably need ballscrews rather than Acme or threaded rod. Are your mechanics compliant enough to measure at this resolution? Software? \$\endgroup\$
    – ChrisR
    Jan 27 '16 at 17:36

There is no relation between PWM pulses and encoder feedback pulses. When you send PWM pulses, you supply the motor with voltage which is V = Vdc * DutyCyleRatio. The encoder measures the position of rotor. Where did you got the idea that PWM pulses == encoder pulses?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.