Some tips and tricks for controlling a servo with an Arduino
Servos aren’t particularly hard to control with Arduinos, and in fact there’s a library available just for that purpose. Actually making the connection between the board and servo and managing one’s power usage will require a bit more finesse.
In the video below, Jeremy S. Cook explains how you can create an adapter that goes between your servo and an Uno, including a capacitor to help even out voltage spikes. While in most cases you would want to supply power your servos separately from the Arduino, this technique seems to work well in a quick round of tests.
The clip also shows how to attach a servo and then detach it to cut it off, using a function outside of the main loop and no additional hardware. This would be very helpful in applications where power is at a premium — or if you just don’t want the servo jittering back and forth!