Author Topic: Clock of clocks  (Read 470 times)

0 Members and 1 Guest are viewing this topic.

Offline starvatorTopic starter

  • Beginner
  • *
  • Posts: 1
  • Helpful? 0
Clock of clocks
« on: March 02, 2013, 04:27:01 PM »
Inspired by a clock design ( http://humanssince1982.com/the-clock-clock/ ), I want to make one myself, yet do not really know where to begin.

Basically, I want to be able have 2 hands on a clock independently controlled to rotate to a predetermined location every 60 seconds.  After quite a bit of research, I came across servos and thought those could be useful to control the hands, then I needed a way to control them and came across arduino boards.

I am not exactly sure if this would be a proper approach to such a situation.

Anyone have any beginner tips? Tricks? Can someone point me in the right direction?

I have no knowledge in mechanical engineering, this is my first project!

Thanks a bunch!

Offline newInRobotics

  • Supreme Robot
  • *****
  • Posts: 1,015
  • Helpful? 48
  • N.I.R.
Re: Clock of clocks
« Reply #1 on: March 04, 2013, 03:32:02 AM »
Hi and welcome :)

If You want to have same setup as in the link You've provided - (for the simplest approach I can think of) You are going to need 24 clocks, 2 servos per clock (1 for each arm You want to move), so 48 servos. To move clock arms You want to use 360 (continuous rotation) servos. To run that many servos you will need 48 PWM (Pulse Width Modulation) channels, to have all these channels in hardware is unreasonable and expensive in this case as servo position is going to be updated only once a minute, so, I think, You would be able to get away with software PWM only, in which case You need to get microcontroller with 48 I/O ports and at least 1 timer, or better, 1 RTC (real time clock).
"Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian W

Offline jwatte

  • Supreme Robot
  • *****
  • Posts: 1,273
  • Helpful? 79
Re: Clock of clocks
« Reply #2 on: March 04, 2013, 11:46:19 AM »
A single 328p AVR chip can do 18 I/O pins, leaving two pins for I/O (either I2C or UART.) Even with SPI, it can do 16.
Three of those would be all you need to drive 48 analog RC servos. They only cost about $3 each.
You could even run them on the internal resonator (at 8 MHz) for low component count, and that'll give you another 2 I/O pins if you want them.
The best way to generate PWM out of a 328p is to disable interrupts, then generate all the PWMs you need in parallel in a tight loop, counting cycles rather than looking at a timer. (A fast timer is good, too, if you're lazy -- half microsecond resolution is simple to achieve that way.)
When the PWM is done for all the outputs, enable interrupts. This turns off interrupts 2 milliseconds out of every 30 milliseconds (or whatever your update rate is.)
The communications protocol from whatever controller you use will have to use acknowledgement from the receiver, as sending more than one byte to a chip that has interrupts off will drop bytes.


Get Your Ad Here