Pages: [1] 2 3 ... 6   Go Down
Author Topic: Driving lots of 7-segment displays. (12x3 digits)  (Read 6886 times)
0 Members and 1 Guest are viewing this topic.
Ontario, Canada
Offline Offline
Full Member
***
Karma: 0
Posts: 175
That's me in the avatar. :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 ( ), 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
« Last Edit: December 04, 2011, 12:34:26 am by Panici » Logged

Electrical Engineering Student

Offline Offline
Edison Member
*
Karma: 19
Posts: 1041
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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).
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 525
Posts: 26494
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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.

Ontario, Canada
Offline Offline
Full Member
***
Karma: 0
Posts: 175
That's me in the avatar. :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.


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.
« Last Edit: December 03, 2011, 01:35:52 pm by Panici » Logged

Electrical Engineering Student

Ontario, Canada
Offline Offline
Full Member
***
Karma: 0
Posts: 175
That's me in the avatar. :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.)
« Last Edit: December 03, 2011, 02:16:42 am by Panici » Logged

Electrical Engineering Student

Ontario, Canada
Offline Offline
Full Member
***
Karma: 0
Posts: 175
That's me in the avatar. :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Electrical Engineering Student

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 525
Posts: 26494
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

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.

Ontario, Canada
Offline Offline
Full Member
***
Karma: 0
Posts: 175
That's me in the avatar. :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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?
« Last Edit: December 03, 2011, 10:59:27 pm by Panici » Logged

Electrical Engineering Student

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 525
Posts: 26494
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sure, you can get really big digits!

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

http://www.kingbrightusa.com/category.asp?catalog%5Fname=LED&category%5Fname=KC1%2DDigit+7%2DSegment+Thru%2DHole+Display&Page=1

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".
http://www.kingbrightusa.com/category.asp?catalog%5Fname=LED&category%5Fname=KC4%2DDigit+0%2E56in&Page=1

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

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.

Ontario, Canada
Offline Offline
Full Member
***
Karma: 0
Posts: 175
That's me in the avatar. :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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".
http://www.kingbrightusa.com/category.asp?catalog%5Fname=LED&category%5Fname=KC4%2DDigit+0%2E56in&Page=1

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! smiley


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
« Last Edit: December 04, 2011, 12:47:08 am by Panici » Logged

Electrical Engineering Student

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 525
Posts: 26494
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Did you price them ordering direct from kingbright?

I've purchased from them directly.


* Kingbright_large_display.jpg (193.97 KB, 912x684 - viewed 23 times.)
Logged

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.

Ontario, Canada
Offline Offline
Full Member
***
Karma: 0
Posts: 175
That's me in the avatar. :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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-grin

They look to be about
So Common Anode, or Common Cathode?
« Last Edit: December 04, 2011, 01:10:49 am by Panici » Logged

Electrical Engineering Student

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 525
Posts: 26494
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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.

Ontario, Canada
Offline Offline
Full Member
***
Karma: 0
Posts: 175
That's me in the avatar. :D
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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???
Logged

Electrical Engineering Student

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 290
Posts: 25838
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Please do not cross post, it just wastes time.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Pages: [1] 2 3 ... 6   Go Up
Jump to: