16-Channel 12-bit PWM Servo Driver with I2C Interface Voltage regulation

Play with it! Please tell us which board you're using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
Jlehtovi
 
Posts: 15
Joined: Thu Feb 23, 2023 7:54 am

16-Channel 12-bit PWM Servo Driver with I2C Interface Voltage regulation

Post by Jlehtovi »

Hi,

How does 16-Channel 12-bit PWM Servo Driver with I2C Interface https://www.adafruit.com/product/815 regulate the input voltage and what’s the input voltage range?

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: 16-Channel 12-bit PWM Servo Driver with I2C Interface Voltage regulation

Post by adafruit_support_bill »

Which input voltage are you asking about? The "VCC" logic voltage determines the i2c signal level. This should be connected to a regulated source: 5v for 5v processor or 3.3v for 3.3v processors.

The "V+" servo power is entirely separate from the logic circuitry. There is an FET for polarity protection, but no voltage regulation. This should be connected to a power source compatible with the servos you are using.

User avatar
Jlehtovi
 
Posts: 15
Joined: Thu Feb 23, 2023 7:54 am

Re: 16-Channel 12-bit PWM Servo Driver with I2C Interface Voltage regulation

Post by Jlehtovi »

I meant the V+. Thx for answer for that.

About VCC: I’m a bit confused about the answer on that and the text that’s on the product’s description: ”It is 5V compliant, which means you can control it from a 3.3V microcontroller, with 3.3V logic pull-ups, and still safely sink up to 5.5V outputs”

So what is the actual required VCC for for this board? I assume it has own microcontroller that sets the specs. How is it 5V compilant if I can control it with 3,3V microcontroller? And what does ”with 3.3V logic pull-ups, and still safely sink up to 5.5V outputs” actually means?

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: 16-Channel 12-bit PWM Servo Driver with I2C Interface Voltage regulation

Post by adafruit_support_bill »

If you are using a 3.3v processor, VCC should be 3.3v also. The i2c lines will be pulled up to the VCC voltage and 5v on SDA & SCL could damage a 3.3v processor.

The "5v compliance" refers to the outputs, not the inputs. These can safely sink up to 5.5v. This can be useful when using it to drive LEDs. It is irrelevant when using it to control servos.

User avatar
Jlehtovi
 
Posts: 15
Joined: Thu Feb 23, 2023 7:54 am

Re: 16-Channel 12-bit PWM Servo Driver with I2C Interface Voltage regulation

Post by Jlehtovi »

Ok, thx. I would also like to include Neopixel to my project. Can I control them with this aswell?

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: 16-Channel 12-bit PWM Servo Driver with I2C Interface Voltage regulation

Post by adafruit_support_bill »

Yes, you can add Neopixels as well. How are you planning on powering them?

Neopixels require a control signal voltage that is close to, but does not exceed the supply voltage. Some combinations of processors and power supplies will require level shifting.

User avatar
Jlehtovi
 
Posts: 15
Joined: Thu Feb 23, 2023 7:54 am

Re: 16-Channel 12-bit PWM Servo Driver with I2C Interface Voltage regulation

Post by Jlehtovi »

I was planning on using this kind of lipo: https://hobbyking.com/en_us/zippy-compa ... tore=en_us as my power source.

Then I make a 5V line to my system by regulating battery voltage to 5V with a buck converter.

This 5V line I use as input voltage for Arduino micros (slaves), Arduino mega (master) and 16-Channel 12-bit PWM Servo Drivers. Mega commands slaves and they command Servo drivers or Mega controls Servo drivers directly. I would connect all servos and Neopixels to 16-Channel 12-bit PWM Servo Drivers so that they would have the regulated 5V line as their input.

I’m not familiar with the term level shifting. Do I have take it or something else into account here?

Here are few things I have taken into account regarding the connections of my project:
-My buck converter must give enough current for all my components.
- I have to use wires thick enough to let the current flow through.

One question: what are A0-A5 on the 16-Channel 12-bit PWM Servo Driver board? Can I use them as regular analog input? I would really like to replace Arduino micros with 16-Channel 12-bit PWM Servo Drivers to save some space in the project. That would be possible if 16-Channel 12-bit PWM Servo Drivers can measure analog values.

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: 16-Channel 12-bit PWM Servo Driver with I2C Interface Voltage regulation

Post by adafruit_support_bill »

As long as everything is 5v, you do not need to worry about logic level shifting.

The PWM Servo board is output only. There is no way to read data on any of the channels.

User avatar
Jlehtovi
 
Posts: 15
Joined: Thu Feb 23, 2023 7:54 am

Re: 16-Channel 12-bit PWM Servo Driver with I2C Interface Voltage regulation

Post by Jlehtovi »

Ok. What are A0-A5 for then?

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: 16-Channel 12-bit PWM Servo Driver with I2C Interface Voltage regulation

Post by adafruit_support_bill »

The address jumpers are described in the guide:
https://learn.adafruit.com/16-channel-p ... rds-848847

User avatar
Jlehtovi
 
Posts: 15
Joined: Thu Feb 23, 2023 7:54 am

Re: 16-Channel 12-bit PWM Servo Driver with I2C Interface Voltage regulation

Post by Jlehtovi »

Okay, thx.

Here https://learn.adafruit.com/16-channel-p ... it-library in the end of the page are instructions for calibrating servos.

1. I’m a bit confused do I need to do that for only one of my servos or all? I have used servos before directly connected to arduino (with external power supply) and I have never calibrated servos like that. Is it 100% neccessary with this driver?

2. If I use several different servos with one driver, how that affects the calibration?

3. In the bottom of the page is a topic ”Converting from Degrees to Pulse Length”. I’m a bit confused do I have to control servos with manual pulse length or why is this introduced here? Or is it just another method of controlling the servos in code instead of the angle?

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: 16-Channel 12-bit PWM Servo Driver with I2C Interface Voltage regulation

Post by adafruit_support_bill »

Hobby servos are analog devices and some variation in response between units is typical. If you require very precise positioning that is repeatable across multiple servos, then you need to calibrate each one. This is true no matter what you are using to control the servo. If your requirements are not that strict, you can skip the calibration.

Servos are controlled by pulse width. The exact relationship between pulse with and position depends on the sevo (see note on calibration above). But generally, pulse widths range from 1ms for -90 degrees to 2ms for +90 degrees.

User avatar
Jlehtovi
 
Posts: 15
Joined: Thu Feb 23, 2023 7:54 am

Re: 16-Channel 12-bit PWM Servo Driver with I2C Interface Voltage regulation

Post by Jlehtovi »

Okay, thx.

I know there exists a problem where servos and neopixel cannot be controlled with same Arduino. However nowadays there is a TiCoServo library that makes it possible.

If I don’t want to use TiCoServo library, am I able to control servos and Neopixel on same Arduino with this Servo driver? I come up with 2 methods which I would like to use:

Method 1: I connect servos and Neopixels to the driver
Method 2: I connect servos to the driver and Neopixels to the Arduino

I am not familiar with syntax to control servos/neopixels though this driver so I would really appreaciate a short example code of this :)

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: 16-Channel 12-bit PWM Servo Driver with I2C Interface Voltage regulation

Post by adafruit_support_bill »

The issue with driving servos and Neopixels directly from an Arduino is because the precise timing requirements of the Pixels conflicts with the precise timing requirements of the servos.

Using the PWM/Servo driver to handle the servo timing eliminates the timing conflict.

It is not possible to control Neopixels with the PWM/Servo.

User avatar
Jlehtovi
 
Posts: 15
Joined: Thu Feb 23, 2023 7:54 am

Re: 16-Channel 12-bit PWM Servo Driver with I2C Interface Voltage regulation

Post by Jlehtovi »

What do you mean by ”PWM/Servo” in the ”It is not possible to control Neopixels with the PWM/Servo” sentense? Do you refer to the ”16-Channel 12-bit PWM Servo Driver with I2C Interface” product? Earlier in the conversation you told it’s possible to control Neopixel with it.

Locked
Please be positive and constructive with your questions and comments.

Return to “Circuit Playground Classic, Circuit Playground Express, Circuit Playground Bluefruit”