Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use SparkFun PWM Shield: Examples, Pinouts, and Specs

Image of SparkFun PWM Shield
Cirkit Designer LogoDesign with SparkFun PWM Shield in Cirkit Designer

Introduction

The SparkFun PWM Shield (DEV-10615) is a versatile add-on board designed for Arduino platforms. It provides multiple Pulse Width Modulation (PWM) outputs, enabling precise control of devices such as servos, motors, LEDs, and other components requiring variable speed, brightness, or position. This shield simplifies the process of generating PWM signals, making it ideal for robotics, automation, and lighting projects.

Explore Projects Built with SparkFun PWM Shield

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Arduino Sensor Shield Controlled Servo Motors
Image of robotarm_sensorshield: A project utilizing SparkFun PWM Shield in a practical application
This circuit utilizes an Arduino Sensor Shield v5.0 to interface with two types of servo motors: an SG90 servo motor and two MG996R servo motors. The SG90 is connected to pin 6 of the shield for PWM control, power (5V), and ground. Each MG996R servo motor is similarly connected to pins 4 and 5 of the shield for PWM control, power, and ground, allowing for independent control of the servo motors via the Arduino platform.
Cirkit Designer LogoOpen Project in Cirkit Designer
Bluetooth-Controlled Robotic Vehicle with Adafruit Motor Shield
Image of motor: A project utilizing SparkFun PWM Shield in a practical application
This circuit is a motor control system that uses an Adafruit Motor Shield to drive four hobby motors, with additional sensors including an IR sensor, an ultrasonic sensor, a metal detector, and a Bluetooth module for remote communication. The system is powered by a battery case and controlled via a rocker switch.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO-Based Robotic Arm with Servo Motors and LED Control
Image of asdasd: A project utilizing SparkFun PWM Shield in a practical application
This circuit is a robotic control system using an Arduino UNO and a Sensor Shield to manage multiple servos and an LED RGB strip. The Arduino code controls the servos for movement and distance measurement, while the Sensor Shield facilitates power distribution and signal connections.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO R4 WiFi-Controlled Stepper Motor with Limit Switches and LED Indicators
Image of MotorShieldv3_Stepper: A project utilizing SparkFun PWM Shield in a practical application
This circuit controls a bipolar stepper motor using an Arduino UNO R4 WiFi with a Motor Shield. It features pushbuttons and limit switches for user input and motor control, as well as red, green, and blue LEDs with corresponding resistors for status indication. The embedded code allows for changing motor direction, stepping the motor with button presses, and continuous operation until limit switches are triggered.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with SparkFun PWM Shield

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of robotarm_sensorshield: A project utilizing SparkFun PWM Shield in a practical application
Arduino Sensor Shield Controlled Servo Motors
This circuit utilizes an Arduino Sensor Shield v5.0 to interface with two types of servo motors: an SG90 servo motor and two MG996R servo motors. The SG90 is connected to pin 6 of the shield for PWM control, power (5V), and ground. Each MG996R servo motor is similarly connected to pins 4 and 5 of the shield for PWM control, power, and ground, allowing for independent control of the servo motors via the Arduino platform.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of motor: A project utilizing SparkFun PWM Shield in a practical application
Bluetooth-Controlled Robotic Vehicle with Adafruit Motor Shield
This circuit is a motor control system that uses an Adafruit Motor Shield to drive four hobby motors, with additional sensors including an IR sensor, an ultrasonic sensor, a metal detector, and a Bluetooth module for remote communication. The system is powered by a battery case and controlled via a rocker switch.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of asdasd: A project utilizing SparkFun PWM Shield in a practical application
Arduino UNO-Based Robotic Arm with Servo Motors and LED Control
This circuit is a robotic control system using an Arduino UNO and a Sensor Shield to manage multiple servos and an LED RGB strip. The Arduino code controls the servos for movement and distance measurement, while the Sensor Shield facilitates power distribution and signal connections.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of MotorShieldv3_Stepper: A project utilizing SparkFun PWM Shield in a practical application
Arduino UNO R4 WiFi-Controlled Stepper Motor with Limit Switches and LED Indicators
This circuit controls a bipolar stepper motor using an Arduino UNO R4 WiFi with a Motor Shield. It features pushbuttons and limit switches for user input and motor control, as well as red, green, and blue LEDs with corresponding resistors for status indication. The embedded code allows for changing motor direction, stepping the motor with button presses, and continuous operation until limit switches are triggered.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications

  • Controlling servo motors in robotics projects
  • Driving DC motors with variable speed
  • Dimming LEDs for lighting applications
  • Generating PWM signals for custom electronics projects

Technical Specifications

The SparkFun PWM Shield is built around the PCA9685 PWM driver IC, which communicates with the Arduino via I2C. Below are the key technical details:

Key Features

  • PWM Channels: 16 independent PWM outputs
  • PWM Resolution: 12-bit (4096 steps)
  • Operating Voltage: 3.3V or 5V (logic level compatible with Arduino)
  • Output Voltage: Up to 6V (external power supply required for higher voltage)
  • Communication Protocol: I2C (default address: 0x40, configurable)
  • Frequency Range: 24 Hz to 1526 Hz
  • Current per Channel: Up to 25mA (sink current)
  • External Power Input: 5V to 6V (via terminal block for powering servos/motors)

Pin Configuration

The SparkFun PWM Shield connects directly to the Arduino's headers and includes additional pins for external power and I2C communication. Below is the pin configuration:

Pin Name Description
SDA I2C Data Line (connects to Arduino SDA pin)
SCL I2C Clock Line (connects to Arduino SCL pin)
VCC Logic voltage input (3.3V or 5V, supplied by Arduino)
GND Ground connection
PWM Outputs (0-15) 16 PWM output channels for controlling servos, motors, or LEDs
External Power (+) Positive terminal for external power supply (5V to 6V for servos/motors)
External Power (-) Ground terminal for external power supply

Usage Instructions

Connecting the Shield

  1. Attach the Shield: Plug the SparkFun PWM Shield directly onto the Arduino's headers.
  2. Power the Shield:
    • For low-power applications (e.g., LEDs), the shield can draw power directly from the Arduino.
    • For high-power devices (e.g., servos or motors), connect an external 5V-6V power supply to the terminal block.
  3. Connect Devices: Attach servos, motors, or LEDs to the PWM output pins (0-15).

Programming the Shield

The SparkFun PWM Shield uses the PCA9685 IC, which can be controlled using the Adafruit PCA9685 library. Below is an example Arduino sketch to control a servo motor:

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

// Create an instance of the PWM driver
Adafruit_PWMServoDriver pwm = Adafruit_PWMServoDriver();

void setup() {
  pwm.begin(); // Initialize the PWM driver
  pwm.setPWMFreq(50); // Set PWM frequency to 50 Hz (standard for servos)
}

void loop() {
  // Move servo connected to channel 0 to 0 degrees
  pwm.setPWM(0, 0, 150); // Pulse width for 0 degrees
  delay(1000); // Wait 1 second

  // Move servo connected to channel 0 to 90 degrees
  pwm.setPWM(0, 0, 375); // Pulse width for 90 degrees
  delay(1000); // Wait 1 second

  // Move servo connected to channel 0 to 180 degrees
  pwm.setPWM(0, 0, 600); // Pulse width for 180 degrees
  delay(1000); // Wait 1 second
}

Important Considerations

  • External Power: Always use an external power supply when driving high-power devices like servos or motors. Ensure the voltage does not exceed 6V.
  • I2C Address: The default I2C address is 0x40. If using multiple shields, you can change the address by soldering the address jumpers on the shield.
  • Frequency Setting: Adjust the PWM frequency based on the application. For servos, use 50 Hz; for LEDs, higher frequencies (e.g., 1 kHz) are recommended to avoid flickering.

Troubleshooting and FAQs

Common Issues

  1. Devices Not Responding

    • Cause: Incorrect I2C connection or address conflict.
    • Solution: Verify SDA and SCL connections. Check for address conflicts and modify the I2C address if necessary.
  2. Servos/Motors Not Moving

    • Cause: Insufficient power supply.
    • Solution: Use an external power supply capable of providing sufficient current for all connected devices.
  3. PWM Outputs Not Working

    • Cause: Incorrect frequency setting.
    • Solution: Ensure the PWM frequency is set appropriately for the connected device (e.g., 50 Hz for servos).
  4. Overheating Components

    • Cause: Excessive current draw from connected devices.
    • Solution: Ensure each channel does not exceed 25mA sink current. Use external drivers for high-current devices.

FAQs

Q: Can I stack multiple PWM shields?
A: Yes, you can stack multiple shields by configuring unique I2C addresses for each shield using the address jumpers.

Q: What is the maximum number of servos I can control?
A: Each shield can control up to 16 servos. By stacking multiple shields, you can control more servos, limited only by the I2C bus capacity.

Q: Can I use this shield with a 3.3V Arduino (e.g., Arduino Due)?
A: Yes, the shield is compatible with both 3.3V and 5V logic levels.

Q: How do I change the I2C address?
A: Solder the address jumpers on the shield to set a new I2C address. Refer to the PCA9685 datasheet for address configuration details.

This concludes the documentation for the SparkFun PWM Shield. For further assistance, refer to the official SparkFun product page or community forums.