Go Down

Topic: Driving 7 Segment led's (Read 2876 times) previous topic - next topic


                           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


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

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



I'm looking into this too, and am leaning towards using SPI and the MAX72XX chip as explained in the playground.
Johannesburg hams call me: ZS6JMB on Highveld rep 145.7875 (-600 & 88.5 tone)
Dr Perry Cox: "Help me to help you, help me to help you...."
Your answer may already be here: https://forum.arduino.cc/index.php?topic=384198.0


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.


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


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:
Constant Current Drivers
Shift registers

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.


Mar 08, 2013, 10:21 pm Last Edit: Mar 08, 2013, 10:23 pm by CrossRoads Reason: 1
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: [Select]

// 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){
digitalWrite(ssPin, HIGH; // data changes on this rising edge

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up