Me and my friend are attempting to build a robotic arm. We have 4 main servos which when attached to the power source (6v-7.5 amp) twitch violently back and forth. We've messed with the code, and even tried attaching it to arduino power itself but they dont seem to work correctly. Code:
Try a capacitor! I have a 25v 2200uf cap on my robotic arm. It takes a lot of twitch out. Had the exact same thing happen to me. And you HAVE TO ground to a common source. All of my servo grounds, and external grounds go to the arduino. If you don't, it will not work well, if at all.
You may have too much load on the servos and they are hunting. Do the servos twitch when they are not loaded? If only one servo is being powered and the rest disconnected, does the connected servo still twitch?
Yesterday I discovered (based on something I read on another forum) that putting a resistor from the signal to the ground connection of the servo (which holds the signal low) has stopped it acting wildly when there is no signal applied. I've used a 4k7 resistor. If that doesn't work it might be worth putting the resistor between signal and power (i.e. holding the signal line high).