Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino-Controlled Multi-Servo Positioning System with Potentiometer Feedback

View and Edit Project In Cirkit DesignerImage of Arduino-Controlled Multi-Servo Positioning System with Potentiometer Feedback

Circuit Documentation

Summary of the Circuit

This circuit is designed to control five servo motors using five potentiometers for position adjustment. An Arduino UNO microcontroller serves as the central processing unit, interfacing with an Adafruit 16-Channel 12-bit PWM Servo Driver via I2C communication to control the servos. The potentiometers provide analog input to the Arduino, which then translates these inputs into PWM signals to adjust the servos' positions. A separate power supply is included to provide adequate power to the servo driver and the servos.

Component List

Arduino UNO

Servo Motors (5x)

Adafruit 16-Channel 12-bit PWM Servo Driver - I2C

Potentiometers (5x)

Power Supply

Wiring Details

Arduino UNO

Servo Motors

Adafruit 16-Channel 12-bit PWM Servo Driver - I2C

Potentiometers

Power Supply

Documented Code

/*
 * This Arduino sketch controls 5 servos using 5 potentiometers.
 * Each potentiometer adjusts the position of a corresponding servo.
 * The Adafruit 16-Channel 12-bit PWM Servo Driver is used to control the servos.
 */

#include <Wire.h>
#include <Adafruit_PWMServoDriver.h>

Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver();

// Servo and potentiometer mappings
const int potPins[5] = {A1, A2, A3, A4, A5};
const int servoChannels[5] = {12, 13, 14, 15, 11};

void setup() {
  Serial.begin(9600);
  pwm.begin();
  pwm.setPWMFreq(60);  // Analog servos run at ~60 Hz
}

void loop() {
  for (int i = 0; i < 5; i++) {
    int potValue = analogRead(potPins[i]);
    int servoPos = map(potValue, 0, 1023, 150, 600);
    pwm.setPWM(servoChannels[i], 0, servoPos);
  }
  delay(15);  // Small delay to prevent jitter
}

This code initializes the Adafruit PWM Servo Driver and sets up a loop to read the analog values from the potentiometers. It maps these values to a range suitable for servo control and sends the corresponding PWM signals to the servos through the driver.