Introduction: Metric Clock: Take 2

Picture of Metric Clock: Take 2

Some of you may remember my first instructable, the binary metric clock. It was published like a month ago, but I'm too lazy to actually check. After getting an LCD, I've decided to remake a better, easier to read, easier to set, useful version. For those who are not familiar with my first metric clock, I will include a small orientation:
It works like anything does in metric, with days as the base unit.
It can show decidays, centidays, millidays, and microdays.
For reference, 864 seconds are in a milliday.
Again for reference, six in the morning is 2:5:0:000, noon in 5:0:0:000, and 6 in the evening is 7:5:0:000.

I personally believe that a metric clock would simplify time-keeping, and should be use instead of the current system. A metric clock would make sense, as opposed to what is in place now.

Changes since the first version:
Not in binary
On an LCD
Can show microdays
Can be set without a computer

Step 1: Supplies

Picture of Supplies

Here is the list of what you'll need:
1 LCD (must be compatible with Hitachi HD44780 driver)
1 10k potentiometer
2 buttons
2 10k resistors
1 Arduino (or clone)
Lots of wire
A breadboard

Step 2: Building It

Picture of Building It

The set up is pretty easy. If you take a look at the picture (created using Fritzing), the blue lines are wires, the big green thing is an LCD,  and the resistors are 10,000 ohm resistors. It is remotely self-explanatory.

Step 3: Code & Explanation

Here is the code, commented for your convenience:

/*
Metric clock
By Alec Robinson, otherwise known as alecnotalex.
Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
*/
#include <LiquidCrystal.h> //Used for writing for the LCD
int deci = 0, centi = 0, milli = 0, micro = 0; //Keep track of each of the units
int setmode = 0; //0 if user is not setting anything, 1 if user is setting decidays, 2 for centidays and so on.
int setbutton = 3, addone = 2; //Pins for buttons; setbutton changes setmode, addone changes the units the user is setting
LiquidCrystal lcd(7, 8, 9, 10, 11, 12); //Creates new lcd at pins 7-12

void setup ()
{
  lcd.begin(16, 2); //Begins the 16x2 LCD
}


void loop ()
{
  lcd.setCursor(0, 0);
  lcd.print(deci); //Prints decidays
  lcd.print(":");
  lcd.print(centi); //Prints centidays
  lcd.print(":");
  lcd.print(milli); //Prints millidays
  lcd.print(":");
  lcd.print(micro); //Prints microdays
  lcd.setCursor(0, 1);
 
  if (digitalRead(setbutton) == HIGH) //If setbutton is pressed
  {
    setmode++; //Changes the mode
    if (setmode == 4) //Resets it if the user has scrolled through all settings
    {
      setmode = 0;
      lcd.print("               "); //Clears bottom row of screen
    }
  }
 
  if (setmode > 0) //If the user is setting something
  {
    lcd.print("Setting: ");
    delay(100); //To make sure the user doesn't accidently press a button more than once when they dont mean to
  }
  else
  {
    delay(86.4); //One microday
    micro++;
    if (micro == 1000) //One milliday
    {
      milli++;
      micro = 0;
      lcd.setCursor(7, 0);
      lcd.print("     ");
      lcd.setCursor(0, 1);
    }
    if (milli == 10) //One centiday
    {
      centi++;
      milli = 0;
    }
    if (centi == 10) //One deciday
    {
      deci++;
      centi = 0;
    }
    if (deci == 10) //One day
    {
      deci = 0;
    }
  }
 
  if (setmode == 1) //When the user is setting the decidays
  {
    lcd.print("deci");
    if (digitalRead(addone) == HIGH)
    {
      deci++;
      if (deci == 10) deci = 0;
    }
  }
 
  if (setmode == 2) //The user is setting centidays
  {
    lcd.print("centi");
    if (digitalRead(addone) == HIGH)
    {
      centi++;
      if (centi == 10) centi = 0;
    }
  }
 
  if (setmode == 3) //The user is setting millidays
  {
    lcd.print("milli");
    if (digitalRead(addone) == HIGH)
    {
      milli++;
      if (milli == 10) milli = 0;
    }
  }
}
 

Step 4: Determine Metric Time, From Reguar Time

I have changed my method since last time.
Let m = minutes in regular time
Let h = hours in regular time
Let mt = metric time
(h + m/60)/24 = mt

This will return a decimal. This decimal is the metric time.

Step 5: Your Finished Product

Picture of Your Finished Product

You're finished building your fancy new time keeping device! Your glorious new piece of time-telling equipment will greatly help you figure out how much of the day has gone by, and how much is left. Although currently no societies use a metric clock,  one can still find many ways to use this device.

In the future, I have even more plans. Once I have the supplies, I plan on making it sync with the satellites, so it can be super precise. Of course, this will not be until a long time. Until then, I hope you enjoy your new clock! 

Comments

etcmn (author)2014-01-29

I write science fiction and developed a metric clock as the time standard in my stories.

Not likely to see one adopted in real life because you would have to have some way to compensate for the fact that one rotation of the Earth does not work out to a nice even number of seconds.

kpkp3030 (author)2012-05-17

how to set the time??????????

alecnotalex (author)kpkp30302012-05-17

You begin by pressing the left button until it says what you want to change. If you want to set decidays, you press it until the LCD reads "Setting: deci". Once you have that set on what you would like to change, press the right button. Pressing the right button increases the number (let's say decidays) by one, until it reaches ten when it cycles back to 0. You need to stop pressing the right button when it reaches the value that you want it to read. Repeat this process for all the values.

Hope this helped!

kpkp3030 (author)alecnotalex2012-05-22

What is the programming for the Metic clock?
decidays mean what?
centidays mean what?
millidays mean what?
microdays mean what?

alecnotalex (author)kpkp30302012-05-22

A deciday is a tenth of a day. So if five decidays have past, then you are half way through the day, or at noon. A centiday is a 100th of the day. So if 7 decidays have past, and 5 centidays, it would be three quarters of the through the day, or 18:00. A milliday is a 1000th of the day. So if 1 deciday has past, 2 centidays, and 5 millidays, it would be one eighth of the way through the day, or 3:00. Microdays work the same way, only one microday is one one-hundred millionth of a day.

kpkp3030 (author)alecnotalex2012-05-22

I don't understand what you mean. Can you explain more easily? Can you write a normal clock programming?
because i am just a primary school student: :)

About This Instructable

5,129views

15favorites

License:

Bio: I am a human being that enjoys to build things. I also say GNU/Linux instead of just Linux. Yeah, I'm that kind of ...
More by alecnotalex:TouchPass: RFID Password EntryTiltKey- Write by TiltingRFI-DJ: MP3 Playing RFID Thing
Add instructable to: