The easiest way to hook the servo breakout up to your Pi is using a breadboard and connecting it to the Pi using I2C:

  • Pi 3V3 to breakout VCC
  • Pi GND to breakout GND
  • Pi SCL to breakout SCL
  • Pi SDA to breakout SDA
  • Servo orange wire to breakout PWM on channel 0
  • Servo red wire to breakout V+ on channel 0
  • Servo brown wire to breakout Gnd on channel 0

Check your servo's datasheet to verify which wires go to which pin!

Don't try to power your servos from the RasPi's 5V power, you can easily cause a power supply brown-out and mess up your Pi! Use a separate 5v 2A or 4A adapter
VCC = the digital supply for the IC (3.3V!), V+ = the supply for the servo motors (typically 5V). Be sure not to confuse the two or you may end up with burnt Pi!
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 where n 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.

This guide was first published on Aug 16, 2012. It was last updated on Mar 08, 2024.

This page (Hooking it Up) was last updated on Mar 08, 2024.

Text editor powered by tinymce.