Minimalist LED Clock (Animated)

by TechMartian in Circuits > Clocks

778 Views, 2 Favorites, 0 Comments

Minimalist LED Clock (Animated)

IMG_20170827_124553.jpg

Tick tock, tick tock, the clock doesn't stop. It never does. It ticks through the early hours of the morning, to the late minutes of the night. Though it might be mundane, there's nothing stopping us from having some creative fun at re-imagining what a clock does. Here, I present you this minimalist LED clock that shows you time using virtual LED clock hands. The absence of moving parts contrasts with the mechanistic nature of a "clock", creating a unique decor waiting to be made by you!

This clock shows you the time by showing an animation of the LEDs to symbolize the clock hands. Clockwise for hours and anticlockwise for minutes.

Materials

IMG_20170827_112738.jpg

* Arduino

* Wires

* 12x LEDs

* 12x 100Ω resistors

Tools

* Soldering Iron and Solder

* Hot Glue Gun and Glue

Solder LEDs

IMG_20170827_114723.jpg
IMG_20170827_113324.jpg
IMG_20170827_114734.jpg

To make wiring more convenient and breadboard-less, solder a 100Ω resistor to each one of the LEDs' anode.

Arrange

IMG_20170827_115506.jpg
IMG_20170827_115836.jpg

* Poke 12 pairs of holes with an LED in a circular manner on a square sheet of foam board, we can trim the excess later.

* Arrange the LEDs in a clock like pattern on the foam boar by poking them through the holes and gluing them in place.

Solder Ground Pins

IMG_20170827_124438.jpg

Solder all the LED ground pins together.

Connect Signal Pins

IMG_20170827_124509.jpg
IMG_20170827_124523.jpg

Connect each one of the anodes to a digital pin on the Arduino board. Record the pins numbers associated with the time represented by the LEDs, as I have written on a piece of paper shown above.


.tg  {border-collapse:collapse;border-spacing:0;} .tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;} .tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;} .tg .tg-yw4l{vertical-align:top}

LED TimeArduino Pin
112
213
311
410
59
68
77
83
910
102
111
126

Code

Screen Shot 2017-08-31 at 10.26.59 PM.png

This is demo program that sets up the clock movements:

const int one = 12;
const int two = 13; const int three = 11; const int four = 10; const int five = 9; const int six = 8; const int seven = 7; const int eight = 3; const int nine = 10; const int ten = 2; const int eleven = 1; const int twelve = 6;
void setup() {
  pinMode(one, OUTPUT);
  pinMode(two, OUTPUT);
  pinMode(three, OUTPUT);
  pinMode(four, OUTPUT);
  pinMode(five, OUTPUT);
  pinMode(six, OUTPUT);
  pinMode(seven, OUTPUT);
  pinMode(eight, OUTPUT);
  pinMode(nine, OUTPUT);
  pinMode(ten, OUTPUT);
  pinMode(eleven, OUTPUT);
  pinMode(twelve, OUTPUT);
}
void loop() {
  
  if (hour() == 1)
    digitalWrite(one, HIGH);
  else if (hour() == 2)
    digitalWrite (two, HIGH);
  else if (hour() == 3)
    digitalWrite(three, HIGH);
  else if (hour() == 4)
    digitalWrite(four, HIGH);
  else if (hour() == 5)
    digitalWrite (five, HIGH);
  else if (hour() == 6)
    digitalWrite(six, HIGH);
  else if (hour() == 7)
    digitalWrite (seven, HIGH);
  else if (hour() == 8)
    digitalWrite(eight, HIGH);
  else if (hour() == 9)
    digitalWrite(nine, HIGH);   
  else if (hour() == 10)
    digitalWrite (ten, HIGH);
  else if (hour() == 11)
    digitalWrite(eleven, HIGH);
  else if (hour() == 12)
    digitalWrite(twelve, HIGH); 
delay(3000);
if (minute() == 12)
    digitalWrite(twelve, HIGH);
  else if (minute() == 11)
    digitalWrite (eleven, HIGH);
  else if (minute() == 10)
    digitalWrite(ten, HIGH);
  else if (minute() == 9)
    digitalWrite(nine, HIGH);
  else if (minute() == 8)
    digitalWrite (eight, HIGH);
  else if (minute() == 7)
    digitalWrite(seven, HIGH);
  else if (minute() == 6)
    digitalWrite (six, HIGH);
  else if (minute() == 5)
    digitalWrite(five, HIGH);
  else if (minute() == 4)
    digitalWrite(four, HIGH);   
  else if (minute() == 3)
    digitalWrite (three, HIGH);
  else if (minute() == 2)
    digitalWrite(two, HIGH);
  else if (minute() == 1)
    digitalWrite(one, HIGH); 
}
void offAll(){
  
  digitalWrite (one, LOW);
  digitalWrite (two, LOW);
  digitalWrite (three, LOW);
  digitalWrite (four, LOW);
  digitalWrite (five, LOW);
  digitalWrite (six, LOW);
  digitalWrite (seven, LOW);
  digitalWrite (eight, LOW);
  digitalWrite (nine, LOW);
  digitalWrite (ten, LOW);
  digitalWrite (eleven, LOW);
  digitalWrite (twelve, LOW);
}