# NeoPixel 60 Ring Wall Clock

## Overview

https://www.youtube.com/watch?v=4ZatJAPwI_4

![](https://cdn-learn.adafruit.com/assets/assets/000/015/862/medium800/led_pixels_04.jpg?1397760767)

This project uses the [DS1307 Real Time Clock](https://www.adafruit.com/products/264)&nbsp;with an Arduino to display the time as a series of colored arcs.

With the new [NeoPixel 60 Ring](http://adafruit.com/products/1768), we have a perfect display for presenting the time with RGB LEDs!

Hours are represented by red, minutes by green, seconds by blue. The arcs overlap and the colors mix. Minutes and seconds are each represented by a single green or blue LED, respectively. In the 12 hour version, a single red LED represent 24 minutes. The image above represents 3:48.

To build this project you will need:

- 4 x [NeoPixel 1/4 60 Ring](http://adafruit.com/products/1768) - so you can make a NeoPixel 60 Ring
- [DS1307 Real Time Clock breakout board kit](https://www.adafruit.com/product/3296)
- [Arduino Uno](https://www.adafruit.com/products/50),&nbsp;[Metro](https://www.adafruit.com/products/2466) or other Arduino compatible microcontroller. This will even work with the [Trinket 5V](https://www.adafruit.com/products/1501)!
- [Adafruit Perma-Proto Half-sized Breadboard PCB](https://www.adafruit.com/products/1609)

If you are new to microcontrollers and Arduino, I would recommend starting out by building the circuit using the&nbsp;[Arduino Uno](https://www.adafruit.com/products/50) and a [breadboard](https://www.adafruit.com/products/239).

If you are more familiar with Arduino, you can use a&nbsp;[Trinket 5V](https://www.adafruit.com/products/1501) and perfboard to build a more permanent electronics project.

### NeoPixel 1/4 60 Ring - 5050 RGB LED w/ Integrated Drivers

[NeoPixel 1/4 60 Ring - 5050 RGB LED w/ Integrated Drivers](https://www.adafruit.com/product/1768)
The biggest NeoPixel Ring yet! With four of these you can make a huge ring with 60 ultra bright smart LED NeoPixels are arranged in a circle with a 6.2" diameter. **Each order comes with just the quarter ring. Four of this item are required to make a large ring. You will have to...**

In Stock
[Buy Now](https://www.adafruit.com/product/1768)
[Related Guides to the Product](https://learn.adafruit.com/products/1768/guides)
![Hand holding NeoPixel Ring with 60   x 5050 RGB LED, lit up rainbow](https://cdn-shop.adafruit.com/640x480/1768-00.jpg)

### Adafruit DS1307 Real Time Clock Assembled Breakout Board

[Adafruit DS1307 Real Time Clock Assembled Breakout Board](https://www.adafruit.com/product/3296)
This is a great battery-backed real time clock (RTC) that allows your microcontroller project to keep track of time even if it is reprogrammed, or if the power is lost. Perfect for datalogging, clock-building, time stamping, timers and alarms, etc. The **DS1307** is the most...

In Stock
[Buy Now](https://www.adafruit.com/product/3296)
[Related Guides to the Product](https://learn.adafruit.com/products/3296/guides)
![Angled shot of a Adafruit DS1307 Real Time Clock Assembled Breakout Board.](https://cdn-shop.adafruit.com/640x480/3296-03.jpg)

### Adafruit Trinket M0 - for use with CircuitPython & Arduino IDE

[Adafruit Trinket M0 - for use with CircuitPython & Arduino IDE](https://www.adafruit.com/product/3500)
The&nbsp;Adafruit Trinket M0 may be small, but do not be fooled by its size! It's a tiny microcontroller board, built around the Atmel ATSAMD21, a little chip with _a lot_ of power. We wanted to design a microcontroller board that was small enough to fit into any project, and low...

In Stock
[Buy Now](https://www.adafruit.com/product/3500)
[Related Guides to the Product](https://learn.adafruit.com/products/3500/guides)
![Manicured hand holding Trinket M0.](https://cdn-shop.adafruit.com/640x480/3500-04.jpg)

# NeoPixel 60 Ring Wall Clock

## Building the Circuit

![](https://cdn-learn.adafruit.com/assets/assets/000/035/922/medium800/led_pixels_neopixelringclock_bb.png?1474572645 circuit diagram using a Trinket 5V - in reality the NeoPixel Ring should be full circle)

![](https://cdn-learn.adafruit.com/assets/assets/000/090/939/medium800/led_pixels_1768-02.jpg?1588971750 the connections between each 1/4 60 Ring should look something like this)

Solder 4 pieces of the the NeoPixel 1/4 60 Ring together, connecting GND to GND, 5V to 5V and DIN to DOUT. Butt the ends together and use a small piece of stripped wire as a 'bridge' to give some mechanical support.

![](https://cdn-learn.adafruit.com/assets/assets/000/090/940/medium800/led_pixels_1768-00.jpg?1588971813 the fully constructed NeoPixel Ring should end up looking like this)

 **Leave one pair of DIN and DOUT disconnected** - this will be where the NeoPixel strand begins and ends. The microcontroller data pin will connect to the DIN here.

**The ring is very delicate! So please mount onto a backing or use care when moving around!**

&nbsp;

NeoPixel Ring connects as follows:

- +5V → **5V** pin on Arduino or **USB** pin on Trinket (red wire)
- GND → **GND** pin on Arduino or Trinket (black wire)
- DIN → **D3** pin on Arduino or **#3** Trinket (blue wire)

DS1307 RTC connects as follows:

- +5V → **5V** on Arduino or Trinket (red wire)
- GND → **GND** on Arduino or Trinket (black wire)
- SDA → **Analog 4** on Arduino or **#0** on Trinket (green wire)&nbsp;
- SCL → **Analog 5** on Arduino or **#2** on Trinket (orange wire)&nbsp;

&nbsp;Assemble the DS1307 breakout following&nbsp;[these instructions](../../../../ds1307-real-time-clock-breakout-board-kit) if it's not pre-assembled.

# NeoPixel 60 Ring Wall Clock

## Code

Important note: when running this code, you should probably use an external power supply (say 9VDC into the Arduino). When I ran the code on USB power, the NeoPixels drew too much current and this caused the RTC to provide strange numbers to the Arduino.

[Download the code](https://github.com/andydoro/NeoPixel-60-Ring-Clock)&nbsp;and uncompress in your Arduino sketch folder.

This Arduino sketch relies on a few Arduino libraries:

- [RTClib](https://github.com/adafruit/RTClib)
- [Adafruit\_NeoPixel](https://github.com/adafruit/Adafruit_NeoPixel)
- [DST\_RTC](https://github.com/andydoro/DST_RTC)

Follow the [DS1307 RTC breakout tutorial](../../../../ds1307-real-time-clock-breakout-board-kit/overview) to learn how to install the RTC library and set the time on the DS1307 RTC.

You will also need to install the [NeoPixel library](../../../../adafruit-neopixel-uberguide/arduino-library).

The [DST\_RTC library](https://github.com/andydoro/DST_RTC) is used to keep the time accurate for Daylight Saving Time.&nbsp;

See the following tutorial to [learn how to install Arduino libraries](../../../../adafruit-all-about-arduino-libraries-install-use).

# Understanding the Code

## &nbsp;

## Brightness

The clock operates with two different brightness levels, so that it can switch to a dimmer level at nighttime. The two brightness levels are `DAYBRIGHTNESS` and `NIGHTBRIGHTNESS`. These values can be 0-255 although with 0 you won't be able to see anything.

The daytime / nighttime cutoffs are set with the `MORNINGCUTOFF` and `NIGHTCUTOFF` values, which define which hours the brightness transitions take place.

```cpp
// nighttime dimming constants
// brightness based on time of day- could try warmer colors at night?
#define DAYBRIGHTNESS 64
#define NIGHTBRIGHTNESS 20

// cutoff times for day / night brightness. feel free to modify.
#define MORNINGCUTOFF 7  // when does daybrightness begin?   7am
#define NIGHTCUTOFF 22 // when does nightbrightness begin? 10pm
```

## Start Pixel

You can define STARTPIXEL to define where the "midnight" point on the clock is. This can useful, for example, if you have the clock in [an enclosure](https://www.thingiverse.com/thing:2415199) and you're unable to physically rotate the NeoPixel Ring.

```cpp
#define STARTPIXEL 0 // where do we start on the loop? use this to shift the arcs if the wiring does not start at the "12" point
```

A value of 0 would mean the colored arcs would begin and end where the DIN wire connects from the microcontroller to the NeoPixel Ring. You can change the value from 0-59 to change where the arcs begin.

# NeoPixel 60 Ring Wall Clock

## Finishing It Up

![](https://cdn-learn.adafruit.com/assets/assets/000/015/827/medium800/led_pixels_05.jpg?1397506860)

This is the back of the clock, pictured here with the discontinued USB Boarduino. As stated before, this project works great with the&nbsp;[Trinket 5V](https://www.adafruit.com/products/1501),&nbsp;[Arduino Uno](https://www.adafruit.com/products/50),&nbsp;[Metro](https://www.adafruit.com/products/2466) or other Arduino compatible microcontroller board!

I used a spare circular piece of black plexi to hide the electronics behind, since I'm just hanging the clock near a desk.

If you want to you can create a more sophisticated enclosure for this clock. [arradan](https://www.thingiverse.com/arradan/about) created [this enclosure to 3D print](https://www.thingiverse.com/thing:2415199) on Thingiverse!

![](https://cdn-learn.adafruit.com/assets/assets/000/053/213/medium800/led_pixels_ringclock3dprint.jpg?1524590433)

![](https://cdn-learn.adafruit.com/assets/assets/000/044/328/medium800/led_pixels_c7da2202001ef3739c67954b4c9dbb31_preview_featured_%281%29.jpg?1501083053)


## Featured Products

### NeoPixel 1/4 60 Ring - 5050 RGB LED w/ Integrated Drivers

[NeoPixel 1/4 60 Ring - 5050 RGB LED w/ Integrated Drivers](https://www.adafruit.com/product/1768)
The biggest NeoPixel Ring yet! With four of these you can make a huge ring with 60 ultra bright smart LED NeoPixels are arranged in a circle with a 6.2" diameter. **Each order comes with just the quarter ring. Four of this item are required to make a large ring. You will have to...**

In Stock
[Buy Now](https://www.adafruit.com/product/1768)
[Related Guides to the Product](https://learn.adafruit.com/products/1768/guides)
### Adafruit DS1307 Real Time Clock Assembled Breakout Board

[Adafruit DS1307 Real Time Clock Assembled Breakout Board](https://www.adafruit.com/product/3296)
This is a great battery-backed real time clock (RTC) that allows your microcontroller project to keep track of time even if it is reprogrammed, or if the power is lost. Perfect for datalogging, clock-building, time stamping, timers and alarms, etc. The **DS1307** is the most...

In Stock
[Buy Now](https://www.adafruit.com/product/3296)
[Related Guides to the Product](https://learn.adafruit.com/products/3296/guides)
### Adafruit Trinket - Mini Microcontroller - 5V Logic

[Adafruit Trinket - Mini Microcontroller - 5V Logic](https://www.adafruit.com/product/1501)
 **Deprecation Warning: The Trinket bit-bang USB technique it uses doesn't work as well as it did in 2014, many modern computers won't work well. So while we still carry the Trinket so that people can maintain some older projects, we no longer recommend it.** <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/1501)
[Related Guides to the Product](https://learn.adafruit.com/products/1501/guides)
### Adafruit Perma-Proto Quarter-sized Breadboard PCB - Single

[Adafruit Perma-Proto Quarter-sized Breadboard PCB - Single](https://www.adafruit.com/product/1608)
Customers have asked us to carry basic perf-board, but we never liked the look of most basic perf: it's always crummy quality, with pads that flake off and no labeling. Then we thought about how people **actually** prototype - usually starting with a solderless breadboard and...

In Stock
[Buy Now](https://www.adafruit.com/product/1608)
[Related Guides to the Product](https://learn.adafruit.com/products/1608/guides)

## Related Guides

- [3D Printed Camera LED Ring](https://learn.adafruit.com/3d-printed-camera-led-ring.md)
- [NeoPixels on Raspberry Pi](https://learn.adafruit.com/neopixels-on-raspberry-pi.md)
- [Trinket Sound-Reactive LED Color Organ](https://learn.adafruit.com/trinket-sound-reactive-led-color-organ.md)
- [Pulse Room](https://learn.adafruit.com/pulse-room.md)
- [Mindfulness Clock OF DOOM](https://learn.adafruit.com/mindfulness-clock-of-doom.md)
- [Trinket React Counter](https://learn.adafruit.com/trinket-react-counter.md)
- [Hacking Yoto Music Players](https://learn.adafruit.com/hacking-the-yoto-music-players.md)
- [Multi-tasking the Arduino - Part 3](https://learn.adafruit.com/multi-tasking-the-arduino-part-3.md)
- [n3rfgun](https://learn.adafruit.com/n3rfgun.md)
- [CircuitPython MIDI to CV Skull](https://learn.adafruit.com/circuitpython-midi-to-cv-skull.md)
- [Guardian Robot with LEDs](https://learn.adafruit.com/guardian-robot-with-leds.md)
- [Talking Musical NeoPixel Clock with Infrared, BLE and Touch Controls](https://learn.adafruit.com/talking-musical-neo-pixel-clock-with-infrared-ble-and-touch-controls.md)
- [Tap Tempo Trinket](https://learn.adafruit.com/tap-tempo-trinket.md)
- [Trinket USB Volume Knob](https://learn.adafruit.com/trinket-usb-volume-knob.md)
- [3D Printed LED Knuckle Jewelry ](https://learn.adafruit.com/3d-printed-led-knuckle-jewelry.md)
