Pages: [1]   Go Down
Author Topic: Driving 7 Segment led's  (Read 1318 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


                           Hi all, i have a project i'd like to get going, i have over googled and am dizzy ! so a little help would be great. i'm looking for the best way to drive 4 7 segment led's. i have seen a few units that are pre-made, great! but i'd like to make my own and plus they didn't provide a schematic or chip info. I'd like to use it as a voltage display for my psu and later as a text display for other arduino project's. would be nice if i could use it like a "backpack" display
Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

in a nut shell its 7 led's that share the same cathode (- side) then you multiply it by how many digits

so if you have a 4 digit display you will have 7 or 8(decimal point) pins going to led's and 4 cathodes

the magic trick is to display them 1 number at a time, quick enough that you cant see them blink on and off

doing this can be direct to arduino, or you can use some shift registers
http://arduino.cc/en/Tutorial/ShiftOut

or any other million and one ways to tackle the problem, each with their advantages and disadvantages ... for instance shift registers cant provide much current so your limited to a rather dim display, especially if each number is only on for 1/4 the time

Logged


Offline Offline
Faraday Member
**
Karma: 60
Posts: 3242
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm looking into this too, and am leaning towards using SPI and the MAX72XX chip as explained in the playground.
Logged

Retired from Arduino.
PMs are set to ignore all.

Offline Offline
Newbie
*
Karma: 0
Posts: 26
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

i think the max is the most popular way i've seen (youtube) everything else has a ton of wiring i'd like to avoid !! spi,i2c anything would be great to save pins for other task.
Logged

Offline Offline
Full Member
***
Karma: 1
Posts: 135
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I did one project using Max7219 with 5 7-segment displays, with a PIC16F628A. It is easy to grasp, just follow the document.
Logged

Search for "mjkzz" on eBay :-)

Eugene, Oregon
Offline Offline
Sr. Member
****
Karma: 9
Posts: 388
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Like most LED projects, there are many ways to accomplish the same task.
If you include any possible limitations, that makes it easier to choose one method over another.

Your more common options are:
Multiplexing
Charlieplexing
Constant Current Drivers
Shift registers
Transistors.

If adding parts or complexity is a problem, then multiplexing or charlieplexing might be a good option.
If brightness is a primary concern, then mutiplexing or charliplexing are less optimal, and constant current or shift registers might be a better option.

If your LEDs are under 9ma each, and you must use shift registers, then the 74hc595 shift registers will probably be ok, if you need 20ma, you will want TPIC???? shift registers as the hc595s are limited to 70ma.

There are probably ways that I havnt even mentioned... You may want to try them all... its possible to try each way, and see what you like best.
Logged


Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 439
Posts: 23797
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

Here's one way to drive 4 displays as a standalone project.
The TPIC6B595 is a nice driver because it can also control segments that are 3-4-5 LEDs in series and powered by 12V, and can sink more than 20mA per pin continuously.
74HC595 is only good for 5V and not much current as pointed out.

Easy to send data to:
Code:
// define these in pre-setup code
byte dataArray[] = {digit0,digit1,digit2,digit3};  // data that will be displayed

byte fontArray[] = {  // fonts that make up the numbers, 1 is an On segment
B00111111, // 0        a
B00000110, // 1    f        b
B01011011, // 2        g
B01001111, // 3    e        c
B01100110, // 4        d       DP
B01101101, // 5
B01111101, // 6
B00000111, // 7
B01111111, // 8
B01101111, // 9
B00000000, // Off 0x0A
};

// data is stored in an dataArray[], update when needed then call this code:

digitalWrite(ssPin, LOW);
for (x=0; x<4; x=x+1){
SPI.transfer(dataArray[fontArray[x]]);  
}
digitalWrite(ssPin, HIGH; // data changes on this rising edge



* 4x7segmentStandalone.jpg (138.54 KB, 960x720 - viewed 33 times.)
« Last Edit: March 08, 2013, 04:23:11 pm by CrossRoads » 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.

Pages: [1]   Go Up
Jump to: