Project tutorial
Minimal parts simple word clock

Minimal parts simple word clock © GPL3+

Simple word clock using 2812b leds.

  • 1,495 views
  • 0 comments
  • 2 respects

Components and supplies

Necessary tools and machines

09507 01
Soldering iron (generic)

Apps and online services

About this project

This was a project I wanted to do when I saw it on project hub, but using shift registers, external power supply and complicated wiring didn’t allow me to pursue it. When 2812b addressable LEDs became available I was able to reduce the size of the project where my Arduino could power the leds and programming could address them without shift registers.

Not having fancy equipment, ie 3d printer, printed circuit manufacturing, etc,, the masking parts are made of cardboard and the LEDs are mounted on cardboard without a printed circuit. The word plate is printed on plain paper however vellum or translucent plastic might be better. The circuit is simple and the size of the project requires no more than 7 LEDs to be on at any given time which allows The Arduino nano to power them.

First step was to print a faceplate layout. I chose to make it 7 cm by 7 cm so one LED could provide enough light for each word segment.

Second step make cardboard mask to separate face plate segments.

Layout LEDs on cardboard to fit segment mask.

Connect LEDs. The LEDs on the layout below are numbered

LED wiring

The sketch as written shows the hour segments in different colors indicating AM or PM. Also the time is adjusted to the time the sketch is run so the RTC will be correct. No effort was made to shorten code as it is easier to understand as written.

Code

wordclock2812.inoArduino
#include <Wire.h>
#include "RTClib.h"
#include <FastLED.h>
#define NUM_LEDS 22
#define DATA_PIN 7
CRGB leds[NUM_LEDS];

RTC_DS1307 rtc;


void setup () {
 
  

  Serial.begin(9600);
  if (! rtc.begin()) {
    Serial.println("Couldn't find RTC");
    while (1);
  }

  if (! rtc.isrunning()) {
    Serial.println("RTC is NOT running!");
    
  rtc.adjust(DateTime(F(__DATE__), F(__TIME__)));
    
  }

{

FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS);
}

}
void loop () {
    DateTime now = rtc.now();
   int h;
   
    Serial.print(now.hour(), DEC);
       h=(now.hour());
     if (now.minute()>34){
      h=h+1; 
     }
      
   
    Serial.print(':');
    Serial.print(now.minute(), DEC);
    leds[0] = CRGB::Yellow;
    leds[20] = CRGB::Yellow;
     FastLED.show();
    if (now.minute() <=4){
      Serial.print ("nothing");
      
        leds[1] = CRGB::Black;
        leds[2] = CRGB::Black;
        leds[3] = CRGB::Black;
        leds[4] = CRGB::Black;
        leds[5] = CRGB::Black;
        leds[6] = CRGB::Black;
        leds[7] = CRGB::Black;
         
          FastLED.show();
      }
      else if (now.minute() <=9){
      Serial.print ("five minutes past");
        leds[5] = CRGB::Red;
        leds[6] = CRGB::Red;
        leds[10] = CRGB::Red;
          FastLED.show();
      }
      else if (now.minute() <=14){
      Serial.print ("ten minutes past");
        leds[5] = CRGB::Black;
        leds[2] = CRGB::Red;
        leds[6] = CRGB::Red;
        leds[10] = CRGB::Red;
          FastLED.show();
      }
      else if (now.minute() <=19){
      Serial.print ("quarter past");
        leds[2] = CRGB::Black;
        leds[4] = CRGB::Red;
        leds[6] = CRGB::Black;
        leds[10] = CRGB::Red; 
          FastLED.show();
      }
      else if (now.minute() <=24){
      Serial.print ("twenty minutes past");
        leds[4] = CRGB::Black;
        leds[3] = CRGB::Red;
        leds[6] = CRGB::Red;
        leds[10] = CRGB::Red;
           FastLED.show(); 
      }
      else if (now.minute() <=29){
      Serial.print ("twenty-five minutes past");
      
        leds[3] = CRGB::Red;
        leds[5] = CRGB::Red;
        leds[6] = CRGB::Red;
        leds[10] = CRGB::Red; 
          FastLED.show();  
      
      
      }
      else if (now.minute() <=34){
      Serial.print ("half past");
        leds[3] = CRGB::Black;
        leds[5] = CRGB::Black;
        leds[1] = CRGB::Red;
        leds[6] = CRGB::Black;
        leds[10] = CRGB::Red; 
          FastLED.show();  
          
       
      }
      else if (now.minute() <=39){
      Serial.print ("twenty-five minutes to");
        leds[1] = CRGB::Black;
        leds[10] = CRGB::Black;
        leds[3] = CRGB::Red;
        leds[5] = CRGB::Red;
        leds[6] = CRGB::Red;
        leds[7] = CRGB::Red; 
          FastLED.show();  
      
      }
      else if (now.minute() <=44){
      Serial.print ("twenty minutes to");
        leds[4] = CRGB::Black;
        leds[5] = CRGB::Black;
        leds[3] = CRGB::Red;
        leds[6] = CRGB::Red;
        leds[7] = CRGB::Red;
           FastLED.show(); 
      }
      else if (now.minute() <=49){
      Serial.print ("quarter to");
        leds[3] = CRGB::Black;
        leds[4] = CRGB::Red;
        leds[6] = CRGB::Black;
        leds[7] = CRGB::Red; 
          FastLED.show();
      
      }
      else if (now.minute() <=54){
      Serial.print ("ten minutes to"); 
        leds[4] = CRGB::Black;
        leds[2] = CRGB::Red;
        leds[6] = CRGB::Red;
        leds[7] = CRGB::Red;
          FastLED.show();
      
        
      }
      else if (now.minute() <=59){
      Serial.print ("five minutes to"); 
        leds[2] = CRGB::Black;
        leds[5] = CRGB::Red;
        leds[6] = CRGB::Red;
        leds[7] = CRGB::Red;
          FastLED.show(); 
      }
    
 
    
    if (h==1){
      leds[21] = CRGB::Black;
      leds[9] = CRGB::Blue;
      FastLED.show();
    }
    if (h==2){
      leds[9] = CRGB::Black;
      leds[11] = CRGB::Blue;
     FastLED.show(); 
    } 
    if (h==3){
      leds[11] = CRGB::Black;
      leds[8] = CRGB::Blue;
      FastLED.show();
    } 
    if (h==4){
      leds[8] = CRGB::Black;
      leds[12] = CRGB::Red; 
      FastLED.show();
    }
      if (h==5){
      leds[12] = CRGB::Black;
      leds[13] = CRGB::Red;
      FastLED.show();
      }
    if (h==6){
      leds[13] = CRGB::Black;
      leds[16] = CRGB::Red;
     FastLED.show(); 
    }
    if (h==7){
      leds[16] = CRGB::Black;
      leds[15] = CRGB::Blue;
      FastLED.show();
    } 
    if (h==8){
      leds[15] = CRGB::Black;
      leds[14] = CRGB::Blue; 
      FastLED.show();
    }
     if (h==9){
      leds[14] = CRGB::Black;
      leds[17] = CRGB::Blue;
      FastLED.show();
      }
    if (h==10){
      leds[17] = CRGB::Black;
      leds[18] = CRGB::Blue;
     FastLED.show(); 
    }
    if (h==11){
      leds[18] = CRGB::Black;
      leds[19] = CRGB::Blue;
      FastLED.show();
    } 
    if (h==12){
      leds[19] = CRGB::Black;
      leds[21] = CRGB::Green;
     FastLED.show(); 
    } 
      
     if (h==13){
      leds[21] = CRGB::Black;
      leds[9] = CRGB::Green;
      FastLED.show();
    }
    if (h==14){
      leds[9] = CRGB::Black;
      leds[11] = CRGB::Green;
     FastLED.show(); 
    } 
    if (h==15){
      leds[11] = CRGB::Black;
      leds[8] = CRGB::Green;
      FastLED.show();
    } 
    if (h==16){
      leds[8] = CRGB::Black;
      leds[12] = CRGB::Green; 
      FastLED.show();
    }
      if (h==17){
      leds[12] = CRGB::Black;
      leds[13] = CRGB::Green;
      FastLED.show();
      }
    if (h==18){
      leds[13] = CRGB::Black;
      leds[16] = CRGB::Green;
     FastLED.show(); 
    }
    if (h==19){
      leds[16] = CRGB::Black;
      leds[15] = CRGB::Green;
      FastLED.show();
    } 
    if (h==20){
      leds[15] = CRGB::Black;
      leds[14] = CRGB::Green; 
      FastLED.show();
    }
     if (h==21){
      leds[14] = CRGB::Black;
      leds[17] = CRGB::Green;
      FastLED.show();
      }
    if (h==22){
      leds[17] = CRGB::Black;
      leds[18] = CRGB::Green;
     FastLED.show(); 
    }
    if (h==23){
      leds[18] = CRGB::Black;
      leds[19] = CRGB::Green;
      FastLED.show();
    } 
    if (h==0){
      leds[19] = CRGB::Black;
      leds[21] = CRGB::Red;
     FastLED.show(); 
    }   
      
    
      
    Serial.print(':');
    Serial.print(now.second(), DEC);
    Serial.println();
    
   
    
    Serial.println();
    delay(3000);
}

Schematics

WORDCLOCK2812
wordclock_ZiUHJtPCFm.fzz

Comments

Author

Default
garysat
  • 9 projects
  • 24 followers

Additional contributors

  • General idea and face plate layout by rakshith bk

Published on

February 29, 2020

Members who respect this project

Lewis57

and 2 others

See similar projects
you might like

Similar projects you might like

Minimal Parts OLED Word Clock

Project showcase by garysat

  • 2,137 views
  • 0 comments
  • 5 respects

Arduino Cheap Minimal Parts Digital Clock

Project showcase by garysat

  • 16,985 views
  • 38 comments
  • 33 respects

Arduino OLED Word Clock

Project showcase by garysat

  • 6,174 views
  • 1 comment
  • 12 respects

Simple Word Clock (Arduino)

Project tutorial by rakshith bk

  • 6,207 views
  • 4 comments
  • 6 respects

Simple Arduino Digital Clock Without RTC

Project in progress by Annlee Fores

  • 126,119 views
  • 32 comments
  • 113 respects

Arduino to-the-minute word clock OLED Display

Project showcase by garysat

  • 2,893 views
  • 2 comments
  • 7 respects
Add projectSign up / Login