loading
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.


Step 1: Parts 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
<p>what happen if add push button? Can you show the connection and its coding?</p>
This is good but Can you make a programmable countdown with 7 segment display ?
<p>Hi, I have a question.</p><p>How is pins 9 &amp; 11 providing GND or (-) for common cathode Seven Segment Display? </p><p>I thought the outputs only supplied (+) outputs? Or has this have something to do with a potential difference across Seven Segment Display?</p>
<p>hi, it worked very well for me, but I also need that the countig only happens while I am punshing a button (for my halo assult rifle replica) I am new in arduino so I really dont know how to do it, do you think that you could help me with it?</p><p>(I am kinda desesperated, I have been looking for it for a long time and I dont understand to much how to do it, or I dont find it, please help :T )</p>
<p>Now how do I add buttons for auto and select fire mode a la colonial marines pulse rifle? ;)</p>
<p>Soo, I built it but mine are common anode (KINGBRIGHT SA52-11EWA). I pretty much reversed the entire code so that &quot;(gnd1, B1);&quot; activates that pin as a gnd-pin. The same for the pins; &quot;(pin1, B0);&quot; sets pin 1 HIGH.<br><br>Also, in each for-loop I put the &quot;gnd code lines&quot; at the top. They seemed to affect the code under it and not above it. Now it works just fine :)<br>Dont really know if this is a good or safe way of doing it but it works.<br><br></p>
<p><strong>Improvement hint</strong>: It looks like you used something like two 170 ohm resistors. Assuming this, you receive a (constant) current of about 17mA for one digit (@5V source and 2V forward voltage per LED). This current will be divided into 1 to 7 segments, depending on how many of them are turned on. That's why the number 1 illuminates much brighter than a 8 in your video. That's a really bad design for a 7-segment. Use 680 ohm resistor per segment (!) instead to receive equal brightness. You will get less than 5mA per segment, one &micro;C digital pin can sink 40mA max. More brightness can be achieved with external open-collector circuitry and smaller resistors.</p>
<p>didnt work for me, the downcounter. i'm using a kw2-502csb dual 7 segment, but the connections are more or less the same. just some random counter happens fast and after tht 00 is appearing with the fading effect. please do explain. </p>
<p>sir is there a way to pause resume and reset the timer from running?</p>
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:)
<p>I know this is late but if anyone else has this issue hears what you need to do. When you open the code in the arduino program find anywhere in the code that says delay(0.5) ; and replace it with delay(1.0) ;</p>
<p>Nicely done! May I ask, if I wanted to pause, or restart (both the use of two separate switches) how can I modify your code? </p>
Any chance you could update the code to have 8 digits displaying hours, minutes, seconds, milliseconds and colons (:) in between each? <br>I have some coding experience with arduino and I'd be willing to help.
<p>lol wouldn't that take like 5 minutes. As for the colons just use red LEDs.</p>
<p>Hello! Could you make library for this? I think it'l be very usefull.</p>
common anode or common cathode <br>
Would you be able to put a 10 key keyboard on this project to start and stop the timer with a code? My friends and I have airsoft guns and we all played Counter Strike as a kids.
hi i need to use to seven segment displays and this is great but is it possible that they could write a int or value of a sensor if so please tell me and email me the code or just post it on a comment thanks
&quot;&quot;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:)&quot;&quot;<br><br>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<br><br>Please help
The delay() command uses milliseconds.<br>To make a delay of 1 second, you would use delay(1000);<br>So, using delay(5) would make 1/200 of a second which is VERY fast.<br>Make it delay(500) for half a second.
where i can put this code???? on visual basic??
No, download the arduino ide. You will need an arduino too.<br> <br> arduino ide: http://www.arduino.cc/en/Main/Software<br> <br> arduino: http://www.amazon.com/Arduino-UNO-board/dp/B004CG4CN4/ref=sr_1_1?ie=UTF8&amp;qid=1311389063&amp;sr=8-1
I'm sure with a little effort, the code could be shortened quite a bit. I'll give it a try!
Anybody know how i would do this only with simple circuit/ ics<br>
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!
You've got to add more detail to this. I'm having to make a lot of wiring guesswork here. &quot;via resistor&quot;? What value? I assume we're plugging these into digital pins, since there is no such thing as just Arduino &quot;pin 6&quot;, etc...? Ground doesn't need a transistor? *shrug*...
Also, nowhere in here states what segment is A-B-C-D-E-F-G... biggest bit of guesswork yet :(
Most displays start with A on the top and then go clockwise, with G in the middle, so:<br><br>A - top<br>B - top right<br>C - bottom right<br>D - bottom<br>E - bottom left<br>F - top left<br>G - middle<br><br>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.
Worked great for me. Nice instructable, wiring was a bit tricky though.<br>
I would love to try this but do not have a two digit display - I only have a 4 digit one:<br> <br> <a href="http://www.kingbrightusa.com/product.asp?catalog_name=LED&product_id=CA56-21GWA">http://www.kingbrightusa.com/product.asp?catalog_name=LED&amp;product_id=CA56-21GWA</a><br> <br> 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?<br> Thanks for any help!!
in your sketch for the countdown-timer you have made a few mistakes, <br> <br>int timer = 500; <br>becomes <br>int timer = 100; <br> <br>and <br> <br>all the delay(0.5); <br> <br>becomes <br> <br>delay(5);
my arduino won't read the code normal
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.<br /> <div id="refHTML">&nbsp;</div>
I've updated the program so when you click on the icon it takes you directly to the program.
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
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(&quot;CONVERT START&quot;); //Convert Code Data Serial.println(&quot;CONVERT END&quot;); --------- Then you can use the Ardunio IDE to monitor the serial port to see what happens in the code.
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
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???
&nbsp;how do i know what resistors i need?
You should try using PORTD instead of digitalWrite() because it will save code space and it will be faster.&nbsp; Using PORTD would also fix the ghosting effect that is caused by the slower digitalWrite().
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.<br /> <br /> 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.<br />
&nbsp;Hi,&nbsp;<br /> Is this a Common Anode, or a Common Cathode display?<br /> Would be great if you could post the displays model nr printed on the side.<br /> Thanks!<br />
it's a common cathode display.<br /> The model is a KINGBRIGHT&nbsp;KCDC04-101.<br /> Sorry for the late response.<br />
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.<br /> <div id="refHTML">&nbsp;</div>
I can not open your script. I've tried everything I could think of. PLEASE help!<br /> <div id="refHTML">&nbsp;</div>
How could you not open it?<br /> Its simply a text file, Rename it to .pde.<br />
I&nbsp;will rate this higher if you do one thing, EXPAND&nbsp;ON&nbsp;THIS!
can you explain a little better about what multiplexing is and maybe include a circuit diagram?
Sure! I will add more information about it for you.
that helped a lot, thanks!

About This Instructable

118,892views

60favorites

Bio: I'm a software developer, but I also love tinkering with electronics. My Instructables are all about Arduino.
More by baharini:ATTiny45/85 LCD display control with a shift register, programmed in ArduinoControlling a character LCD with an ArduinoHow to add 6 extra pins to your Arduino with no extra hardware
Add instructable to: