Forum Index > Projects > Clock Kits
 hacking the hour hand
 |  Printable Version
By: Anonymous: rob () on Tuesday, January 19 2010 @ 01:37 PM PST (Read 5621 times)  
Anonymous: rob

in the comments for the bulbdial post there was talk of trying to modify the hour hand behavior to mimic more closely an analog clock.

has anyone looked at this? what is the limit of how many LEDs can be illuminated at once given the charlieplexing going on in the LED circuits?






       
   
By: Windell (offline) on Tuesday, January 19 2010 @ 01:56 PM PST  
Windell

The way that the program works is that it normally has six LEDs lit (quickly, in sequence) at any given moment-- this is how the fading between any two values works already. So... it's pretty straightforward to do this, in terms of programming-- the tricky part is figuring out what to do.


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: GoatRider (offline) on Tuesday, January 19 2010 @ 03:42 PM PST  
GoatRider

I've been wanted to do this too, but haven't gotten around to it yet. Too much work programming to do leaves my programming brain too tired to tackle it.


Forum Henchperson
Henchperson

Status: offline

Registered: 01/12/07
Posts: 25

Profile Email    
   
By: Anonymous: rob () on Tuesday, January 19 2010 @ 04:25 PM PST  
Anonymous: rob

okay, i read the source code... i see how to do it but i'm not sure how it fits with the logic of the rest of the program. meaning that i think the fade values are getting reset everytime through the loop, so just setting it in normalFades() will only cause a fade once, say, at half past the hour.

having said that it should suffice to just hold the hour fade values rather than resetting them, unless of course other parts of the program assume that most of the time the two fades are going to be 0 and 63.

i have to get the development environment up somewhere, i've never messed with this stuff before.

and this probably isnt really going to look how i think it's going to look, but i suppose it's worth a try.





       
   
By: Windell (offline) on Tuesday, January 19 2010 @ 08:15 PM PST  
Windell

Okay, I've coded this* if you want to try it. I don't think the result is interesting, but I am open to suggestions.

(*not guaranteed to be bug-free.)

Find the following in your code:

PHP Formatted Code
 
    if (MinNow == 59)    // End of the hour, only:
    {
      if (SecNow == 59){
        HrFade2 = SecFade2;
        HrFade1 = SecFade1;
      }
    }
 


Comment that out and replace it by

PHP Formatted Code
      HrFade2 = MinNow;      // The hour hack itself:
      HrFade1 = 63 - HrFade2;



Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: Anonymous: rob () on Tuesday, January 19 2010 @ 10:42 PM PST  
Anonymous: rob

Quote by: Windell

Okay, I've coded this if you want to try it. I don't think the result is interesting, but I am open to suggestions.



well first i have to get the development env up and running. but yeah i can imagine that this does not look right. perhaps it would make more sense to simply move the hour hand to the next hour at say, 45 minutes past the hour. the thing that really throws me is that when i look at the clock at 10:55, it looks more like 9:55 due to the position of the hour hand.

i understand it's not an analog clock, but after 40 years of reading analog clocks a certain way, it's hard to unlearn Smile





       
   
By: Windell (offline) on Tuesday, January 19 2010 @ 10:57 PM PST  
Windell

>well first i have to get the development env up and running.

Just download the app; that's all there is to it. It's as easy as it gets.

>i understand it's not an analog clock

Yup. Read Hour, then Minute, then Second. Smile


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   
By: Anonymous: rob () on Wednesday, January 20 2010 @ 11:15 AM PST  
Anonymous: rob

Quote by: Windell

>well first i have to get the development env up and running.

Just download the app; that's all there is to it. It's as easy as it gets.

>i understand it's not an analog clock

Yup. Read Hour, then Minute, then Second. Smile



i'm thinking now that the only way to accomplish this nicely is to give up the second hand, repurpose it as the minute hand, and use the current minute hand as the hour hand. i'll have a hack on this as soon as i clear my other projects...





       
   
By: karlgg (offline) on Saturday, January 23 2010 @ 08:09 PM PST  
karlgg

i'm thinking now that the only way to accomplish this nicely is to give up the second hand, repurpose it as the minute hand, and use the current minute hand as the hour hand. i'll have a hack on this as soon as i clear my other projects...



Reuse the hour hand as the seconds, maybe? It moves quickly, anyway. Razz


I think I am, therefore I am... I think
Forum Mad Scientist
Mad Scientist

Status: offline

Registered: 01/25/09
Posts: 81

Profile Email    
   
By: Anonymous: rob () on Monday, January 25 2010 @ 05:19 PM PST  
Anonymous: rob

Quote by: karlgg

i'm thinking now that the only way to accomplish this nicely is to give up the second hand, repurpose it as the minute hand, and use the current minute hand as the hour hand. i'll have a hack on this as soon as i clear my other projects...



Reuse the hour hand as the seconds, maybe? It moves quickly, anyway. Razz



maybe, but the quest for analog-clockiness kind of precludes using the shortest hand for the second hand...





       
   
By: polossatik (offline) on Tuesday, January 26 2010 @ 03:42 PM PST  
polossatik

Quote by: rob

Quote by: karlgg

i'm thinking now that the only way to accomplish this nicely is to give up the second hand, repurpose it as the minute hand, and use the current minute hand as the hour hand. i'll have a hack on this as soon as i clear my other projects...



Reuse the hour hand as the seconds, maybe? It moves quickly, anyway. Razz



maybe, but the quest for analog-clockiness kind of precludes using the shortest hand for the second hand...



not if you reverse everything, mount the led's on the "solder side" so you can point the "hour (red)" ring leds "up" and then mount the plate with the "pointer" on the "front" side (above the red ring).

Then the red ring is the longest "shadow".

that leaves one thing left. the case, so for that you also need to mount the rings "under" the main pcb (and drill a few new holes for the buttons)

no?


Forum Apprentice
Apprentice

Status: offline

Registered: 01/21/10
Posts: 9

Profile Email    
   
By: driverblock (offline) on Monday, April 25 2011 @ 10:30 AM PDT  
driverblock

I got the half-hour hack working. I started a new thread here:
http://www.evilmadscientist.com/forum/viewtopic.php?showtopic=4551


Forum Apprentice
Apprentice

Status: offline

Registered: 04/25/11
Posts: 3

Profile Email    
   
By: Anonymous: Robert () on Thursday, March 01 2012 @ 07:51 AM PST  
Anonymous: Robert

This is a perfect example of a "gotcha".

If it is the morning, and you are tired, you do not need the clock telling you that you have an hour more to get ready than you actually do.

If you have a roommate, or guests, they will probably find this clock confusing. Decorative, yes, but not to be used for time-telling.

Perhaps, if nothing else, one could mount the LED ring in "crooked" so that the hour hand points halfway between hours or something.





       
   
By: Windell (offline) on Thursday, March 01 2012 @ 10:59 AM PST  
Windell

It's actually not "confusing." Once people realize that it's digital, they get the idea pretty quickly.

If you wanted to do something like this, you could make the two hour LEDs fade from one to the other, during the course of the hour.


Windell H. Oskay
drwho(at)evilmadscientist.com
http://www.evilmadscientist.com/

Forum Evil Scientist
Evil Scientist

Status: offline

Registered: 06/15/06
Posts: 1932
Sunnyvale, CA

Profile Email Website  
   



 All times are PDT. The time is now 10:06 PM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to Post 
Filtered HTML Allowed 
Censored Content 

Evil Mad Scientist Forum Archives — Read only!

Please visit our new forums for new discussions.


DIY Hardware for Electronic Art


The Original Egg-Bot Kit


Octolively
Interactive LED kits


Meggy Jr RGB
LED matrix game
development kit.


Business-card sized
AVR target boards


Peggy 2
LED Pegboard kits

My Account






Lost your password?