Posts with «clock» label

Hex Matrix Clock is Spellbinding

Just when we think we’ve seen all possible combinations of 3D printing, microcontrollers, and pretty blinkenlights coming together to form DIY clocks, [Mukesh_Sankhla] goes and builds this geometric beauty. It’s kaleidoscopic, it’s mosaic, and it sorta resembles stained glass, but is way cheaper and easier.

The crucial part of the print does two jobs — it combines a plate full of holes for a string of addressable RGB LEDs with the light-dividing walls that turn the LEDs into triangular pixels. [Mukesh] designed digits for a clock that each use ten triangles. You’d need an ESP8266 to run the clock code, or if you’d rather sit and admire the rainbow light show unabated by the passing of time, just use an Arduino Uno or something similar.

Most of the aesthetic magic here is in the printed pieces and the FastLED library. It has a bunch of really cool animations baked in that look great with this design. Check out the demo video after the break. The audio is really quiet until the very end of the video, so be warned. In our opinion, the audio isn’t necessary to follow along with the build.

The humble clock takes many lovely forms around here, including pop art.

It’s Time for Watch Clocks to Make a Comeback

Along with all the colorful, geometric influence of Memphis design everywhere, giant wristwatch clocks were one of our favorite things about the 80s. We always wanted one, and frankly, we still do. Evidently, so did [Kothe]. But instead of some splashy Swatch-esque style, [Kothe] went the nerdy route by building a giant Casio F-91W to hang on the wall.

Not only does it look fantastic, it has the full functionality of the original from the alarm to the stopwatch to the backlit screen. Well, everything but the water resistance. The case is 3D-printed, as are the buckle and the buttons. [Kothe] might have printed the straps, but they were too big for the bed. Instead, they are made of laser-cut foam and engraved with all the details.

Inside there’s a 7″ touch display, a real-time clock module, and an Arduino Mega to make everything tick. To make each of the printed buttons work, [Kothe] cleverly extended a touch sensor module’s input pad with some copper tape. We think this could only be more awesome if it were modeled after one of Casio’s calculator watches, but that might be asking too much. Take a few seconds to watch the demo after the break.

Prefer your clocks less clock-like? Get a handle on the inner workings of this slot machine-based stunner.

Watch the Day Inch Along with a Tape Measure Clock

If we asked you to rattle off all the tools at your own personal disposal, you’d probably leave your timepieces off the list. But we say clocks are definitely tools — cool tools that come in countless forms and give meaning to endless days.

A clock form we hadn’t considered was that of an actual tool. So we were immeasurably delighted to see [scealux]’s clock made from a measuring tape. At least, the time-telling part of the clock is made from a measuring tape. The case isn’t really from a tape measure — it’s entirely printed, Bondo’d, sanded, and painted so well that it’s quite easy to mistake it for the real thing.

Tightly packed inside this piece of functional art is an Arduino Nano and a DS3231 precision RTC module, which we think is fitting for a tool-based clock. The Nano fetches the time and drives a stepper motor that just barely fits inside. There’s just enough tape wound around the printed hub to measure out the time in increments of one hour per inch. Take 1/16″ or so and watch the demo and brief walk-through video after the break.

Not all tools are sharp, and not all clocks are meant to be precise. Here’s a clock for the times that gives you the gist.

Servo-Powered 7-Segments Choreograph This Chronograph

Good clocks are generally those that keep time well. But we think the mark of a great clock is one that can lure the observer into watching time pass. It doesn’t really matter how technical a timepiece is — watching sand shimmy through an hourglass has its merits, too. But just when we were sure that there was nothing new to be done in the realm of 7-segment clocks, [thediylife] said ‘hold my beer’ and produced this beauty.

A total of 28 servos are used to independently control four displays’ worth of 3D-printed segments. The servos pivot each segment back and forth 90° between two points: upward and flat-faced to display the time when called upon, and then down on its side to rest while its not needed.

Circuit-wise, the clock’s not all that complicated, though it certainly looks like a time-consuming build. The servos are controlled by an Arduino through a pair of 16-channel servo drivers, divided up by HH and MM segments. The Arduino fetches the time from a DS1302 RTC module and splits the result up into four-digit time. Code-wise, each digit gets its own array, which stores the active and inactive positions for each servo. Demo and full explanation of the build and code are waiting after the break.

When it comes to 7-segment displays, we say the more the merrier. Here’s a clock that uses pretty much all of them.

Giant Clock Made In the Nick of Time

When [tnjyoung] was asked to build a huge lighted clock for a high school theater’s production of Cinderella with only two weeks before opening night, he probably wished for a fairy godmother of his own to show up and do it for him. But he and his team pulled it off, and it looks amazing. That medallion in the middle? It was laid out painstakingly by hand, using electrical tape.

This thing is 12 feet wide and weighs more than 500 pounds. Even so, it isn’t a permanent set piece, so it has to move up and down throughout the show on airplane cables. Now for the minutiae: there’s an Arduino Uno with built-in Wi-Fi that receives UDP commands from a phone to raise and lower the clock at the appropriate times. The ‘duino is also controlling two stepper motors, one for the hour hand and one for the minute hand.

Time is almost a minor character in the story of Cinderella, since she has to get back by midnight. Because of this, [tnjyoung] programmed a dozen or so time cues that move the steppers at various speeds to achieve different effects, like time flying by as she dances the night away with the Prince. Hour you still just sitting there? Sweep past the break to watch the build process fly by in a matter of minutes.

Got all the time in the world? Make a clock out of clocks. Clocks all the way down.

Nixie Clock Claims to be Simplest Design

[Engineer2you] built a nixie tube clock and claims it is the simplest design. We felt like that was a challenge. In this design, the tubes are set up as a matrix with optoisolators on each row and column. With 60 segments, the matrix allows you to control it all with 16 bits. There are six columns, each corresponding to a digit. That means each row has 10 lines.

The Arduino code reads the clock and produces the output to the tubes fast enough that your eye perceives each digit as being always on, even though it isn’t.

It may be semantics, but part of what makes the design simple isn’t that it is simple on its own, but that it does use a small number of dense modules. For example, the clock is a DS3231, and there is a DC step up board to generate 390V for the tubes. So instead of minimizing part count, this design really minimizes how many parts you have to connect by employing modules, including the Arduino. That’s still something, though.

It looks as though the nixie tubes used are of Soviet origin. They need no more than 170V to ignite and at least 120V to stay lit. Not a problem with a simple DC to DC converter since the current is very low — on the order of 2.5 mA or so.

We suppose one day the stock of nixie tubes will be gone. But there are still people making them. Or you can do a modern version with light pipes.

Hack a Day 15 Feb 06:00

Sequino Tells Time In The Most Satisfying Way: Sequins

You know you’ve done it. You’re walking through the store and you see those pillows covered in sequins that change color depending on which way you lay them. You swipe your fingers across the surface, for a letter, or maybe a simple drawing. Then comes the satisfying part, you swipe […]

Read more on MAKE

The post Sequino Tells Time In The Most Satisfying Way: Sequins appeared first on Make: DIY Projects and Ideas for Makers.

Tutorial – LED Real Time Clock Temperature Sensor Shield for Arduino

In this tutorial we look at how to use the neat LED Real Time Clock Temperature Sensor Shield for Arduino from PMD Way. That’s a bit of a mouthful, however the shield does offer the following:

  • four digit, seven-segment LED display
  • DS1307 real-time clock IC
  • three buttons
  • four LEDs
  • a active buzzer
  • a light-dependent resistor (LDR)
  • and a thermistor for measuring ambient temperature

The shield also arrives fully-assembled , so you can just plug it into your Arduino Uno or compatible board. Neat, beginners will love that. So let’s get started, by showing how each function can be used – then some example projects. In no particular order…

The buzzer

A high-pitched active buzzer is connected to digital pin D6 – which can be turned on and off with a simple digitalWrite() function. So let’s do that now, for example:

void setup() {
  // buzzer on digital pin 6
  pinMode(6, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(6, HIGH);   // turn the buzzer on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(6, LOW);    // turn the buzzer off by making the voltage LOW
  delay(1000);                       // wait for a second
}

If there is a white sticker over your buzzer, remove it before uploading the sketch. Now for a quick video demonstration. Turn down your volume before playback.

The LEDs

Our shield has four LEDs, as shown below:

They’re labelled D1 through to D4, with D1 on the right-hand side. They are wired to digital outputs D2, D3, D4 and D5 respectively. Again, they can be used with digitalWrite() – so let’s do that now with a quick demonstration of some blinky goodness. Our sketch turns the LEDs on and off in sequential order. You can change the delay by altering the variable x:

void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(2, OUTPUT); // LED 1
  pinMode(3, OUTPUT); // LED 2
  pinMode(4, OUTPUT); // LED 3
  pinMode(5, OUTPUT); // LED 4
}

int x = 200;

void loop() {
  digitalWrite(2, HIGH);    // turn on LED1
  delay(x);
  digitalWrite(2, LOW);    // turn off LED1. Process repeats for the other three LEDs
  digitalWrite(3, HIGH);
  delay(x);
  digitalWrite(3, LOW);
  digitalWrite(4, HIGH);
  delay(x);
  digitalWrite(4, LOW);
  digitalWrite(5, HIGH);
  delay(x);
  digitalWrite(5, LOW);
}

And in action:

The Buttons

It is now time to pay attention to the three large buttons on the bottom-left of the shield. They look imposing however are just normal buttons, and from right-to-left are connected to digital pins D9, D10 and D11:

They are, however, wired without external pull-up or pull-down resistors so when initialising them in your Arduino sketch you need to activate the digital input’s internal pull-up resistor inside the microcontroller using:

pinMode(pin, INPUT_PULLUP);

Due to this, buttons are by default HIGH when not pressed. So when you press a button, they return LOW. The following sketch demonstrates the use of the buttons by lighting LEDs when pressed:

void setup() {
  // initalise digital pins for LEDs as outputs
  pinMode(2, OUTPUT); // LED 1
  pinMode(3, OUTPUT); // LED 2
  pinMode(4, OUTPUT); // LED 3

  // initalise digital pins for buttons as inputs
  // and initialise internal pullups
  pinMode(9, INPUT_PULLUP); // button K1
  pinMode(10, INPUT_PULLUP); // button K2
  pinMode(11, INPUT_PULLUP); // button K3
}

void loop()
{
  if (digitalRead(9) == LOW)
  {
    digitalWrite(2, HIGH);
    delay(10);
    digitalWrite(2, LOW);
  }

  if (digitalRead(10) == LOW)
  {
    digitalWrite(3, HIGH);
    delay(10);
    digitalWrite(3, LOW);
  }

  if (digitalRead(11) == LOW)
  {
    digitalWrite(4, HIGH);
    delay(10);
    digitalWrite(4, LOW);
  }
}

You can see these in action via the following video:

The Numerical LED Display

Our shield has a nice red four-digit, seven-segment LED clock display. We call it a clock display as there are colon LEDs between the second and third digit, just as a digital clock would usually have:

The display is controlled by a special IC, the Titan Micro TM1636:

The TM1636 itself is an interesting part, so we’ll explain that in a separate tutorial in the near future. For now, back to the shield.

To control the LED display we need to install an Arduino library. In fact the shield needs four, so you can install them all at once now. Download the .zip file from here. Then expand that into your local download directory – it contains four library folders. You can then install them one at a time using the Arduino IDE’s Sketch > Include library > Add .zip library… command:

The supplied library offers five functions used to control the display.

.num(x);

…this displays a positive integer (whole number) between 0 and 9999.

.display(p,d);

… this shows a digit d in location p (locations from left to right are 3, 2, 1, 0)

.time(h,m)

… this is used to display time data (hours, minutes) easily. h is hours, m is minutes

.pointOn();
.pointOff();

… these turn the colon on … and off. And finally:

.clear();

… which clears the display to all off. At the start of the sketch, we need to use the library and initiate the instance of the display by inserting the following lines:

#include <TTSDisplay.h>
TTSDisplay rtcshield;

Don’t panic – the following sketch demonstrates the five functions described above:

#include <TTSDisplay.h>
TTSDisplay rtcshield;

int a = 0;
int b = 0;

void setup() {}

void loop()
{
  // display some numbers
  for (a = 4921; a < 5101; a++)
  {
    rtcshield.num(a);
    delay(10);
  }

  // clear display
  rtcshield.clear();

  // display individual digits
  for (a = 3; a >= 0; --a)
  {
    rtcshield.display(a, a);
    delay(1000);
    rtcshield.clear();
  }
  for (a = 3; a >= 0; --a)
  {
    rtcshield.display(a, a);
    delay(1000);
    rtcshield.clear();
  }

  // turn the colon and off
  for (a = 0; a < 5; a++)
  {
    rtcshield.pointOn();
    delay(500);
    rtcshield.pointOff();
    delay(500);
  }

  // demo the time display function
  rtcshield.pointOn();
  rtcshield.time(11, 57);
  delay(1000);
  rtcshield.time(11, 58);
  delay(1000);
  rtcshield.time(11, 59);
  delay(1000);
  rtcshield.time(12, 00);
  delay(1000);
}

And you can see it in action through the video below:

The LDR (Light Dependent Resistor)

LDRs are useful for giving basic light level measurements, and our shield has one connected to analog input pin A1. It’s the two-legged item with the squiggle on top as shown below:

The resistance of LDRs change with light levels – the greater the light, the less the resistance. Thus by measuring the voltage of a current through the LDR with an analog input pin – you can get a numerical value proportional to the ambient light level. And that’s just what the following sketch does:

#include <TTSDisplay.h>
TTSDisplay rtcshield;

int a = 0;

void setup() {}
void loop()
{
  // read value of analog input
  a = analogRead(A1);
  // show value on display
  rtcshield.num(a);
  delay(100);
}

The Thermistor

A thermistor is a resistor whose resistance is relative to the ambient temperature. As the temperature increases, their resistance decreases. It’s the black part to the left of the LDR in the image below:

We can use this relationship between temperature and resistance to determine the ambient temperature. To keep things simple we won’t go into the theory – instead, just show you how to get a reading.

The thermistor circuit on our shield has the output connected to analog input zero, and we can use the library installed earlier to take care of the mathematics. Which just leaves us with the functions.

At the start of the sketch, we need to use the library and initiate the instance of the thermistor by inserting the following lines:

#include <TTSTemp.h>
TTSTemp temp;

… then use the following which returns a positive integer containing the temperature (so no freezing cold environments):

.get();

For our example, we’ll get the temperature and show it on the numerical display:

#include <TTSDisplay.h>
#include <TTSTemp.h>

TTSTemp temp;
TTSDisplay rtcshield;

int a = 0;

void setup() {}

void loop() {

  a = temp.get();
  rtcshield.num(a);
  delay(500);
}

And our thermometer in action. No video this time… a nice 24 degrees C in the office:

The Real-Time Clock 

Our shield is fitted with a DS1307 real-time clock IC circuit and backup battery holder. If you insert a CR1220 battery, the RTC will remember the settings even if you remove the shield from the Arduino or if there’s a power blackout, board reset etc:

The DS1307 is incredibly popular and used in many projects and found on many inexpensive breakout boards. We have a separate tutorial on how to use the DS1307, so instead of repeating ourselves – please visit our specific DS1307 Arduino tutorial, then return when finished.

Where to from here? 

We can image there are many practical uses for this shield, which will not only improve your Arduino coding skills but also have some useful applications. An example is given below, that you can use for learning or fun.

Temperature Alarm

This projects turns the shield into a temperature monitor – you can select a lower and upper temperature, and if the temperature goes outside that range the buzzer can sound until you press it.

Here’s the sketch:

#include <TTSDisplay.h>
#include <TTSTemp.h>

TTSTemp temp;
TTSDisplay rtcshield;

boolean alarmOnOff = false;
int highTemp = 40;
int lowTemp = 10;
int currentTemp;

void LEDsoff()
{
  // function to turn all alarm high/low LEDs off
  digitalWrite(2, LOW);
  digitalWrite(4, LOW);
}

void setup() {
  // initalise digital pins for LEDs and buzzer as outputs
  pinMode(2, OUTPUT); // LED 1
  pinMode(3, OUTPUT); // LED 2
  pinMode(4, OUTPUT); // LED 3
  pinMode(5, OUTPUT); // LED 4
  pinMode(6, OUTPUT); // buzzer

  // initalise digital pins for buttons as inputs
  // and initialise internal pullups
  pinMode(9, INPUT_PULLUP); // button K1
  pinMode(10, INPUT_PULLUP); // button K2
  pinMode(11, INPUT_PULLUP); // button K3
}

void loop()
{
  // get current temperature
  currentTemp = temp.get();

  // if current temperature is within set limts
  // show temperature on display

  if (currentTemp >= lowTemp || currentTemp <= highTemp)
    // if ambient temperature is less than high boundary
    // OR if ambient temperature is grater than low boundary
    // all is well
  {
    LEDsoff(); // turn off LEDs
    rtcshield.num(currentTemp);
  }

  // if current temperature is above set high bounday, show red LED and
  // show temperature on display
  // turn on buzzer if alarm is set to on (button K3)

  if (currentTemp > highTemp)
  {
    LEDsoff(); // turn off LEDs
    digitalWrite(4, HIGH); // turn on red LED
    rtcshield.num(currentTemp);
    if (alarmOnOff == true) {
      digitalWrite(6, HIGH); // buzzer on }
    }
  }

  // if current temperature is below set lower boundary, show blue LED and
  // show temperature on display
  // turn on buzzer if alarm is set to on (button K3)

  if (currentTemp < lowTemp)
  {
    LEDsoff(); // turn off LEDs
    digitalWrite(2, HIGH); // turn on blue LED
    rtcshield.num(currentTemp);
    if (alarmOnOff == true)
    {
      digitalWrite(6, HIGH); // buzzer on }
    }
  }
  // --------turn alarm on or off-----------------------------------------------------
  if (digitalRead(11) == LOW) // turn alarm on or off
  {
    alarmOnOff = !alarmOnOff;
    if (alarmOnOff == 0) {
      digitalWrite(6, LOW); // turn off buzzer
      digitalWrite(5, LOW); // turn off alarm on LED
    }
    // if alarm is set to on, turn LED on to indicate this
    if (alarmOnOff == 1)
    {
      digitalWrite(5, HIGH);
    }
    delay(300); // software debounce
  }
  // --------set low temperature------------------------------------------------------
  if (digitalRead(10) == LOW) // set low temperature. If temp falls below this value, activate alarm
  {
    // clear display and turn on blue LED to indicate user is setting lower boundary
    rtcshield.clear();
    digitalWrite(2, HIGH); // turn on blue LED
    rtcshield.num(lowTemp);

    // user can press buttons K2 and K1 to decrease/increase lower boundary.
    // once user presses button K3, lower boundary is locked in and unit goes
    // back to normal state

    while (digitalRead(11) != LOW)
      // repeat the following code until the user presses button K3
    {
      if (digitalRead(10) == LOW) // if button K2 pressed
      {
        --lowTemp; // subtract one from lower boundary
        // display new value. If this falls below zero, won't display. You can add checks for this yourself :)
        rtcshield.num(lowTemp);
      }
      if (digitalRead(9) == LOW) // if button K3 pressed
      {
        lowTemp++; // add one to lower boundary
        // display new value. If this exceeds 9999, won't display. You can add checks for this yourself :)
        rtcshield.num(lowTemp);
      }
      delay(300); // for switch debounce
    }
    digitalWrite(2, LOW); // turn off blue LED
  }
  // --------set high temperature-----------------------------------------------------
  if (digitalRead(9) == LOW) // set high temperature. If temp exceeds this value, activate alarm
  {

    // clear display and turn on red LED to indicate user is setting lower boundary
    rtcshield.clear();
    digitalWrite(4, HIGH); // turn on red LED
    rtcshield.num(highTemp);

    // user can press buttons K2 and K1 to decrease/increase upper boundary.
    // once user presses button K3, upper boundary is locked in and unit goes
    // back to normal state

    while (digitalRead(11) != LOW)
      // repeat the following code until the user presses button K3
    {
      if (digitalRead(10) == LOW) // if button K2 pressed
      {
        --highTemp; // subtract one from upper boundary
        // display new value. If this falls below zero, won't display. You can add checks for this yourself :)
        rtcshield.num(highTemp);
      }
      if (digitalRead(9) == LOW) // if button K3 pressed
      {
        highTemp++; // add one to upper boundary
        // display new value. If this exceeds 9999, won't display. You can add checks for this yourself :)
        rtcshield.num(highTemp);
      }
      delay(300); // for switch debounce
    }
    digitalWrite(4, LOW); // turn off red LED
  }
}

Operating instructions:

  • To set lower temperature, – press button K2. Blue LED turns on. Use buttons K2 and K1 to select temperature, then press K3 to lock it in. Blue LED turns off.
  • To set upper temperature – press button K1. Red LED turns on. Use buttons K2 and K1 to select temperature, then press K3 to lock it in. Red LED turns off.
  • If temperature drops below lower or exceeds upper temperature, the blue or red LED will come on.
  • You can have the buzzer sound when the alarm activates – to do this, press K3. When the buzzer mode is on, LED D4 will be on. You can turn buzzer off after it activates by pressing K3.
  • Display will show ambient temperature during normal operation.

You can see this in action via the video below:

Conclusion

This is a fun and useful shield – especially for beginners. It offers a lot of fun and options without any difficult coding or soldering – it’s easy to find success with the shield and increase your motivation to learn more and make more.

You can be serious with a clock, or annoy people with the buzzer. And at the time of writing you can have one for US$14.95, delivered. So go forth and create something.

A little research has shown that this shield was based from a product by Seeed, who discontinued it from sale. I’d like to thank them for the library.

This post brought to you by pmdway.com – everything for makers and electronics enthusiasts, with free delivery worldwide.

To keep up to date with new posts at tronixstuff.com, please subscribe to the mailing list in the box on the right, or follow us on twitter @tronixstuff.

This clock tells time on a photochromic display

With many LED projects—like clocks—you’ll want to use a diffuser to keep light somewhat even over a wide area. Diffusers, as their name implies, diffuse light, but what if one was to instead use it as the light source itself?

This clever timepiece from Zaphunk does just that, employing an array of UV LEDs to illuminate a photochromic face. In the case of the glowing screen, the material first shines in response to the lit LEDs, then stays ‘on’ after they turn off, showing four numbers and a colon. When the photochromic cover is in use, the filament instead changes color based on the LEDs. 

The clock is implemented with an Arduino Nano, an RTC module, and a heavily modified 8-digit 7-segment display, and triggered via the press of a button on top.

This clock uses a custom built 4-digit 7-segment display made from UV LEDs. In front of the display a screen is placed that consists either of phosphorescent (“glow-in-the-dark”) or photochromic material. A push button on the top lights up the UV display which then illuminates the screen for a few seconds so that it starts glowing or changes color which then slowly fades away.

Unique Clock Keeps Time the Fibonacci Way

You say your binary clock no longer has the obfuscation level needed to earn the proper nerd street cred? Feel like you need something a little more mathematically challenging to make sure only the cool kids can tell the time? Then this Fibonacci clock might be just the thing to build.

Granted, [TecnoProfesor]’s clock is a somewhat simplified version of an earlier version that was nigh impossible to decode. But with its color coding and [Piet Mondrian]-esque grids, it’s still satisfyingly difficult to get the time from a quick glance. The area of the blocks represents the Fibonacci sequence 1, 1, 2, 3, 5, and adding up which blocks are illuminated by the RGB LEDs behind the frosted front panel. That lets you tally up to 12 intervals; for the minutes and seconds, there are indicators for the powers of 12 up to 48. Put it all together and you’ve got a unique and attractive graphical time display that’s sure to start interesting conversations when the mathematically disinclined try to use it. Check out the video below as the clock goes from 12:28:01 to 12:28:46. We think.

If this doesn’t scratch your itch for obfuscated clocks, we’ve got plenty of them. From random four-letter words to an analog digital clock to an epic epoch clock, we’ve got them all.