Driving lots of 7-segment displays. (12x3 digits)

Hey guys.
Perhaps i'm getting ahead of myself here, but i'd like to order some parts now so I can tackle the project over my christmas break.

I'm planning to build an external display for PC racing simulators (ie. rFactor)

Ideally i'd like to have a display 12 digits wide, and 3 tall. [or taller depending on price/if the arduino can drive it]

I realize it would be a lot easier to use an LCD display, but i'd like to try and implement with segmented displays.
[Could I possibly use nine, 4-digit displays?, giving me a 12x3 display]

Similar to this (Arduino rFactor - YouTube), but with the LCD info on segmented displays.

My main concerns right now are:

  1. How to physically wire power to all of the displays. (using a 5v bench supply most likely)
  2. How to get the data from the arduino onto the displays. (multiplexing? hardware/pin wiring?)
  3. Fast display refresh rate.

Skip to part way through the video, and you can see how quickly his segmented display can respond to in-game changes.
I've seen similar setups on youtube, that have lag.

I've got a bootleg dealextreme Arduino Mega on the way, as well as an Arduino nano from the same site.
[I'm probably also going to need a pretty big breadboard, in order to have a somewhat continuous display. Or perhaps I should use something else instead of a solderless breadboard?]

If it ends up being prohibitively expensive, i'll probably go the LCD route, but i'd really like to do it on segmented displays.

EDIT:
I forgot to mention, I would like to have colon separators like on the (LTC-4627JR [These are available in Common Cathode and Common Anode]). It would make laptime displays much prettier.
EDIT2:
Or are these even available in the same size as that video? If not, i'll scrap the separator idea

Thanks for your help!
-Panici

Try checking out the MAX7221 chip. It's pretty expensive ($10) but you don't need to wire up resistors for the LEDs (save one for setting current) and you can just send it a string like "09221" over SPI (three pins) and it'll display them (ie a 7segment decoder). It can handle up to 8 digits (and you can string them up without using any extra arduino pins). It'll also do a LED Matrix if you like those.

The only other reasonable option from a string of breadboards is to have a custom PCB. And if you go with the breadboard route, the wiring will get pretty intense. Then again, custom PCBs are scary and somewhat expensive.

Also, you really don't need to worry about update speed; I doubt anything you'll have will be slower than the PC Serial connection, and you can only really perceive updates more than about 50ms apart (I believe that's 80000 clock cycles).

You want 30 7-segment displays? Yeah, 4 MAX7221's will do 32 digits nicely. Or 5 for 40.
SPI commands to all of them, can control data update to each digit.
Lot of commonality in the wiring, be straightforward to do, either as wirewrap, or spread across a couple of 80x100mm PCBs.

WizenedEE:
Try checking out the MAX7221 chip. It's pretty expensive ($10) but you don't need to wire up resistors for the LEDs (save one for setting current) and you can just send it a string like "09221" over SPI (three pins) and it'll display them (ie a 7segment decoder). It can handle up to 8 digits (and you can string them up without using any extra arduino pins). It'll also do a LED Matrix if you like those.

The only other reasonable option from a string of breadboards is to have a custom PCB. And if you go with the breadboard route, the wiring will get pretty intense. Then again, custom PCBs are scary and somewhat expensive.

Also, you really don't need to worry about update speed; I doubt anything you'll have will be slower than the PC Serial connection, and you can only really perceive updates more than about 50ms apart (I believe that's 80000 clock cycles).

I do like the idea of the MAX7221 chip, however a few things come to mind.

1. Price - I'm going to need 5 of these suckers ($50) to power a 12x3 display. That pretty much rules it out.
[Can I use MAX7219 instead? I found a 10 pack on ebay for $5]

2. Special characters. - In addition to (0-9,A,B,C,E,F) Ideally I want to be able to use the segments to form whatever other letters I can. (n, r, o, d, b, etc)
3. Speed - I've seen displays lag with only four 7-segment displays, so i'd rather use extra pins on the Arduino then daisy chain. (Also the spec sheet says 10Mhz serial for the chip, although i'm not experienced enough to know if that is fast enough at this point.)

In terms of breadboarding this, I'm probably just going to suck it up and use solderless breadboards for now. Hopefully I can use all 4-number displays.

I will probably have to buy 3 (TW-E40-1020) to fit everything.

CrossRoads:
You want 30 7-segment displays? Yeah, 4 MAX7221's will do 32 digits nicely. Or 5 for 40.
SPI commands to all of them, can control data update to each digit.
Lot of commonality in the wiring, be straightforward to do, either as wirewrap, or spread across a couple of 80x100mm PCBs.

I'm thinking 12x3 [36 digits], so I can use all 4-number modules.

See above points.

EDIT:
I forgot to mention, I would like to have colon separators like on the (LTC-4627JR [These are available in Common Cathode and Common Anode]). It would make laptime displays much prettier.
EDIT2:
Or are these even available in the same size as that video? If not, i'll scrap the separator idea[/b]

Oh and also, while talking about speed, I plan on also driving two (possibly 3) of these using the (TM1638) library.
http://www.dealextreme.com/p/8x-digital-tube-8x-key-8x-double-color-led-module-81873

And a multi-LED shift light similar to what is pictured.

(Also, In the future possibly a motor on the brake pedal to indicate wheel locking.)

Any thoughts? I'd like to order from Digikey or Ebay right away so I can start the build over my christmas break.

If you want to make 4 number modules, MAX6953 will drive 4 5x7 LED matrices, that's another way to go.

Or make yourself modules of 4 shift registers that you access via SPI commands.

All modules will get SCK, MOSI.
Each module will need its own ChipSelect pin. 9 modules = 11 pins.

TM1638 library seems to use a version of shiftout to send data:
TM1638(byte dataPin, byte clockPin, byte strobePin
so it seems like you could roll your own code and those with SPI.transfers also.
So one more Chipselect there.
With a '328 based Arduino, that's 12 pins. 2 more for serial = 14. 1 for a motor drive transistor = 15.

Get yourself some perfboard, 30 guage wirewrap wire, wirewrapping tool & wirewrap sockets & go for it make yourself something that will be more durable and less troublesome to trouble shoot than solderless breadboards.
http://www.king-cart.com/cgi-bin/cart.cgi?store=phoenixent&product_name=HWS15765

I'm a complete Arduino n00b, so forgive me here :slight_smile:

What sized 7-Segment displays do you think he is using here?

I'd like to fit the entire 12 digit width on one 6.5" breadboard, how large of a display can I use?
I'd like to maximize number size. Around 0.8" numbers I think would be ideal.

That said, can I even get larger 4-digit modules? A quick digikey/mouser search only shows 0.56" available.

If i'm forced to use 2-digit modules, we may have to rethink the wiring.
Perhaps only 10 digits wide to make things less complex?

Sure, you can get really big digits!

.8", 1", 1.5", 1.8", 2.3", 4"!

On the other hand, 6.5" / 12 = 0.54" wide.
0.8" tall digits are 0.787" wide.

a 0.56" tall digit, 4 digit display is 1.98" wide, so 3 displays (12 digits) would fit in 6".

Lots of color & brightness levels - 24,000mcd!

CrossRoads:
On the other hand, 6.5" / 12 = 0.54" wide.
0.8" tall digits are 0.787" wide.

a 0.56" tall digit, 4 digit display is 1.98" wide, so 3 displays (12 digits) would fit in 6".
4-Digit 0.56in LED from Kingbright USA

Ah! Thanks for the physical dimensions. I've made two mockups and printed them to scale. It looks like the 0.56" digits will be perfect! :slight_smile:


If I make a more permanent version, i'll move the displays closer together.

--
So the next step is to pick out which modules to use.
Common Cathode, or Common Annode?

Digikey has the (LDQ-N516RI), but at $7.13 a piece, that's $64.
(Or I could take advantage of the price break and get 10 for $65)

There's these suckers, but it looks like it'll take 25 days to ship here.
http://www.ebay.com/itm/1-X-0-56-4-DIGIT-7-Segment-Super-Red-LED-display-CC-/220594621095?pt=LH_DefaultDomain_0&hash=item335c76caa7

Did you price them ordering direct from kingbright?

I've purchased from them directly.

CrossRoads:
Did you price them ordering direct from kingbright?

I've purchased from them directly.

Ah, there's an idea! Do they ship from the USA?
Price seems to be ~$2.38 per module. That's much cheaper then digikey :smiley:

They look to be about
So Common Anode, or Common Cathode?

Yes.
I find common anode easier to deal with.
Anodes go to +5, cathodes go to shift registers that pull low.

CrossRoads:
Yes.
I find common anode easier to deal with.
Anodes go to +5, cathodes go to shift registers that pull low.

Alright. Now that we've established which displays to use, let's think about wiring them up.

You had mentioned the MAX7219 before. Are shift registers a similar thing?

What would work better in this situation? What are the pros and cons of each?

Let's leave the TM1638 based modules I mentioned before out of the equation for now.
I'll drive them with separate pins and code for them separately afterwords.
Unless we need to somehow wire them together with these displays, in order to not have display lag???

Please do not cross post, it just wastes time.

Summarized thread so far:
(I cross posted, and this post was moved)

Bear with me, this my first project.
Please include details that are assumed knowledge to an experienced person.

I'm planning to build an external display for PC racing simulators (ie. rFactor)
Mock up:

The plan is to build on breadboard then transfer to perfboard at a later date.

I'm going to use 9x red 4-digit modules (0.56") from here:

Should I get Common Cathode, or Common Anode?

My main concerns right now are:
1. Power - How to physically wire power to all of the displays. (using a 5v bench supply most likely)
2. Data Transfer - How to get the data from the arduino onto the displays. (multiplexing? hardware/pin wiring?)
3. Fast display refresh rate/speed - I've seen displays lag with only four 7-segment displays, so i'd rather use extra pins on the Arduino then daisy chain.
4. Special characters. - In addition to (0-9,A,B,C,E,F) Ideally I want to be able to use the segments to form whatever other letters I can. (n, r, o, d, b, etc)

Oh and also, while talking about speed, I plan on also driving two (possibly 3) of these using the (TM1638) library.
http://www.dealextreme.com/p/8x-digital-tube-8x-key-8x-double-color-led-module-81873

Let's leave the TM1638 based modules out of the equation for now, unless we need to somehow wire them together with these displays, in order to not have display lag???

So far, the MAX7219 has been mentioned, as well as shift registers.
What would work better in this situation? What are the pros and cons of each?

I've also just noticed, kingbrightusa has 12 pin and 36 pin models. (as opposed to the 16 pin displays from digikey)

Obviously i'm going to use the 12 pin for sanity sake!

Which particular one? One of the CA56-21xx?

So you're going for the multiplexing route then? Need to control the anodes then too. Maybe with UDN2981

Then gang all 12 Cathode segments together, can pull low with 1 driver, with anode current/digit from UDN2981s.

Vs a shift register per digit and daisy-chained SPI connections.

Either way can be made to work.

Or go with CC56-21. Common cathode.
Anodes can be driven by arduino outputs, use ULN2803 to sink the current, one digit at a time.
All segment anodes connected in parallel (a's, b's, c's, d's, e's, f's, g's)
Then a bank of 5 ULN2803s to cycle thru the common cathodes.
Have an 8x36 array that you loop thru for the display,
update an array element as a digit needs changing.

Basically how the MAX7221 works, but just for 4 digits.

Hey Crossroads.

Either the CC56-21 or CA56-21 look like they would work. The other ones would probably be too bright!
I'm not sure which route I should go.

Honestly most of what you've said has gone over my head, as i've never worked with 7-segment displays, multiplexers or shift registers before.

I hate to ask you to break it down for me, but if you're willing...