Close
0%
0%

Iris Clock

An RGB LED clock

Similar projects worth following
A clock made with a 60 LED ws2811 strip.
Frame made from MDF and hardboard.

My first primarily surface mount project.

I've been able to complete the software while I wait for the boards to arrive, so in the mean time, here is a rundown on the features I've built in:

8 modes:

  • hours/minutes/seconds (with automatic DST adjustment)
  • month/day of month
  • week/day of week
  • percent of day (per soixante really), with sunrise and sunset markers
  • phase of the moon (latitude, longitude and time zone are hardcoded into firmware)
  • spectrum (shifts one degree of hue every second)
  • solid color (shifts one degree of hue every second)
  • plasma (three random anchor points with random colour, changing every 1/2 second)

12 base colours with 5 colour harmonies:

  • base colours are red, orange, yellow, chartreuse, green, spring green, cyan, azure, blue, violet, magenta, rose (i.e. every 30 degrees of hue)
  • colour harmonies are complementary, analogous, split complementary, triadic, and tetradic
  • for all harmonies except tetradic, the markers are white, the fill colour (e.g. hour) is the base colour, and the other colours depend on the harmony.

Controlled by re-purposed Apple remote (white):

  • colour harmony is selected with select button
  • base colour is selected with the up and down buttons
  • mode is selected with left and right buttons
  • date and time are set by pressing menu button, left and right button select Y, M, D, H, M, S
  • remote can be paired and paired device ID is stored in an extra RTC register.

All of the time and ephemera calculations come courtesy of the Swfltek time library.

All of the code to drive the WS2811 strip at 8MHz is hand-crafted assembly (my first attempt at AVR assembly). It was inspired by this code which did not work properly for me (first LED was always wrong and it took 18 ms to update 60 leds intsead of 1.8 ms which caused flicker).

  • 60 × WS2812B 1 meter long strip with 60 RGB LEDs
  • 1 × DS1307 Real time clock
  • 1 × Atmega328 Microprocessors, Microcontrollers, DSPs / ARM, RISC-Based Microcontrollers
  • 1 × TSOP39338 38 kHz IR receiver
  • 1 × 3A wall wart

View all 10 components

  • The board have arrived

    Warren Janssens07/10/2014 at 20:50 0 comments

    The boards that I ordered from Dirty PCB arrived yesterday.  I ordered the parts I'm missing from Digikey today, so I should be able to complete the project this weekend.

  • Board Ordered

    Warren Janssens06/11/2014 at 23:01 0 comments

    I ordered the boards for the clock plus some additional projects that fit into 5 x 5 today from dirty pcb.

    The software is pretty much completely working as well.

    The frame is also cut and the first coat of paint is on.

    Stay tuned for some photos.

  • Board Designed

    Warren Janssens05/30/2014 at 15:50 0 comments

    I've decided that this is the project where I dive head first into surface mount.  To that end I've decided to see just how small I can make the board.  At the moment it's .65" x 1.55".  The 328 is TQFP32, the RTC is SO8, and the resistors and caps are all 805.  To save space for the ISP headers I'm going to try this board edge technique. (As I write this I wonder why I still have a through-hole crystal on the board?)

    I'm also going to try panelizing for the first time and get another design printed at the same time to make the most of the 5x5 space I have to work with (a TQFP32 AT90USB162 breakout).

    As for the software, it's mostly working on my breadboard.  I've got it driving the WS2811 strip, reading my Apple remote, and working with the RTC over i2c and using the 1Hz clock output -- all using the internal 8MHz oscillator.  The code for driving the ws2811 at 8MHz was found here.

  • LED strip arrived

    Warren Janssens05/26/2014 at 18:01 0 comments

    The LED strip I ordered off of ebay arrived today so time to start playing with that tonight.

View all 4 project logs

Enjoy this project?

Share

Discussions

Andrew Meyer wrote 07/19/2016 at 11:38 point

Hello Warren, the link to the source code just comes up with 'unknown project' - would you mind posting it again? Many thanks!

  Are you sure? yes | no

Warren Janssens wrote 07/24/2016 at 02:16 point

The source was moved here: https://github.com/thebiguno/microcontroller-projects/tree/master/projects/iris

I updated the link in the project.

I haven't worked on this in a while and that repo that I share has been pretty active so there are no guarantees that it still compiles.  But the ASM for driving the LEDs at 8Mhz is probably still pretty interesting.

  Are you sure? yes | no

mr.jb wrote 02/15/2015 at 14:58 point

I think you could use an Esp8266 + ntp making the user interface and the controler a lot simpler..  

https://github.com/cnlohr/ws2812esp8266

  Are you sure? yes | no

Warren Janssens wrote 02/16/2015 at 00:36 point

I'm not sure what's to be gained by having a wi-fi connected device.  What would you do with it that can't be done with just the MC and the RTC?  There isn't enough you can do with 60 LEDs to make it worth the added complexity of controlling it over the network.

  Are you sure? yes | no

zhangyongchao wrote 08/13/2015 at 13:34 point

Your advice is pretty good !

  Are you sure? yes | no

mr.jb wrote 08/13/2015 at 13:39 point

Especially considering this project...

https://github.com/cnlohr/esp8266ws2812i2s

  Are you sure? yes | no

zhangyongchao wrote 08/13/2015 at 14:03 point

OK ! Using Esp8266 can be simpler.But I need to learn your code !

  Are you sure? yes | no

John Lassen wrote 02/14/2015 at 06:59 point

Hi Warren,
nice Project. I've created a similar project, but I've only released a video of the Ring (-Clock) by now.
You can see it here :
https://www.youtube.com/watch?v=14hvjW1nEEU&list=UUseT9OOgEoWV0q9SJ4bwM-g

  Are you sure? yes | no

Warren Janssens wrote 02/16/2015 at 00:39 point

I just checked out your video.  Very Nice.  Your build quality seems much better than mine - what materials are you using and how did you fabricate it.  I noticed that you are using the wall to diffuse the LEDs - does that work well?  I really like the idea of using 120 LEDs instead of just 60.

  Are you sure? yes | no

DainBramage wrote 12/17/2014 at 17:31 point
Hi Warren, nice project!
I was wondering if you would consider posting the circuit diagram for this. I am thinking about building something along the same lines, but not quite the same, and I think that your circuit would give me a good place to start from.

  Are you sure? yes | no

Warren Janssens wrote 12/17/2014 at 17:41 point
I actually just removed the schematic image that I had here this morning as I noticed it was out of date. I've just posted the most recent revision. If you follow the link to the code you'll find the kicad source files.

  Are you sure? yes | no

DainBramage wrote 12/17/2014 at 18:02 point
Thank you!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates