Controlling a 7 Amp LED strip with a TLC5947?

TobiasRipper:
So here's a proper video explaining the circuit:
Mosfet Troubles - YouTube

Hi again,
Looked at the video, I think we're still trying to invert that MOSFET to get rid of the blinks due to the driver switching it's output when we don't want it to.

Try the following, one step at a time - use one of those 2N3904's to drive one LED (instead of the MOSFET driving a string of LEDS), when that works use the transistor output to drive the MOSFET connected to the string of LEDS. You can leave the one LED in circuit. You should see the LED string ON when the one LED is off and vice versa.
Diagram:


Yours,
TonyWilk

Hi,
Thanks for the video, I think this is your circuit now.
TLC5947_Output Control3.jpg
What do you have the LAT terminal of the 5947 module connected to?
It is an input described as below, if un-terminated it may be causing your problem due to it being an edge triggered input.
pins.jpg
The example circuits in the data sheet show it terminated to some control.

Tom… :slight_smile:

In terms of code, I used the Adafruit Library to send data to the driver. Writing my own hardware addressing method is a bit out of my abilities. The wiring is done according to their website instruction. The Latch of the driver is connected to the Uno controlling it.

Wiring:

So let's say its the library doing something in the background. If someone could let me know to address the driver manually instead of using the library, I could run a test on that.

Code I'm using:

/*************************************************** 
 This is an example for our Adafruit 24-channel PWM/LED driver

 Pick one up today in the adafruit shop!
 ------> http://www.adafruit.com/products/1429

 These drivers uses SPI to communicate, 3 pins are required to  
 interface: Data, Clock and Latch. The boards are chainable

 Adafruit invests time and resources providing this open source code, 
 please support Adafruit and open-source hardware by purchasing 
 products from Adafruit!

 Written by Limor Fried/Ladyada for Adafruit Industries.  
 BSD license, all text above must be included in any redistribution
****************************************************/

#include "Adafruit_TLC5947.h"

// How many boards do you have chained?
#define NUM_TLC5974 1

#define data   4
#define clock   5
#define latch   6
#define oe  -1  // set to -1 to not use the enable pin (its optional)

Adafruit_TLC5947 tlc = Adafruit_TLC5947(NUM_TLC5974, clock, data, latch);

void setup() {

 tlc.begin();
 if (oe >= 0) {
   pinMode(oe, OUTPUT);
   digitalWrite(oe, LOW);
 }
}

void loop() {
 
 tlc.setPWM(0, 0);
 tlc.setPWM(1, 4095);
 tlc.setPWM(2, 4095);
 tlc.write();
 delay(200);


        tlc.setPWM(0, 4095);
         tlc.setPWM(1, 4095);
         tlc.setPWM(2, 4095);
         tlc.write();
         delay(200);
 

 tlc.setPWM(0, 4095);
 tlc.setPWM(1, 4095);
 tlc.setPWM(2, 0);
 tlc.write();
 delay(200);


        tlc.setPWM(0, 4095);
         tlc.setPWM(1, 4095);
         tlc.setPWM(2, 4095);
         tlc.write();
         delay(200);

         
 tlc.setPWM(0, 4095);
 tlc.setPWM(1, 10);
 tlc.setPWM(2, 4095);
 tlc.write();
 delay(200);


        tlc.setPWM(0, 4095);
         tlc.setPWM(1, 4095);
         tlc.setPWM(2, 4095);
         tlc.write();
         delay(200);
 
//  colorWipe(4095, 0, 0, 100); // "Red" (depending on your LED wiring)
//  delay(200);
//  colorWipe(0, 4095, 0, 100); // "Green" (depending on your LED wiring)
//  delay(200);
//  colorWipe(0, 0, 4095, 100); // "Blue" (depending on your LED wiring)
//  delay(200);
//  rainbowCycle(10);
}

In terms of code, I'm only writing once every delay. It's supposed to light one of 3 LEDs at a time.

Just as a side note. There ins't really any sort of way to convert the Ground PWM to a 5v PWM other than the Resistor and Path of lowest resistance way? When I used the Mega with its 14 something PWM channels, it was so much easier - it actually worked.

Hi,
Instead of letting the code control LAT, connect it as shown in the datasheet, or just connect it to gnd or 5V and see what happens.
You can’t damage the IC as its an input.

Tom… :slight_smile:

I’ve gone ahead and tested out your suggestion. Connecting the LATch to 5v, 3.5v or Gnd resulted in the driver doing nothing.

Here are the results.

And a few notes:

PS: I’ve also re-read the Latch definition and I’m pretty sure that pin is supposed to be first flipped low and then high in order to push the data into the shift registers. So Having it statically sitting on 5v or ground wouldn’t do anything.

Hi,
Okay, I don;t have a 5947 to try this end.
I have a 5940 breakout module, must check what the differences are.

Have you tried replacing your LED strips with just one LED and series resistor?

Tom... :slight_smile:

TobiasRipper:
I've also re-read the Latch definition and I'm pretty sure that pin is supposed to be first flipped low and then high in order to push the data into the shift registers. So Having it statically sitting on 5v or ground wouldn't do anything.

Correct.

Invert the drive as I've said earlier.

Yours,
TonyWilk

So I've read up on the responses somewhere. It appears that the TLC5947 is not meant for rapid refresh. More for static signs of a sort. There IS a different version of a similar driver that is meant for a display like application. Looks like I'm going to have to shop a little more.