pca9685 PWM 6 volts max?

I have a 16 channel PWM using the PCA9685. I wish to use this to drive servos.

It has VCC and V+ connections. The V+ connections are wired to "header" pins and also to a small terminal block. The terminal block V+ appears to be connected to the V+ header pins through a diode and the V+ header pins are directly tied to the servo header pins. I see no continuity between VCC and V+.

The board is marked V+ 6V max.

What is going on? I assume the VCC is for the logic circuitry and V+ is for the servo (or LED) supply.

Why is there a 6V max rating? Why is there a diode at the V+ terminal block?

What I would like to do is connect a 7.2v battery to the terminal block, short the diode so it directly connects to the servo headers and make no connection from V+ on the PWM board to the Arduino. Will that work or will I smoke something? I believe the servos will run at 7.2V

I have a 16 channel PWM using the PCA9685.

Great. Which one? Link to the data sheet of it please.

Everything else can be answered once you supply this.

The PCA9685 can only run at a maximum of 5.5V so in practice use no greater than 5V.

Grumpy_Mike:
Great. Which one? Link to the data sheet of it please.

Everything else can be answered once you supply this.

The PCA9685 can only run at a maximum of 5.5V so in practice use no greater than 5V.

Yes, but the PCA9685 runs off VCC, not V+, so WTF. So, why is there a limit on V+?

Not only cheap, but already had all the header pins soldered on, came relatively quickly too:

http://www.ebay.com/itm/311188037855?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

There appear to be a few libraries out there, FWIW, this seemed to be the most servo friendly:

#include <HT_PCA9685.h>

Yes, but the PCA9685 runs off VCC, not V+, so WTF. So, why is there a limit on V+?

That web site has no idea what it is selling nor how to use that chip. From the look of it there are no active components other than the PCA9685.

There is a limit on the V+ because it is connected to the servo which is connected to the chip.

Why is there a 6V max rating? Why is there a diode at the V+ terminal block?

The diode is to drop the voltage down to 5.3V so that the chips maximum signal value is not exceeded. So the servos will always run at 0.7V below the voltage applied on the V+ terminal. You put a bigger value into V+ and you blow the chip.

There appear to be a few libraries out there,

There is absolutely no need whatsoever to use any library for this chip. It is just so simple to drive through the I2C bus. This is one of those occasions where a library has been produced for its own sake. You will have to learn as much about how to drive the library as you would have learning about the chip. But learning to drive the chip is a transferable skill where as the library is a dead end.

Grumpy_Mike:
That web site has no idea what it is selling nor how to use that chip. From the look of it there are no active components other than the PCA9685.

I believe that. The website on the board goes to a site with greeking placeholder text.

I believe this could benefit from an external clock as I've read believe the internal lacks accuracy

There is a limit on the V+ because it is connected to the servo which is connected to the chip.
The diode is to drop the voltage down to 5.3V so that the chips maximum signal value is not exceeded. So the servos will always run at 0.7V below the voltage applied on the V+ terminal. You put a bigger value into V+ and you blow the chip.
There is absolutely no need whatsoever to use any library for this chip. It is just so simple to drive through the I2C bus. This is one of those occasions where a library has been produced for its own sake. You will have to learn as much about how to drive the library as you would have learning about the chip. But learning to drive the chip is a transferable skill where as the library is a dead end.

As it turns out the diode goes between the V+ terminal block and the V+ header pins.

There is no sign of any continuity between VCC and V+. To that end I tried a little experiment, I put 6V to V+ and got nothing at VCC, zero. The chip is isolated from V+. The diode serves only to drop the 6V to the servo rail and anything connected to the VCC pins (which I have no intention of doing).

The Adafruit version has a transistor switch and an onboard clock, it also has, I believe, a similar 6V V+ warning. So, again, WTF.

I took a brief stab at the simplicity of driving the chip, I see your point on this, but nowhere in the 50 page PDF of the chip could I glom on to the simplicity. Looking at the C++ in the library I see that it is not a difficult process, although parts appear arcane to me, but then, I have never written a driver. I prefer, for now, to adapt what works. I have enough other code that needs writing... then to dive into this.

At any point, if it doesn't have an accurate enough clock, then it is useless as a servo driver.

There is no connection between the +V pin and the Vcc until you add a servo. Then there is a path through the servo's control pin between the two. You probably will not be able to measure this with a meter. The two supplies are in no way isolated.

The clock is stable enough to drive a servo without jitter.

Grumpy_Mike:
There is no connection between the +V pin and the Vcc until you add a servo. Then there is a path through the servo's control pin between the two. You probably will not be able to measure this with a meter. The two supplies are in no way isolated.

The clock is stable enough to drive a servo without jitter.

Thanks, I'm having a hard time wrapping my mind around this.

The board has 330 ohm resistors in series with the chip and the servo signal pins, I would have thought that those are there to limit current if the chip overdrove the servo (assuming a diode in the servo to clamp Vin within a diode drop of the servo rail). That seems unlikely as the servo is operating at a higher voltage than the chip.

As far as running the servos at 5.3 V, I don't like that idea at all. The servos lose torque and efficiency at lower voltages.

I'm not concerned about the jitter, what does worry me is that the servo may not be near 90 degrees when it is supposed to be there.

The primary use of these boards is to drive LEDs and I think the 6V limit must have something to do with that instead.

At the moment I am back to making a servo bus for the DUE...

what does worry me is that the servo may not be near 90 degrees when it is supposed to be there.

No you can get the full movement with this chip. In fact the pulse width can be anything you like by setting the registers correctly.

Look at page 28 of the data sheet, that shows the three modes you can set the output to.
In the open drain mode ( FIG 15 ) you see a direct connection, however you can not use the chip to drive servos in this mode, due to them not updating correctly until the next cycle of the master clock. That leaves the other two modes.

If you were to use a FET like it shows in figs 13 then it is fine you could power your servo from what ever voltage you like, just have a resistor in the drain and connect the drain to the servo' control line. Using the configuration in fig 14 with a higher voltage would be more tricky because that would require boosting the PCA9685 chip's output first to the higher voltage with an n-channel or NPN before applying it to the control signal with a p-channel FET or bipolar PNP transistor.

However, in the board you linked to there is no FET and so the control pin of the servo is directly connected to the PCA9685 chip. This is why the servo can not be powered by anything more than 0.5V above the power supply of the PCA9685 chip.

The Adafruit version has a transistor switch and an onboard clock,

Not this one it doesn't.

Is there another one that does?

I am currently using this chip to drive four servo motors and 12 LEDs and the servos are dead stable and will move through the full range.

Grumpy_Mike:
No you can get the full movement with this chip. In fact the pulse width can be anything you like by setting the registers correctly.

Look at page 28 of the data sheet, that shows the three modes you can set the output to.
In the open drain mode ( FIG 15 ) you see a direct connection, however you can not use the chip to drive servos in this mode, due to them not updating correctly until the next cycle of the master clock. That leaves the other two modes.

If you were to use a FET like it shows in figs 13 then it is fine you could power your servo from what ever voltage you like, just have a resistor in the drain and connect the drain to the servo' control line. Using the configuration in fig 14 with a higher voltage would be more tricky because that would require boosting the PCA9685 chip's output first to the higher voltage with an n-channel or NPN before applying it to the control signal with a p-channel FET or bipolar PNP transistor.

However, in the board you linked to there is no FET and so the control pin of the servo is directly connected to the PCA9685 chip. This is why the servo can not be powered by anything more than 0.5V above the power supply of the PCA9685 chip.

Not this one it doesn't.

Adafruit 16-Channel 12-bit PWM/Servo Driver - I2C interface [PCA9685] : ID 815 : $14.95 : Adafruit Industries, Unique & fun DIY electronics and kits
Is there another one that does?

I am currently using this chip to drive four servo motors and 12 LEDs and the servos are dead stable and will move through the full range.

OK.

So there is no pull up resistor on the board and it would then pull up to the supply voltage of the servo. I see how that is a problem. The LED would be the pullup otherwise.

I've mixed up the boards, although Adafruit has more than one board with this chip, the board with the clock is this one:

http://www.hobbytronics.co.uk/pwm-servo (there may be another also)

Although that also lacks the pull up resistors and has the same problem you noted. For me, that is too many tiny resistors and/or FETs to add on. It looks like I am back to the DUE running the PWM and the servo bus I was building as I really do want the servos at 7.2 V.

Thanks, more karma added to you...

I've read through the datasheet some more and have sorted out the OUTDRV configuration. Notes interspersed:

Grumpy_Mike:
No you can get the full movement with this chip. In fact the pulse width can be anything you like by setting the registers correctly.

Look at page 28 of the data sheet, that shows the three modes you can set the output to.
In the open drain mode ( FIG 15 ) you see a direct connection, however you can not use the chip to drive servos in this mode, due to them not updating correctly until the next cycle of the master clock. That leaves the other two modes.

If you were to use a FET like it shows in figs 13 then it is fine you could power your servo from what ever voltage you like, just have a resistor in the drain and connect the drain to the servo' control line. Using the configuration in fig 14 with a higher voltage would be more tricky because that would require boosting the PCA9685 chip's output first to the higher voltage with an n-channel or NPN before applying it to the control signal with a p-channel FET or bipolar PNP transistor.

This is the way I see it.

See Table 6 for configuring for totem pole or open drain.

The important thing is to run it in totem pole so that it swings between the rails of the chip, the servo signal line being a typical high impedance input. If you run it in open drain, as you would if you were directly driving LEDs then it would swing up to that's device V+, not so in totem pole. The FET is unneeded on board, consider that it is external and part of the circuitry of the servo.

If you were to run that board in it's most common usage, that of driving LEDS directly then you would use open drain and blow up the device if it hit over 6V, hence the warning.

BTW, I ordered the Hobbytronics that had the onboard clock.

You've gotten me halfway to writing my own for this, as you suggested.

You've gotten me halfway to writing my own for this, as you suggested.

Great, if you get stuck give me a call.

For using servos I initialised the chip like this:-

void PCA_init(){
   Wire.begin();                // start the I2C interface
   PCA_write(SLAVE_ADDRESS, 0, 0x31);   // sleep mode set to 1
   PCA_write(SLAVE_ADDRESS, 0xfe, 132); // set divider for 50 Hz refresh
   PCA_write(SLAVE_ADDRESS, 0, 0x21);   // Mode reg 1 - Oscillator on, auto increment, respond to call all address
   PCA_write(SLAVE_ADDRESS, 0x1, 0x0C); // Mode reg 2 - outputs totem pole, invert bit clear, output change on ack,
}