DIY Smartwatch: Soldering SMD

Going into this project I knew I would have to do a lot of surface mount soldering to save space and money.  I used the smallest SMD hand-solderable packages and still ran out of space!  I’ve never been particularly good at soldering, but knew that I would have to become much better to tackle the types of projects I’m interested in.  In anticipation of this, I splurged and bought a very nice soldering iron from Radioshack.  I cannot express how great this iron is!  I’m used to using cheap, $10 irons that just need to get the job done, but with the fine tip on my new one, SMD wasn’t difficult at all!  Below is a picture of the board with most of the components soldered on.


You’ll notice that I haven’t yet soldered on the accelerometer.  That’s because QFN packages are much smaller than I anticipated, even with a fine tipped iron.  In order to solder this, I’d probably need solder paste and a hot air station, something I’m not quite ready to drop $100 on yet.  Not sure what I’m going to do about that, especially since I’m going to need the accelerometer to minimize power usage.

DIY Smartwatch: Improvements for V2

From the current progress I’ve already made on this project, I can already see a lot of mistakes and things that will need to be improved for the second PCB.  Below is a list of the ones that immediately come to mind.

  • Possibly use the onboard voltage regulator on the Adafruit display
    • The Adafruit display board already has a 3.3V regulator for the screen logic, using this would mean one less part that I need and would give me a tiny bit extra space.
  • Maybe just switch to the E-Ink display to save power
    • I was very dismayed by the enormous amount of power the screen uses.  Even if I get tricky and heavily optimize the screen usage, I’m not sure how long I can get the battery to last.  This is a last ditch solution and would probably involve an entire re-layout of the board.
  • Use through holes for the battery instead of a connector
    • The battery connector is the tallest component on the board aside from the connectors, getting rid of it would mean I can make the uber-thick watch a little bit thinner.  Since I have verified that the battery charging circuit works, I just need to decide which battery will be used I should then be able to solder it in permanently.
  • Use micro USB instead of mini
    • Same thing as above, the mini USB is pretty tall.  A micro USB connector didn’t seem much harder to solder and would give me a little extra space.
  • Get rid of reset button
    • When I’m entirely done programming the watch, I’ll most likely give it a simple case, making the Reset button entirely inaccessible anyway.  It might be better for space to replace the button with a test point.
  • Add real-time clock
    • With the added space from removing components, there might be room for an RTC that could be used to keep better track of time.
  • Enlarge accelerometer pads for easier soldering
    • As previously stated, the accelerometer is very difficult to solder, especially without a hot air station.  If I don’t decide to buy one, another option might be to enlarge the pads for the accelerometer chip connections so it is easier to touch with the soldering iron.
  • Move tall components away from microSD slot on display board
    • In line with the USB and battery connections, I need to plan ahead so that the top boards fits better with the bottom board with less wasted space.
  • Silk screen labels
    • Since I rushed to ship out the board for fab, I didn’t take the time to properly and clearly label all the components on the board.  Doing so would make identifying what needs to go where much easier and would make debugging simpler if I know what vias are attached to what.
  • Test points
    • It would probably help to have some dedicated test points to make sure the circuit is behaving as it should be.

DIY Smartwatch: Screen Current Draw

To give a better idea of the power budgeting I’ll be working with, I wrote a small test program to cycle through various percentages of the screen set to white with varying brightness levels.  Since black pixels on OLED displays are completely turned off, they consume no power and so a power saving method is to use darker tones.  That is why I’m testing the screen at various “ON” percentages.  As for the brightness, this display uses a 4 bit value to determine how bright the display will be set to with the brightness being in increments of 1/16.  Below is a table relating current draw to percentage of the screen on and the brightness for a 5V supply.

0/15 1/15 2/15 3/15 4/15 5/15 6/15 7/15 8/15 9/15 10/15 11/15 12/15 13/15 14/15 15/15
0% 6.1 mA 6.4 mA 6.5 mA 6.7 mA 6.8 mA 6.7 mA 6.8 mA 6.8 mA 7.0 mA 7.1 mA 7.1 mA 7.1 mA 7.2 mA 7.4 mA 7.4 mA 7.4 mA
25% 17.1 mA 20.8 mA 24.9 mA 29.1 mA 32.8 mA 36.2 mA 39.9 mA 42.4 mA 44.3 mA 46.2 mA 47.9 mA 49.0 mA 49.7 mA 52.1 mA 52.6 mA 53.4 mA
50% 28.1 mA 35.5 mA 43.5 mA 51.4 mA 58.8 mA 65.7 mA 73.5 mA 79.7 mA 81.9 mA 85.3 mA 89.2 mA 91.2 mA 92.6 mA 97.1 mA 97.8 mA 99.6 mA
75% 39.6 mA 50.7 mA 62.6 mA 74.2 mA 85 mA 95.6 mA 107.5 mA 118.8 mA 121.3 mA 125.4 mA 131.2 mA 134.4 mA 141.5 mA 143.2 mA 144.4 mA 146.7 mA
100% 51.1 mA 66.2 mA 82.2 mA 97.1 mA 111.5 mA 125.5 mA 139.2 mA 152.6 mA 160.8 mA 167.3 mA 174.3 mA 177.7 mA 186.8 mA 189.2 mA 191.5 mA 195.2 mA

That’s quite a lot more than what I originally thought the display would draw.  It looks like I’m going to have to do some serious power budgeting to make up for this.

DIY Smartwatch: Code Hosting

While I was waiting for my board to come in, I started playing with the screen, learning about Adafruit’s library as well as designing the watch interface and visuals.  I’ve created a Github repository to host all of the test programs, image files, and final code.  I’m currently using a modified Adafruit GFX library and the SdFat library, but will probably strip out the code not required for my application and start using a custom display library soon.

DIY Smartwatch: Board Layout

After the circuit design comes the hard part, the board layout.  I went through several iterations of trying to fit all of the different components on the board but essentially based the design around the Bluetooth module, which I knew I wanted on top, the screen header, which I wanted on the bottom, and the buttons which I wanted on the right side of the watch.  Below is the fruit of many hours of labor.  The board design is actually the stage which decided the final components I would use.  During the circuit design phase I had included an RTC and crystal oscillator, but as you can see below, there wasn’t really any room for it.  I also figured that the internal oscillator on the AVR is reasonably accurate and the time could be included in a data packet sent from the phone.

The top layer of the board is a 3.3V pour and the bottom is a ground pour, but after adding all of the components to the board I noticed that the power would have to take a rather circuitous route to reach some of the components on the right side.  To remedy this, I decided to add some last minute capacitors and shift some components around to provide better connectivity.  However, in my rush I ended up making a few minor mistakes.  Namely I placed several capacitors and components directly under the Bluetooth board.

And here are the fabbed boards!  I ordered them from Fusion PCB since they are the cheapest option I could find and provided a quantity of ten boards in the event I made a lot of soldering mistakes.  I only glanced at a few of the boards but am very satisfied with the quality.  The only downside of their service is the turnaround time.  It took twenty days from day of order to day of delivery, which is reasonable since they’re based in China, but can be frustrating if you need to make multiple iterations and improvements.

DIY Smartwatch: Circuit Design

This post is meant to be an explanation of the final schematic for my Smartwatch board, version 1 with a bit of reasoning behind each component and my reasoning behind why I did what I did.

Total Schematic Overview

This is just the reset button, connected to reset the AVR and BLE module.  I also originally tied the screen reset to it as well until I realized the Adafruit screen library required it to be connected to a GPIO.

This is the vibration motor circuit.  Since the motor uses up to 85mA, about twice what the AVR can supply, it’s hooked up to an N-MOSFET to amplify the current.  I also hooked up the gate of the MOSFET to a PWM pin on the AVR in case I don’t need the full vibration.  There is also a diode and capacitor attached to the leads of the motor to help reduce noise and prevent large voltage spikes.

Next are the switches.  The four-pin box above is actually a navigation switch with each pin being a connection for up, down, and press actions.  Since the AVR has built in internal pull-up resistors, the switches are all tied to ground.  I also quickly ran out of interrupt pins (there are four or five on this AVR but they also doubled as communication pins that I needed for other things) so am using PCINT pins instead.  I have never used these before and they aren’t built into the Arduino toolchain so we’ll see how using them goes.

Here is the BLE module in all of its low power glory.  I grabbed the eagle part over from the same place I got the breakout board and used his design as a reference.  There are debugging LEDs on the TX, RX, and Connect lines to show the status of the BLE module, but odds are I won’t be keeping these since LEDs take several mA and I won’t have power to spare.

Above is the power regulation circuit.  It takes the battery (3.4V – 3.7V) and regulates down to 3.3V.  I also added a power switch at the last minute in case I want to solder the battery leads directly onto the PCB.

This is the charging circuit.  It takes 5V power from the USB port and feeds it to a chip that handles the charging for me.

Next is the cheap 3-axis accelerometer I’m hoping to use for a good deal of the interactivity of the watch.  However, it is a secondary feature so if I messed up it’s not too big of a deal.

Here’s a simple brightness-detection circuit.  I want to automatically control the brightness of the screen as a means of saving power so I’ve hooked up a photoresistor in a voltage divider circuit with the output being sent to an analog pin on the AVR.

This is just the header for the screen.

Lastly is the AVR itself.  In addition to the connections I’ve already covered there’s also a voltage divider connected directly to the battery as a simple means of detecting the battery voltage as well as the USB data pins in the hopes that I can load the Arduino bootloader and program the watch directly from the computer.

DIY Smartwatch: I’ve got competition!

So it looks as if I’m not the only one looking to design a fun, interactive watch.  A very cool OLED watch was recently featured on Hackaday.  It has all sorts of features crammed into it and looks like was an impressive amount of time and effort put into making it.  Watching a video of the watch in action gave me lots of thoughts about what to implement in my design and reading his write-up gave me a chance to compare my methods and parts against his.  Overall I really like his design and what he did with such little space, and I would ultimately like to achieve the level of detail, quality, and battery life that he did, though with a slightly bigger package.

That being said, my design remained relatively unchanged after looking at his, mainly because we are attempting to accomplish different tasks and most of our circuitry was already similar.  I did update my design to use the navigation button seen on his watch, but that will have little effect in the long run.

DIY Smartwatch: Other Components

With the main component of the watch being chosen, it’s now time to choose everything else that will go into making this watch.  Since I chose a higher end screen, I’m going to shoot for other nicer components in order to get the most functionality out of it.

First off is the processor.  I chose an Atmega32u4 for several reasons.
  • I’m very familiar with Arduino and AVR programming, plus the Arduino community has phenomenal support so I wanted a chip that was also on an Arduino board, namely the Atmega328p or Atmega32u4.
  • I chose the Atmega32u4 because it has more pins, more memory, more Flash, and a built in USB core which would mean no extra chip required for USB programming.  The extra memory and Flash are also a plus since graphical programming result in a pretty large memory footprint.
  • As an added plus, the Atmega32u4 has a way to internally change the processor speed so if it becomes an issue, I can speed up the chip when I need a speed boost.
For the Bluetooth 4.0 module I chose a module from FastTech mostly due to the fact that someone had already done all of the hard work, making an eagle component and breakout board.
I also decided to use this accelerometer from Sparkfun since it was the cheapest that they have and also has orientation and shake interrupts that I foresee using in the watch.
I decided to use this vibration motor from Sparkfun since it was already in their eagle library and I was making a purchase from them already.
I added the LiPo charging IC found on this board for to charge my battery directly from USB power.
And for the last of the major components I’m using a generic photocell to detect brightness
Aside from that I have a few other minor components such as regulators, headers, transistors, and passive components with a full BOM to be posted later.

DIY Smartwatch: Silent but not Idle

It may have been over a month since I’ve posted anything, but I’ve certainly been productive in that time!  I’ve gotten quite a few things done including making the bill of materials, circuit design, and board design as well as ordering everything I should need for the finished product.  Now that I’m waiting for everything to arrive, it’s time to catch up on the documentation.

Over the next few days I’m going to try and write posts for how I established all of the other components to include in the circuit, how I designed the circuit itself, and how I designed the board.  The lines between these topics also became quite blurred as I went on so I’m only going to cover the finished product and briefly discuss how I arrived there.

In the past month another DIY watch similar to what I plan also popped up over at Hackaday so I may also take a post to comment on what I liked from that design, what I didn’t, and overall what I thought of it.

Lastly, I noticed a pretty neat competition over at Instructables that I may try and enter, assuming I finish by the Nov 11th deadline.  Grand prize is a new laptop, 2nd gen Nexus 7, and quadcopter.  It looks like the requirements are very broad, it has to be designed with a microcontroller, so hopefully I’ll be entering this watch as well as my Pi on the Face project.