Linear Clock Using Arduino + DS1307 + Neopixel: Re-using Some Hardware.


Intro: Linear Clock Using Arduino + DS1307 + Neopixel: Re-using Some Hardware.

From previous projects I had an Arduino UNO and a Neopixel LED strip left, and wanted to make something different. Because Neopixel strip has 60 LED lights, thought to use it as a big clock.

To indicate the Hours, a red 5-LED segment is used (60 LED / 12 segments = 5 LED). The Minutes are shown with a single green LED, and the seconds using one blue LED.

I added a DS1307 Real Time Clock board in order to keep the time when the Arduino is not powered.

This is the Neopixel 60 LED strip used: and this the DS1307 board:

Initially the LED strip was planned to be hanging on the dinning room wall, but my daughters told me to attach it to a piece of wood from a pallet, so they drew the numbers and glued to the wood.

Step 1: Prototype Board.

Here you have the circuit to be implemented, and the BOM.

If you don't use the DS1307 RTC board, it will not work. The Hour and Minute will be reset when the Arduino is not powered because this board does not have an internal RTC.

The prototype board helps keeping the RTC DS1307, a couple of resistors and buttons in place.

Some soldering and cabling is needed.

The "H" button increases the hour when pushed. The "M" button increases the minute. The seconds are reset when any button is pressed.

After 6 month of continuous operation, there has been a 2 minutes delay (fairly good, in my opinion).

Step 2: Arduino UNO

I used an old Arduino clone, and some pins to connect the prototype board.

You can find the Arduino code at:

Attached the Arduino to the piece of wood using a plastic tie.

Soldered 3 cables to the Neopixel strip (caution: use some isolation tape or connector).

In this project the Arduino is powered by a standard 5V 1A USB charger.

Info for developers: the Neopixel is powered from 5V pin of the Arduino UNO because only 7 LED are On simultaneously. If you plan to turn On more LEDs (which will be perfect for more attractive displays) consider powering the Neopixel from an external 5V source. In that case, connect source GND to GND pin of the Arduino board.

Powering the Arduino connecting external and reliable power source to 5V pin is also an option.

Step 3: Attaching LED Strip to Wood.

Used 3 plastic ties to hold the strip in place. Be careful not to cover any LED.

Some sheets were glued to the wood, and painted the numbers.

Red numbers indicate the Hour. Lines are drawn every 5 LED.

Green numbers indicate the Minute. Note that the first LED indicates the first minute, and the last indicates the 60th minute.

Step 4: Future Development.

Some ideas from this project:

1.- Carve the numbers in the wood using a chisel, and paint and varnish it.

2.- Draw the Hours numbers in one side, and the Minutes numbers on the other.

3.- Use 2 LED strips back to back: one facing left for the Hours, and one facing right for the minutes.

4.- Experiment with different segments and colors: imagination is the limit (you are advised to use an external 5V power to the Neopixel strip).

5.- Show Hour and Minutes alternatively.

6.- Divide LED strip into segments and make an 7x8 LED matrix to show digital numbers & characters.

7.- Dim the light: use a LDR or photodiode to automatically dim the light.

8.- Connect to the cloud to get the time from a server.

9.- Enable an Alarm: the strip flashes when phone calls or tweets are received, or a time alarm is set.

10.-.... just let me know!

Step 5: Post-Script: 2 Strips.

I left the file "neopixel_invers_2_strips.ino" in

It is intended to control one strip to indicate hours connected to pin #6, and a second strip to indicate minutes/seconds connected to pin #7.

Both 5V DC and Ground of the strips are connected to the same source.

DISCLAIMER: couldn't test it as long as don't have 2 strips. If you test it, be kind to report bugs or confirm it works well.

Thank you.



    • Optics Contest

      Optics Contest
    • Audio Contest 2018

      Audio Contest 2018
    • Plastics Contest

      Plastics Contest

    6 Discussions


    1 year ago

    Hi Lluis Llimargas

    I was wondering how could I modify the sketch so I can use two big digit (see photo attached) to display the hours(7 more pins on arduino board). On the other hand, I'd like to keep the minutes and seconds on the neopixel strip.

    Hope I'm clear

    Thank you!


    1 reply
    Lluis LlimargasBenjaminP87

    Reply 1 year ago

    Nice Idea!. The simple way: cut the Neopixel in smaller strips (1,2,3,4, etc... LEDs in each for example) and place them as a regular 7-segments. Solder GND and 5Vdc of the strips in parallel, and connect the IN pin of each strip to a single GPIO output pin, so you need 7 GPIOs for a single 7-segments. For a 2 digit, I suggest use a TTL-level multiplexer, so only 8 GPIOs are needed, plus another GPIO for the second/minute strip.

    But you can do it better!: don't think of each mini-strip to be independent from another. Connect the mini-strips in serial, but calculate which LEDs have to be light-up for each segment, and address them individually in the code, so only 1 GPIO is needed.

    For a 60 LED Neopixel strip and two 7-segments, you can make 14 mini-strips of 4 LEDs each, all connected in serial. Do you dare? ;-D


    1 year ago

    Hi Lluis, beautiful project!
    you please kindly tell me what it would look like in the arduino code
    to use two LED strips, one for the Hours and one for the Minutes and
    I have little experience with Arduino
    Thank you

    1 reply
    Lluis Llimargasdancopy

    Reply 1 year ago

    Chek the Github repository for the file: "neopixel_invers_2_strips"

    Unfortunately I don't have 2 strips, so couldn't check if it works or not. Connect strip for Hours to pin #6 and minutes/seconds to pin #7.


    2 years ago

    I am well impressed a really novel clock keep it up


    2 years ago

    This is a cool clock! Nicely done, thank you for sharing the details :)