Comments on Alpha Clock Five

Tick Tock Clock Kits

Moderators: adafruit_support_bill, adafruit

Comments on Alpha Clock Five

Postby odometer » Sun Jan 22, 2012 12:36 pm

I originally posted this comment before actually buying and using the Alpha Clock Five. Now that I have assembled and used one, I wish to amend what I have written. My new text is in italics.

I was looking at pictures of, and information about, the Alpha Clock Five. Here is what I think:

The idea of a hackable clock of this sort, I very much like. But the implementation, I find a bit lacking.

First of all, the case. It seems rather stylish, but why are the sides of the case open? I am aware of allowing access to the inside of the case in order to attach a cable interface, but for that, you only need a hole in the case, not a complete absence of both the left and right sides! After having assembled the case, it seems that it is very solid. But it would be better if it had left and right sides and/or rubber feet.

Second, the default features. The clock is in spirit a nearly perfect reproduction of what you will find for $20 in your local department store. I believe that even the department store clocks have a dimming feature.
Windell, you were right: the display can indeed be set to be VERY bright: so much so that you could use the display itself as a night light! Not that you'd want to, necessarily, because the brightness will change when the time changes, because the number of lit segments will change.

Yes, one difference is that the Alpha Clock Five has a 24-hour mode, but it looks rather obnoxious with that "H" on the right. Perhaps that is because it was designed in America by Americans who do not know what a proper 24-hour clock looks like. (hint: no H) The default font, too, does not look so good; nine of its ten digits look exactly like 7-segment display digits. (The only difference is shortening the middle bar of the 3.)
Well really, it's a matter of taste. The default font, though plain, does appear quite legible. I went through two or three iterations before settling on a character set I was satisfied with. Most of its numerals are the same as those in the graphic I posted further down this thread. The exception is the numeral 4. I admit, Windell's "4" is much more legible than my own. In actual use, my 4 looks too much like a 1.
And the clock has no date.

Third, modifying the firmware. The firmware looks like it was written by the family dog.
Well, it works, but for me at least, the logic is not so easy to follow. If I were starting from scratch, I would have instead done this: I would keep track of what the clock is now doing (showing the time, ringing the alarm, setting the time, etc.) by means of a single state variable, and use that variable as the argument to a huge "switch" statement controlling program flow. The firmware seems to use a number of state variables to keep track of the mode, and seems organized mainly around button presses.
Just finding the part of the firmware that advances the time was hard. Or, maybe I should say parts, plural, because the parts that (1) check for the next second, (2) increment the seconds, and (3) reset 60 seconds to 0 and start a new minute are widely separated. (Try finding them yourself.) A much less forgivable flaw is in the way that the Chronodot is used to reset the Arduino's timekeeping. The Chronodot is checked at the beginning of each minute, meaning if the Chronodot has 2:09:57 when the Arduino has 2:10:00, you will see the time jump backward. Would it have been that hard to instead check the time right in the middle of the minute?
To answer my own question: No, it's not hard at all.

tl;dr version: Unless you intend to modify the software, or you want your displays super-duper-bright, or you MUST have 24-hour format, you will end up spending $145 for something [strike]no better than[/strike] mostly functionally identical to what your local Wal-Mart sells for $20.
Last edited by odometer on Wed Mar 21, 2012 11:49 pm, edited 3 times in total.
odometer
 
Posts: 97
Joined: Sun Aug 21, 2011 10:01 pm

Re: Comments on Alpha Clock Five

Postby adafruit » Sun Jan 22, 2012 7:34 pm

hi,

thanks for posting, this clock designed by evil mad scientist is something that folks seem to really like but not every kit is for everyone, that's for sure - (http://evilmadscience.com/productsmenu/tinykitlist/447). here are some of the features we like.

=========================
Open source hardware design-- easy to hack!
Open source software design-- easy to reprogram (if you want to)!
Upgradeable firmware
Based on the ATmega644A microcontroller with 64 kB of flash, with plenty of room to grow.
Comes pre-flashed with Sanguino bootloader; can be programmed through Arduino IDE (with extensions).
6-pin TTL-serial connector, can be used to display data or time sent from computer
Unused I/O pins are broken out from the microcontroller, including one ADC and 5+ GPIO
Open-frame case design gives easy access to serial connector and reset button

The Alpha Clock Five kit is open-source in both hardware and software, and is designed to be user friendly and hacker friendly. The on-board microcontroller is an ATmega644A, running a program atop the Sanguino bootloader, and can be reprogrammed through a free, modified version of the Arduino IDE. FTDI USB-TTL and AVR-ISP programming header locations are provided on the circuit board. The circuit board also features alternate mounting hole locations-- in case you're building a different case. Full documentation is available on our documentation site.
=========================

so for some these are really important and interesting features - you might want to send your feedback directly to evil science, here too:
http://evilmadscience.com/contact

windell and lenore are fantastic and they're always looking to improve their designs and welcome feedback.

cheers,
adafruit support
User avatar
adafruit
 
Posts: 10546
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Comments on Alpha Clock Five

Postby odometer » Sun Jan 22, 2012 11:24 pm

adafruit wrote:Open source software design-- easy to reprogram (if you want to)!

Ladyada, have you actually looked at the firmware yourself? You won't know whether to laugh or cry. Go ahead, take a look.
odometer
 
Posts: 97
Joined: Sun Aug 21, 2011 10:01 pm

Re: Comments on Alpha Clock Five

Postby adafruit » Mon Jan 23, 2012 9:00 am

we try to set a positive constructive tone here, if there are specific improvements you'd like to see - please share them with evil mad science, we're sure they'd like good feedback on this cool kit.

thanks!
adafruit
User avatar
adafruit
 
Posts: 10546
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: Comments on Alpha Clock Five

Postby oskay » Mon Jan 23, 2012 9:55 am

As Adafruit says, we are always interested in constructive feedback.

- The most important feature is the hackability, and ability to use it as a 5-character serial-controlled alphanumeric display. We haven't had any other reports of people having trouble with the firmware, and we have already seen several great projects that people are building by modifying the firmware. (I presume that these people must be getting help from their family dogs.) One of the reasons that the firmware is organized the way it is, is to support the very wide range of display brightness settings, which does set constraints on the amount of time spent in certain parts of the code. It goes MUCH brighter and MUCH dimmer than a $20 clock.

- Regarding the chronodot and update time: Your interpretation is not correct. The displayed time will not actually go backwards, unless you change the firmware to make it do that.

- If you don't like the standard case, you might want to consider the version without it, the Alpha Clock Five "Basic Edition". Also, the case design is open source, and you can certainly design a variant with wings if you would prefer one.

- It's a young project, and a good time for new features to be added in the coming versions. If you would like to see a date mode, or different font options, or a better way to indicate-- yes, to Americans -- that the clock is in 24 hour mode, we would be very interested to hear your suggestions-- please drop us a line, or add a note on our wiki or forums.


- Windell
oskay
 
Posts: 19
Joined: Tue Jul 31, 2007 3:03 am

Re: Comments on Alpha Clock Five

Postby macegr » Mon Jan 23, 2012 11:11 pm

I've never seen an alarm clock in a store that had an alphanumeric display. Nor have I ever seen one that included schematics and firmware to make it do whatever you want, like remember your birthday and wake you up with a confetti cannon.
User avatar
macegr
 
Posts: 285
Joined: Fri Apr 04, 2008 3:46 pm

Re: Comments on Alpha Clock Five

Postby odometer » Tue Jan 24, 2012 10:24 am

macegr wrote:like remember your birthday

No date.
odometer
 
Posts: 97
Joined: Sun Aug 21, 2011 10:01 pm

Re: Comments on Alpha Clock Five

Postby odometer » Tue Jan 24, 2012 10:44 am

oskay wrote:- Regarding the chronodot and update time: Your interpretation is not correct. The displayed time will not actually go backwards, unless you change the firmware to make it do that.


Let me just pick the relevant part of your code. I will comment on it.
Code: Select all
byte RTCgetTime()
{ // Read out time from RTC module, if present
  // send request to receive data starting at register 0

  byte status = 0;
  Wire.beginTransmission(104); // 104 is DS3231 device address
  Wire.send(0); // start at register 0
  Wire.endTransmission();
  Wire.requestFrom(104, 3); // request three bytes (seconds, minutes, hours)

To be honest, I don't understand how to do the above part myself, so there, count yourself my superior.
Code: Select all

  int seconds, minutes, hours;
  unsigned int temptime1, temptime2;
  byte updatetime = 0;

  while(Wire.available())
  {
    status = 1;
    seconds = Wire.receive(); // get seconds
    minutes = Wire.receive(); // get minutes
    hours = Wire.receive();   // get hours
  }

  // IF time is off by MORE than two seconds, then correct the displayed time.
  // Otherwise, DO NOT update the time, it may be a sampling error rather than an
  // actual offset.
  // Skip checking if minutes == 0. -- the 12:00:00 rollover is distracting,
  // UNLESS this is the first time running after reset.

Now, why would the 12:00:00 rollover be "distracting", unless the clock is being reset from (say) 12:00:00 to 11:59:57, then three seconds later it goes back to 12:00:00 ??

Code: Select all

  // if (ExtRTC) is equivalent to saying,  "if this has run before"

  if (status){
    seconds = (((seconds & 0b11110000)>>4)*10 + (seconds & 0b00001111)); // convert BCD to decimal
    minutes = (((minutes & 0b11110000)>>4)*10 + (minutes & 0b00001111)); // convert BCD to decimal
    hours = (((hours & 0b00110000)>>4)*10 + (hours & 0b00001111)); // convert BCD to decimal (assume 24 hour mode)

That will work, but I prefer: seconds-=(6*(seconds/16))
Code: Select all

    //Optional: report time::
    // Serial.print(hours); Serial.print(":"); Serial.print(minutes); Serial.print(":"); Serial.println(seconds);


    if ((minutes) && (MinNow) ){
      temptime1 = 3600*hours + 60*minutes + seconds;  // Values read from RTC
      temptime2 = 3600*HrNow + 60*MinNow + SecNow;    // Internally stored time estimate.

      if (temptime1 > temptime2)
      {
        if ((temptime1 - temptime2) > 2)
          updatetime = 1;
      }
      else
      {
        if ((temptime2 - temptime1) > 2)
          updatetime = 1;
      }


As for the above: that's what boolean OR is for.
Code: Select all
    }

    if (ExtRTC == 0)
      updatetime = 1;

    if (updatetime)
    {
      SecNow = seconds;
      MinNow = minutes;
      HrNow = hours;

    }
  }

  return status;
}

odometer
 
Posts: 97
Joined: Sun Aug 21, 2011 10:01 pm

Re: Comments on Alpha Clock Five

Postby oskay » Tue Jan 24, 2012 1:06 pm

Now, why would the 12:00:00 rollover be "distracting"
You are correct in that this comment is in error. (It will not actually be distracting.)

That will work, but I prefer: seconds-=(6*(seconds/16))
The ATmega series of microcontrollers does not include hardware division circuitry; bit manipulation is generally more efficient, and the code does not deserve your scorn.

No, we are not perfect, but there are generally reasons for the way that we do things.
oskay
 
Posts: 19
Joined: Tue Jul 31, 2007 3:03 am

Re: Comments on Alpha Clock Five

Postby macegr » Wed Jan 25, 2012 12:56 am

Well, anyway...not to say I don't complain how people have designed things sometimes, but I'm prepared to back that up by designing my own version. I'm looking forward to the new Alpha Clock that odometer will doubtless release in a couple months. :wink:
macetech LLC - http://www.macetech.com
User avatar
macegr
 
Posts: 285
Joined: Fri Apr 04, 2008 3:46 pm

Re: Comments on Alpha Clock Five

Postby odometer » Thu Jan 26, 2012 9:56 am

oskay wrote:One of the reasons that the firmware is organized the way it is, is to support the very wide range of display brightness settings, which does set constraints on the amount of time spent in certain parts of the code.


So I'm guessing that the whole program is structured around this.
Is that why you have that huge array for the font, rather than using a SWITCH statement?

- Regarding the chronodot and update time: Your interpretation is not correct. The displayed time will not actually go backwards, unless you change the firmware to make it do that.


So... if the Arduino has 12:00:00 for the time, and it asks the Chronodot "what time is it?", and the Chronodot says "it's 11:59:57", what happens?

and you can certainly design a variant with wings if you would prefer one.


I'd already have my clock my way, but for one thing: design!=fabricate

If you would like to see a date mode,


I'd put one in, if I could figure out how the "time setting" part of the code is supposed to work.
I don't see why make date separate from time. My way, I'd just have it where if you scroll more than 24 or 36 hours in one direction, the program sees what you're trying to do, and goes into date setting mode.

or a better way to indicate-- yes, to Americans -- that the clock is in 24 hour mode,


Leave the fifth character blank... or use it to indicate other information, such as the approximate seconds (a pseudo-analog "clock hand" would work). It could also be used for an (ugly) date indicator.

Here I show you some things I came up with:
Attachments
weirdnums.png
weirdnums.png (25.01 KiB) Viewed 2585 times
odometer
 
Posts: 97
Joined: Sun Aug 21, 2011 10:01 pm

Re: Comments on Alpha Clock Five

Postby odometer » Thu Mar 22, 2012 1:27 am

Well, now I actually own an Alpha Clock Five. I assembled it around March 11 or 12 (I'm not sure exactly, I don't keep a diary), and even though I haven't soldered anything in many years, I got it working.

Once I assembled it, I found myself with essentially a clone of a department-store alarm clock-- except with a big and very bright display.

I bought this clock with the intention of reprogramming it. For me, a clock with no date is incomplete. I suppose you are thinking, "If I want the date, I'll just use my cell phone or computer", but in that case, you can just use your cell phone or computer for the time as well. I have no cell phone, and I do not keep a computer in my apartment. For one who, like me, still writes letters on paper, a calendar-clock is very handy. Another thing I want my clock to do is show seconds. When cooking, it is hard to time 2 minutes or 3 minutes without a seconds indicator.

I found this clock to be difficult to reprogram for new functionality. (Many of my comments are in the first message of this thread, which I have edited since my purchase of the clock.) It took me many hours, but eventually I extended the firmware to count the days as well as the hours. I am not a flawless programmer; I found some very serious bugs in my calendar code, which I then fixed. This Web site was very helpful to me: http://www.timeanddate.com/calendar/

I was shocked that the firmware only poorly supported setting the seconds. On almost any digital clock, even one that does not show the seconds, the seconds can still be set. Typically, whenever the minutes are changed, the seconds get reset to zero. Try it. Set the clock on your microwave oven or whatever, and then count how many seconds before the minute changes. Now try it on the Alpha Clock Five, and you have about one chance in sixty of the same thing happening. In order to set the seconds on the Alpha Clock, you must send a command through the serial interface (!), and even there, the documentation is not good. You have to use what the documentation calls "Unix Time", but this is not the Unix Time in common use, unless you are in the UTC+0h timezone, as the firmware assumes UTC+0h. I would have added a "timezone select" option to the clock, but I decided it wasn't worth the effort. Instead, I programmed the clock to allow the seconds to be set in normal time-setting mode. I also programmed in a seconds hand, which moves in increments of 1/8 minute, that is, 7.5 seconds, and yes, my code does handle the half-second.

I will now share with you exactly what I have running on the clock in my apartment.
Attached is my modification of the firmware. I have changed the file extension to .txt so that I could attach it.

firmware_mod_by_odometer.txt
(56.58 KiB) Downloaded 104 times
odometer
 
Posts: 97
Joined: Sun Aug 21, 2011 10:01 pm


Return to Clocks

Who is online

Users browsing this forum: No registered users and 5 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [114]

Raspberry Pi[82]
 
FLORA[24]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[12]
Arduino[60]
 
NETduino[14]
 
BeagleBone[23]
 
Android[6]
 
XBee[10]
More Dev Boards[30]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[39]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[9]


 
Breakout Boards[35]
LCDs & Displays[49]
Components & Parts[70]
Batteries & Power[54]
EL Wire/Tape/Panel[52]
LEDs[112]
 
Wireless[16]
Cables[66]
 
Lasers[6]
Sensors/Parts[147]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[41]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[25]


 
Stickers[41]
 
Skill badges[55]
 
Books[26]
 
Circuit Playground[7]
 
Gift Certificates[4]