I asked something similar yesterday with no luck, Thought I would try and simplify my explanation of what is wrong to hopefully find a solution.
I am using an Arduino UNO with an adafruit motor shield, two servos attached. Jumper pin removed from motor shield for individual power supplies. I have 6 inputs on pins a0 - a5, switches with 10k/100ohm pull up resistor configuration.
When I have an adapter (6v) plugged into the motor shield and the UNO powered by USB cable it runs perfectly, switches respond instantly and the code runs perfectly.
As soon as I try to power the UNO with a seperate power Supply (different adapter to the motor shield) the program runs very glitchy. Switches a0- a4 only respond when held down for a couple of seconds.
I have tried setting the adapter power from everything between 3.5v up to 12v with no change. UNO lights up all ok. If I plug the USB back in the switches work again, program runs fine etc.
I have also tried sharing the be adapter between the two boards - same result.
Any ideas what may be causing this?
For the sake of the community, if anyone else has this problem, after days of frustration I have found a 'workaround'
A note for anyone trying to use a 'split power supply' with this setup. Even though my supply was split prior to plugging into the UNO/Motor Shield, there still seems to be feedback through to the adapter, and thus causing glitches on the UNO, even if the jumpers are set to have each board use an independent power supply.
I am guessing (I'm sure someone else knows more) that because some of the pins are still shared through the board and shield for pwm, motor control etc that there is feedback somewhere, despite the supply being seperate.
To stop the interference coming through I had to carefully grind through the positive track on the board, right next to the servo sockets and completely isolate the servo power from the rest of the shield, then soldered header pins onto the +/- holes next to the servo pins and attached the supply to these pins instead. I then had the shield 'share' main power from the UNO with servos powered completely independently.
That completely solved the problem and it is running great now.
It sounds like you probably had some power-supply drooping caused by the servos pulling too much current. Or maybe there was just too much noise on the power supply from the motors. Either way, you might have been able to solve your problem by adding a couple of different sized capacitors from V+ to GND (like 470uf, 1uf, and 0.1uf) to smooth it out.
The large 470uF cap would keep the supply from drooping, and the smaller caps are better at filtering out high frequency noise because they usually have a lower ESR (equivalent series resistance).