Help needed with TLC5940nt

Thread Starter

ant247

Joined Mar 2, 2014
10
Hi folks,
I'm having a bit of trouble with my latest project and require some help.

I'm still quite new to the world of diy electronic stuff and have only built a couple of LED cubes and a couple of other things so far.

I am now working on an RGB LED cylinder,(The 1 in the pic is not mine, this is the original by Dave Clausen) but I am having a nightmare with it and came here hoping to get the break I need.

The circuit consists of 2 boards.
The lower board is basically an arduino with an ATMEGA168, but it will also work with an ATMEGA328. The top board contains 5xIRLU3715PBF N channel Mosfets run by 3x TC4427ACPA Mosfet drivers and 4 daisy chained TLC5940NT's. see attached schematics
All the parts I have used are the same as the original cylinder, trying to source parts that are no longer made (IRLU3715PBF) is a real headache.

The trouble I am having is that none of the 4 TLC5940NT shift registers work right.
Only pin 28 is working on the first 3 registers, pin 28 chip 4 isn't on because there is no led connected to that pin.
The result of this is that only 3 of the 19 columns light up, and only in 1 colour.
The circuit is built on a breadboard because the pcb I etched is shorting out between almost all solder points.
No matter how many times I rebuild the circuit, I always get similar results but have never had my cylinder display more than it does now.
Basically the help I need is....
Why is only the first outpin on the shift registers working ?
Could it be a code problem, I am doing this project without really understanding it because all parts are provided (Eagle files for both boards and code).

This is the introduction to the code...

// this is technically an Arduino sketch but it is basically just straight ANSI C
#include <avr/pgmspace.h>
#define spi_wait() while (!(SPSR & (1<<SPIF))) {}
#define nop() asm volatile ("nop")
#define xlat_high() PORTB |= (1 << PB2)
#define xlat_low() PORTB &= ~(1 << PB2)
#define blank_high() PORTB |= (1 << PB1)
#define blank_low() PORTB &= ~(1 << PB1)
#define gsclk_high() PORTD |= (1 << PD5)
#define gsclk_low() PORTD &= ~(1 << PD5)
#define PIXELS_PER_PLANE 19
#define PLANE_COUNT 5
#define PIXEL_COUNT (PIXELS_PER_PLANE * PLANE_COUNT)
static byte pixels[PIXEL_COUNT * 3];
#define OUTPIXEL_COUNT 64
static byte plane_trans[] = {
0, 2, 4, 1, 3
};

in case anyone can help me, and I hope you can.
This project has cost me too much money to just shelf it, I must finish it.

PLEASE HELP, if you can that is. Everything
 

Attachments

Thread Starter

ant247

Joined Mar 2, 2014
10
140 odd views and not 1 answer, please guys, help a noob out.
I have been getting nowhere with this for over 5 weeks now and it's getting rather frustrating not being able to get any further.
Please guys, look in your deep down and help a struggling man out.

If anymore info is needed, I will provide it if I can.

Thanks again.
 

THE_RB

Joined Feb 11, 2008
5,438
...
The trouble I am having is that none of the 4 TLC5940NT shift registers work right.
...
Why is only the first outpin on the shift registers working ?
...
It's a complex project for someone to debug for you from one post. :)

But if the first output pin a shift register is the only pin working, you need to do some testing of the shift registers.

Maybe your code is resetting the shift register after sending only one data bit? It seems to be an interesting symptom that only the FIRST pin is working.

I suggest you strip your code down to just enough to work the shift registers, then SLOWLY send one bit each second, and watch the LEDs.
 

Thread Starter

ant247

Joined Mar 2, 2014
10
Thanks for the suggestion RB.
ALL of the TLC5940's are working as they are supposed to, I tested them all with 3 different circuits.

I personally think that it is to do with the code because I have rebuilt the breadboard 3 different ways and I have always ended up with very similar results.
This build has given me the best results with 3 columns lighting, last time I only had 2 columns.

I will try stripping the code down as best I can, I don't understand the code that much yet, but as long as I keep a copy of the code untouched I should be ok.

Thanks again RB, 1 answer is better than none.
 

Thread Starter

ant247

Joined Mar 2, 2014
10
I have had a play with the code and changed a couple of things, but that only changed the animations.
I think it might be something to do, partly, with the tlc_config.h file.
I have set the NUM_TLCS to 4 but I can't figure out the thing about turning pin27 on or off, because if it is off then it needs to be connected to a gnd. Pic1 shows that pin27 does go to a gnd on pin22 and then to the DCPRG pin19.
This is repeated 4 times down the line.

Pic2 shows some of the daisy chain wiring and some mini looms.

Pic3 shows the whole breadboard circuit, I made the mini wiring looms to cut down on connections. These made no difference to the way the cylinder runs.

Can anyone give me any help with the config file and the Pin27 thing please, I think this might be a giant step forward with my cylinder.

Thanks in advance for any help.

I just can't understand how others have got it working and I am finding it so hard....
 

Attachments

THE_RB

Joined Feb 11, 2008
5,438
I sympathise with your situation but it is a very hard thing to debug from a distance looking at a mess of wires. :)

Even if your wiring checks out correctly there is always a chance with plug in breadboards that one of those contacts has been strained or damaged and has an open circuit.

All I can suggest for now is to check and re-check all your wiring.

The next step up from that is to re-write the code to do tests of the shift registers, like I suggested earlier. That will let you run a test code in slow motion and see if the shift registers and wiring is working.
 

Sensacell

Joined Jun 19, 2012
3,453
When building a complex computer / electronic project like this there are always a million reasons why it won't work, nothing I build ever works the first time.

You need to figure out how it's supposed to work and troubleshoot it logically, one step at a time. Follow the signal chain, look at the serial data and clock signals on each driver, are they correct?

Otherwise it's like trying to diagnose a sick horse from across the street, just a guessing game.
 
Top