camera/code question

We have been having difficulty with the camera servos having a “jittery” movement with or without code and even when disabled.

We have tried different code, checked all wiring, replaced servos, flashed the cRIO and have switched out digital I/O modules.

Nothing has worked!!Please help!!:slight_smile: :confused:

Any information will be useful! Thanks in advance.

are you using the 2color demo code or code based off this?
I know that code needs some modifying to be non-jittery

Yes, we are using that code. But we are programming in lab view. Our watchdog seems to be very finicky…

It seems that our problem is, our camera servos hang up even when the Driver Station has the Robot Disabled. The camera servos will flip out and jitter extremely…

What would allow this to happen?
The robot is disabled, and somehow the servo’s still are receiving signal.

Any help is appreciated.

Jittery servos when the robot is disabled implies noise on the servo signal line. I’d look for places where the wiring to the servos could be picking up an induced signal, such as running parallel to the camera’s ethernet cable for an extended length.


Our electrical engineer agrees! We have redone the code several times…

So Twisting Cables to reduce noise would be the solution?

We have twisted our wires and used the toroid shield our electronic engineer has provided. It is extremely jittery with/without code.

Noise is not the problem… it seems. Do you have any other suggestions???

Employing twisted pairs only works when the signal is carried by the differential voltage on the two wires. That’s not really the case for a servo PWM signal. Besides running the wires so they aren’t near a source of EMI, your only real solution would be to shield the wiring.

To verify whether or not it’s interference from the Ethernet cable, try unplugging the cable at the cRIO end and see whether the servo twitching when disabled goes away.

I’ve also seen jittery servos because the leads were busted up where they entered the servo. Do both motors twitch, or just one? If you swap the connectors does it follow the motor or the port?

To determine if it is a SW issue, you can add a chart to the servo position control. There used to be one there to watch the control response anyway, and that is why there is a deadband and smoothing, because the image processing does give noisy input to the system. If it is a tiny twitch, you can expand the deadband, it is currently 2 degrees I think.

Greg McKaskle

This may seem like a strange question - what kind of ball manipulator do you have? We ran into twitchy camera servos during our first regional, like you described, with camera off, even no power (having disconnected the wires to camera. Ends up that our ball collecting belt system created enough static electricity that it fed directly to the camera servos through PWMs. We added a bleed rod from the belt to the frame, sprayed the belt each time we used it with static-guard, and made sure to tape the junctures where we had joined PWM cables for proper length. End of twitching (for the most part - we still get a little from time to time but not enough to impact camera function.)

Hope this helps!

Thank you for your help!