TimeDuino- 7 Segment Arduino Clock (No shift registers needed!)

Hey all instructable goers! This is my first project. Yes, I know those words usually get the stereotype "This isn't going to be a good project" attitude, but I have been waiting a long time for a project that is worthy of possibly breaking the first project attitude- at least for a while anyway.

This project would be about medium level for a novice, but *hopefully* still provide somewhat of a challenge for more experienced users, as they get into the code and work on improving this.  "This" that I have mentioned multiple times, is an Arduino clock, based off of a 4 digit display. I have named this project the "TimeDuino". Its a simple 4 digit clock, driven with Arduino and transistors. Well, enough boring you with the introduction, lets get to the project!

Well, a few more things actually :)
1. In the spirit of instructibles and the growing DIY world, feel free to use this project, hack it, open it, tear the code apart, and in any way you want destroy/hack/DIY it to your hearts content. I want everyone to be able to access the project, and not have to worry about proper permissions. I really like the quote from MAKE: Magazine, which states "If you cant open it, you dont own it". So OWN this project! Open it, hack it, tear it apart and make it your own. Go beyond the step by step instructions and really customize it! I really enjoy electronics, and i want to share that enjoyment with others.

2. Feedback is appreciated. Tell what you do or do not like! What needs upgraded and what needs reverted to a previous version? These things (though I might not be able to complete all of them) really help and make it easier to create something that is liked by the community. Have a question? Ask it in the comments, or PM me. I'd be happy  to help as much as I can.

Many thanks, and on to the project! :)

Remove these adsRemove these ads by Signing Up
1-40 of 63Next »

Thanks so much for this Instructable! I just got into Arduino, and and looking for projects and wanted to make a clock, but still need some guidance before taking it on solo. Exactly what I needed and very well done!

akrishnan7 months ago

Can you please send block diagram to

ashanrathsara11 months ago
can you give me to this clock diagram
maewert3 years ago
Very nice clock. One rather simple update to make it more accurate would be to use the millis function which return the number of milliseconds that has passed since the Arduino began running. Millis%60000 would then give you the elapsed seconds, millis%(60*60000) would give you the elapsed minutes and millis%(12*60*60000) would give you the elapsed hours. Then you can add these elapsed times with the clock time when the arduino was turned on (this is determined when the user 'sets' the clock at power up). The only other problem is the millis clock rolls over to zero after it hits it maximum value (after about 50 days) and you could detect this and correct for it. Using this approach you wouldn't need to update counters, etc.

Just a thought.

Best Wishes.
astroboy907 (author)  maewert3 years ago
Hey- Thx for your comment :)
To be honest I completely forgot about the millis function :)
I'll start working on a version with that in it, see if I can get it to work the way you described. Also will be working on blinky colon and 24 hour time, so the next version might have all three in it.
astroboy907 (author)  astroboy9073 years ago
Ok I got the code running with millis() (it was a lot easier than I thought, I pretty much only copy pasted the example from Arduino and changed it around a bit)- working on the 50 day reset counter problem and I'm gonna let it run for a couple hours just in case :) Then I'll upload the code (I'll mention you in my 'ible too :) )
Thanks for mentioning it, it's so much easier than what I had before!
Hi Astroboy907,nice work. can you publish the newer code with the millis, also did you ever added the RTC into the clock?

No real need to mention me since you're doing all the work :-) but I do appreciate the thought!

Best Wishes,
what do i have to modify to work with common cathode display
lolooo2 years ago
very thanks for this great project .
but just I have question
Is it work with parallel Linux or processing ??
if it's not can I make this clock with parallel Linux ?

Best regards:
astroboy907 (author)  lolooo1 year ago
If the arduino IDE is available for linux distribution (which I think it is at, than yes, it is.
kshowell2 years ago
Enjoyed the build. Thanks much for the project. Good luck with school.
astroboy907 (author)  kshowell2 years ago
Thanks... its pretty accurate for the internal clock, but eventually I am going to have to get a clock chip on it... My next project is a watch (why is it that I only build clocks and time-devices?? Odd..) and I will want a clock chip on it, so I suppose I will develop this software with it... I kinda forgot about this and have not updated my stuff in a while.
aclock2 years ago
Is a good project but i search v.1.8 clock + RTC/Ds chip
Ok for singe full file code .pde or txt (for Software Arduino V.1) .
Please Link download.
astroboy907 (author)  aclock2 years ago
I have not built version 1.8 yet, as I am very busy with school. As for now I do not have the time to write it.... So sorry!! I will try this summer when I have extra time...
drbogger2 years ago
I noticed there's a bug, where after the clock cycles a few times, the hour1 digit does not turn off when it's suppose to... Any ideas on a fix?
I found a fix!

The issue seems to be with counter2

It sets counter2 = 1, but it never resets it back to 0..

I added the code to reset it here:

if(hour2counter == 25){
hour2counter = 1;
hour2 = 1;
hour1= 0;
counter2 = 0;
astroboy907 (author)  drbogger2 years ago
ok. Test and see if that works! I think it should :)
astroboy907 (author)  drbogger2 years ago
about how many cycles? I'll try to take a look through the code. Also- sorry I havnt been keeping up with this. My schedule is shot to heck with school....
astroboy907 (author) 3 years ago
Hey everyone, sorry for the delays in updating, stuff keeps on coming up, and I came down with something and am not feeling 100%. Hope to update soon though :) Sorry for any inconvenience this causes.
sorry for replaying here and thanks for this great project

sorry again but i need you immediatehelp ,, can you please tell me if it possible to replace the arduino with a microprocessor??
coz i'm working on my first hardware project and i'm requested to use a microprocessor and i like your project very much

if you have any advice or suggestions
for me i would be happy to know them

please help,,too much nerves
astroboy907 (author)  eng.enayyah3 years ago
No problem.

In short, the Arduino is a microcontroller. I think this should work, but ask if you need a microprocessor, or a microcontroller. The arduino is a microcontroller, but I am not sure if your project requires a microprocessor or microcontroller. If it can be either, you can use the arduino. If not, this project should work with a microprocessor. Depending on which one you get, there might be a difference in the code and hardware.

Robot Lover3 years ago
You should totally add a real time clock! 5* I noticed you already ordered the chip, but here is a kit that has all the components for  the clock:
astroboy907 (author)  Robot Lover3 years ago
I actually havnt ordered the chip yet :( I was meaning to but my order went crazy and the cart deleted itself. yay. so now I am putting in a new order from the place- will stick a few timers in there- btw, what timer do you think I should use? I can get the DS1307 or the 1302 timer... Thanks for the input!
If you got the kit above, it would come with the ds1307. I've never used them but this one looks pretty simple to use.
astroboy907 (author)  Robot Lover3 years ago
link is taking a while here... will check it out 2morrow
You could go to and search for it. Talk to you later! ( ;
astroboy907 (author)  Robot Lover3 years ago
sorry it took so long. ordered chip and it should be here this week. along with some other parts for various ibles...
sweet! You should post an update to this instructable!
astroboy907 (author)  Robot Lover3 years ago
I'm planning on it. Also I got parts for making a 6 digit display from this, cathode display, buttons (for some reason im missing mine), RTCs. Havnt gotten to alarm yet, but that comes after RTC
I was thinking of making one of these but for a wrist watch. Can't wait to see your finished clock!
astroboy907 (author)  Robot Lover3 years ago
Oops! Received order just now in the mail (tayda electronics)- my seconds clock is a bit larger - I guess My display was marked .56" but its really .40" or something, so my seconds display is a little large, but it should work fine. It should be a week or 2 max before i get it to work :)
I order from tayda too!
astroboy907 (author)  Robot Lover3 years ago
Nice- btw update in 1307, its coming along but Im having a hard time finding time cause of school. I think I am going to try to post an ible on how to use a DS1307 too, while im at it ;)
Yeah you should! I have never used one before so I don't really know how to interface it.
lissajous13 years ago
Hi Astroboy907,

Can you please help again? please? You sound so nice. My counter works fine but when I setup a basic 555 to feed into pin(13) pwm. It works good but it runs at same speed as if i was to inject 10 hz versus 10khz. It's weird, it's not faster or slower. Would it be something in the millis area? I can't seem to get it. : (
If you have time, you sounded very busy last time. I apologize for interrupting you. : )

Please can you help me?

astroboy907 (author)  lissajous13 years ago
Sure I can try to help (I have had absolutely no ex. with 555's but ill try to be as helpful as I can be). First of all, what are you trying to do with this? I understand its a counter, but what are the functions you want? Is it counting down by 25/50 or somthing, and if so how much time in between counts? I'm so sorry I sounded busy. It was actually just me being gone for a while and not having access to my computer (just an iPod) you didnt interrupt me at all. It sounds like you may be able to do this whole thing code only, and no 555 involved. What arduino are you using? and does it have a timing chip on it? Ill be glad to help- actually righte now ill start rewriting the code to time up and down :) shouldnt be that hard because the basic infrastructure is there...

astroboy907 (author)  astroboy9073 years ago
try dividing millis value by 10 and try that :)
Hi Astroboy907,

I tried dividing the millis value by 10 but i got some really weird results. If u could maybe help me with some code and make a very slow signal pulse generator with the arduino duemilanove that would work. Please..... Please......... : (

astroboy907 (author)  lissajous13 years ago
Hey- sorry about my really late reply but Ive been a bit busy (not too busy to help! :) )
Ok, I would be more than glad to help you with the vending machine- its would help greatly when I am writing the code to know some more about the project, if you dont mind.

1. What is this project exactly? A detailed description would be nice and super helpful

2. What do you want the code to do? I understand you want it to count up, but when exactly do you want it to count up? When a coin is detected by a sensor (and if so, what type of sensor), or on a timer.

3. What do you want the timer to trigger when it reaches a certain amount? Is there any user interaction (such as choosing what item, etc)

4.What hardware do you want on this? I understand you have a duemilanove, but any chips/sensors/servos/motors/transistors, etc would be nice to have on hand.

5. Is this any way connected to your computer while running? More so, is the computer going to send or receive text, etc from the arduino.

6. What results do you want to have when the project is finished? A step by step of what you want the machine to do would be great, an example:

I. User inserts coin into machine

II. Machine determined quantity of coin, and adds value to the counter

III. When machine has enough coin values, etc. etc.

7. What is the machine vending? is it large, like candy bars, or smaller like M&Ms?

Sorry if i have overwhelmed you a bit. I have gotten the same thing when I asked questions, and its a bit tough to come up with all the answers
1-40 of 63Next »