Skip to content

How to make a watch

February 27, 2012

How hard would it be to make my own watch, using off-the-shelf components and some custom coding?

IMG_0836

I often travel across the country, and in the last few years I have iterated through a substantial number of watches that try to make travel easier by keeping track of multiple timezones. The more expensive watches kept breaking (I’m looking at you, low quality Tissot leather straps), and so far the best I’ve found is a cheap Casio retro 80’s calculator watch. You can see two timezones at the same time, and the watch has a nice backlight to use in the dark. The calculator keypad nicely adds geek cred to the look, and I like it.

But, I think I can make a better watch myself. How hard could it be?

STEP 1: Find a suitable micro-computer to use as a watch

After looking at a bunch of interesting watch-platforms, I have decided to use a $30 Sandisk Sansa Clip+ MP3 player as the basis for the watch. Firstly, it’s small enough to fit on my wrist. Secondly (and most important of all) it supports the open source Rockbox firmware, so I can easily develop my watch application. Finally, it looks nice, and has a bright two-color OLED display that I can use to show multiple timezones on the same screen. The iPod Nano also looked good as a possible platform, but it doesn’t support custom firmware and there is no way to keep the screen lit up all the time. I doubt there’s a Jailbreak for the Nano, so lets go with the Sansa.

9448449_sb

Step 2: Find a suitable wrist strap for the new watch

OK so now I have to find a way to attach this little gem to my wrist. Something light, comfortable and not too expensive – and this strap from STAMP watches fits the bill just right. It’s an ideal fit for the Sansa player, which I can attach to the strap using the clip on the back of the device. The strap was $20 at Macy’s, and as a bonus, you can pick one in any color you like (I went with black).

STAMPS strap

Step 3: Prepare the software to power the watch

This is a simple customization job, as much of the work has already been done by the fine team behind Rockbox. However, there isn’t a multi-time-zone app in the default Rockbox installation, so I will need to write it myself. But first things first – I need to install the Rockbox development environment on Mac OS Mountain Lion. Here’s my step-by-step guide:

  1. Install GIT on Mac OS. GIT is a tool to download the source code for Rockbox, amongst other things.
  2. Download the Rockbox source code using GIT. This is about 50Mb in size and shouldn’t take long.
  3. Install the GCC compiler. You will need a free Apple Developer account to download the toolkit, but you don’t need the entire XCode – just the command line tools.
  4. Install the AutoMake and AutoConf scripts. I copy/pasted the command line commands from that page and everything worked well.
  5. In the tools folder of the Rockbox source code, run “sudo ./rockboxdev.sh” script and watch the build magic take place. Make sure to select the “a” option during configuration to specify the ARM kernel for the Sansa device.

Rockbox compilation

Success! Now the source code is ready to compile into a binary format ready for the Sansa Clip+. Here’s another quick guide:

  1. In the Rockbox source folder, create a build folder “mkdir build;cd build”
  2. Run the configure scripts “../tools/configure” and select “62” as the option for devide (Sansa Clip+) and “N” for Normal build.
  3. All configured? Run the make scripts .. “make” and watch the compiler output scroll by.
  4. Finally, run “make fullzip” to get the install image for the device.

With all this done, I have the software image to install Rockbox on the Sansa Clip+. Yes, there is of course a quicker way of getting the default build onto the device, but since I will be modifying the source code, it’s essential to have the development environment set up first.

Step 4: Write my own clock app with support for multiple time zones

The Sansa Clip+ display supports two colors, a row in orange at the top, and a row in blue at the bottom. This dovetails nicely into my requirement to have dual timezone displays on the watch. However, I don’t need to write my app from scratch – in fact, it’s much simpler to modify the existing Clock app and make it look the way I want it on the Clip+ screen.

The source files for the Clock app are in the “rockbox/apps/plugins/clock”, and the source file I’m looking for is “clock_draw_digital.c”. There are three modes of display for the clock (Analog, Digital, Binary) and I’ll start modifying Digital first (I’ll get to the Binary mode later). It’s fairly easy to read the code (thanks to original developer Kévin Ferrare) and the changes didn’t take up much time.

A quick shortcut to compile and install the code onto the device in one command line, and set Clock to auto-run (your folder structure may vary)

make -j; make zip; rm -R /Volumes/SANSA\ 4GB/.rockbox; unzip ~/Desktop/tmp/rockbox/rockbox/build/rockbox.zip -d /Volumes/SANSA\ 4GB/; cp /Volumes/SANSA\ 4GB/.rockbox/rocks/apps/clock.rock /Volumes/SANSA\ 4GB/.rockbox/rocks/apps/autostart.rock; diskutil unmount /Volumes/SANSA\ 4GB

Download the improved source code, with added support for multiple time zones, here.

Step 5: Putting it all together

Actually, this is the simplest step here. After updating the source code for the Clock app, re-build the code (“../tools/configure; make; make fullzip”) and deploy the finished version to the device. I find that it helps to set the screen in “never-dim” mode so that it always stays on, and add the Clock app to the auto-start (define #AUTOROCK# in main.c and copy the compiled clock.rock to ./rockbox/rocks/apps/autostart.rock) so that it starts every time the watch is powered on.

The battery in the Sansa Clip+ works for a good 16-18 hours with the display on at full brightness, which suits me just fine for a full day of wear. I’m quite pleased with the final results, it looks great, the screen is easy to read in any lighting condition (even in bright sunlight) and it helps me easily keep track of two timezones.

Finished watch

Hurray! The watch works, and I’m very happy with it. It charges via USB, has a built-in music player (and a micro-SD card slot for music) and fits well on my wrist. As an added bonus, I have changed the Binary display mode so that the rows of dots are nicely aligned on the Sansa screen, as you can see on the image above, the top row of dots is orange (hours) and the bottom two rows (minutes, seconds) are blue. It takes a couple of days to natively read the binary display, but it’s a nice conversation starter and well worth doing.

Last but not least, consider putting a touch of Gorilla glue (or superglue) on the clip that attaches to the strap, to lock in in the closed position. The strap will thread through perfectly, and the clip won’t accidentally open when the watch accidentally catches on something. Enjoy the finished results!

Advertisements

From → Uncategorized

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: