How to connect TLC5940 to ULN2003?

I trying to control 7 RGB Led strips(12V) using arduino with Jitter.
I think almost finished, because they(TLC 5940, ULN2003) worked well when I tested separately. But I can't connect both of them, even though some people said they connected in this forum. I found some picture and followed it. However, it doesn't work. I hooked up pull up resistor(10K) on one of ULN2003 inputs with arduino 5V. And LED(12V) hooked up ULN2003 Ground.


(I connected 12V power supply for LED strips.)

Help me, please.

Also, I have very simple patch arduino.
If you give me any advice, I will appreciate it.
Thank you so much.

 /* Tlc.set(channel (0-15), value (0-4095)) sets the grayscale value for
       one channel (15 is OUT15 on the first TLC, if multiple TLCs are daisy-
       chained, then channel = 16 would be OUT0 of the second TLC, etc.).

       value goes from off (0) to always on (4095).

       Like Tlc.clear(), this function only sets up the data, Tlc.update()
       will send the data. */
       

#include "Tlc5940.h"

int incomingByte;
unsigned long duration;


void setup() {
  
  Serial.begin(115200);
  Tlc.init();
  /* Call Tlc.init() to setup the tlc.
     You can optionally pass an initial PWM value (0 - 4095) for all channels.*/

}

void loop() {
  
 Tlc.clear();

 byte Rdim1;
 Rdim1 = map(Rdim1, 0, 4095, 0, 255);
 byte Gdim1;
 Gdim1 = map(Gdim1, 0, 4095, 0, 255);
 byte Bdim1;
 Bdim1 = map(Bdim1, 0, 4095, 0, 255);
 
 byte Rdim2;
 Rdim2 = map(Rdim2, 0, 4095, 0, 255);
 byte Gdim2;
 Gdim2 = map(Gdim2, 0, 4095, 0, 255);
 byte Bdim2;
 Bdim2 = map(Bdim2, 0, 4095, 0, 255);
 
 byte Rdim3;
 Rdim3 = map(Rdim3, 0, 4095, 0, 255);
 byte Gdim3;
 Gdim3 = map(Gdim3, 0, 4095, 0, 255);
 byte Bdim3;
 Bdim3 = map(Bdim3, 0, 4095, 0, 255);
 
 byte Rdim4;
 Rdim4 = map(Rdim4, 0, 4095, 0, 255);
 byte Gdim4;
 Gdim4 = map(Gdim4, 0, 4095, 0, 255);
 byte Bdim4;
 Bdim4 = map(Bdim4, 0, 4095, 0, 255);
 
 byte Rdim5;
 Rdim5 = map(Rdim5, 0, 4095, 0, 255);
 byte Gdim5;
 Gdim5 = map(Gdim5, 0, 4095, 0, 255);
 byte Bdim5;
 Bdim5 = map(Bdim5, 0, 4095, 0, 255);
 
 byte Rdim6;
 Rdim6 = map(Rdim6, 0, 4095, 0, 255);


 if(Serial.available() >= 16)
  {
    
  byte Rdim1 = Serial.read(); 
  byte Gdim1 = Serial.read();
  byte Bdim1 = Serial.read();
  
  byte Rdim2 = Serial.read(); 
  byte Gdim2 = Serial.read();
  byte Bdim2 = Serial.read();
  
  byte Rdim3 = Serial.read(); 
  byte Gdim3 = Serial.read();
  byte Bdim3 = Serial.read();
  
  byte Rdim4 = Serial.read(); 
  byte Gdim4 = Serial.read();
  byte Bdim4 = Serial.read();
  
  byte Rdim5 = Serial.read(); 
  byte Gdim5 = Serial.read();
  byte Bdim5 = Serial.read();
  
  byte Rdim6 = Serial.read(); 


  Tlc.set(0, Rdim1);
  Tlc.set(1, Gdim1);
  Tlc.set(2, Bdim1);
  Tlc.set(3, Rdim2);
  Tlc.set(4, Gdim2);
  Tlc.set(5, Bdim2);
  Tlc.set(6, Rdim3);
  Tlc.set(7, Gdim3);
  Tlc.set(8, Bdim3);
  Tlc.set(9, Rdim4);
  Tlc.set(10, Gdim4);
  Tlc.set(11, Bdim4);
  Tlc.set(12, Rdim5);
  Tlc.set(13, Gdim5);
  Tlc.set(14, Bdim5);
  Tlc.set(15, Rdim6);
 

 Tlc.update();
  }
}

However, it doesn't work.

In what way? What do you see? Is the LED on or off.

The circuit is right if you build exactly what you have.

Have you testes the TLC 5940 by itself in this wiring, the 1K current setting resistor is quite low make it 2K, but that in itself will not stop it working.

Always use the # icon when posting code, especially silly long winded code.

why are you mapping the values to 255?

Thank you so much your quick answer :slight_smile:
Yes, it works fine when I use only TLC 5940.
I used not 1K but 2K resistor for TLC 5940.

when I hooked up ULN 2003 with TLC 5940, LED strips turned on. But, It didn't work dim and turn off.
Sorry for my confusing questions.
And, I wanner send data 0-255 to control LED strips from Jitter.
That's why I used map.
Can it be problem?

First understand that what you are doing inverts the data, that is what sets the LEDs to full on with a TLC5940 alone will set the LED to full off when you add the 2003.

And, I wanner send data 0-255 to control LED strips from Jitter.
That's why I used map.

I think you have that bit of the code the wrong way round. Try it simply first without all the fancy control just to see if you have the hardware working.