Introduction: Arduino How to Connect Multiple Servo Motors - PCA9685 Tutorial

About: Arduino fan!

In this tutorial we will learn how to connect several servo motors using PCA9685 module and arduino.

PCA9685 module is very good when you need to connect several motors, you can read more about it here https://www.adafruit.com/product/815

Watch the Video!

Step 1: What You Will Need

  • Arduino UNO or any other Arduino board or ESP
  • 16 Channel PWM/Servo Driver I2C PCA9685
  • Servo motors (in this example we use 4 servos)
  • Breadboard
  • Jumper wires
  • Visuino software: Download here

Step 2: The Circuit

  • Connect each servo connector to PCA9685 pins (servo1 to pins 0, servo2 to pins 1,etc)
  • Connect PCA9685 pin SCL to Arduino pin SCL
  • Connect PCA9685 pin SDA to Arduino pin SDA
  • Connect PCA9685 pin VCC to Arduino pin 5V
  • Connect PCA9685 pin GND to Arduino pin GND

Step 3: Start Visuino, and Select the Arduino UNO Board Type

The Visuino: https://www.visuino.eu also needs to be installed. Download Free version or register for a Free Trial (Recommended for full experience ).

Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino UNO" as shown on Picture 2

Step 4: In Visuino Add,Set & Connect Components

  • Add "NXP Servo PCA9685 (I2C)" component
  • Add "Sine Analog Generator" component
  • Connect "SineAnalogGenerator1" pin out to "ServoPCA96851" pins 0
  • Connect "SineAnalogGenerator1" pin out to "ServoPCA96851" pins 1
  • Connect "SineAnalogGenerator1" pin out to "ServoPCA96851" pins 2
  • Connect "SineAnalogGenerator1" pin out to "ServoPCA96851" pins 3
  • Connect "ServoPCA96851" pin Control I2C to Arduino board pin I2C In

Step 5: Generate, Compile, and Upload the Arduino Code

In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.

Step 6: Play

If you power the Arduino UNO module, the servo motors will start to rotate.

Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this Instructable, you can download it and open it in Visuino: https://www.visuino.eu