Time Pulse

Click this image to return to the main index. This is a random little project I've had in the back of my head for a long time.
The idea was to show time passing, but instead of a traditional clock face or digits or lights representing binary, to use some kind of tactile feedback. A simple vibrate motor was an obvious choice - used as 'force feedback' actuators in video-game console controllers and as indicators in cell phones and pagers, these devices should be well known and easy to obtain.
Surprisingly, Digikey doesn't carry anything like what I was looking for. Sparkfun has one for five bucks each. All Electronics has a couple options available now for about as cheap as I've seen. Of course paying shipping on a one buck motor is questionable; see if you can find an old cell phone or pager to salvage parts from first.

The rest of the project is fairly straight forward; most of the complexity is in the software of the microcontroller.
Schematic diagram showing circuit that contains microcontroller and motor.
I briefly considered using a 555 timer chip to drive down the cost, but a microcontroller made counting minutes/hours/days a lot easier and I didn't need to fiddle with much analog stuff. A 555-based circuit would very viable for somebody who only wanted a heartbeat pulse without the extra timing.
The crystal frequency is an odd value because I prototyped the project on a development board I had left over from a project that was doing a lot of serial communication at 9600bps: 9600 * 1024 = 9,830,400, or 9.8304 million. I had to fiddle with the fuses on the microcontroller to get it to use the crystal - unfortunately I don't recall the exact settings.
The diode in parallel with the motor is there to catch back-EMF. The motor coil acts as an inductor and I do this trick with much larger motors - figured it couldn't hurt here. Similar idea with the 100uF capacitor on the power nets - that'll smooth out any noise from the motor and will provide quick power for the motor.
The 'SELECT' jumper is there because I was originally planning on putting an LED on the board as well and I wanted to be able to switch between it and the motor.

You can grab the source code here. (AVR-GCC C)

And here are some photos of the second prototype board:

I didn't really mean to hang the motor over the edge of the board like that; honestly, I was working quickly at the expense of detail.
The basic idea is this: there is a very faint pulse every second, a longer pulse every minute, a very pronounced pulse every hour, and a pulse that lasts nearly a full second when the day changes.
Setting the time is very simple: the device starts counting from zero when plugged in, so the user needs to attach the power source exactly at midnight. I haven't tested how much drift it has (there might be some bugs in the code that make this even worse, don't know) and this clock won't compensate for Daylight Savings. It's pretty dumb overall.
I'm using a Motorola BR50 Lithium Ion cell for power. It was salvage from a very crappy cell phone. In the photos above it's actually charging (it had self-discharged to 0.16 volts); the wires in the screw terminal of the device are for temporarily connecting it (via clips) to my bench supply.


DISCLAIMER
All content is owned by its respective creators/licence holders.
Unless otherwise stated, everything else: Copyright © 2009-2011, Chlazza