Yep, as long as you're calling pwm.setPWM() for each new value, you're good.
davidb wrote:when it looks like I should have been using this:
pwm.setPWM(0, 0, 0);
I'd wondered about that, but figured it was best to go one point at a time. Good to know you've got something that works for you.
davidb wrote:2. based on the LEDs I am trying to drive @ 5V I only need a 43 ohm to limit the current to 25mA. It seem like my only options are to either try to solder a 53ohm resistor in parallel to the 221 ohm resistor on the board or remove the 221 ohm resistor and replace with a 43 ohm resistor. Neither option appears to be much fun, but wanted to check.
Hmm.. I see where you're heading, but would probably use a line buffer myself.
To paraphrase in order to make sure I understand: the diodes you're using have a forward voltage of about 4v at 25mA, and the 220 ohm resistors built into the PCA9685 board will only give you about 5mA when you use a 5v power supply. To get 25mA, you need a current limiting resistor of about 43 ohms (I'd suggest 47 ohms since that's the closest standard value).
Instead of modding the PCA9685 board, I'd mentally re-label it from 'LED driver' to 'central pattern generator' and use its outputs to drive cheap, simple components that can get more power to the LEDs.
Starting simple, we have things like the 2N3904 NPN transistor: you can get a hundred in TO92 packages from Mouser for $3.50, and each one can handle 200mA of current.. about 8 LEDs worth. Give each LED its own resistor, use the transistor as a switch between the LED and GND, drive the transistor's base with the PCA9685 board's output, and you're set.
Moving up a notch, there's the 2N7000 mosfet: it works the same way, but it can handle pulsed current up to 800mA and draws no DC current from the control line. The only practical limit to the number you could drive from a single output line (called the 'fanout') is the capacitance of the wire connecting everything. Those are a little more expensive ($6.50 per hundred in TO92), but still a good bet.
Next up would be inverters like the 74HC04 or 74HC14. Those work from 5v supplies and each inverter can handle about 25mA of output current. They come 6 to a chip, run about $12.50 per hundred in DIP-14 packages, and work pretty much the same way the transistors/mosfets do.
From there you go to line drivers like the 74HC244 and 74HC245. Those don't invert the signal, do have 'enable' lines that can tristate the output, come 8 to a package, and cost about 50% more than the inverters.
The prices drop by about a third if you're willing to use SMT components rather than through-hole components.
The chips are more compact, and inverters are slightly more cost effective than individual transistors. Transistors can handle a lot more current than chips though. It's also true (and I still shake my head over this) that a 47 ohm resistor will cost about the same as a 3904 transistor.
When you void a product warrany, you give up your right to sue the manufacturer if something goes wrong and accept full responsibility for whatever happens next. And then you truly own the product.