ILAMtitan 86 Posted April 12, 2013 Share Posted April 12, 2013 I figured you guys might be interested in some of my tinkering with the Launchpad. Hopefully by putting a few of my projects up here it will also keep me accountable for finishing them. This is one a cobbled together a few months ago. It's been up on the MCU projects page on E2E, so you might have already seen it: http://e2e.ti.com/group/microcontrollerprojects/m/msp430microcontrollerprojects/664670.aspx PROJECT OVERVIEW The Vetinari clock is from a book series known as Discworld, where Lord Verinari has a clock in his waiting room which has an irregular tick. The idea of the clock is to add a sense of unease and anxiety to anyone in the waiting room since their brain doesn't filter out the ticks like a normal clock. Here's a video to get a better idea of the result. The tick is actually a lot louder in person. SOFTWARE DESIGN To accomplish this task on a 430, we create an array of possible time frames to tick the clock, and parse through it at 4Hz. The array is 32 entries long, so it equates to 32 seconds in the real world. By randomly setting 32 of the elements high, we create a timing sequence. A high element will generate a tick of the clock. This means a second on the clock can be as little as 250ms, or as long as 24 seconds, and still keep accurate time. Check the attached software too see how it's all done; I did my best to comment it up. main.c HARDWARE DESIGN The clock coil is driven via an alternating polarity pulse. The easiest way to change a load's polarity with an MCU is using an h-bridge. The schematic shown is a simple implementation using two NPN and two PNP transistors. I had the transistors and drive resistors laying around, so this part was easy to cobble together (along with the half used battery holder). It would be easy to use a single IO pin per side of the bridge, but the transistors fit better onto the launchpad, as shown in the image. To add the driving resistors in series, I cut a small gap in the traces, scrapped off the solder mask on either side to make pads, and put down a small SMA resistor. It's not pretty, but it works. In the clock mechanism, there is a small control board with a crystal and epoxy glob IC that normally runs the clock. I just ripped that out and directly attached the coil to the h-bridge. The resulting clock is actually more maddening than I expected in a quiet environment. By using 3V rather than the 1.5V that the original movement used, the ticks are much more pronounced and do an excellent job of ruining a person's calm. vicvelcro, izdane, JVimes and 14 others 17 Quote Link to post Share on other sites
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.