Close
0%
0%

Trinket Watch

A watch with an OLED display, powered by a Trinket

Similar projects worth following
My plan for this project was to make a digital watch powered by a Trinket. I'd seen a few watch builds on Hackaday before, and thought I'd take a stab at making one. The Pro Trinket is perfect for this project because of its size; it barely sticks out behind the 1.3" OLED. The parts for this project come out to under $50, so it's also relatively affordable.

The Trinket Watch is a fully-functional digital watch. You can use it as a stopwatch or even pass some time by playing Pong.

The UI is similar to most other digital watches. The center button cycles through different modes, and the top and bottom buttons perform other functions.

The "case" of the watch doesn't do very much protecting – I opted to have a more open design so that people can see the insides of the watch. And it sure is a conversation starter. The case does do its job well, though: it keeps the watch connected to the watch band.

I drew the schematic by hand, since I'm not experienced with Eagle or anything like that:

Note: The schematic's missing an optional on/off switch for the LiPo backpack, which is well documented in the instructions.

  • 1 × Adafruit Pro Trinket - 3V 12MHz $9.95 Adafruit PID 2010
  • 1 × Adafruit Pro Trinket LiIon/LiPoly Backpack Add-On $4.95 Adafruit PID 2124
  • 1 × Monochrome 1.3" 128x64 OLED graphic display $24.50 Adafruit PID 938
  • 1 × Lithium Ion Polymer Battery - 3.7v 500mAh $7.95 Adafruit PID 1578
  • 3 × Tactile Switch Buttons (6mm slim) x 20 pack $4.95 Adafruit PID 1489, for menu navigation

  • Final Touches

    davish01/03/2015 at 00:04 0 comments

    With everything electronically on the watch complete, today I added a much-needed power-switch and made a case. I went through a few iterations of that. First, I tried just making a box around the watch, but that was too bulky, and didn't let any of the hackiness of the watch show. So, I opted for a much more barebones design that doesn't protect the watch very much, but shows off the insides. The progression goes from left to right:

    You can see the final watch all the way on the right, but here's a close-up, on my wrist:

    Now that the watch is done, the next (and last) thing to do is film the demo video!

  • Putting it all together

    davish12/30/2014 at 03:53 0 comments

    Instead of waiting for the step-up regulator to arrive, I decided to put everything else together in a small package. First thing I did was cut down the leads on the OLED. Then, I soldered the SDA and SCL wires to A4 and A5, respectively. The reset pin was switched from 4 to 12, since 4 was on the other side of the trinket. I soldered Vin to pin 11 and Ground to pin 10. In the code, 11 is set to OUTPUT, HIGH and 10 is set to OUTPUT, LOW. This way, the wires don't have to stretch all the way across the board. After that, I soldered the backpack back on.

    The next thing to do was to solder on the buttons. I placed them on some PCB from RadioShack (I know, I know), and soldered them in. I then cut off the extra board so it would be less than height of the watch, and then soldered leads for the three digital pins to the other side of the switches. After soldering that all together, soldering the ground lead, and bending the wires to "smush" everything together, I had something that resembled a watch:

    Since the RTC currently isn't integrated, the next thing was to find a way to set the time. C++ adds a string constant, __TIME__, that represents the time in HH:MM:SS format. I parse this string, and set the hours, minutes and seconds to the right value. I wrote a function, adjustInternalTime(), that increments milliseconds using millis() and increments seconds, minutes, and hours accordingly. The last thing I added was a new mode for changing the time. It looks pretty similar to the digital clock view, but it's in 24-hour mode and tells you if you're incrementing hours or minutes. A video, showing off the new form factor as well as an overview of the software as it stands, is below:

    Next thing to do is to make an enclosure and watch strap. This'll be a little tricky since it can't be too bulky.

  • From Uno to Trinket: Some Problems

    davish12/26/2014 at 05:23 0 comments

    Now that all the parts are proven to work on the Uno, it was time to move it all over to the 3.3V trinket. The screen and buttons worked perfectly fine, but it turns out that even though the DS1307 RTC works fine with 3.3V on its I2C pins, it still needs 5V input voltage; hooking it up to 3.3V just gives a random date that doesn't change. It doesn't seem like there's a way to get around this, so I've ordered a 5V step-up regulator from Pololu. Hopefully, that'll trick the RTC into behaving properly. While I'm waiting for that to arrive sometime next week, I'll be working on a case to be 3D-Printed, and refining some of the code.

  • Real Time!

    davish12/26/2014 at 05:19 0 comments

    I started off today by soldering together the DS1307 RTC kit and hooking it up to the Uno. After running the example program that sets the time, I wrote a function called updateTime() that takes the place of demo(), but hands off the actual time instead of the minutes looping over and over. This worked out fine, and as of now, the Trinket Watch was a functioning bedside clock! I also polished off my stopwatch mode, which works just fine. Video below, with some more Pong as well:

  • Back to the hardware

    davish12/25/2014 at 05:10 0 comments

    After a long day of traveling I come home, check Hackaday, and realize that I won the fourth drawing for the EDC contest! That definitely made my day. To follow up my "victory" (if you can call getting randomly chosen a hat a victory), I loaded up all the code that I wrote while I was away (I ported the JS to Arduino's Processing language on the plane). The analog clock face works just as well as the digital one.

    Read more »

  • Emulator

    davish12/21/2014 at 20:39 0 comments

    From now until Wednesday, I won't be around to work on the physical watch. The same will be true from Saturday through New Years. Such are the holidays. So, to make sure I'm not completely wasting my time, I decided to write an emulator to test on. You can find it at it's current stage on Dropbox, and check out the source in this project's GitHub Repo. Both links are in the sidebar.

    It turns out Adafruit's Graphics Library doesn't have any documentation to my knowledge: I have to find out how shapes are drawn by writing the code and testing it out on the display itself. Not wanting to wait four days to get something done, I decided to write a little emulator for the OLED display.

    Read more »

  • Basic OLED Watch Code Completed

    davish12/19/2014 at 05:15 0 comments

    After I tested the OLED in the last entry, I decided to code up a function that would display a time in a relatively pretty way. I started by just finding the part of the Adafruit example code that renders text on the display, and changed it to print out a string, formatted (HH:MM):

    I then looked at the example code for the RTC module, and it showed that the values from the RTC are put into a Date object, where you can get the hours and minutes from, as well as Unix time. I wrote code that took variables with seconds and minutes and added one minute to the time every 200 milliseconds. Here's the outcome:

    (I apologize for the vertical video).

    All of my code is now on GitHub, so feel free to check it out! The link will be in the sidebar.

  • OLED Up and Running!

    davish12/19/2014 at 03:03 0 comments

    OLED works! Next step is to write a small program for the OLED that displays a dummy time, in digital for now, and have it count up minutes, to see if it updates correctly. When that works, I know I can move on to making the RTC kit and wiring that up.

  • Parts Arrived!

    davish12/19/2014 at 01:36 4 comments

    Parts arrived from Adafruit today! Pictured is all the main components, plus a gyroscope that I accidentally included in the snapshot. After checking the pins on the RTC, it looks like it takes 5V. Well, that won't work well with the 3.3V trinket and 3.7V battery. After some research, it looks like it can work with 3.3V logic by not soldering in the two pullup resistors. Easy enough. And for the voltage input? Let's hope that when Adafruit writes that it "works best" at 5V, it actually works at all at 3.3V. Hopefully I can test the OLED tonight with an Uno, and possibly poke around with setting the RTC.

  • Quick Calculation

    davish12/18/2014 at 17:10 0 comments

    Tabulating up all of the thicknesses of the components for the watch, it seems like if everything is just stacked on top of each other, the thickness of the watch will be 18.75mm. Putting the backpack and trinket side-by-side, it comes out to a slightly more reasonable 16.75mm. The watch I currently wear is around 15 or 16mm, so it shouldn't be as unwieldy as a 2cm thick watch sounds. I'll see different ways I can arrange the parts once they arrive later today.

View all 11 project logs

  • 1
    Step 1

    Prepare the Display

    Solder wires to the OLED display pins Data, Clk, Rst, Vin and Gnd pins.

    Since we're using I2C, you'll need to solder together the two pads on the back of the OLED display. (Picture c/o Adafruit)

  • 2
    Step 2

    Connecting the display

    Now you'll connect the display to the Trinket. Connect Data to A4, Clk to A5, Rst to 12, Vin to 11 and Gnd to 10.

    At this point, you can run Adafruit's OLED example code to make sure that everything is connected properly.

  • 3
    Step 3

    Backpack

    Now solder the Trinket LiPo backpack to the trinket. To keep the thickness down, the backpack will be next to the Trinket, not on top of it.

View all 11 instructions

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates