Introduction: Logical Clock

Ola! My name is Aditya Tripathi. This instructable, as the name suggests is based on logic. Logic is involved in both the cases i.e. in making this clock and also reading the time from this clock.

Have you ever come across a situation in which you have a limited amount of LEDs and you want to make something awesome with that limited amount. Than this instructable is for you. Basically it involves 10 LEDs which are used to show time. 4 LEDs are reserved for hours and 6 LEDs are reserved for minutes. Now how does it shoes time. Each LED is numbered in the following sequence [1, 2, 4, 8 ...] therefore to read time you must add the number written below the on LEDs .

For e.g. if time is 10:05. Then for hour(here 10) Led numbered 2 And 8 will get on and for minutes(here 5) LED numbered 1 and 4 will get on. So the sum of it gives you the time. I have not ,made AM,PM feature because I was in a hurry, but you can add it using 1 more LED for AM,PM.
One more example if time is 12 AM than no LED will glow while if its 12 noon 4&8(hour LEDs) will glow (4+8=12) but all the minute LEDs will be off.

This project has a very simple circuiting . Even beginners can make this.

NOTE: Actual meaning of logical clock is different it means mechanism for capturing chronological and causal relationships in a distributed system. Distributed systems may have no physically synchronous global clock.

Advantages:

1.Daily exercise of brain.

2.Correct time keeping using a peculiar method Disadvantages:Younger kids will probably tell you that your clock is telling wrong time.

I am sorry for my bad English. Please ignore silly mistakes. And please do not forget to vote(if you like my i'ble).

Tips:

  1. Be clear with what are you building.
  2. Get knowledge on the components used.
  3. Plan your building.
  4. Use simulators(Autodesk Circuit) for your project to know the outcome of your build.
  5. Use 3d designing apps like Maya or fusion360 to make your enclosure look good.

For those who can not find the video link is here.

Step 1: Parts

Parts required are listed below:

Parts:

  1. Arduino (or any other arduino compatible board
  2. USB Cable
  3. RTC
  4. Female Connectors
  5. LEDs (10)
  6. 9v Battery
  7. Battery holder
  8. PCB
  9. Male Pins
  10. Wires for connections

Tools:

  • Soldering Iron
  • Solder Wire
  • Hot glue gun (with sticks)
  • Paint Brush
  • Pearl Colors
  • Wire Strippers(picture not given)
  • Drill (only if body is of wood)

For body I used wood and Hardboard you may use any other material.

(the big socket thing attached to my glue gun is universal converter, converts 240 to 120 V)

Step 2: Building the Body or Enclosure

For Body I chose a shape of pentagon therefore. I cutted a pair of pentagon from a piece of ply thereafter with the help of Glue gun I sticked cut out pieces of hardboard. If using wood you may need to drill holes for LEDs . Therefore advised to use cardboard. Draw lines using compass and pencil than cut them with hacksaw. For body(if pentagon shaped) you require a compass to make an angle of 108 degree at every side than with help of scale make 8 cm length side . Cut 5 pieces of 8*3 dimensions.

Step 3: Setting the RTC

It was a great help by author WWC whose i'ble about RTC helped me to set mine and program it further. You can also follow his steps if you never used an RTC before. You can either make one by following the pic or you can by the whole module(I made it).

GO here https://www.instructables.com/id/Setting-the-DS130...

What is a RTC?

A RTC is a computer clock (most often in the form of an integrated circuit) that keeps track of the current time. Although the term often refers to the devices in personal computers, servers and embedded systems, RTCs are present in almost any electronic device which needs to keep accurate time. This RTC is a module that is powered by 3v cell that lasts for approximate 9 months. That means you get correct time till 9 months. This time limit is for DS1307 ic but there are modules that can give correct time for years also. RTC connects with arduino with the pin name as SDA and SCl (Serial data and Serial clock). Pin 5 and 6 of RTC.

Problems faced by me while programming it:

  1. I didn't plugged the 3V battery
  2. Wrongly connected the SDA and SCL(pins of ic DS1307)
  3. In his code I didn't changed new line ending to new line (Command for serial monitor you can see them at the bottom right of serial monitor)
  4. I didn't plugged the VCC wire.

If you overcome these than your RTC will be programmed effortlessly .

Step 4: Testing the LEDs

You must check first that wether your LEDs are working or not by connecting them to 9V battery using 330 ohm resistors or connect them in parallel and power them with 9V battery

Step 5: Soldering

Start by soldering LEDs

  • Solder LEDs - terminal to each other (You can combine hour and minute GND)
  • Thereafter solder strands of wire to LEDs + terminal
  • Than solder Male pins to each and every wire (including the female headers used to connect RTC)

NOTE: Use PCB for Hour LEDs because they are in straight Line.

Step 6: Connections

Between Arduino and RTC:

  • SDA of the RTC to pin 4 of the Arduino.
  • SCL of the RTC to pin 5 of the Arduino

Between Arduino and LEDs:

  • Start connecting hour LEDs from Digital pin 2 to 5.
  • and minute LEDs from Digital pin 6 to 11.

Between Arduino and Battery:

  • Connect Vin of arduino to Battery's + and Gnd to -.

Step 7: Programming

The code is given below. Explanation is in the code (comments).I did not copied it because it was looking shabby without spaces. Upload the code and proceed to next step.

Step 8: Painting

Trace the pentagon on a white sheet. Cut it out. Than paint it with Pearl colors of your wish. I chose Orange (it matched with my desk).

Step 9: Drill the Hardboard

The step name is self explainatory. Drill the hardboard or ply or wood to make space for LEDs. Make the markings and drill them. Drill one hole at the rear piece of pentagon for switch.

Step 10: Stick the Coloured Cut Out

Make holes in your cut out and with the help of fevicol stick it on Hardboard or Ply or Wooden piece.

Step 11: Assembling

Start by fitting LEDs at there places in the enclosur.

  • Thereafter with the help of Hot glue gun make their places fix(Use tape to minimize disturbance caused by your hand)
  • When glue dries remove the tape.
  • Attach RTC module to the body via double sided tape or normal tape(roll it and stick it)
  • Similarly attach the Arduino.
  • Attach peices of hardboard to pentagon with the help of Glue Gun
  • Close the body by joining rear and front parts

NOTE: What is that White paper below Arduino?

It is a non conductor to prevent short circuiting in the circuit . Please place a similar sheet below arduino and RTC. I lost one arduino due to Short Circuiting.

Step 12: Testing

Switch on your clock. Start adding. And keep moving.

A riddle for the genius just to relax.

A frog is in a 30m deep well. Everyday he gathers energy to make a 3 m leap but at night he slides down 2m. Calculate the no. of days required to get out.(Reply In the comments)

With a fresh i'ble I will meet you next time, till then Sayonara;)

Comments

author
ptjj999 (author)2016-12-29

I would suggest adding some current limiting resistors to the LED's. At full current I would think the Arduino is going to suffer.

Something around 330R would provide current limiting and still provide good illumination.

author
Aditya Tripathi (author)ptjj9992017-01-07

You are right sir, the lights are very bright after the built I diffused the LEDs with sandpaper. BTW thank you sir for suggestion.

author
ptjj999 (author)Aditya Tripathi2017-01-09

Wow, Sandpapering the LED's seems a little harsh, and it doesnt limit the current the LED wants to pull out of the Arduinos I/O pins. Remember an LED at full bright will pull as much current as the source can provide, even to the point of burnout. I really suggest in future using a current limit resistor in series with your LEDs ( They and your Arduino will be much happier ).

Have a look in Instructables, there are several really good decriptions of why to use a resistor and how to calculate the optimum vale.

I must say though, this is a cool little project. Well done on what you have created.

author
Aditya Tripathi (author)ptjj9992017-01-17

Thanks! You are a nice guy.

author
Anmeet Chawla (author)2016-10-24

Not bad....☺☺

author

Was it a appreciation or you figured out something wrong if yes then pls tell me.

author

Thank you

author
JegresS (author)2016-10-22

Nice idea, but better was to start with the highest number.

author
Aditya Tripathi (author)JegresS2016-10-22

Absolutely right. Then calc. would have been easy. But the problem is CODE(a demon for many people).

author
Chitlange Sahas (author)2016-10-20

Really cool dude!

author

Thank You

About This Instructable

1,271views

15favorites

License:

Bio: I love all things related to electronics . Follow me for awesome instructables. Science lover. Chemistry hater. Arduino ,linkit one, pro mini etc. familiar with these ... More »
More by Aditya Tripathi:Go Green Powerbank W/ Speaker and LEDsLogical ClockStalker Guard
Add instructable to: