Help w/Large LED 7-Seg display

Hi all -- Noob submits & hopes you all can help. I am building a Pinewood Derby timer system for my Cub Scout Pack. I am trying to control 4 individual digit LEDs (LSD23265) common anode with 9V. I need to be able to send place order (i.e. 1st, 2nd, 3rd, 4th) from Nano. The Nano gets data from another Uno connected via serial (A4, A5). Based on research around net I learned that best option for this would be TLC5916 const current LED drivers. But, for the life of me I can't get it all to work, even with just a basic LED connected to the output pins. Here's my setup so far:

Arduino | TLC5916
Pin 11 Pin2 (SDI)
Pin 13 Pin3 (CLK)
Pin 10 Pin 4 (LE)
Pin 7 Pin 13 (OE)

TLC5916 ground pin (12) connected via 220ohm R.
I copied code from another posting in forum (forum.arduino.cc/index.php?topic=65492.0) and have attempted to get it to work (below). I have tried SPI.H, TLC5917.h libraries without success. I attempted to add line in posting regarding LE being added LOW, HIGH, then back to LOW.

#include "SPI.h"
int SDI=11;
int CLK=13;
int LE=10;
int OE=7;

void setup()
{
pinMode(SDI, OUTPUT);
pinMode(OE, OUTPUT);
pinMode(LE, OUTPUT);
SPI.begin();
SPI.setBitOrder(LSBFIRST);
}

void setBLUE(int Bluevalue)
{
digitalWrite(LE, LOW);
digitalWrite(OE, HIGH);
digitalWrite(SDI, LOW);
SPI.transfer(0); // send command byte
SPI.transfer(Bluevalue); // send value (0~255)
digitalWrite(LE, HIGH);
digitalWrite(SDI, HIGH);
digitalWrite(OE, LOW);
digitalWrite(LE, LOW);
}
void loop()
{
setBLUE(255); // Turn all 8 leds on
delay(500);
setBLUE(0); // Turn all 8 leds off
delay(500);
}

You can see that the noob is WAY out of his element here and clearly can't make sense of the TLC5916 configuration. It is worth noting that I figured out all on my own how to wire up a 74HC595 but also learned that it won't work here with 9V (no pretty blue smoke today).

So my begging question is: how do I wire up the LED LSD23265 to TLC5916 so i can control each digit independently from Nano? What are the pin connections necessary and what is the correct code? Lastly, I need to (of course) conserve pins on the Nano, I'd hoped to serial them together via A4/A5, but again, can't make that all come together.

Many thanks in advance - I really appreciate all of your help that I have gleaned over the last few years & am proud to say that this is the first time I am truly stumped. Any help appreciated!

TLC5916 ground pin (12) connected via 220ohm R.

WHY??? This is wrong. All grounds must be connected together.

Read the how to use the forum sticky before posting anymore code.

Draw a schematic of what you have.
Use decoupling capacitors on the chips
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html
The data sheet says the maximum forward voltage is 9.6V so 9V may not be enough.

High voltage output shift registers would work great here. TPIC6B595. Wiring is just like an HC595.
Easier to code than the TLC5916 too, especially as you don't need 256 steps of brightness, and if you do you can get with PWM on the shift register OE/ line.
This pic has resistors in series in the middle of the LED string - wire them at the output of the shift register instead.

I posted some code Thursday or Friday on using arrays to create fonts to be displayed, and using SPI.transfer( ) to send the info to the shift registers.

I think it's my book too.

Grumpy - Very sorry for not providing code properly. I will review and try to do better next time. I mis-typed the ground connection. Not pin 12, but pin 16 - all grounds connected. I thought the R-EXT (pin 15) was supposed to control current, no? Again, thought I mentioned the noob-coefficient. My crude setup sketch attached.

The supply voltage oddly enough, though it says “9V” on the wall-wart, measures in at 16V! I just checked to see if I had enough Vf to get them lit up. THAT one is a headscratcher. So I don’t think voltage is a problem, they light up with resistors and direct connect to voltage & gnd. They didn’t poof so I may have a bad wart(?) or bad multimeter I guess. I will have to throttle it back with a 7812 and check to see which (so I don’t fry something at a minimum).

CrossRoads – Thanks for your input. I was hoping to use the TLC5916s since I just bought them based on what I thought was best for the LEDs I have, but given my difficulty getting them to work, perhaps this is a different option I should explore. I have actually made the 595s work with smaller 7-segs, and no, I don’t need 256 steps of brightness. The 595-like ICs would actually be ideal since they can handle the voltage needed.

GriffUSN:
The supply voltage oddly enough, though it says “9V” on the wall-wart, measures in at 16V!

Nothing unusual there. It is an unregulated supply consisting only of a transformer (at mains frequency), bridge rectifier and capacitor. When unloaded, the voltage will float to the peak voltage of the rectified AC, but under load the capacitor will not maintain this voltage and the resistance of the transformer in addition (which actually helps in smoothing the rectified voltage) will cause the voltage to droop down to (and below) the "nominal" voltage.

Quite unsuitable for this sort of project where the load will be continuously varying - you need a regulated, "switchmode" supply.

Paul - Many thanks. That makes sense. Explains as well my experience with Radio Hut AC-DC hardware.. all over the place. I actually have a power supply on order from DigiCom so that should help with my power concerns. Is it better to wire in a 7812 to get 12V and just be happy with that? The Nano should be OK at 12V as well as the LEDs.

Thanks very much for the help. I still haven't a clue how to make the TLC5916 work for my 7-segs. I will have to just keep fiddling while I go order TPIC6B595s. $)

According to the data sheet I have on the TLC5916 pin 1 is the ground and pin 16 the supply, you seem to have it backwards.

Amend the first post and we can talk about the code when it is posted correctly.

Grumpy - I have no idea what I was looking at for pinout on TLC5916. I see that I did have them wrong, adjusted as necessary, pinout changed (below) and attached is updated (pinout for Nano this time) artists crude rendering of circuit.

Arduino | TLC5916
Pin 11 Pin2 (SDI)
Pin 13 Pin3 (CLK)
Pin 10 Pin 4 (LE)
Pin 7 Pin 13 (OE)
Pin 1 (gnd)
Pin 16 (vcc)

Thanks all..

#include "SPI.h"
int SDI=11; 
int CLK=13; 
int LE=10; 
int OE=7;

void setup()
{
  pinMode(SDI, OUTPUT); 
  pinMode(OE, OUTPUT);
  pinMode(LE, OUTPUT);
  SPI.begin(); 
  SPI.setBitOrder(LSBFIRST);
}

void setBLUE(int Bluevalue)
{
  digitalWrite(LE, LOW);
  digitalWrite(OE, HIGH);
  digitalWrite(SDI, LOW);
  SPI.transfer(0); // send command byte
  SPI.transfer(Bluevalue); // send value (0~255)
  digitalWrite(LE, HIGH);
  digitalWrite(SDI, HIGH);
  digitalWrite(OE, LOW);
  digitalWrite(LE, LOW);
}
 void loop()
{
      setBLUE(255); 
      delay(500);
      setBLUE(0); 
      delay(500);
}

Does this work now?
Your pictures are way too big to see when you click them in a web page, scale them to about 800 pixels across for a user friendly size.

Well golly, eventually I will get this posting posted exactly right. I resized the attachment and reattached.
No, not working still. The LEDs sit dark.

One other thing that occurs to me as I sit and stare at this *%$& circuit, I don't see that I am actually connecting any of the output pins (i.e. 5-12) to turn anything on? The code is missing the actual: "turn pin 8 'on.'" I admit that I have cycled through so many tweaks on this I may have gooned something and missed an obvious step in the code. I trust that everyone's eagle eyes and god-like Arduino skills will spot my gross display of noobage.

This code was written for a board using 2x TLC5925, the 16 output version of your chip. It's a little whack because it's designed to be extended to reading the value to display from serial but it should get you started.

Scoreboard_Example.pde (2.58 KB)

It probably won't make a difference, but according to my reading of the TLC5916 timing diagram, the code should be:

void setBLUE(int Bluevalue)
{
  digitalWrite(LE, LOW);	// this could be done in setup()
  digitalWrite(OE, HIGH);	// disable outputs
  SPI.transfer(Bluevalue);	// send value (0~255)
  digitalWrite(LE, HIGH);	// latch the data
  digitalWrite(LE, LOW);
  digitalWrite(OE, LOW);	// enable outputs
}

I also removed the line

  SPI.transfer(0); // send command byte

This doesn't seem correct for the 5916 by my reading of the datasheet.

Another option to consider would be an SAA1064 driver chip. This single chip could run all 4 of your digits with only a couple of ordinary pnp transistors (eg. BC337). No current limiting resistors needed either. It can take supply voltages up to 15V and connects to the arduino via only 2 lines (I2C bus).

Paul