# Motor control feedback for setting and maintianing RPM

**URL:** https://forum.pololu.com/t/motor-control-feedback-for-setting-and-maintianing-rpm/11429
**Category:** Motor controllers/drivers and motors
**Created:** [December 4, 2016, 6:16am UTC](https://forum.pololu.com/t/motor-control-feedback-for-setting-and-maintianing-rpm/11429 "2016-12-04T06:16:15Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![BrandonM](https://forum.pololu.com/user_avatar/forum.pololu.com/brandonm/32/609_2.png) [@BrandonM](https://forum.pololu.com/u/BrandonM)
#### Post date: [December 7, 2016, 10:44pm UTC](https://forum.pololu.com/t/motor-control-feedback-for-setting-and-maintianing-rpm/11429/7 "2016-12-07T22:44:49Z")

</div>

The jrk can register a change of a single pulse within the PID period, and how the jrk will react to a change in the feedback signal will depend on how you have the feedback scaled, the speed of your motor, the CPR of your encoder, the PID period, and the PID coefficients. If you have not done so, I recommend reading through the Frequency (digital) heading of the “Feedback Options” section of the jrk user’s guide that i linked to in my first post. My posts in [this forum thread](https://forum.pololu.com/t/jrk-21v3-using-frequency-digital-feedback-option/8881/2) (and the one I link to from there) might also be helpful for understanding how the feedback works.

The 500 CPR spec you gave for your encoder looks like it is for both channels and includes the rising and falling edges; since the jrk only uses 1 channel and only the rising edges, you will be getting around 125CPR. At 1000 RPM, you would get 125000 counts per minute, which is roughly 2083 counts per second. This means that if your PID period is set to 10ms (the default), you can expect about 21 pulses from the encoder in each PID period. With that information, you can find the appropriate feedback scaling values using the 2048±n formula I mentioned in the forum thread linked to above. Since the minimum difference that the jrk can recognize is a single pulse per PID period, it should have a sensitivity of about 48RPM (since that corresponds to 1 count per PID period) using the default PID period of 10ms. If you need more than that, you might try experimenting with increasing the PID period (e.g. doubling the PID period would drop this down to 24 RPM and so on). However, please note that if you increase the PID period too high, it will likely result in jittery or stop-and-go behavior. Also, you will likely need to re-tune your PID coefficients after changing the PID period.

Brandon

---

_[View the full topic](https://forum.pololu.com/t/motor-control-feedback-for-setting-and-maintianing-rpm/11429)._
