# NEO Internal Encoder Choppy PID

We have a backup gearbox for our elevator and we recently swapped that gearbox to use NEOs and SPARK Max Speed Controllers. I am using the internal encoder in the NEO to act as feedback for our PID. The feedback seems to be very choppy and thus the gearbox is extremely jumpy. I see I can plug in a CTRE Encoder into the NEO, will this improve the “jumping” if the PID control? Also where can I specify in the SPARK Max Code to look at the plugged in CTRE Encoder for feedback?

Thanks

You can’t use the encoder port while using a NEO motor. So don’t plug in a CTRE encoder at the same time as a NEO.

We are running NEOs on our elevator and using the built-in encoders for PID seems fine… are you sure it’s not just in need of retuning the PID?

1 Like

Shoot, that’s annoying. But yeah I was just not having a fun time tuning our gearbox since the reduction is like 6:1. Looks like I’ll have a fun time tomorrow.

I second checking your PID tuning. Take a look at our Code Examples for a starting point. Your final values will likely be different, but the examples will give you an idea of appropriate gain magnitudes.

Ahh, yeah my gains were pretty low for what I’m used to but now I see I need to go way lower thanks!

@dyanshak The NEO datasheet states that the Empirical Peak Output Power is 406 Watts, but does not state the RPM

. Could you please provide the RPM
value at which that peak power was obtained?

Thank you.

The peak power will be at 1/2 free speed at ~2838 RPM.

1/2 of free speed is the theoretical speed for max output power if the torque vs speed is linear.

For your empirical (bench) testing, what was the measured speed for the 406W output?

It was measured at 2900 RPM.

Thanks @dyanoshak ,

Did you seek the RPM

that yielded the highest power, or just measure the power at 2900 because that’s about half the free speed?

Could you please post a link to the test procedure for this testing?

Has anyone done dyno testing on the NEO to see if the max power actually occurs at 2900rpm (half free speed).

How linear is the torque vs speed curve?

.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.