Go Down

Topic: 6 digit 7 Segment display - TPIC6B595 schematic component? (Read 6 times) previous topic - next topic

johnhuebbe

Hi all.  First off, an introduction.  I'm John Huebbe... new to electronics but experienced with programming.  Just picked up an Arduino and some components a week ago.  So far, so good with simple projects (LEDs, speaker, push buttons, small 7 segment display).

I'm building a large (2 to 5 inch high numbers) 6 digit 7 segment display.  Some background info... I already have my code working while using the embedded-lab SPI7SEGDISP8.56 MAX7219 based serial 8-digit seven segment LED display module  http://embedded-lab.com/blog/?p=6943  (took me longer to solder up than program)

From reading a ton of forum posts (most where CrossRoads has replied) it looks like it would be best not to use the MAX7219 to drive larger displays and I think it best to use the TPIC6B595 to drive them.  Right? 

So, I'm trying to come up with a basic schematic using the ExpressSCH software, but I don't see a TPIC6B595 component.  I already tried searching but couldn't find a component to download.  Does anyone already have this made?  Or, have I missed seeing it in the software?

Also, does anyone already have a schematic drawn up using these?

CrossRoads

#1
Mar 06, 2013, 05:00 pm Last Edit: Mar 06, 2013, 05:38 pm by CrossRoads Reason: 1
TPIC6B595 is good for driving  higher voltage displays,  where 10-12V is needed to drive 3-4-5 LEDs/segment.
With ExpressSCH is dirt simple to make your own component.
Highlight an existing component, use the menu commands to ungroup it, revise as needed, then select all to regroup and save as a custom component.
I can send you my TPIC6B595 symbol when I get home.  Send me a PM after 5:00PM east coast time as a reminder.
I've posted schematics showing that part as well.  Are you multiplexing the digits, or just using 1/digit?
This board I offer ($6 for bare board) can drive up to 12 digits seperately.  I'm also using it in another project to multiplex 56 digits (altho less brightly due to the multiplexing).
http://www.crossroadsfencing.com/BobuinoRev17/

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

johnhuebbe

#2
Mar 06, 2013, 05:23 pm Last Edit: Mar 06, 2013, 05:26 pm by johnhuebbe Reason: 1
I haven't really decided on a specific 7 segment display yet, but most of the larger displays I see are 7-12 volt.  I'm not really set on a certain type or size just yet.

So far I've seen displays like this one:
http://www.ebay.com/itm/4-inch-7-segment-RED-LED-display-common-anode-1pcs-/360608554918?pt=LH_DefaultDomain_0&hash=item53f5f1dfa6
Voltage:10V~12V  Current:160mA

But maybe eBay isn't the best choice?  I don't see many specs on that display (like brightness).  I want a bright display for outdoor viewing in the sun.

I've seen some other displays on Digikey
http://www.digikey.com/product-detail/en/LDS-AD16RI/67-1493-ND/253656
6.8V  10mA

or

Mouser
http://www.mouser.com/ProductDetail/Lumex/LDS-AD14RI/?qs=sGAEpiMZZMvkC18yXH9iIodCS3EcCJg%2fvIF5cWbQeXU%3d
8V 30mA

I've also seen some that are only 1.85V 30mA (although not in stock)
http://www.mouser.com/ProductDetail/Kingbright/SA23-11SRWA/?qs=sGAEpiMZZMvkC18yXH9iIgvC7dgeX7B5331BdgRjLvY%3d

So far, I've been working on a small prototype on my breadboard.  Once I get the software to work how I want it, then I'll start making a full size version.  I've been trying to read a lot and see what others have done before, but lots of projects look to be unique.  Just trying to figure out all of the different options out there for what will work best for me. Daunting task for a non-electronics guy.

I'll PM you later for the component for expressPCB software.  Thanks!
(I'm still amazed at how easy it is to program something on the Arduino and have it do things. Never thought it would be this easy.)

CrossRoads

#3
Mar 06, 2013, 05:57 pm Last Edit: Mar 06, 2013, 05:59 pm by CrossRoads Reason: 1
try kingbrightusa.com too, example
http://www.kingbrightusa.com/category.asp?catalog%5Fname=LED&category%5Fname=KC1%2DDigit+4%2E0in&Page=1

Or make your own digits, chunks of LED strip lights for each segment.
The digikey/mouser parts are faint, only 10s of mCD.  You need much more for outdoor use:
http://www.dipmicro.com/store/LED5B
http://www.dipmicro.com/store/LED5G
http://www.dipmicro.com/store/LED5W
These will show up nice!

Yes, Arduino pretty easy to use. Programming seems like fancy BASIC to me.  But then again, I've been exposed to a lot of different software over the years. Biggest challenge to the coding was keeping the ; and { } straight when I started with Arduino.  Gets easier the more you do it.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

johnhuebbe

Thanks for the links.

Do you have any suggestions on the mCD output needed for a display to be visible outdoors?

I'm not opposed to making my own LED digits, kind of like this http://www.ebay.com/itm/LARGE-5-127mm-TALL-BI-COLOR-LED-7-SEGMENT-DISPLAY-100-USA-BUILT-/321036681257?pt=LH_DefaultDomain_0&hash=item4abf470029

Only reservations would be soldering up all of those LEDs onto boards for 6 digits.  Plus, I'd have to make a custom board (unless you know of boards available for purchase)

CrossRoads

Thru hole, you're only looking at 21 LEDs/digit, won't take long.
I made my own here by soldering the LEDs to 80x100mm Velleman perfboard, and then wire wrapping them in parallel to be driven from 5V source.
Didn't take long at all.
I used the really bright LEDs (these came from superbrightleds.com in different colors) and limited them to a few mA, because 20mA was waaay too bright indoors! Needed sunglasses for testing!
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

johnhuebbe

Wow, looks cool.  Making my own LED segments might be an option I'll consider.  I just initially figured it would be easier to buy the segments so I would have less assembly work.

As for your LED driver board (using TPIC6B595), is this what you mean ?


In the mean time, I'll try and sketch something out on paper and post it here.

johnhuebbe

Ok, here is my project idea... just an overview of what I'm planning.  Anybody, feel free to make suggestions on components.


johnhuebbe

I'm starting to consider the power requirements of my project... and to have a bright display for outdoor use, it seems like I'll need a big battery.

So, using the TPIC6B595, is there a way to control the brightness of the LEDs, in order to reduce my power requirements when it isn't full sun (cloudy days, night, indoors)?

If I make my own digits out of LEDs; assuming 28 LEDs for 6 small segment, 77 LEDs for 2 large segments, 10 LEDs for 3 round lights;  I get 352 LEDs  (I might reconsider how many I use for the large ones).  If I run them at 20mA, I'll have about 7000mA for the display.  Seems like a lot of power, since I was considering batteries that have a capacity of 7Ah.  Would only run my display for 1 hour, right?

So... if there is an easy way I could have a dial or menu system control the brightness, I would prolong the display time.

johnhuebbe

I think I calculated too high (made a newbie mistake) and assumed they are all on at the same time.  Should be more like 3.9A at 20mA per LED.

Anyone have a suggestion for controlling the brightness using the TPIC6B595? 

johnhuebbe

Some updates:

I have my TPIC6B595 registers wired up to some small 7 segment displays.  I have tested them with a sketch that I downloaded from Nick Gammon's site http://www.gammon.com.au/forum/?id=11518&reply=1#reply1  and all of the segments light up, so I know everything is wired up correctly and working. Hard to see, but I have a capacitor across the + and - for a decoupling capacitor.  I also just used 1 resistor per display, since I didn't have 42 resistors for each led segment, so it does dim as more segments light up.



Now, my question.  Are there some code samples/examples on how to display numbers onto my 6 digit display?  Previously when I was using the Embedded Lab SPI 7-seg display http://embedded-lab.com/blog/?p=6862  the code was very simple.  Like:

Code: [Select]

#include <LedControl.h> //  need the library
LedControl lc=LedControl(4,3,5,1); // lc is our object Pin 4, 3, 5  and 1 display

clockminute = minute();
clockhour = hour();
lc.setDigit(0,6,clockhour,false);
lc.setDigit(0,3,clockminute,false);


Where I used lc.setDigit to send the display what number I wanted for my hour, minute, second.

Is there a similar Library for using 595 shift registers?  Also, should I be using SPI.h or ShiftOut() to update my display? (I've started reading a bit about each)

CrossRoads

I use SPI.transfer() for shift registers.  Way faster.
Assuming your 6 are daisy chained:
Code: [Select]

digitalWrite(ssPin LOW);
SPI.transfer(fontArray[byte0]);
SPI.transfer(fontArray[byte1]);  // send out the font information that represents the data for byte1
SPI.transfer(fontArray[byte2]);
SPI.transfer(fontArray[byte3]);
SPI.transfer(fontArray[byte4]);
SPI.transfer(fontArray[byte5]);
digitalWrite(ssPin, HIGH);

with
byte fontArray [] = {
// B-DP-g-f-e-d-c-b-a
B00111111, // 0          a
B00000110, // 1      f        b
B01011011, // 2          g
//etc.                    e        c
B01011111, // 9           d       DP, or one of the indicator lights
};

and the bytes might even come from an array:
SPI.transfer(fontArray[dataArray[x]]);  // double look up! send out the font information from dataArray position x

so this might be in a loop:
for (x=0; x<6; x=x+1){
SPI.transfer(fontArray[dataArray[x]]);
}

You could use MAX7219 to drive the 6 smaller displays from 5V, using its brightness register to control the brightness level.
On the TPIC6B595, use PWM on the output enable pin to control brightness level.

MAX7219:
digitalWrite(ssPin, LOW);
SPI.transfer(register1address);
SPI.transfer(register1data);
digitalWrite(ssPin, HIGH);
// really need to bury that in a library?  I don't think so
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

johnhuebbe

Yes, they are daisy chained.

Is there a standard way they should be hooked up? Like, should the first display be on the far left or far right?
Here is what I show with my display and how it's hooked up.


Serial In goes to #1, then Serial out of 1 goes to in of #2, etc...

Using your suggestions, here is my test code. Works so far.
Code: [Select]

// Test sketch using 6 TPIC6B595 shift registers
#include <SPI.h>

const static byte charTable[128] = {
  // B-DP-g-f-e-d-c-b-a
  //    a
  //f       b
  //    g
  //e       c
  //    d       DP
 
  //0         1         2         3         4         5         6         7
    B00111111,B00000110,B01011011,B01001111,B01100110,B01101101,B01111101,B00000111,
  //8         9
    B01111111,B01100111
};

const byte LATCH = 10;     //Arduino Latch Pin = 10
const byte NumberOfSR = 6; //Number of Shift Registers

byte DisplayData [NumberOfSR]; //Array for numbers that go in the 6 digit display

void refreshDisplay ()
{
  digitalWrite (LATCH, LOW);
  for (byte i = 0; i < NumberOfSR; i++)
    SPI.transfer (DisplayData [i]);
  digitalWrite (LATCH, HIGH);
}

void clockDisplay ()
{
  DisplayData [0] = charTable[1];
  DisplayData [1] = charTable[2];
  DisplayData [2] = charTable[3];
  DisplayData [3] = charTable[4];
  DisplayData [4] = charTable[5];
  DisplayData [5] = charTable[6];
  refreshDisplay ();
}

void setup ()
{
  SPI.begin ();
}
 
void loop ()
{
    clockDisplay ();
}


I'll most likely use the decimal points for my lights and just use 2 more TPIC6B595's for the other 2 larger digits.  Or, I may even use another 595 for the lights. That way I can daisy chain everything with some headers & cables.

CrossRoads

The way its coded, it will display 654321.
Its up you to define what goes where, there isn' a standard.

You have no current limit resistors? That will burn out your LEDs eventually. The TPIC6B595 can sink a lot of current.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

johnhuebbe


The way its coded, it will display 654321.

Its up you to define what goes where, there isn' a standard.

Ok, that's what I thought.

You have no current limit resistors? That will burn out your LEDs eventually. The TPIC6B595 can sink a lot of current.

I have 1 small resistor on each of the common anodes of the 7 segment displays.  I sized it so if I was displaying the number 1, it would be about 10mA.  If I show an 8, the display dims more.  I would add resistors to each individual led for my final project, but I didn't want to put in 42 resistors on my breadboard for this. (plus I didn't have that many on hand)

Go Up