should I keep the ground wires separated (as pictured), or should I hook both of the ground wires to a common ground?
The Servo also has a CAP. If the CAP is wired up between the power and ground for the servo, can the servo share a common ground with the rest of the circuit?
Yes, you have drawn it with a common ground and you should have a common ground. The two ground pins on the Arduino are electrically the same place.It has to share a ground with the rest of the circuit in order for it to work.Having said that you should never power a servo off the same 5V as the Arduino. At least not without a pi decoupling circuit like the last circuit in this link:http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html
I did realize the 2 ground pins are electrically the same place, so looks like my question is moot! Does this mean if I had another component plugged into 5 volt rail that the CAP would be regulating all the components in the 5 circuit? As for the powering the servo off the same 5 Volts as the arduino board- in this example I have the Arduino plugged into a wall wart outputting 9 volts/ 650 mA. Are you saying I should have the servo on a separate power source even when my board is plugged into a wall power source?
While the cap smooths, not regulates, for all the components it is the one that is physically closer that gets the most benefit.Yes it should be separate because of the interference the servo generates can upset the Arduino.
Thanks for the info. I can't rely on batteries, and I'd like to avoid having two separate wall warts (1 for arduino board, and 1 for the servo).I'm running a SG90 micro servo:http://akizukidenshi.com/download/ds/towerpro/SG90.pdfConsidering the load on the servo is minimal, is it possible for me to get away with running the servo from the Arduino 5v pin? Or do I really need a second power source for this servo (or use the pi decoupling circuit as Grumpy Mike mentioned)?
Your wrote, "Considering the load from the servo is minimal"From what I read, the Servo Stall Current is between 570ma and 730ma.That is the opposite of "minimal".And 4 Volts x 0.730 Amps = 3 Watts of heat the 5 Volt Regulator must dissipate.And your AC Wall Adapter is only rated at 650ma ? ? ?
Or for that matter to move for more than 5 seconds before I power it down (using detach() in my code).
That does not power it down. If you want to minimise the current just don't ask it to move.These forum pages are littered with cases of people driving a servo off the 5V power rail of the Arduino and it crashing the Arduino, or making it unreliable.If you want to avoid the decoupling circuit then get another 5V regulator ( and capacitors ) and drive it off your single wall wart.
So in the end, I will probably end up just buying a motor shield to drive my servo.
is that for every case of people asking about servos crashing their arduinos, there are 10 projects online with diagrams showing a servo directly hooked up to their board.
No you don't / can not power a servo through a motor shield.Remember there is a lot of crap on line.