An Introduction to the PCA9685 16-Channel Servo Controller Module

24 November 2023


Ⅰ. Overview of PCA9685

Ⅱ. Manufacturer of PCA9685

Ⅲ. Pin configuration of PCA9685

Ⅳ. What are the features of PCA9685?

Ⅴ. How does the PCA9685 work?

Ⅵ. What are the applications of PCA9685?

Ⅶ. What should we pay attention to when using PCA9685?



Ⅰ. Overview of PCA9685


18e57a13376021d3a70696488242dbaa.png


PCA9685 is an LED control chip that can be used to generate 16-channel PWM signals, which can easily control multiple servos and other electronic devices. It mainly controls the rotation angle of the steering gear by outputting PWM pulse signals with different duty cycles. In addition, it can communicate through the I2C bus, which is very convenient to use.


PCA9685 has the ability to generate 16 PWM pulses, and the programming is simple and flexible, and the control is independent and precise. These characteristics enable the servo control based on it to effectively reduce the complexity of hardware and software design and have high reliability. 


Replacements and equivalents:

LED6001

• MAX6954

• PCA9955

• RT9288A

• TLC5971



Ⅱ. Manufacturer of PCA9685


The PCA9685 is manufactured by NXP Semiconductors, a semiconductor company established in 1953. Headquartered in Eindhoven, the Netherlands, NXP Semiconductors stands as a global leader in automotive electronics and chip solutions, with business operations spanning security, computing, network, intelligent interconnection, autonomous driving, and various other fields.



Ⅲ. Pin configuration of PCA9685


7a026aac9e33b79e387ec2a258c1ad5e.png


The pin configuration of PCA9685 is shown in the figure, and below is its name and description.


Pin 1~5 (A0~A4): address input 0~4


Pin 6~13 (LED0~LED7): LED driver 0~7


Pin 14 (Vss): Supply Ground


Pin 15~22 (LED8~15): LED driver8~15


Pin 23 (OE): active LOW output enable


Pin 24 (A5): address input 5


Pin 25 (EXTCLK): external clock input


Pin 26 (SCL): serial clock line


Pin 27 (SDA): serial data line


Pin 28 (Vdd): supply voltage



Ⅳ. What are the features of PCA9685?


• The hardware address of PCA9685 is designed to be 6 bits, so 62 of the same chip can be connected to the same N2C bus. Each chip has 4 software programmable addresses based on the I2C bus, and any chip can be addressed simultaneously or individually.


• It has power-on reset and software reset functions.


• It has a built-in 25MHz crystal oscillator and does not need to be connected to an external crystal oscillator. In addition, it also supports connecting an external crystal oscillator up to 50MHz.


• Its built-in 25MHz oscillator and external clock can be optionally used.


• Its voltage operating range is 2.3 to 5.5V, and its operating temperature is -40°C to 85°C.


• The PWM pulse output frequency range of PCA9685 is 40 to 1000Hz.


• In fast mode, the rate of 2C bus can reach 1MHz. In addition, the drive capability of the SDA port can reach 30mA, making it suitable for use on high-load buses.



Ⅴ. How does the PCA9685 work?


The workflow of PCA9685 can be divided into two stages, namely initialization configuration and PWM output.


In the initial configuration phase, first, we need to use the I2C bus to connect the PCA9685 to the main control device. Then, the master control device sends a series of configuration commands to the PCA9685, including setting the PWM frequency, enabling output channels, etc. These commands are received by PCA9685 and processed accordingly according to its internal setting rules, and the configuration information will be saved in its internal registers.


During the PWM output stage, the master control device can send PM output commands to the PCA9685 through the I2C bus. Based on these received commands, PCA9685 controls the corresponding PWM channel to output the specified pulse width and duty cycle to achieve brightness and position control of LED lights, servos and other equipment.


In addition to the basic PWM output function, the PCA9685 also provides some additional functions such as group mode and wake-up function. Group mode allows multiple PCA9685 to be connected together to control multiple chips through an I2C bus, thereby achieving more PWM output channels. The wake-up function can wake up the PCA9685 chip through external signals to save system power consumption.



Ⅵ. What are the applications of PCA9685?


• Industrial automation: In industrial automation, PCA9685 can be used to control various actuators such as valves and actuators. Through the PCA9685, engineers can more conveniently adjust the actuator action to ensure the stability and efficiency of the industrial process.


• Art installation: In art projects, it can be used to control various dynamic lighting effects to create unique art installations.


• Educational use: It can be used as part of an educational project to teach and demonstrate the generation and control of PWM signals.


• Lighting system: It can be used to control LED strips, bulbs or other lighting equipment to achieve dimmable effects and make the lighting system more flexible.


• Robot control: PCA9685 can make the robot's movement more stable and smooth through precise steering gear control, thereby better adapting to various complex environments and tasks.


• Aircraft model control: In remote control aircraft, helicopters and other aviation models, PCA9685 can be used to control the steering gear to adjust the attitude and flight direction of the aircraft.


• Automotive electronic systems: In addition to being used to control interior lighting, dashboard lighting, etc., PCA9685 can also be used to control lights or other lighting effects outside the car, such as running water turn signals and breathing lights, bringing more intelligence to the car. lighting experience.



Ⅶ. What should we pay attention to when using PCA9685?


The PCA9685 address bits are different from those described. According to the chip manual, the address bit register has a total of 8 bits, the highest bit is fixed at 1, and the six bits A0-A5 are user-changeable. Among them, the most critical one is the RW bit, which determines whether to read or write. When writing a program, we should add the R/W bit. The sending address bits are 0x80, not 0x40. When sending the address, we should add the address bit of PCA9685, that is, the sending address bit is 0x81.


The PCA9685 has a 12-bit resolution, which means that during duty cycle control, the corresponding duty cycle range of 0-4096 is 0 to 100. When controlling the servo, it is recommended to use a signal with a period of 20ms and a control signal of 0.5ms to 2.5ms. This resolution is sufficient for the control accuracy of the servo. However, PCA9685 is not suitable for application scenarios that require higher precision control of the servo.




Frequently Asked Questions


1. What is the function of PCA9685?


The PCA9685 is a 16-channel I2C-bus controlled LED controller optimized for Red/Green/Blue/Amber (RGBA) color backlighting applications. Each LED output has individual 12-bit resolution (4096 steps) PWM controller with a fixed frequency.


2. What is the power rating of PCA9685?


The PCA9685 operates with a supply voltage range of 2.3 V to 5.5 V and the inputs and outputs are 5.5 V tolerant. LEDs can be directly connected to the LED output (up to 25 mA, 5.5 V) or controlled with external drivers and a minimum amount of discrete components for larger current or higher voltage LEDs.


3. What is the purpose of PCA9685?


The PCA9685 servo driver module is used applications where large number of servo motors are used such as robot arm, hexapod and robots. It increases the number pf PWM output of your microcontroller.


4. What is the working principle of PCA9685?


This module has 6 bridges to select the board address and to place on the same bus up to 62 controllers for a total of 992 actuators (available addresses 0x40 to 0x7F). It can drive PWM outputs with adjustable frequency and 12-bit resolution.


5. Can PCA9685 drive DC motor?


The PCA9685 DC Motor block controls the power and direction of a DC motor connected to PCA9685 PWM chip-based shields such as Adafruit Motor Shield V2. The input signal determines the power supplied to the motor and the direction of rotation of the motor.