Shop OBEX P1 Docs P2 Docs Learn Events
Controlling hands of a clock — Parallax Forums

Controlling hands of a clock

jtrzjtrz Posts: 40
edited 2008-05-08 16:12 in BASIC Stamp
Hi all,

This actually has nothing to do with·making the hands of an analog clock move on a regular basis as in the case of an actual clock moving every minute.· So I'm hoping this could be easy...

Let's say I have an analog·clock face with only an hour hand and a minute hand.· I have a small keypad where I type in something like this "1238".· That means I want the clock·to show 12:38 with the hour hand at the 12 and the min hand at 38.· That's it:··(a) interpret the time to be displayed and (b) move the hands to that time.·

Now the movement doesn't have to have an actual movement like a clock where the min hand would spin a number of times and the hour hand would track with it, eventually getting to the right time.· It could simply be that the hands of the clock move independently to their assigned·numbers.

Additional bonus points awarded to those of you who can come up with a solution that does not involve a center "axle" for the hands but looks like it has an axel on it.· [noparse]:)[/noparse]·

One thought I had might be this...hands are NOT connected to the center axel.· Move the tips of the each hand to their appropriate numbers then move the other end of each hand to the center.· Looks like a clock where the hands are connected to the center axel but they are not.

I know this sounds strange.· But please don't ask me to explain it [noparse]:)[/noparse]· Don't worry.· It's only for entertainment purposes.

As always, I thank you in advance for any help/ideas!

Thanks!

John

Comments

  • ercoerco Posts: 20,259
    edited 2008-05-08 03:27
    I don't need bonus points! But you need 2 coaxial shafts, just like an analog clock. Simple and effective. Each shaft has a hand and a small gear (N teeth) attached to it. Two standard servos with a larger gear (2N or more) teeth drive them. This way a servo that only rotates 180 degrees or less can rotate the smaller driven gear a full 360 degrees. Then program a Stamp to monitor keypresses, interpret the digits, and drive servos accordingly with pulsout commands. Straightforward for any BS2-class chip using 12 I/Os (10 digit inputs, 2 servo outputs).

    This will drive the hands backwards (CCW) at times, but it's a simple solution. Your only solution thus far...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·"If you build it, they will come."
  • Lee HarkerLee Harker Posts: 104
    edited 2008-05-08 13:59
    I think for accuracy you would want to use 2 stepper motors.·One for each·clock hand.·If you wanted to move the hands without a center axle showing, you could have two concentric shafts behind the face with magnets attached to make the hands follow. The shorter hour hand could follow a track that is inside the track of the longer minute hand.
  • jtrzjtrz Posts: 40
    edited 2008-05-08 16:12
    Thank you erco! You are truly a genius at making things like this seem easy!

    Looks like I'll be taking apart a clock to see how it ticks and using that as my basis for this,

    Thank you too Lee! I appreciate your idea!
Sign In or Register to comment.