3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Arduino 7 segment countdown timer

Arduino 7 segment countdown timer
This project is based on a Kingbright dual 7 segment display and an Arduino Diecimila.
it counts down from 20 and lights up pin 13 LED when the timer is complete.
It uses no extra hardware which is usefull for low-cost projects.
It also features multiplexing to get the job done with only 9 pins altogether for the displays.


 
Remove these adsRemove these ads by Signing Up
 

Step 1Parts needed

For this project you will need the following:

COMPONENTS:
1. An Arduino (any kind will do)
2. A dual-7 segmant display or 2 seperate 7 segment displays.
3. 2 Resistors (the values depend on your display)
4. About 50cm of non-stranded wire

TOOLS:
1. A soldering iron and solder. (My display was SMD so i had to solder wires to it for connection)
2. A fume extractor. (I really reccomend buying or making one as they are very helpful to you)
3. A wire stripper, or you could just use scissors
« Previous StepDownload PDFView All StepsNext Step »
34 comments
Mar 19, 2012. 2:44 PMSantos46289 says:
""hi i have built this timer and loaded the programme into my arduino but it just lights up the 7 segment display and then jumbles through a load of numbers really quickly. then it stops and starts pulsing. does anybody know why. please be simple, im new to arduino:)""

I have the same Problem its to fast .... and its the same when i change it from delay(0,5) to delay(5) // int timer 100

Please help
Feb 3, 2012. 11:42 PMnickygiscool says:
hi i have built this timer and loaded the programme into my arduino but it just lights up the 7 segment display and then jumbles through a load of numbers really quickly. then it stops and starts pulsing. does anybody know why. please be simple, im new to arduino:)
Jul 26, 2010. 3:31 PMhonskie says:
where i can put this code???? on visual basic??
Jul 22, 2011. 7:45 PMtlegasse says:
No, download the arduino ide. You will need an arduino too.

arduino ide: http://www.arduino.cc/en/Main/Software

arduino: http://www.amazon.com/Arduino-UNO-board/dp/B004CG4CN4/ref=sr_1_1?ie=UTF8&qid=1311389063&sr=8-1
Jul 6, 2011. 11:46 AMRobot Lover says:
I'm sure with a little effort, the code could be shortened quite a bit. I'll give it a try!
May 23, 2011. 8:48 PMrocket_man says:
Anybody know how i would do this only with simple circuit/ ics
Apr 28, 2011. 11:25 PMjaragon says:
Cool write-up! i used a dual common anode display. for using a c.a replace the B0 to B1 and viceversa. gonna try and add to this to count starting at 99!
Oct 7, 2010. 2:35 AMFalconFour says:
You've got to add more detail to this. I'm having to make a lot of wiring guesswork here. "via resistor"? What value? I assume we're plugging these into digital pins, since there is no such thing as just Arduino "pin 6", etc...? Ground doesn't need a transistor? *shrug*...
Oct 7, 2010. 2:37 AMFalconFour says:
Also, nowhere in here states what segment is A-B-C-D-E-F-G... biggest bit of guesswork yet :(
Apr 7, 2011. 8:45 PMgranitepenguin says:
Most displays start with A on the top and then go clockwise, with G in the middle, so:

A - top
B - top right
C - bottom right
D - bottom
E - bottom left
F - top left
G - middle

You will probably need to look at the datasheet for whatever 7-segment component you have to tell what pins correspond to what segment, though.
Dec 5, 2010. 11:09 AMI Build, Therefore I Am says:
Any chance you could update the code to have 8 digits displaying hours, minutes, seconds, milliseconds and colons (:) in between each?
I have some coding experience with arduino and I'd be willing to help.
Nov 10, 2010. 7:24 PMdjlewis725 says:
Worked great for me. Nice instructable, wiring was a bit tricky though.
Oct 21, 2010. 3:15 PManonymouse197 says:
I would love to try this but do not have a two digit display - I only have a 4 digit one:

http://www.kingbrightusa.com/product.asp?catalog_name=LED&product_id=CA56-21GWA

Having only just really started electronics, I am not too sure how to wire up one of these displays, and even then it would take me some time to write the code. Can anyone give me a hand on how to wire it up?
Thanks for any help!!
Oct 17, 2010. 3:57 AMjrigvd says:
in your sketch for the countdown-timer you have made a few mistakes,

int timer = 500;
becomes
int timer = 100;

and

all the delay(0.5);

becomes

delay(5);
Sep 24, 2010. 10:02 AMjrigvd says:
my arduino won't read the code normal
Oct 27, 2009. 5:13 AMMr Jaderman says:
You know what you could do is just copy it from the Arduino IDE and then just paste on to your page here. Would GREATLY appreciate it.
 
Jul 5, 2010. 3:24 AMHeeth says:
Hi friend. This post on multiplexed Display was really very very useful but i have stuck in a problem. I want to display an temperature on the multiplexed display. I have used LM35 for temperature sensing and 7135 as ADC. Now when ADC is accessing the analog data and converting the data, my display is getting turned off. I have used timer for displaying, when the timer is overflown, its getting turned off for a while and getting turned on again. What to do friend?? Heeth
Aug 30, 2010. 12:06 AMcatprog says:
The code for converting the data is probably taking so long that you can see the delay in the timer. (if your using the Arduino IDE) in setup() ----------- Serial.begin(9600); ------ in the main code ------------- Serial.println("CONVERT START"); //Convert Code Data Serial.println("CONVERT END"); --------- Then you can use the Ardunio IDE to monitor the serial port to see what happens in the code.
Jul 5, 2010. 3:20 AMHeeth says:
Hi friend. This post on multiplexed Display was really very very useful but i have stuck in a problem. I want to display an temperature on the multiplexed display. I have used LM35 for temperature sensing and 7135 as ADC. Now when ADC is accessing the analog data and converting the data, my display is getting turned off. I have used timer for displaying, when the timer is overflown, its getting turned off for a while and getting turned on again. What to do friend?? Heeth
Jul 5, 2010. 3:15 AMHeeth says:
heyy, that was really useful for me. But i have a doubt. My multiplexed display is getting turned off for w while. I have used 7135 ADC and whenever 7135 gets data from from the source, my segments are getting turned off... What to do for that friends???
Apr 17, 2010. 10:55 AMDylan552 says:
 how do i know what resistors i need?
Feb 13, 2010. 11:57 AMTeslaling says:
You should try using PORTD instead of digitalWrite() because it will save code space and it will be faster.  Using PORTD would also fix the ghosting effect that is caused by the slower digitalWrite().
Jan 20, 2010. 7:48 AMGrumpy Mike says:
You have the current limiting resistor in the cathode. Doing this will alter the brightness of the number depending on how many segments are lit.

You can see this in your photograph the 1 is much brighter than the 9 and 8 would be dimmer still. You need to remove the cathode resistors and put a current limiting resistor in each segment's anode.
Nov 6, 2009. 4:40 AMwopwop says:
 Hi, 
Is this a Common Anode, or a Common Cathode display?
Would be great if you could post the displays model nr printed on the side.
Thanks!
Oct 28, 2009. 5:33 AMMr Jaderman says:
I tried it again. When I clicked it, I saved it as, let's say, Arduino.pde and then it would save it as Arduino.pde.tmp as a tmp file and i can't change the file type.
 
Oct 27, 2009. 4:59 AMMr Jaderman says:
I can not open your script. I've tried everything I could think of. PLEASE help!
 
Oct 27, 2009. 9:05 PMReCreate says:
How could you not open it?
Its simply a text file, Rename it to .pde.
Oct 8, 2009. 2:03 PMM4industries says:
I will rate this higher if you do one thing, EXPAND ON THIS!
Oct 5, 2009. 2:18 PMikestarm17 says:
can you explain a little better about what multiplexing is and maybe include a circuit diagram?
Oct 6, 2009. 4:15 PMikestarm17 says:
that helped a lot, thanks!

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
11
Followers
5
Author:baharini
I'm a software developer, but I also love tinkering with electronics. My Instructables are all about Arduino.