Hope someone will be able to help me here as I am stumped as to what next should I do / check.
I will do my best to be as brief as possible.
I am using TLC59711 breakout board to drive 4 IR emitters (IR LEDs).
When I assemble everything on a breadboard (using jumper wires) it works, and works well. LEDs stay on and keep on (although I did not try to leave them on for longer than 5 min).
Just FYI I had to solder in an additional resistor (1.2k Ohm) to the breakout board as I needed more power to drive my IR LEDs.
Here is my problem:
When I move to my own custom PCB something goes wrong.
- My custom PCB is exact copy of the wiring from a breadboard (I triple checked) and that in turn is taken from adafruit learn article for TLC59711.
- Instead of jumper wires I use ribbon cable (2x20) to connect my Xavier NX (dev board from nVidia with the same interfaces and pinout as RaspberryPi) to my custom PCB (more on that later as I think it has something to do with the issues I am having)
- When ribbon cable is connected the LEDs light up, stay on for several seconds and just power off. If I run a test script again to switch them on, they switch on and then go off again.
- When I connect my custom PCB with jumper wires I get entirely different result. The LEDs power on, stay on for 60 - 90 sec and then start to blink roughly every second. The blink is short and seems consistent.
- I do not use all the lanes from the ribbon cable, only 8 (SPI, 3.3v, GND and 3 other general IO pins for lighting normal LEDs directly from the board.
- FYI the TLC59711 is powered by external PSU (I have tried 5v 15W 3A and 12v with similar ratings and results are the same) - the four LEDs in total draw about 240 mA.
Reading about it online (could not find anything specific for my use case) it seems that the clock timings might be affected by the extra PCB between TLC59711 and Xavier NX? Am I on the right track, and if so how would I go to fixing that - I am really stumped on where to start.
Secondly, do I need to use different connector / cable combo that ribbon cable as it seems that it is interfering?
- I tried making the ribbon cable very short (about 2cm / 1 inch) and the same issue happened. Just power off and never come back on.
Code: Select all
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# CircuitPython
# SPDX-FileCopyrightText: 2021 s-light
# SPDX-License-Identifier: MIT
# Author Stefan Krüger (s-light)
"""TLC5971 / TLC59711 Example."""
__doc__ = """
tlc59711_singlechip_autoshow.py - TLC59711AutoShow minimal usage example.
simple demo of the TLC59711 16-bit 12 channel LED PWM driver.
Shows the minimal usage - how to set pixel values.
the TLC59711AutoShow class automatically writes the pixel values on each change.
this makes it very slow on lots of pixel changs but is convenient for only a handfull of pixels..
Author: Tony DiCola, Stefan Krueger
Enjoy the colors :-)
"""
import board
import busio
import time
import adafruit_tlc59711
print(__doc__)
# Define SPI bus connected to chip.
# You only need the clock and MOSI (output) line to use this chip.
spi = busio.SPI(board.SCK, MOSI=board.MOSI)
pixels = adafruit_tlc59711.TLC59711AutoShow(spi)
# Ways to set the values:
# just a list or tuple with 3 integer values: R G B
# each 0 - 65535 or 0.0 - 1.0
# every chip has 4 RGB-LEDs (=12 Channel)
#pixels[0] = (50111, 50111, 50111)
#pixels[1] = (0, 0, 100)
#pixels[2] = (0.01, 0.0, 0.01)
#pixels[3] = (0.1, 0.01, 0.0)
# You can also explicitly control each R0, G0, B0, R1, B1, etc. channel of the first ic
# by getting and setting its 16-bit value directly with properties.
# For example set channel 2 to 1/4 green (i.e. G2):
pixels.r3 = 65535
pixels.g3 = 65535
pixels.b3 = 65535
pixels.r2 = 65535
pixels.g2 = 65535
pixels.b2 = 65535
pixels.r1 = 65535
pixels.g1 = 65535
pixels.b1 = 65535
pixels.r0 = 65535
pixels.g0 = 65535
pixels.b0 = 65535