Minimalistic Led Clock

7,032

147

13

About: I'm an embedded ICT student.

In this instructables, I will show you how to make a simple/minimalistic led clock.

The clock shows 3 dots.
One from the seconds (blue), one for the minutes (yellow) and one for the hours (red).

Let's get started!

Step 1: Parts

For this clock, you'll need several parts. These are:

Step 2: Schematic

This project has pretty simple wiring.

First you connect both rings after each other.

Then you connect the input of the rings to pin D9 on the arduino.

After that, you can connect the RTC to the arduino on pins A4, A5 and D2.

Step 3: Clock Overlay

I made a pretty basic layout, which fits the led rings.

I printed it on heavy paper, so the leds aren't that bright.

After you printed it, just cut out the circles and its ready to use.

Step 4: Code

In the code, I used 2 libraries.

The first one is the adafruit Neopixel library

And the second one is the RTClib

To set the time, connect the arduino to the computer and open clock.exe in clock.rar.
It will show all com ports available and ask you which port you want to use. Just type "COM0" where 0 is the number you want. The script should automatically update the time of the RTC using the time off your computer.

Step 5: Resume

That's it, now you have a simple led clock.

I hope you liked it and you are able to recreate it yourself.

Share

    Recommendations

    • Epilog X Contest

      Epilog X Contest
    • Cardboard Challenge

      Cardboard Challenge
    • Warm and Fuzzy Contest

      Warm and Fuzzy Contest

    13 Discussions

    0
    None
    aydindemir

    5 weeks ago

    I did, but after 12 or after the red LED goes off after 24, I guess there is a lack of code?

    1 reply
    0
    None
    aydindemiraydindemir

    Reply 5 weeks ago

    kod bu şekilde iyi çalışıyor

    // Date and time functions using a DS1307 RTC connected via I2C and Wire lib
    #include <Wire.h>
    #include <Adafruit_NeoPixel.h>
    #include "RTClib.h"
    #define PIN 6
    #define NUMPIXELS 60
    #define NUMPIXELS2 24
    RTC_DS1307 rtc;
    volatile char update = 1;
    unsigned char month = 0;
    unsigned char day = 0;
    unsigned char hour = 0;
    unsigned char mins = 0;
    unsigned char secs = 0;
    unsigned int year = 0;
    Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS + NUMPIXELS2, PIN, NEO_GRB + NEO_KHZ800);
    void setup () {
    Serial.begin(9600);
    pixels.begin();
    if (!rtc.begin()) {
    Serial.println("Couldn't find RTC");
    while (1);
    }
    rtc.writeSqwPinMode(SquareWave1HZ);
    if (!rtc.isrunning()) {
    Serial.println("RTC is NOT running!");
    rtc.adjust(DateTime(2016, 6, 16, 12, 00, 00 )); // First setup
    }
    Serial.print("Time:\n");
    unsigned long start = millis();
    while (!Serial.available() && (start + 2000) > millis()) {} // Wait 2 seconds to receive the setup date/time
    if ((start + 2000) > millis())
    {
    year = Serial.read();
    year <<= 8;
    while (!Serial.available()) {}
    year |= Serial.read();
    while (!Serial.available()) {}
    month = Serial.read() & 0xff;
    while (!Serial.available()) {}
    day = Serial.read() & 0xff;
    while (!Serial.available()) {}
    hour = Serial.read() & 0xff;
    while (!Serial.available()) {}
    mins = Serial.read() & 0xff;
    while (!Serial.available()) {}
    secs = Serial.read() & 0xff;
    rtc.adjust(DateTime(year, month, day, hour, mins, secs ));
    }
    pinMode(2, INPUT);
    attachInterrupt(0, Clock, RISING);
    }
    void loop () {
    if (update)
    {
    DateTime now = rtc.now();
    secs = now.second();
    mins = now.minute();
    hour = now.hour();
    hour = (hour >= 12) ? hour - 12:hour ;
    hour= hour << 1 ;
    pixels.setPixelColor(secs, pixels.Color(0, 0, 255));
    pixels.setPixelColor(mins, pixels.Color(255, 255, 0));
    pixels.setPixelColor(hour + NUMPIXELS, pixels.Color(255, 0, 0));
    pixels.show();
    pixels.setPixelColor(secs, pixels.Color(0, 0, 0));
    pixels.setPixelColor(mins, pixels.Color(0, 0, 0));
    pixels.setPixelColor(hour + NUMPIXELS, pixels.Color(0, 0, 0));
    update = 0;
    Serial.println("u"); // Debuging
    }
    }
    void Clock() {
    update = 1;
    }

    clock.jpeg
    0
    None
    avillalobos

    Question 6 months ago

    Does anyone have any pictures of the whole thing completed including the power supply, Front and back? I'd like to see the wiring of the back side of the Arduino also to see how power is supplied to the LED's.

    0
    None
    laaaubravo

    2 years ago

    Hi, really nice proyect, but I don't really understand the power supply for the clock and the Arduino. Could you explain please? can the arduino be powered by batteries?

    1 reply
    0
    None
    Laurens-Wuytslaaaubravo

    Reply 2 years ago

    As power supply for the project I used a usb wall wart.

    You can power it from a battery, but I don't think it will run for a long time. Because the leds and the arduino use quite some power.

    Laurens

    0
    None
    ndronet

    2 years ago

    Thanks for posting links on where to get the parts! That really helps.

    0
    None
    tomas75a

    2 years ago

    Cool clock! :)

    0
    None
    josh7727

    2 years ago

    Great project ,but the power source u. Used and can I used a arduino uno instead

    1 reply
    0
    None
    Laurens-Wuytsjosh7727

    Reply 2 years ago

    Yes, you can use an arduino uno.

    As power source I used a 1A USB charger, as there are only 3 led's on at the same time, which brings it to about 3*60mA = 180mA for the led's.

    If you want to have all the led's on at the same time, you should have a power supply capable of delivering 5A (84*60mA).

    Laurens

    0
    None
    sanjaykray

    2 years ago

    Great! tfs.you inspired me to make one.

    0
    None
    kcraske

    2 years ago

    I just love anything to do with time and clocks. Thanks.

    1 reply