4-Digit 7-Segment LED Display + Arduino

377,543

127

66

Posted

Introduction: 4-Digit 7-Segment LED Display + Arduino

I recently got a 4-Digit 7-Segment LED Display from Sparkfun, and couldn't wait to use it. Here, I will show you how to wire it, and some sample programs to use with it!

Step 1: Display Info

This is the way the display works. It's multiplexed, so you select the digit by setting its pin (we'll get into pins later) HIGH, and you select the segment by setting its pin LOW. You display multiple digits at once by rapidly cycling through them.
The Pins (digits are numbered from the left):
Digit 1: 1
Digit 2: 2
Digit 3: 6
Digit 4: 8
 
Segment A: 14
Segment B: 16
Segment C: 13
Segment D: 3
Segment E: 5
Segment F: 11
Segment G: 15
 
Decimal Point: 7
 

Step 2: Wiring the Display and Button

Now, to wiring! To make it easier for you, I am going to put the Arduino pin number first, then the display's pin number.
 
1--14
2--16
3--13
4--3
5--5
6--11
7--15
8--7
9--1 (resistor)
10--2 (resistor)
11--6 (resistor)
12--8 (resistor)

If this is too confusing, say so in the comments, and I'll rewrite it.
Connect the button to Arduino pin 13 and 5V.
I used 1K resistors, but you could get away with less.
 

Step 3: Programming

I'm pretty much just putting refrence links and files here.
 
Display Datasheet

 
Timer Program (I modeled my timer after this)

 
Attatched Files:

_4segTimer: Timer program

_4digitAni1: Animations

The programs still need some tweaking/additions, so I'll be updating them once in a while.

Update History:


 

Share

    Recommendations

    • Science of Cooking

      Science of Cooking
    • Pocket-Sized Contest

      Pocket-Sized Contest
    • Microcontroller Contest

      Microcontroller Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    66 Comments

    hello again,still no success in getting the sketch to start counting.I am using a UNO v3 with a 5461A5 type readout.12 pin

    Im sure it must be something simple that is causing it to non start.

    Can you give me some idea's why I can't get the digits to start counting. I am sure i am working with the correct code, as the other code works well.but I cannot get this start counting.All my connections are correct.

    please help make an old happy !!.

    Please help

    There are only 12 pins on the display but your connecting pin 1 on the Ard to pin 14 on the display.... very confusing.

    user

    same here

    some down in the comments:

    1--10 (a)
    2--7 (b)
    3--4 (c)
    4--2 (d)
    5--1 (e)
    6--11 (f)
    7--5 (g)
    8--3 (dot)
    9--12 (resistor) (d1)
    10--9 (resistor) (d2)
    11--8 (resistor) (d3)
    12--6 (resistor) (d4)

    10 and 11 reversed for me

    Tip: If you have 12-pin segment display your scheme will be like this:

    1--10 (a)
    2--7 (b)
    3--4 (c)
    4--2 (d)
    5--1 (e)
    6--11 (f)
    7--5 (g)
    8--3 (dot)
    9--12 (resistor) (d1)
    10--9 (resistor) (d2)
    11--8 (resistor) (d3)
    12--6 (resistor) (d4)

    Used the same, except of 10 and 11, I reversed it. Using (sh)5461as panels.

    i got it working, it is a 4 digit seven segment i got from an old DSTV Decorder, and controlling it over the serial monitor

    i has download it,but cant open in arduino IDE because that file is not pde