Home Arduino Projects Arduino Projects: Building an Arduino Countdown Timer

Arduino Projects: Building an Arduino Countdown Timer

by Tutorial45

If developing electronic components, hardware or devices has been one of your dreams, then you are in the right place. In this post, you will be introduced to a simple Arduino project using the Arduino Uno board.

This beginner project is focused on building a countdown timer using an Arduino Uno and a couple of components that will be introduced to you. The development of a countdown timer is a great way to get started and the next steps will show why.

Basic Arduino countdown timer

Parts needed

  • Arduino Uno Board – This is the microcontroller board based on the ATmega 3284.
  • Potentiometer – This is three-terminal resistors that serve as an adjustable voltage divider. The potentiometer will be used to tune the contrast of the LCD. You may need to fiddle with it a bit in order to see it display something on the screen.
  • LCD display – This is a backlight Display that shows the number on the countdown. The LCD features a 16 X 2 character display which means it can display up to sixteen characters on each of its two lines.
  • Half-size breadboard – This is the construction base that supports the components you will use throughout the project.
  • Jumper wire pack
  • Header strip

The Steps

The complete breadboard layout can be seen with the connections needed to accomplish the building of the countdown timer. The schematic diagram also helps you read the connections for the project. These diagrams have been provided to assist you with understanding which components go where and for verification purposes.  You can learn more about the wiring process for each component here.


4 pins of the LCD will be left unused. (you can find the data sheet of this LCD here)

The LCD is basically a parallel port LCD featuring 16 X 2 character display meaning we could display up to 16 characters on each of the two lines.

The following diagram will help you read connections more easily, but if you feel more comfortable with the one above, the following can still help to verify your wiring.

source: sunfounder.com

In this project, the potentiometer serves to tune the contrast of the LCD. You might need to play with it a little to see anything appearing on the screen. A common mistake is to have it totally turned down, and having the illusion the connections have not been made correctly.

You can find out more about the wiring process here.

Sketch (The code)

The code explained


The line above sets the writing head to the position 1,0 and prints tutorial45.com from that position.


This sets the writing head to the position 6,1 and prints :


This sets the writing head to the position 9,1 and prints :

The following picture perfectly illustrates what the above lines do.


The other lines in the code work with the same principle but in this case, the words become countdown numbers. The six cells will show the hours, minutes, and seconds as the timer counts down. The timer changes under set conditions determined by the multiple ‘if’ conditions you can see on the code outlined above. A delay of 1000 ms in every iteration has been given. This is due to ‘zero-second’ execution time for every other line in the loop.

The countdown timer built here starts from 23 hours, 59 minutes, and 59 seconds. It starts from this point and counts down to zero and starts over again. The starting point of the countdown timer can also be changed by inputting the value you want as H, M, and S in the sketch code. This allows you countdown from wherever you choose.

Related Posts


Alexa November 24, 2016 - 2:00 am

https://uploads.disquscdn.com/images/05804dcad884efacd980c03db87fce06a67c520605c78a68cdf7cd7ed40cb629.jpg Hi, so I plugged in all the wires and the screen shows the semi colons but no numbers at all. How do I fix this?
this is my code:
int b, a, c;
int tim = 1000;
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(4, 6, 10, 11, 12, 13);
void setup()
lcd.begin(16,2); //set up the LCD’s number of columns and rows:
void loop()

for (int h=10; h<-1; h–)
for (int m=59; m<-1; m–)
for (int s=59; s<-1; s–)
a=4;// Position for hours
b=7;// Position for minutes
c=10;// Position for seconds
if (s<10) // add a zero before the digit of second when it is lower than 10
if (m<10) // add a zero before the digit of second when it is lower than 10
if (h<10) // shift the position of hours to one position when it is lower than 10
delay(tim); //wait for 1 second


LostVox November 25, 2016 - 2:24 pm

Same here…

Andrew Vox November 24, 2016 - 11:51 am

I am having the same issue as Charlie. all of it is copied and pasted as instructed and wired but the numbers never show up but everything else does.
Please help!
Thanks : )

Andreea November 25, 2016 - 5:31 pm

Just updated the code!

Charlie_ Lee_rhee September 14, 2016 - 5:47 am

Hmm… when i edit the code to say something else( Like hello world)
It works.
only the timer isn’t working.

But i think that the code is correct too.
There are no errors….etc.

so…i have no idea what’s wrong…. 🙁

1 2 3 4 5 6

Leave a Comment

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Privacy & Cookies Policy