# Jrk 21v3 as Constant Speed Control with Encoder Feedback

Hello! I have a question regarding the jrk, particularly the feedback scaling values. I’m using the jrk to maintain the speed as the load changes.

Some background:

I have a 24V gear motor with a built in encoder (the encoder puts out a 5v square wave). I’ve measured the encoder to put put out approximately 2200 pulses per revolution (of the output). No load, the output spins at about 70rpm (~2,566 pulses per second), but I’d like to regulate it at 35rpm (~1,283 pulses per second). I’ve arbitrarily set the PID Period to 25ms.

My understanding (right or wrong), is that for every PID Period (25ms), it will count the number of pulses from the encoder, so at 70 rpm, during a 25ms period, there will be about 64 pulses counted. Because of that, I should adjust the feedback scaling so that the Maximum is 2112. I come to that number based on the center being 2048 and adding my max. Am I using the feedback scaling values properly?

At the moment, I’m using the analog input with a potentiometer to adjust the target, I plan to used a voltage divider in the future to fix the speed.

Thanks for any help!!

Hello.

It sounds like you have a good understanding of how it will work. In “Frequency (digital)” feedback mode, the pulses measured on the feedback pin are tallied over the PID period. However, please note that only the rising edge is counted, so you should take this into account to make sure your math still works out. As you mentioned 2048 is the neutral point, so if you are getting 64 pulses per PID period, you can set the minimum setting in the “Feedback” tab of the Jrk Configuration Utility to 1984 (2048 - 64) and the maximum to 2112 (2048 + 64).

Brandon

Wow, thanks for the fast reply!! This is a neat device. I’m still trying to tune the PID coefficients. I think I’m getting close.

Thanks again,
Ed