I’m not sure what kind of issue this is, because to get straight to the point, from time to time some of our motors jitter. Sometimes our conveyor jitters while it’s lifting (neo 550 motors) and sometimes it’s out shooter (mini neo). I’m not sure if it’s electrical (too much battery consumption or other) or if it’s something in the code. It usually only starts happening when our battery is around 12.4 volts, but not all the time. Sometimes the battery will be at 11 volts and the motors will run fine, so I’m not sure what’s going on and can’t voluntarily reproduce it.
For more details on what happens, basically it runs its command but jitters halfway to its goal, then proceeds as if nothing happens. We are using pid on the conveyor but not the shooter.
Form your description, this could be a coding error, an electrical problem, or possibly a mechanical one.
I’d have a look at your DS Logs, and check whether any the circuits are taking more current than you expect, and whether any brownout events are reported. Also, you may want to check (carefully) whether any of the wiring seems to be getting hot.
i totally agree with this! you might also want to check if you are dropping any packets, as temporary losses can have really weird effects on motor movement sometimes.
You should also check your driver station log for brownouts. If your battery is running low, and you try to pull a lot of current out of it, the roboRio will start to temporarily disable motors. This appears as “jittering” on motors since they are getting rapidly turned on and off.
Are you, by any chance, controlling your SparkMax controller via PWM instead of CAN? If so, you might be experiencing EMF interference. I’ve seen a number of teams run into issues like you’re describing due to EMF causing issues with PWM.
thank you for your answer, I’m still not sure what it was but it has stopped since we changed our roboRio and our radio, it might’ve been anything though since our robot has been tuned so many times. There have been no brownouts though. It might’ve been our battery too, since i stops once we change it. Thank you!