About me

Projects:

Parkour gym clock

Chroma

Strobr

Orientation Aware Camera

LED Life

OpenGL Experiments

3D Modeling

Miscellaneous

Parkour Clock

After doing several long, complex projects, this time I thought I would do something relatively simple. Something straightforward and useful that I could have done done in a month or two.

I take classes at a parkour gym here in town. They used to use a big LED wall clock that on the surface looked wonderfully useful, but turned out to have such a baffling interface that it was never used for anything but displaying the time. Since then, the instructors have been relying on stopwatches and phone apps to keep time for games, courses, and workouts. Those work well enough, but it seemed clear to me that it would be nice to have something that can be seen by everyone.

I settled on the idea of making what I imagined to be the gym's ideal clock. My goals were to make a reliable clock, stopwatch, and countdown timer that could be seen and operated from anywhere in the gym, and to make it as simple as possible to use. This idea also offered an opportunity to try out a number of things I'd been curious about; Sure Electronics' LED displays, Sparkfun's Nordic wireless modules, and Ponoko's laser-cutting service.

Since the majority of this project would be prefabricated and I was already pretty sure of which parts I wanted, I just went ahead and ordered all the major components before even getting started on any real design work. I got two of the P7.62 32X16 RG Bicolor LED Dot Matrix displays from Sure Electronics; I figured 4" tall digits were big enough to read from across the gym, and that putting the two together for a total of 64x16 pixels would be enough for a clock display. I got a DeadOn RTC clock module from Sparkfun; accurate, SPI interface, and built-in battery backup- perfect. I got a Nordic RF keyfob from Sparkfun and a matching Nordic nRF24L01+ wireless module; I just loved the look of the little keyfob, and figured I'd see what I can do with it.

The electronic design portion of this project was easy as could be. Basically all I had to do was supply power, and hook up the RTC, displays, and wireless module to a microcontroller. I already had some MSP430-F2274 micros on hand, so as the peripherals arrived, I took a several evenings with each one to familliarize myself with them and rough out some code to initialize and put them to use. Once I was comfortable with each of the pieces, it wasn't hard to put all them together.

The wireless module and the RTC each got one of the micro's serial interfaces to themselves. Since the micro only has two serial interfaces, and because they aren't very good at handling protocols that don't always work in multiples of eight bits at a time, the displays instead get a bit-banged interface on the micro's GPIO pins. The displays can be daisy-chained, so one interface is good for both.

I more or less completely sidestepped the issue of supplying power by simply buying a 5V regulated AC adapter- just what the display panels require (up to around an amp each)- and stepping it down to 3.3V for the rest of the electronics (up to just a few hundred milliamps) with a small linear regulator. Since there's no data pins from the displays to the micro, and since the displays are happy with 3.3V signals, the voltage difference simply wasn't an issue.

I prototyped the circuit on a breadboard, and once I was confident it was good, I transplanted the whole thing to perfboard. I laid out the piece of perfboard I bought with the diagram below. 5V power comes in through the display bus (orange), and gets regulated down to 3.3V (red) for everything else. Green is ground, and blue is signal. On top, in red, is the Nordic wireless module. Beside it are the 16-pin display bus header, and the 3.3V linear regulator. In the middle is the micro, on its breakout board. On bottom is the 14-pin programming header, wired to be connected to a MSP-FET430UIF emulator in self-powered Spy-Bi-Wire mode. Beside it, in red, is the RTC module, and beside that, a piezobuzzer. Since drawing this diagram, I modified the circuit to add in a small transformer to amplify the buzzer a bit.

Soldered together, the board looks like this:

It only took a couple week of evenings to get the software working pretty well. The RTC only reports the time to the nearest second, but it can be configured to output a 1KHz square wave, so I was able to connect that to a timer on the micro and configure it to keep track of milliseconds. I designed a bitmap font with all the digits and symbols I needed, and wrote a simple library to draw those on the displays. I also rewrote the firmware for the keyfob to give it a unique ID, to enable its auto-retransmit feature (which appears to have effectively boosted the reliable range around 50%), and to change the way it transmits packets. Now, as long as a button is down, it transmits a packet every 200ms with a count of how many ticks each button has been down for. I figured that would allow for holding down buttons (and much less problem-prone than button-down/button-up messages, in case of lost packets), and allow for button combinations (which I wound up not using).

The last stage of the project was designing a case. I decided that I wanted to build a wood case out of parts laser-cut from ponoko.com. Using Solidworks made a pretty easy project out of it, since I could instantly visualize exactly how all the pieces would fit together.

The split on the long top and bottom pieces (as you can see above), was simply so that I could fit all the pieces for the case into a single 31"x15" sheet of wood (Ponoko's largest). That left a little extra room, so I made spares of all the side pieces just in case, but they turned out to be unnecessary.

Since I was already getting the wood laser-cut, I figured I'd also try out some leather. I designed kaychains for the remote fob to label all the buttons, and a nice nameplate with the gym's logo. I experimented with both the raster (filled areas) and vector (lines) modes for the logo. Raster turned out much nicer, I think.

The only problem with using Solidworks is that the engineering drawings it produces require quite a bit of cleanup before they're suitable to be sent off to Ponoko. Still, completely worth it, just for being able to visualize the entire assembly. The designs I came up with worked perfectly, except that the wood wound up being a few hundredths of an inch thicker than I expected. Since I designed all the joints to be fairly snug, that meant I had to file out two sides of forty holes just a little bit to get everything to fit together.

The front of the clock, fully assembled:

Inside the back:

The back, closed:

And finally, the remote and its leather keychain:

Installed and in use at the gym. It doesn't show in the small picture, but it's really quite readable from every corner of the gym:

Up close:

 

Update:

After seeing my clock in use at the gym for several weeks, I noticed that the instructors seemed a little paranoid that they would lose or break the remote. They were always fairly explicit about handing it off to each other or putting it away in a known location. A side-effect of this was that the clock would often get left in stopwatch or countdown mode, and since the remote was put away it would stay that way for most of class.

So just as the point of the clock was to make something that everybody could see, it seemed clear that I should make it so everyone can use it as well. I had to make a big, durable remote that would never get broken or misplaced.

Something like this:

I got the giant red button from Sparkfun, the buttons from Jameco, and the case from the local electronic parts shop JB Saunders. (I realized too late that the case only fits together one way, and that makes the keyhole slots upside-down. Oh, well.)

As you can see, this was a very simple project. I just bought another keyfob, flashed on the exact same firmware as the original remote, and broke out each of its button pads to the big buttons.

One extra thing I had to do as add capacitors to debounce the switches- ordinarily I would do that in software, but here it looked like the switch bounce was actually causing the microcontroller in the fob to lock up and become unresponsive until I pulled the battery. A value of 0.047µF takes the micro's pullup resistors about 1ms to pull up to its logic high threshold voltage- a little bounce from the big button sill made it through that window, but nothing the software couldn't deal with.

 

 

As with all my projects, I invite you to reproduce, or even better, improve upon my work. If you do so, I'd love to hear about and see what you've come up with. Everything you need to know- source code, schematics, CAD files, and so on- is in the ZIP file below.

Download source (.zip, 1.9M)