Something really weird is happening with a Neo we have attached to a flywheel (not geared). We are running a simple current loop on the Spark Max using their API, as we have done successfully before. The setpoint is 1 amp. When tuning just a P term, kP = 0.05 runs the motor to about 0.1 amp. kP=0.1, however, runs it to 38 amps and it makes a very loud noise. Is there something I’m missing?
Are the encoder wires plugged in?
Yes.
Is it the encoder built in to the spark max? Make sure that your receiving expected values from it. If not, there could be a conversion issue with setting your reference point.
Look closely at the encoder wires. Rev uses JST connectors which are a terrible connector for this application. The wires have a habit of breaking and it’s not always obvious that that’s what’s happened.
Found solution. There was no load on the flywheel, so to see expected current output we needed to hold/stall it. I didn’t realize this and was driving P up way too high.
Why are you using a current PID loop on your flywheel? This will have the opposite effect of what is typically desired, since current will spike when a ball goes through and cause your PID loop to drop the output percent, which will slow down your shot. Most solutions run velocity PID, which increases the output when speed drops as a ball goes through, bringing the velocity closer to the setpoint, making your shot more consistent.
We’re not, we’re definitely planning on running velocity. I was just using the prototype flywheel to test onboard current PIDs (which we’re planning on running on the drivetrain), since other people were using the drivetrain.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.