Introduction: # Simple Arduino Digital Clock Without RTC Module

It's just a simple digital clock controlled by Arduino without using any RTC module (Real Time Clock). Every time you switch on this clock you've to set it to the present time, just like the analog clocks found in homes.

My aim is to give beginners some understanding on how to work with Arduino using only simple materials and without lots of Incomprehensible codes.


And also with that, some of my own designing. As of now designing is still in development and in my next version of this project I will try to add some features similar to this project

https://www.instructables.com/id/Cardboard-Paper-Ri...

made by my friend Vincent John

Step 1: Things Used in This Project

Hardware

1. Arduino Uno/Genuino Uno - 1

2. 16x2 LCD Display - 1

3. 10K Rotary Potentiometer - 1

4. 10K Resistor - 2

5. 220ohm Resistor - 1

6. Tactile Button Switch - 2

7. Breadboard (optional) - 1

8. Male Jumper Wires (optional)- 30

9. 12V Adapter - 1

10. Prefboard - 1

Software Used

1. Autodesk Circuits & Fritzing (Used for drawing the circuit diagrams)

2. Arduino IDE


Tools

Soldering iron and Solder (if planning to make on perf board)

Hot Glue Gun

Cardboard (I got mine from old cardboard boxes)

Step 2: Let's Start

Anyone with little experience in using a breadboard, connecting wires can make Arduino Digital Clock circuit easily.

There is nothing to worry just follow the diagram and connect using male jumper wires or you could use the perf board and solder everything.

Follow the circuit diagram

First connect all the LCD display, tactile switches, resistors, a potentiometer.

Follow the step by step diagram given above if you are having trouble connecting the circuit

Step 3: Programing

Then upload the code given below to your Arduino using Arduino IDE

/* Digital Winding Clock - Arduino Clock for beginners   
No RTC, 
Just set it to exact time using the push buttons each time you switch on the clock 
Made by Techno (sǝɹoɟ ǝǝןuuɐ) 
Feel free to modify 
*/ 
#include 
 
LiquidCrystal 
lcd(12,11,5,4,3,2); 
int h=12; 
int m; 
int s; 
int flag; 
int TIME; 
const int hs=8; 
const int ms=9; 
int state1; 
int state2; 
void setup() 
{ 
 lcd.begin(16,2); 
} 
void loop() 
{ 
lcd.setCursor(0,0); 
s=s+1; 
lcd.print("TIME:"); 
lcd.print(h); 
lcd.print(":"); 
lcd.print(m); 
lcd.print(":"); 
lcd.print(s); 
if(flag<12)lcd.print("AM"); 
if(flag==12)lcd.print("PM"); 
if(flag>12)lcd.print("PM"); 
if(flag==24)flag=0; 
delay(1000); 
lcd.clear(); 
if(s==60){ 
 s=0; 
 m=m+1; 
} 
if(m==60) 
{ 
 m=0; 
 h=h+1; 
 flag=flag+1; 
} 
if(h==13) 
{ 
 h=1; 
} 
lcd.setCursor(0,1); 
lcd.print("HAVE A NICE DAY"); 
//-------Time 
// setting-------// 
state1=digitalRead(hs); 
if(state1==1) 
{ 
 h=h+1; 
 flag=flag+1; 
 if(flag<12)lcd.print("AM"); 
 if(flag==12)lcd.print("PM"); 
 if(flag>12)lcd.print("PM"); 
 if(flag==24)flag=0; 
 if(h==13)h=1; 
} 
state2=digitalRead(ms); 
if(state2==1){ 
 s=0; 
 m=m+1; 
} 
}

Finish the connections with Arduino.
And that's it you've built your Arduino digital Clock.:)

Step 4: Testing

Now power up the Arduino either by connecting the USB cable or by using a 12v adapter.

Arduino should start and the LCD backlight should glow. Don't worry if you see nothing on the LCD. Try turning the potentiometer, you can see the texts becoming clearer. Stop turning when you've achieved your desired contrast.

The button on the right is for changing Hour and the one on left is for changing the minute according to the circuit diagram.

Step 5: One Last Thing

You can change the message displayed below the time by changing .

lcd.print("HAVE A NICE DAY");

text in the code. Change HAVE A NICE DAY to something like GOOD MORNING, GOOD EVENING or any

Save it and then re-upload it to the Arduino

Autodesk Circuit

Press simulate and then the buttons to change time

Step 6: Furthermore : Designing the Clock Body

Now that you've built the circuit on a breadboard transfer it to a prefboard so you can house everything inside a box. it wouldn't be that hard to copy everything onto a prefboard. But keep in mind do not solder the pushbuttons on the prefboard itself, using some wire extend the pushbuttons so that we can stick it outside the box

Since we have built the clock mechanism, display and all let's build a body to house all our electronics. I prefer using cardboard for making it because it's much easier to use and best of all it's bio-degradable.

Making the Box

We are going to make a box that houses all our electronics, Arduino, etc. The required dimensions of the box are 8cm (length) x 5cm(breadth) x 4cm(height)

  • Copy the template onto the cardboard either by drawing the diagram onto the cardboard or by printing the (the real box template) template given below on an A4 sheet and then sticking it onto the cardboard.
  • Cut out the template.
  • Cut out the 'x' marked rectangle so that LCD display can be seen.
  • Cut along the red line so that we can fold everything to make a box.
  • Place the electronics inside the box.
  • Fold up everything and stick them using hot glue.
  • Cut holes so that you can take pushbuttons out and stick them on the side of the box and to connect 12 v adapter to power the electronics.

Building the circles

Wondering why I chose this kind of design?

It's because I'm planning to add some more features to this clock and when I finish it, I'll let you guys know.

  • Cut out three circles

One with 75 cm radius, second one with65cm radius and another one with 55cm radius as in the template given below

  • Cut out a 7cm x 2cm rectangle exactly at the middle of every circle or you could use printed template pasted on the cardboard to cut it out.(you should get something similar to the picture 5 )
  • Paint the circles with your favorite color and also add your own designs!
  • On top of the big circle stick the medium sized circle aligning the cutout rectangle and then stick the smaller one on top of it in the same fashion.(you should get something similar to picture 6)

Well if you have access to a laser cutter use the templates to cut out the shapes. it could save you time and give precise cutouts.

Bringing it all together

Paste the Box containing all the electronics on the back of the big circle aligning the display of the LCD with our cutout rectangle.Stick them all together using hot glue gun..Glue a hook or something like that on the back of the clock so that you can hang it on your wall

  1. Power up your Clock
  2. Adjust the time using the pushbuttons
  3. Hang it on the wall!

And....... that's it!

You have made your very own Arduino Digital Clock

Step 7: FAQ

FAQ

Can we modify this project?

With Arduino there is no ending, there are many endless ways by which you can modify this project.

eg: Try to find a way to add an alarm to this clock.

Why didn't I use an RTC module?

For the sake of simplicity, I have avoided using RTC module. Most people suggested me to add an RTC module, but for beginners, I think this would be enough. If you want to build one there are many projects and tutorials available online.

P.S if your planning to build a standalone Arduino so that you can use this clock without the need for including Arduino permanently visit these links
https://www.arduino.cc/en/Main/Standalone

https://diyhacking.com/make-arduino-board-and-boot...

https://diyhacking.com/shrink-arduino-projects/

If you have any more queries post it below in the comment section.
[I will try to upload a video on construction in future updates.]

So see you all with another project

And thank you for your time.

Comments

author
Jules1050 made it! (author)2017-01-23

The case looks great, but I am not sure if the delay of 1000ms is accurate, regarding there is some time needed for the rest of the script!?

author
techno man made it! (author)techno man2017-01-25

I'll look into it

author
ElectronicaXAB3 made it! (author)2017-01-21

You should have made it with an RTC module, however it's a good tutorial for beginners and I like how you made the casing.

author
techno man made it! (author)techno man2017-01-21

^̮^

About This Instructable

5,365views

48favorites

License:

Bio: Just a simple Maker ...!
More by techno man:Deadpool Fidget SpinnerMushroom Bose CubeLeafy Fidget Spinner
Add instructable to: