The easiest way to hook the servo breakout up to your Pi is using a breadboard and connecting it to the Pi using I2C:
The PCA9685 (the actual chip that drives the servos) is powered by the 3.3V supply on the Pi (labelled VCC
on the servo breakout). Because the servos have different power requirements -- typically a 5V supply and as much as a couple hundred mA per servo -- they're powered from a separate power supply, labelled V+
In the example image above with a single servo motor, we are powering the motor from an external 5V power supply connected to the terminal block on the breakout board via a DC power adapter
. Make sure you connect the wires correctly, with +/+ and GND/GND.
Why not use the +5V supply on the Raspberry Pi?
Switching directions on the servo can cause a lot of noise on the supply, and the servo(s) will cause the voltage to fluctuate significantly, which is a bad situation for the Pi. It's highly recommended to use an external 5V supply with servo motors to avoid problems caused by voltage drops on the Pi's 5V line.
When to add an optional Capacitor to the driver board
We have a
spot on the PCB for soldering in an electrolytic capacitor. Based on
your usage, you may or may not need a capacitor. If you are driving a
lot of servos from a power supply that dips a lot when the servos move, n * 100uF
is the number of servos is a good place to start - eg 470uF
or more for 5 servos. Since its so dependent on servo current draw, the
torque on each motor, and what power supply, there is no "one magic
capacitor value" we can suggest which is why we don't include a
capacitor in the kit.