Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

12x High power LEDs with TLC 59711
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

12x High power LEDs with TLC 59711

by octoshaw on Thu Jul 02, 2020 10:55 pm

Hi there. I'm looking to control 12 high power LED drivers via PWM from Arduino. I picked up the TLC59711 breakout board to experiment with - since I only want the PWM output (my LEDs are well over the 17v output of this BoB), I'm using a pull-up resistor on the driver outputs as mentioned. This seems to work overall, but I'm having 2 issues (I'm a relative newbie so any suggestions appreciated!)

1. Setting a duty cycle via CircuitPython produces the inverse duty cycle at the output (as measured on my 'scope) - I can deal with this in software of course, but its slightly annoying.

2. Whenever I reset my Arduino via power cycle or CircuitPython update, I briefly get the LEDs at max power (which is blinding as well as coming very close to the current limit of my boost converter). Normally I would pull-down the LED driver PWM input to avoid this - however due to the open-drain nature of the BoB, this PWM line is already pulled-up as mentioned above.

Perhaps I should just go for a more PWM friendly BoB like the PCA 9685? - am I likely to have similar issues with that? - or is there a way to configure the 59711 to avoid the issue?

thanks!

octoshaw
 
Posts: 8
Joined: Fri Jan 31, 2020 4:38 pm

Re: 12x High power LEDs with TLC 59711

by adafruit_support_bill on Fri Jul 03, 2020 6:02 am

The PCA9685 outputs are 'active high', so it is probably a better match for what you are trying to do.

adafruit_support_bill
 
Posts: 78210
Joined: Sat Feb 07, 2009 10:11 am

Re: 12x High power LEDs with TLC 59711

by octoshaw on Fri Jul 03, 2020 12:39 pm

Thanks for the reply! - I ordered the alternative BoB.

As a general rule, what’s the preferred way to avoid the effects of floating pins during startup? - is a pull down the right approach? Or would some other kind of switch be employed when feeding a higher voltage component driver?
Sorry for the basic question - I’m usually more on the software side of things!

octoshaw
 
Posts: 8
Joined: Fri Jan 31, 2020 4:38 pm

Re: 12x High power LEDs with TLC 59711

by adafruit_support_bill on Fri Jul 03, 2020 1:06 pm

For open collector outputs in the off state, you can use a pull-up. A pull-down would be self-defeating.

For GPIO type outputs in a high-impedance state, either pull-ups or pull-downs can be used as needed.

The PCA9685 has an active LOW Output Enable pin. It can be configured to default all of the pins to HIGH, LOW or high-impedance state when not enabled. See section 7.4 of the data sheet.
https://cdn-shop.adafruit.com/datasheets/PCA9685.pdf

adafruit_support_bill
 
Posts: 78210
Joined: Sat Feb 07, 2009 10:11 am

Re: 12x High power LEDs with TLC 59711

by octoshaw on Tue Jul 07, 2020 12:58 pm

Thanks for the reply and Info Bill!

octoshaw
 
Posts: 8
Joined: Fri Jan 31, 2020 4:38 pm

Re: 12x High power LEDs with TLC 59711

by octoshaw on Tue Jul 07, 2020 6:49 pm

One more question :)
I picked up a PCA9685 driver board and followed the steps to set it up carefully. Library installations seem to be successful and all of the following lines from the tutorial execute fine in the REPL - apart from the last one:
Code: Select all | TOGGLE FULL SIZE
import board
import busio
import adafruit_pca9685
i2c = busio.I2C(board.SCL, board.SDA)
pca = adafruit_pca9685.PCA9685(i2c)

Which gives me:
Code: Select all | TOGGLE FULL SIZE
AttributeError: 'module' object has no attribute 'PCA9685'

Not sure how this can be - perhaps a version mismatch somewhere? I pulled all libs today - how can I debug this?

Thanks again!

octoshaw
 
Posts: 8
Joined: Fri Jan 31, 2020 4:38 pm

Re: 12x High power LEDs with TLC 59711

by adafruit_support_bill on Tue Jul 07, 2020 7:06 pm

I suspect that the class constructor has changed. The example code from the library initializes it this way:

https://github.com/adafruit/Adafruit_Py ... pletest.py
Code: Select all | TOGGLE FULL SIZE
# Import the PCA9685 module.
import Adafruit_PCA9685


# Uncomment to enable debug output.
#import logging
#logging.basicConfig(level=logging.DEBUG)

# Initialise the PCA9685 using the default address (0x40).
pwm = Adafruit_PCA9685.PCA9685()

# Alternatively specify a different address and/or bus:
#pwm = Adafruit_PCA9685.PCA9685(address=0x41, busnum=2)

adafruit_support_bill
 
Posts: 78210
Joined: Sat Feb 07, 2009 10:11 am

Please be positive and constructive with your questions and comments.