Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[General] Texas Instruments TLC59116 LED Driver Chip is not driving LEDs please help

Status
Not open for further replies.

asimlink

Full Member level 1
Joined
Jun 24, 2009
Messages
96
Helped
12
Reputation
24
Reaction score
12
Trophy points
1,288
Location
Islamabad
Activity points
2,287
Hi Everyone,

I am driving TLC59116 chip with Ardunio DUE board. My connection scheme correclty connects Arduino I2C Pins (SDA/20, and SCL/21) with TLC59116 LED Custom designed Driver Board.

In short I am unable to light any led. In detail please see my schematics, code and the register values that i read back by modifying an arduino example code:
tlc59116-sch.JPG

In this schematic I mistakenly had used TLC59116 device instead of TLC59116F (which does not requires pull down on pin1). I corrected my scheme to match TLC59116 and added a 150 resistor that now pulls down pin1.

I have made sure that both 3.3V and 5V power supplies are good. I also made sure that SCL and SDA are correclty toggling and are not exchanged. I then ran two Arduino Example codes:

1. github.com/.../TLC59116.ino

This is a sample code which should dim leds in a loop.

2. I also tried burning examples from following Arduino Library:

github.com/.../TLC59116

This library has 2 examples :

GlowingNumbers
SineWave
All the three examples do not turn on any LED.

i then modified the code from first example : TLC59116.ino and added a code to read back and print values of TLC59116 registers.

Here is the print on console I can see (the first value 0x80 is at register address 0x00):

Code:
80
0
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
FF
0
0
0
0
0
D2
D4
D8
D0
FF
0
0
0
-----------------------
Here you can see that i never see any error reported in EFLAG1 and EFLAG2 registers.

I request everyone to suggest what is wrong that I dont see any LED turned ON ever? I also had tried different values of PWM (0x7F and some other)

Following is my modified code that reads all registers as well as writes to them in continous loop as in TLC59116.ino example code:


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
// Using Arduino to control LEDs using the TI TLC59116
// Written by Peter Easton (whizoo.com 2013)
// Distributed under Open Software License v3.0
 
#include <Wire.h>
 
// I2C bus addresses (excludes the R/W bit)
#define ADDRESS                        0b1100000  // Assumes A0 to A3 are connected to ground
#define ALLCALL_ADDRESS                0b1101000
#define RESET_ADDRESS                  0b1101011
 
// I2C R/W
#define I2C_READ                       1
#define I2C_WRITE                      0
 
// Control register (three MSB control auto-increment)
#define NO_AUTO_INCREMENT              0b00000000
#define AUTO_INCREMENT_ALL_REGISTERS   0b10000000
#define AUTO_INCREMENT_BRIGHTNESS      0b10100000
#define AUTO_INCREMENT_CONTROL         0b11000000
#define AUTO_INCREMENT_BRIGHT_CONTROL  0b11100000
 
// TLC59116 registers
#define TLC59116_GRPPWM                0x12
#define TLC59116_LEDOUT0               0x14
 
// LED output state for LEDOUT0 to LEDOUT3
#define LED_OUTPUT_OFF                 0b00
#define LED_OUTPUT_GROUP               0b11
 
 
void setup()
{
  Wire.begin();
  Serial.begin(9600);
  
  Serial.println ("TLC69116");
  
  //reset();        // added by aoc
  // Transmit to the TLC59116
  Wire.beginTransmission(ADDRESS);
  // Send the control register.  All registers will be written to, starting at register 0
  Wire.write(byte(AUTO_INCREMENT_ALL_REGISTERS));
  // Set MODE1: no sub-addressing
  Wire.write(byte(0));
  // Set MODE2: dimming
  Wire.write(byte(0));
  // Set individual brightness control to maximum
  for (int i=0; i< 16; i++)
    Wire.write(byte(0xff));  //0XFF 
  // Set GRPPWM: Full brightness
  Wire.write(byte(0xff));  //0XFF
  // Set GRPFREQ: Not blinking, must be 0
  Wire.write(byte(0));
  // Set LEDs off for now
  for (int i=0; i< 4; i++)
    Wire.write(byte(0x00));
  // Set the I2C all-call and sub addresses (if needed)
  Wire.endTransmission();
 
  delay(100);
  
  //setLEDs(0xAAAA);
  //setBrightness(0xAA);
  
  read_registers();
  
}
 
 
void loop()
{
  // reads all registers
  read_registers();
  
  // Loop through LEDs from 0 to 15
  for (int i=0; i<16; i++) {
    setLEDs(1<<i);
    delay(100);
  }
  
  // Light all LEDs and slowly dim them
  setLEDs(0xFFFF);
  for (int i=255; i > 0; i--) {
    setBrightness(i);
    delay(20);
  }
  setLEDs(0);
  setBrightness(0xFF); 
  
}
 
 
// Turn the LEDs on or off.  LEDs is a 16-bit int corresponding to OUT0 (LSB) to OUT15 (MSB)
void setLEDs(int LEDs)
{
  int registerVal=0;
  int registerIncrement = LED_OUTPUT_GROUP;
  
  Wire.beginTransmission(ADDRESS);
  // Write to consecutive registers, starting with LEDOUT0
  Wire.write(byte(AUTO_INCREMENT_ALL_REGISTERS + TLC59116_LEDOUT0));
  
  // Write the value for LEDs
  for (int i=0; i< 16; i++) {
    if (LEDs & 0x01)
      registerVal += registerIncrement;
    // Move to the next LED
    LEDs >>= 1;
    // Are 4 LED values in the register now?
    if (registerIncrement == LED_OUTPUT_GROUP<<6) {
      // The register can be written out now
      Wire.write((byte) registerVal);
      registerVal = 0;
      registerIncrement = LED_OUTPUT_GROUP;
    }
    else {
      // Move to the next increment
      registerIncrement <<= 2;
    }
  }
  Wire.endTransmission();
}
 
 
// Set the brightness from 0 to 0xFF
void setBrightness(int brightness)
{
  Wire.beginTransmission(ADDRESS);
  // Write to the GRPPWM register
  Wire.write(byte(NO_AUTO_INCREMENT + TLC59116_GRPPWM));
  Wire.write(byte(brightness));
  Wire.endTransmission();
}
 
// Reset all TLC59116's on the I2C bus
void reset()
{
  Wire.beginTransmission(RESET_ADDRESS);
  Wire.write(byte(0));
  Wire.endTransmission();
}
 
// reads all registers and prints them over serial console
void read_registers (void)
{
  Wire.beginTransmission(ADDRESS);
  // Write to consecutive registers, starting with LEDOUT0
  Wire.write(byte(AUTO_INCREMENT_ALL_REGISTERS + 0));
  Wire.endTransmission();
  
  Wire.requestFrom(ADDRESS, 32);    // request n bytes from slave device #ADDRESS
 
 
  while(Wire.available())    // slave may send less than requested
  { 
    char c = Wire.read();    // receive a byte as character
    Serial.println(c, HEX);         // print the character
  }  
  Serial.println ("-----------------------------");  
  delay (3000);  
}

 
Last edited by a moderator:

SunnySkyguy

Advanced Member level 5
Joined
Sep 26, 2007
Messages
6,743
Helped
1,675
Reputation
3,348
Reaction score
1,644
Trophy points
1,413
Location
Richmond Hill, ON, Canada
Activity points
50,732
I didnt look at code, but the LEDs ate rated at~3V@100mA and you failed to implement the CC Rset value of 180Ω for 104mA.

The R's on each LED are not necessary if you power the LEDs from 3.3V

Make sure you have decent heatsink for the LEDs such as 1 sq" per LED of MCPCB.

Considering you missed the Rext current setting part on pin 1, I expect you may have overlooked items in your code and thermal design.
 

asimlink

Full Member level 1
Joined
Jun 24, 2009
Messages
96
Helped
12
Reputation
24
Reaction score
12
Trophy points
1,288
Location
Islamabad
Activity points
2,287
I didnt look at code, but the LEDs ate rated at~3V@100mA and you failed to implement the CC Rset value of 180Ω for 104mA.

The R's on each LED are not necessary if you power the LEDs from 3.3V

Make sure you have decent heatsink for the LEDs such as 1 sq" per LED of MCPCB.

Considering you missed the Rext current setting part on pin 1, I expect you may have overlooked items in your code and thermal design.

Thanks Sunny for your reply. I actually wanted to use TLC59116F device (which does not has built-in constant current circuit) but mistakenly I ordered TLC59116 (without F) part. Thats the reason that my actual schematic does not has pull down REXT current setting resistor on Pin-1. To fix the issue due to wrong part I then arbitrarily selected 150 ohm resistor value and soldered it on Pin1 to ground. Since The actual design intended to use TLC59116F device, This is the reason that I have current limit series resistors (12.7ohms) with each LED.

However I do have large heatsink around 1sq-in to 1.5 sq-in as copper pour that connects each LED for heat dissipation.

heat-sink.JPG

btw, with value of 150 ohms the TLC59116 should expect larger than 100mA current but shouldnt it still turn ON LEDs? I dont see any LED turning ON with 150 ohm REXT resistor. Can you explain why is that and why I dont even see any Error flag being setting up in Error registers? The chip seems to be responding to read and writes to registers perfectly.
Do you think making the REXT value to 180 will turn ON leds?

Kind Regards

- - - Updated - - -

Hi Sunny,
I had two LED boards with TLC59116 chip on them on deep investigation I found that on one Board while Making connection to the R-EXT Pin-1 With resistor i had mistakenly bridged the solder between pin1 and pin2 (A0). In my schematic A0/Pin 2 is being grounded via R22/0 ohm resistor. Therefore Pin-1 was also being shorted to Ground on this board.

Later when i oppened the solder between pin 1 and pin2 by use of soldering iron and wick i still could see the short between pin1 and ground. Although I saw using a magnifier that there was no solder bridge between the two pins. I think somehow the chip has got damaged by pulling down pin1 to ground directly.

Anyways I then soldered a 330 ohm resistor on R-EXT pin-1 of 2nd board. I then ran same Arduino code that blinked leds and was able to see LEDs lighting and blinking.

My issue is resolved. I am thankful to you for pointing me out the issue related with R-EXT.

Kind Regards

- - - Updated - - -

I noticed that when all leds are ON with 330 ohm R-EXT the TLC59116 chip gets very very hot. I dont think this chip can work without proper heat sink. But i think TLC59116F chip can perform better than TLC59116 chip (with CC circuit). The TLC59116F chip since does not has Constant Current circuit and the output driver MOSFET will only go into either cut off or in saturation and therefore should be able to dissipate less heat than TLC59116.

Kind Regards
 

SunnySkyguy

Advanced Member level 5
Joined
Sep 26, 2007
Messages
6,743
Helped
1,675
Reputation
3,348
Reaction score
1,644
Trophy points
1,413
Location
Richmond Hill, ON, Canada
Activity points
50,732
This chip is damaged. and very old design.

Yes it needs a decent heatsink.

Since the LEDs are ~3V @100mA , a 2V drop will limit current by Ohm's Law

Use a 3.3V Supply, The LED ESR is ~0.3Ω, so if the MOSFET used with current mirror probably has excessive RdsOn.
If the LED cathode is grounded, R to 3.3 should be ~ 0.3/0.1 = 3 Ω, but if RdsOn is 10 ~30 Ohms, or has no heatsink , why the chip is getting too hot.
 

asimlink

Full Member level 1
Joined
Jun 24, 2009
Messages
96
Helped
12
Reputation
24
Reaction score
12
Trophy points
1,288
Location
Islamabad
Activity points
2,287
Hi Sunny,

Since LEDs usually do not have fixed forward voltage and their typical value for Forward voltage may vary LED to LED, therefore i had decided to use 5V power supply with resistor in series to dessipate extra energy through series resistor.

Dont you think TLC59116F device (without CC circuit) will perform better in terms of less heat generation than TLC59116 which has builtin CC circuit?
 

SunnySkyguy

Advanced Member level 5
Joined
Sep 26, 2007
Messages
6,743
Helped
1,675
Reputation
3,348
Reaction score
1,644
Trophy points
1,413
Location
Richmond Hill, ON, Canada
Activity points
50,732
You presume incorrectly what I know about LED physics and the saturation ESR tolerance is tested and well defined in the part number suffix by Vf bin range. Each batch is normally within 1% while all batches are as much as 50% for ESR in poor quality expitaxial wafers. Normally LED ESR~ Pmax/Imax* per LED but is actually measure by ΔV/ΔI when saturated in middle of desired range, but is never included in spec. but easily calculated from datasheet.

Ideally a CC MOSFET regulator off 3.3V is most accurate with a current mirror CC inside that chip. But you broke yours.

5V only degrades efficiency and temp. rise for R, G or B LED, which must be dissipated somewhere.
A thorough understand of Rjc and Rca is needed for good designers for every component.

When I suggested >1 sq in. per LED for MCPCB, but for FR4 double or triple this as Epoxy is a good thermal insulator and vias choke thermal flux significantly.

* my observation
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top