Instructables
Picture of Bamboo digital clock
IMG_20140510_122209.jpg
IMG_20140510_122220.jpg

You need following parts for this beautiful clock:

- Arudino Mini Pro

- digital RGB LED-Stripe (1m, 60 LEDs)

- Bamboo pizza plate (32cm circumference)

- RealTimeClock Module for Arduino

- 3,3v Voltage regulator (for the RTC module)

Just stick the LED-Stripe around the pizza plate and connect the RTC and the LED-Stripe to the Arduino Mini Pro.

The hour indicator is red, the minute indicator is cyan.

You can find Information about the LED-Stripe Arduino connection at Adafruit (https://learn.adafruit.com/digital-led-strip/overview).

You can find the Arduino code here: https://dl.dropboxusercontent.com/u/2711220/Mikrocontroller%20Sourcecodes/LEDStripClock.ino

 
Remove these adsRemove these ads by Signing Up
dushu made it!5 months ago

Looks great; I had also made a similar clock some time back.

http://www.instructables.com/id/Charliexplexed-LED...

You can see version 2 of the code here:

https://github.com/dushyantahuja/LED-Clock/tree/An...

This code can be used with your clock with minor variations to adjust for the pin you have used and the type of your LED strip. The differences in code are:

1. The hour hand also grows - so if it is 6:30 - the 3 LEDs from the 6 hand half-way up to the 7 hand will light up - make it easier to "read" the time

2. Shows a rainbow every 15 minutes - just some zing

3. Have attached a bluetooth module to the RX and TX ports - so you can actually set the time, colours, brightness, etc via bluetooth. It also works as a "missed call notifier" - similar to this: http://dushyant.ahuja.ws/2013/11/physical-android-...

4. Have attached an LDR to an analog pin so that the brightness of the strips adjusts to the ambient light

IMG_0122.JPG
MacManus88 (author)  dushu5 months ago
Hi dushu,

Wow, your clock looks great, too.
The Bluetooth Module to edit the settings is a great idea. Originally i wanted to add some buttons to edit things, but I think, I'm going the bluetooth way.

Thanks for sharing your code!
dushu MacManus885 months ago
You're welcome. I'm thinking of adding a couple of touch switches - but not sure yet.
waltassault5 months ago

Hello MacManus,

I've been looking for the perfect use for my LED strip and I think this is it. Also the Bamboo Plate looks like a great piece of blank space for some artwork when the clock is all done. My question is if you can re post the link to the arduino code in the comments because it appears cut off or something and I can't get to it. I'd like to hold onto the code in case you take it down before I get around this project.

MacManus88 (author)  waltassault5 months ago
Hello waltassault, Here's the code:

// Digitale Uhr mit LED-Strip
// Pascal König, Mai 2014
// http://www.pascals-koenigreich.de/

//Für Strip
#include "LPD8806.h"
#include "SPI.h"

//Für RTC
#include "Wire.h"
#define DS1307_ADDRESS 0x68

int nLEDs = 60;

int dataPin = 4;
int clockPin = 5;

LPD8806 strip = LPD8806(nLEDs, dataPin, clockPin);

int hour_global = 0;
int minute_global = 0;
int minute_global_old = 0;

int hour_pin = 0;

void setup() {
  //RTC
  Wire.begin();
  Serial.begin(9600);
  Serial.println("Setup...");
 
  //Strip
  strip.begin();
  strip.show();
}

void loop() {
  getDate();
  Serial.print(hour_global);
  Serial.print(":");
  Serial.println(minute_global);
 
  if (hour_global == 0 | hour_global == 12 | hour_global == 24) hour_pin = 0;
  else if (hour_global == 1 | hour_global == 13) hour_pin = 5;
  else if (hour_global == 2 | hour_global == 14) hour_pin = 10;
  else if (hour_global == 3 | hour_global == 15) hour_pin = 15;
  else if (hour_global == 4 | hour_global == 16) hour_pin = 20;
  else if (hour_global == 5 | hour_global == 17) hour_pin = 25;
  else if (hour_global == 6 | hour_global == 18) hour_pin = 30;
  else if (hour_global == 7 | hour_global == 19) hour_pin = 35;
  else if (hour_global == 8 | hour_global == 20) hour_pin = 40;
  else if (hour_global == 9 | hour_global == 21) hour_pin = 45;
  else if (hour_global == 10 | hour_global == 22) hour_pin = 50;
  else if (hour_global == 11 | hour_global == 23) hour_pin = 55;
 
  hour_pin = nLEDs - hour_pin;
  minute_global = nLEDs - minute_global;
 
  for(int i=0; i<strip.numPixels(); i++) strip.setPixelColor(i, 0);
  for (int i = nLEDs-1; i > minute_global; i--) strip.setPixelColor(i, strip.Color(0, 127, 127));
  strip.setPixelColor(hour_pin-1, strip.Color(127, 0, 0));
 
  if (minute_global != minute_global_old) {
    strip.show();
    minute_global_old = minute_global;
  }
  delay(1000);
}

byte bcdToDec(byte val)  {
// Convert binary coded decimal to normal decimal numbers
  return ( (val/16*10) + (val%16) );
}

void getDate(){

  // Reset the register pointer
  Wire.beginTransmission(DS1307_ADDRESS);

  byte zero = 0x00;
  Wire.write(zero);
  Wire.endTransmission();

  Wire.requestFrom(DS1307_ADDRESS, 7);

  int second = bcdToDec(Wire.read());
  int minute = bcdToDec(Wire.read());
  int hour = bcdToDec(Wire.read() & 0b111111); //24 hour time
  int weekDay = bcdToDec(Wire.read()); //0-6 -> sunday - Saturday
  int monthDay = bcdToDec(Wire.read());
  int month = bcdToDec(Wire.read());
  int year = bcdToDec(Wire.read());

  hour_global = hour;
  minute_global = minute;
}
craftclarity5 months ago

This looks really cool! I'd love to see a step-by-step......

MacManus88 (author)  craftclarity5 months ago

Hi craftclarity.

It's really simple, you just have to glue the LED-Stripe on the bamboo plate, program the Arduino and connect everything.

But maybe i find a little bit of time in the next Weekend to write a step-by-step guide.

Greetings