I am new to using these controllers but am a fast learner. I have a JRK21v3 set-up in the following little project of mine. It is driving and Altimeter in my flightsim. I have a 5K 10 turn precision pot for feedback. Each half turn of the pot gives me a 1000ft on the altimeter so it goes from 0 to 20K. Driving the jrk21 is an RC servo signal from a 3rd party servo card. Here is the issue I am having. Instead of moving smoothly, the needle jumps in 20-40ft increments, pausing at each stop, instead of running smoothly. Now the aircraft is only climbing at 500-800fpm so it has to drive the needle fairly slow. I know, at least I think, that if the PID settings are right it should work smoothly, correct? I tried 2, .01265, 2 on the 3 settings. I have my pid time at 100ms, max amp on motor set .8 and 150 in the speed table. I tried playing around with the PID but not get it to stop the jumping in the aforementioned small steps. If I dive the plane and get the change up 1.5k to 2kfpm it works well.
Thanks for your help.
I’m sorry the altimeter isn’t behaving as nicely as you would like. Unfortunately, I think that 20-40ft is pretty close to the limit of how precise the jrk can be.
For input resolution, the jrk measures RC signals in units of 2/3 microseconds and the typical valid range of RC signals is 1000 to 2000 microseconds. Assuming that your 3rd-party controller outputs signals in this range, there would only be 1500 different pulse widths that the jrk can detect. This means the most resolution you could hope for would be 20,000ft/1500 = 13 feet.
We also have to think about output resolution. The jrk uses the RC input to calculate the Target value which is between 0 and 4095. A Target value of 4095 should correspond to 20,000 feet, and every increment of the Target value should correspond to 20,000/4095 = 4.9 feet.
Still, I have some suggestions that might help:
Why did you set the current and duty cycle limits? If possible, I would remove those limits so you can get better performance out of the jrk.
Why did you change the PID period from the default of 10ms to 100ms? I would try changing it back to 10 ms. You’ll want to adjust your PID parameters after doing this (e.g. multiply D by 10 and divide integral by 10).
I suggest tuning your PID parameters by following the instructions in the “Setting Up Your System” section of the Jrk User’s Guide. You would have to temporarily put your jrk into Serial input mode so you can control it from the configuration utility.
Hopefully you can get your system working better.
Thanks for the input David.
I lowered the duty cycle and current with the thought of slowing the motor down so as to make it move in slower motion so as not to jerk to each 20ft increments. It seemed like when I had those settings at 600 it made the stop and go action worse.
I re-set everything in the Jrk and recalibrated. It is MUCH better now and very accurate! Still have the stop and go movement at lower climb or decent rates but it is close. I will try messing with the PID so more.
I also reset the PID period to 10ms.
By the way, the Jrk does a much better job than the gutted servo electronics i was using did.
Great! I’m glad you are having more success now. --David
Believe it or not, it is working the best right now with these settings, P=10 I=.7650 D=1023 I think this is about as smooth as it will get getting small changes in input.
Next up is getting the motion base going using my Pololu Motor Drivers.