4-Digit 7-Segment LED

Hi,

I desoldered this LED display from an old toy. My son has been hounding me to make it light up.

Can anyone tell me what i would need to drive this thing using an arduino? (or just point me in the right direction)

I have tried searching the numbers on the side of it, but cannot come up with an exact match.

Thanks,
Steven

threebean

Posts: 20
Joined: Thu Oct 25, 2007 10:46 am

Re: 4-Digit 7-Segment LED

Well, it's got 12 pins, so it is almost certainly a multiplexed 4digit * 8 segment (including the decimal point) display. Since you ONLY have 12 pins, it's pretty easy to figure out the wiring using a battery, a 1k resistor, and a couple of alligator clips.
Basically, "assume common anode" and connect the + side of the battery to one of the pins on display, and use the resistor and other clip to probe the other pins. You should get one of three behaviors:

1) nothing lights up. This means that the the display is actually common cathode, and you have the + clip connected to one of the cathodes. Reverse the clips on the battery and try again (you'd then be assuming common cathode, and you'll jump to step 3 since you already know a cathod.)

2) Most pins do nothing, but 4 pins light up a (same) segment in each of the 4 displays. This means that the clip is connected to that segment anode pin, and each of the 4 probed pins is the common cathode for the respective digit. Write those down on paper (pin N = cathod of digit 1, etc), this proves that the display is common cathode, and gives you one segment anode pin and all 4 cathode pins. Reverse the batter clips and put the - clip on one of your common cathodes.

3) if you have the + connected to a common anode (or the - connected to a common cathod), you should see each segment of a particular digit light up when you probe 8 of the other pins (and the 3 pins that don't do anything are the the other common anodes (or cathodes.) Mark down which pins are which segments, and which are the other "commons".

(this is easier to do than it is to describe. I wish I had Lady Ada's video skills! You should wind up with a "these pins are the +/- common for each digit, and these pins are the individual segments for each digit.) From there, it's ready to connect up to an arduino in any number of fashions; search for "multiplexed display"

westfw

Posts: 1377
Joined: Fri Apr 27, 2007 1:01 pm
Location: SF Bay area

Re: 4-Digit 7-Segment LED

Thank You - I am going to drag my stuff out and see if i can get this thing running!

Off to look up multiplexing…
threebean

Posts: 20
Joined: Thu Oct 25, 2007 10:46 am

Re: 4-Digit 7-Segment LED

This may be the pinout...

I am the Possum, and I approve of this message. Sent from MacBook Wheel Sorry for my bad German.

oPossum

Posts: 636
Joined: Fri Oct 26, 2007 12:42 am
Location: Michigan, USA

Re: 4-Digit 7-Segment LED

Thanks to you both. I did some testing and this is what i have found, provided the pins start out on the lower left and count up counter clock wise.

Pins 12, 9, 8, and 6 all take ground.
Pins 1, 2, 3, 4, 5, 7, 10, and 11 are positive.

I think this is a common cathode version?

Here it is all wired up:

threebean

Posts: 20
Joined: Thu Oct 25, 2007 10:46 am

Re: 4-Digit 7-Segment LED

Pins 12, 9, 8, and 6 all take ground.
Pins 1, 2, 3, 4, 5, 7, 10, and 11 are positive.

This means that you have the "common cathode" version of the diagram in the previous post. Just reverse each of the diodes to come up with your diagram.

Now you are ready to display some actual numbers instead of all 8's. You will need 11 (or 12 if you need decimal points) digital pins. You should use transistor drivers on the four cathodes.

In loop():
(1) All four cathodes high
(2) Desired anodes for the first digit high
(3) Cathode for first digit low
(4) Delay

Repeat for digit 2

Repeat for digit 3

Repeat for digit 4

Don
floresta

Posts: 221
Joined: Thu Jul 31, 2008 10:27 am
Location: Western New York, USA

Re: 4-Digit 7-Segment LED

So i picked up some transistors and spent some time reading about them. This article helped me quite a bit, I think i understand them a bit now.
http://www.kpsec.freeuk.com/trancirc.htm

I now have 2 of the ground pins hooked up using transistors and i can turn them off and on from the arduino (i need to get a bigger board before I get the other two hooked up):

Now, I have a question. Why use the transistor for switching the grounds when you could just allow them to run directly into the pins on the arduino?
threebean

Posts: 20
Joined: Thu Oct 25, 2007 10:46 am

Re: 4-Digit 7-Segment LED

Why use the transistor for switching the grounds when you could just allow them to run directly into the pins on the arduino?

For a nominal 20mA per segment, you can only drive one or two segments before you exceed the current that an Ardunio pin is supposed to supply (OR sink.) So you need a transistor on the common.

There are a couple of possible ways to "cheat":
• Use much less than 20mA per segment. Modern LEDs are brighter and probably don't need that much anyway.
• drive two or few segments at a time. This is just an extension of the multiplexing concept. You could start to see flicker, though.

westfw

Posts: 1377
Joined: Fri Apr 27, 2007 1:01 pm
Location: SF Bay area

Re: 4-Digit 7-Segment LED

I've just got one of these 4 digit displays from eBay and didn't understand the datasheet. Thanks for this tutorial as it was all I could find online and I now have 8.8.8.8.

I'd love to know how to get something better displayed on the segments.
gary

Posts: 1
Joined: Fri Jun 24, 2011 1:45 pm